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 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00027 require_once("class_itext.php");
00028 require_once("class_iselect.php");
00029 require_once ('class_anc_group.php');
00030 $r=new Anc_Group($cn);
00031
00032
00033
00034
00035 if ( isset ($_POST['remove']))
00036 {
00037 if (isset($_POST['ck'] ))
00038 {
00039 foreach ($_POST['ck'] as $m )
00040 {
00041 $obj=new Anc_Group($cn);
00042 $obj->ga_id=$m;
00043 $obj->remove();
00044 }
00045 }
00046 }
00047
00048
00049
00050 if ( isset($_POST['add']))
00051 {
00052 $obj=new Anc_Group($cn);
00053 $obj->get_from_array($_POST);
00054 echo $obj->insert();
00055 }
00056 $array=$r->myList();
00057
00058 echo '<div class="content" >';
00059 echo '<form method="post">';
00060 echo dossier::hidden();
00061 echo '<table class="result" >';
00062 echo '<tr> <th>'._("Code")." </th><th>"._("Plan")." </td><th>"._("Description").'</th></tr>';
00063 foreach ($array as $idx=>$m)
00064 {
00065 echo '<tr>';
00066 echo '<td>'.h($m->ga_id).'</td>';
00067 echo '<td>'.h($m->pa_name).'</td>';
00068 echo '<td>'.h($m->ga_description).'</td>';
00069 echo '<td> Effacer <input type="Checkbox" name="ck[]" value="'.$m->ga_id.'">'.'</td>';
00070 echo '</tr>';
00071 }
00072 $w=new IText("ga_id");
00073 $wDesc=new IText("ga_description");
00074 $val_pa_id=$cn->make_array("select pa_id,pa_name from plan_analytique");
00075 $wPa_id=new ISelect("pa_id");
00076 $wPa_id->value=$val_pa_id;
00077
00078 echo "<td>".$w->input()."</td>";
00079 echo "<td>".$wPa_id->input("pa_id")."</td>";
00080 echo "<td>".$wDesc->input("ga_description").
00081 HtmlInput::submit('add',_('Ajouter')).
00082 "</td>";
00083 ;
00084
00085 echo '</table>';
00086
00087 echo "<hr>";
00088 echo HtmlInput::submit('remove',_('Effacer'));
00089
00090 echo '</div>';