MY_STOCK == 'N')
{
echo '
';
echo _("Vous n'utilisez pas de gestion de stock");
echo '
';
return;
}
if ( isset ($_POST['add_stock']))
{
$post_name=$http->post('r_name');
if ( strlen(trim($post_name)) != 0)
{
$st=new Stock_Sql($cn);
$st->from_array($_POST);
$st->insert();
}
}
if ( isset ($_POST['mod_stock']))
{
$post_name=$http->post('r_name');
if ( strlen(trim($post_name)) != 0)
{
$st=new Stock_Sql($cn,$http->post('r_id',"number"));
$st->from_array($_POST);
$st->update();
}
}
$tb=new Sort_Table();
$p_url=HtmlInput::get_to_string(array("ac","gDossier"));
$tb->add(_("Nom"), $p_url, " order by r_name asc", "order by r_name desc", "ona", "ond");
$tb->add(_("Adresse"), $p_url, " order by r_adress asc", "order by r_adress desc", "oaa", "oad");
$tb->add(_("Ville"), $p_url, " order by r_city asc", "order by r_city desc", "ova", "ovd");
$tb->add(_("Pays"), $p_url, " order by r_country asc", "order by r_country desc", "opa", "opd");
$tb->add(_("Téléphone"), $p_url, " order by r_phone asc", "order by r_phone desc", "opa", "opd");
$sql="select * from stock_repository ";
$ord=(isset($_GET['ord']))?$_GET['ord']:"ona";
$order=$tb->get_sql_order($ord);
$array=$cn->get_array($sql." ".$order);
?>
get_header(0)?> |
get_header(1)?> |
get_header(2)?> |
get_header(3)?> |
get_header(4)?> |
|
|
|
|
|
|