30 lines
627 B
PHP
30 lines
627 B
PHP
<?php
|
|
//include_once(realpath(dirname(__FILE__)) . "/../../../../../fonctions/authplugins.php");
|
|
//autorisation("codepromo");
|
|
|
|
include_once(realpath(dirname(__FILE__)) . "/../../Codepromo.class.php");
|
|
|
|
if($id = lireParam('regle_id', 'int')){
|
|
$codepromo_codepromo_regle = new Codepromo_codepromo_regle();
|
|
$codepromo_codepromo_regle->id = $id;
|
|
$codepromo_codepromo_regle->delete();
|
|
|
|
}
|
|
else{
|
|
|
|
if(empty($_REQUEST['code']))
|
|
{
|
|
echo 0; exit;
|
|
}
|
|
|
|
$code = $_REQUEST['code'];
|
|
|
|
$codepromo_codepromo = new Codepromo_codepromo();
|
|
if($codepromo_codepromo->charger_statut($code, array(1, 2)))
|
|
echo 0;
|
|
else
|
|
echo 1;
|
|
}
|
|
|
|
exit;
|
|
?>
|