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

user_update.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: 1.5 $ */
00025 if ( $action == 'update' ) {
00026     if ( CheckJrn($g_dossier,$g_user,$p_jrn) < 2 ) {
00027       NoAccess();
00028       exit -1;
00029     
00030     }
00031     // p_id is jrn.jr_id
00032     $p_id=$_GET["line"];
00033     echo_debug('user_update.php',__LINE__," action = update p_id = $p_id");
00034     echo JS_VIEW_JRN_DETAIL;
00035     echo JS_CONCERNED_OP;
00036     $r ='<FORM METHOD="POST" ACTION="user_jrn.php">';
00037     $r.=UpdateJrn($cn,$p_id);
00038     $r.='<INPUT TYPE="Hidden" name="action" value="update_record">';
00039     $r.='<input type="SUBMIT" name="update_record" value="Enregistre">';
00040     $r.='</FORM>';
00041     echo '<div class="redcontent">';
00042     echo $r;
00043     echo '</div>';
00044   }    
00045 if ( isset($_POST['update_record']) ) {
00046   // NO UPDATE except rapt & comment
00047   UpdateComment($cn,$_POST['jr_id'],$_POST['comment']);
00048   InsertRapt($cn,$_POST['jr_id'],$_POST['rapt']);
00049   echo '<div class="redcontent">';
00050     ViewJrn($g_dossier,$g_user,$p_jrn,"user_jrn.php");
00051   echo '</div>';
00052 
00053 } // if update_record
00054 ?>