<? require_once('../../classes/classes.php'); ?> <? include('../../include_connexion/connexion_site_on.php'); ?> <? // Récupération des données passées en paramètres $mon_action = $_POST["mon_action"]; $num_promotion = $_POST["num_promotion"]; $promotion = new promotion(); //echo "--- mon_action : " . $mon_action . "<br>"; // On souhaite une modification if ($mon_action == "modification") { // Mise à jour de la base $promotion->gererDonnee( $_POST ); header("Location: ./liste.php"); } if ( $promotion->load( $num_promotion ) ) { $titre_page = "Modification d'une promotion"; $titre = stripcslashes( utf8_encode( $promotion->titre ) ); $sous_titre = stripcslashes( utf8_encode( $promotion->sous_titre ) ); $reduction = stripcslashes( utf8_encode( $promotion->reduction ) ); $texte = str_replace("\\", "", $promotion->texte); $checked_oui = ( $promotion->online == '1') ? "checked" : ""; $checked_non = ( $promotion->online == '1') ? "" : "checked"; } else { $titre_page = "Ajout d'une promotion";