Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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>