Exemple #1
0
        $myEtagere->validite_date_deb = extraitdate($form_visible_deb);
        $myEtagere->validite_date_fin = extraitdate($form_visible_fin);
        $myEtagere->visible_accueil = $form_visible_accueil;
        $myEtagere->tri = $tri;
        $myEtagere->save_etagere();
        aff_etagere("edit_etagere", 1);
        break;
    case 'valid_new_etagere':
        $myEtagere = new etagere(0);
        $myEtagere->create_etagere();
        if (is_array($etagere_autorisations)) {
            $autorisations = implode(" ", $etagere_autorisations);
        } else {
            $autorisations = "1";
        }
        $myEtagere->autorisations = $autorisations;
        $myEtagere->name = $form_etagere_name;
        $myEtagere->comment = $form_etagere_comment;
        $myEtagere->validite = $form_visible_all;
        $myEtagere->validite_date_deb_f = $form_visible_deb;
        $myEtagere->validite_date_fin_f = $form_visible_fin;
        $myEtagere->validite_date_deb = extraitdate($form_visible_deb);
        $myEtagere->validite_date_fin = extraitdate($form_visible_fin);
        $myEtagere->visible_accueil = $form_visible_accueil;
        $myEtagere->tri = $tri;
        $myEtagere->save_etagere();
        aff_etagere("edit_etagere", 1);
        break;
    default:
        aff_etagere("edit_etagere", 1);
}
Exemple #2
0
// +-------------------------------------------------+
// $Id: constitution.inc.php,v 1.6 2007-03-10 09:03:18 touraine37 Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
if (!verif_droit_etagere($idetagere)) {
    $action = "aucune";
}
switch ($action) {
    case 'edit_etagere':
        $myEtagere = new etagere($idetagere);
        $etagere_constitution_form = str_replace('!!formulaire_titre!!', $msg['etagere_constitution_de'] . " " . $myEtagere->name, $etagere_constitution_form);
        $etagere_constitution_form = str_replace('!!idetagere!!', $idetagere, $etagere_constitution_form);
        $etagere_constitution_form = str_replace('!!constitution!!', $myEtagere->constitution(1), $etagere_constitution_form);
        print pmb_bidi($etagere_constitution_form);
        break;
    case 'save_etagere':
        $myEtagere = new etagere($idetagere);
        // suppression
        $rqt = "delete from etagere_caddie where etagere_id='" . $idetagere . "' ";
        $res = mysql_query($rqt, $dbh);
        for ($i = 0; $i < sizeof($idcaddie); $i++) {
            if (verif_droit_caddie($idcaddie[$i])) {
                $myEtagere->add_panier($idcaddie[$i]);
            }
        }
        aff_etagere("constitution", 0);
        break;
    default:
        aff_etagere("constitution", 0);
}