Groupe Analytic management
This commit is contained in:
parent
50f9c9360e
commit
7c5c41c7bf
3 changed files with 83 additions and 2 deletions
|
|
@ -75,6 +75,9 @@ if ( isset ($_REQUEST['p_action']))
|
|||
$User->AccessRequest($cn,CA_IMPRESSION);
|
||||
$def=2;
|
||||
break;
|
||||
case 'ca_groupe':
|
||||
$def=3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
echo ShowItem(array(
|
||||
|
|
@ -117,7 +120,7 @@ if ($_REQUEST['p_action'] == 'ca_od' )
|
|||
// Impression
|
||||
if ($_REQUEST['p_action'] == 'ca_groupe' )
|
||||
{
|
||||
require_once('ca_groupe.inc.php');
|
||||
require_once('ca_group.inc.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
|
|||
78
include/ca_group.inc.php
Normal file
78
include/ca_group.inc.php
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
/*
|
||||
* This file is part of PhpCompta.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/* $Revision$ */
|
||||
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
|
||||
/* !\file
|
||||
*/
|
||||
|
||||
/* \brief manage the group
|
||||
*
|
||||
*/
|
||||
require_once ('class_anc_group.php');
|
||||
require_once ('class_widget.php');
|
||||
$r=new Anc_Group($cn);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// REMOVE
|
||||
if ( isset ($_POST['remove'])) {
|
||||
if (isset($_POST['ck'] )) {
|
||||
foreach ($_POST['ck'] as $m ) {
|
||||
$obj=new Anc_Group($cn);
|
||||
$obj->ga_id=$m;
|
||||
$obj->remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// INSERT
|
||||
if ( isset($_POST['add'])) {
|
||||
$obj=new Anc_Group($cn);
|
||||
$obj->fill_from_array($_POST);
|
||||
$obj->insert();
|
||||
}
|
||||
$array=$r->myList();
|
||||
|
||||
echo '<div class="u_content">';
|
||||
echo '<form method="post">';
|
||||
echo dossier::hidden();
|
||||
echo '<table style="border: 2px outset blue; width: 100%;" >';
|
||||
echo '<tr> <th> Code </th><th>Description</th></tr>';
|
||||
foreach ($array as $idx=>$m) {
|
||||
echo '<tr>';
|
||||
echo '<td>'.$m->ga_id.'</td>';
|
||||
echo '<td>'.$m->ga_description.'</td>';
|
||||
echo '<td> Effacer <input type="Checkbox" name="ck[]" value="'.$m->ga_id.'">'.'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
$w=new widget("text");
|
||||
echo "<td>".$w->IOValue("ga_id")."</td>";
|
||||
echo "<td>".$w->IOValue("ga_description").
|
||||
widget::submit_button('add','Ajouter').
|
||||
"</td>";;
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo "<hr>";
|
||||
echo widget::submit_button('remove','Effacer');
|
||||
|
||||
echo '</div>';
|
||||
|
|
@ -63,7 +63,7 @@ class Anc_Group {
|
|||
$this->ga_id=str_replace(' ','',$this->ga_id);
|
||||
$this->ga_id=strtoupper($this->ga_id);
|
||||
$sql=" delete from groupe_analytique where ga_id='".pg_escape_string($this->ga_id)."'";
|
||||
print_r($sql);
|
||||
|
||||
ExecSql($this->db,$sql);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue