noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
stock_inv_histo.inc.php
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  *   This file is part of NOALYSS.
00005  *
00006  *   NOALYSS is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License as published by
00008  *   the Free Software Foundation; either version 2 of the License, or
00009  *   (at your option) any later version.
00010  *
00011  *   NOALYSS is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU General Public License
00017  *   along with NOALYSS; if not, write to the Free Software
00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00022 /**
00023  * @file
00024  * @brief history of manuel change
00025  *
00026  */
00027 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00028 if ( isset($_POST['del']))
00029 {
00030         if (isset($_POST['ok']))
00031         {
00032                 if ($g_user->can_write_repo($_POST['r_id']))
00033                 {
00034                         $cn->exec_sql('delete from stock_change where c_id=$1',array($_POST['c_id']));
00035                 }
00036                 else
00037                 {
00038                         alert("Vous ne pouvez pas modifier ce dépôt");
00039                 }
00040         }
00041         else
00042         {
00043                 alert("Opération non effacée: vous n'avez pas confirmé");
00044         }
00045 }
00046 $profile=$g_user->get_profile();
00047 $a_change=$cn->get_array("select *,to_char(c_date,'DD.MM.YY') as str_date from stock_change as sc
00048                         join stock_repository as sr on (sc.r_id=sr.r_id)
00049                         where sc.r_id in (select r_id from profile_sec_repository where p_id=$profile)
00050                 order by c_date");
00051 $gDossier=dossier::id();
00052 ?>
00053 <div class="content">
00054 <table class="result">
00055         <tr>
00056 
00057                 <th>
00058                         Date
00059                 </th>
00060                 <th>
00061                         Commentaire
00062                 </th>
00063                 <th>
00064                         Dépot
00065                 </th>
00066                 <th>
00067                         Utilisateur
00068                 </th>
00069                         <th>
00070 
00071                 </th>
00072         </tr>
00073         <?php for ($e=0;$e<count($a_change);$e++): ?>
00074         <?php $class=($e%2==0)?' class="even" ':' class="odd" '; ?>
00075         <tr <?php echo $class?>>
00076 
00077                 <td>
00078                         <?php echo   $a_change[$e]['str_date']?>
00079                 </td>
00080                 <td>
00081                         <?php echo h($a_change[$e]['c_comment'])?>
00082                 </td>
00083                 <td>
00084                         <?php echo h($a_change[$e]['r_name'])?>
00085                 </td>
00086                 <td>
00087                         <?php echo $a_change[$e]['tech_user']?>
00088                 </td>
00089                 <td>
00090                         <?php echo HtmlInput::anchor("Détail","javascript:void()",sprintf("onclick=\"stock_inv_detail('%s','%s')\"",$gDossier,$a_change[$e]['c_id']));?>
00091                 </td>
00092 
00093         </tr>
00094         <?php endfor; ?>
00095 </table>
00096 </div>
 All Data Structures Namespaces Files Functions Variables Enumerations