Your IP : 216.73.216.162


Current Path : /home/xbodynamge/www/reservation/admin/
Upload File :
Current File : /home/xbodynamge/www/reservation/admin/modif_complete_seance.php

<?php
include_once('init.inc.php');

if ($_POST['type']=="supprimer"){



try {
    
    $transactDB = new PDO("mysql:host=".$DB_server.";dbname=".$DB_dbname, $DB_login, $DB_pass);
    $transactDB->beginTransaction();
	

    $transactDB->query("delete from reservation".$DB_prefixtable."seance_complete where id = ".$_POST['id']);
    
    
    $transactDB->commit();
} catch (Exception $e) {
    $transactDB->rollback();
}

}


if ($_POST['type']=="creer"){


try {
    
    $transactDB = new PDO("mysql:host=".$DB_server.";dbname=".$DB_dbname, $DB_login, $DB_pass);
    $transactDB->beginTransaction();
	

    $transactDB->query("insert into reservation".$DB_prefixtable."seance_complete (salle, date, heure_debut, heure_fin, type_seance, complet) value ('".$_POST['salle']."', '".$_POST['date']."',  '".$_POST['heure_debut']."',  '".$_POST['heure_fin']."',  '".$_POST['type_seance']."', 1)");
    
    
    $transactDB->commit();
} catch (Exception $e) {
    $transactDB->rollback();
}

}

header('Location: page_complete_seance.php'); 


?>