include 'DAO/ConnexionBD.php'; include 'DAO/GestionBD.php'; include 'DAO/EmpruntDAO.php'; include 'Metier/Emprunt.php'; $_libelleEmp = $_POST['libelleEmp']; $_emetteur = $_POST['emetteur']; $_inter = $_POST['inter']; $_isin = $_POST['isin']; $_mnemonique = $_POST['mnemonique']; $_libelle = $_POST['libelle']; $_taux = $_POST['taux']; $_duree = $_POST['duree']; $_nominal = $_POST['nominal']; $_mode = $_POST['mode']; $_nombre = $_POST['nombre']; $_montant = $_POST['montant']; $_dateJ = $_POST['dateJ']; $_datePE = $_POST['datePE']; $_dateDE = $_POST['dateDE']; $_Connexion = new ConnexionBD(); $_Connexion->connect(); $_GestionBD = new GestionBD($_Connexion); $_empruntDAO = new EmpruntDAO($_GestionBD); $_emprunt = new emprunt($_libelleEmp, $_emetteur, $_inter, $_isin, $_mnemonique, $_libelle, $_taux, $_duree, $_nominal, $_mode, $_nombre, $_montant, $_dateJ, $_datePE, $_dateDE); try { $_empruntDAO->AddObj($_emprunt); header("Location: index.php#start"); } catch (Exception $e) { header("Location: create.php?message=error"); }
</section> </div> <div class="8u skel-cell-mainContent" id="content"> <article id="main"> <br> <?php include 'DAO/ConnexionBD.php'; include 'DAO/GestionBD.php'; include 'DAO/EmpruntDAO.php'; include 'Metier/Emprunt.php'; $id = $_GET['id']; $_Connexion = new ConnexionBD(); $_Connexion->connect(); $_GestionBD = new GestionBD($_Connexion); $_empruntDAO = new EmpruntDAO($_GestionBD); $_emprunt = new Emprunt("", "", "", "", "", "", "", "", "", "", "", "", "", "", ""); $_emprunt = $_empruntDAO->Load($id); ?> <form action="edit.php" method="POST"> <p class="contact"><label for="name">Libelle Emprunt</label></p> <input id="libelleEmp" name="libelleEmp" value="<?php echo $_emprunt->get_libelleEmp(); ?> " type="text"> <p class="contact"><label for="name">Emetteur</label></p> <input id="emetteur" name="emetteur" value="<?php echo $_emprunt->get_emetteur(); ?>
<!--<form action='save.php' method='post' target="_blank">--> <article id="main"> <h2> </h2> <br> <?php include 'DAO/ConnexionBD.php'; include 'DAO/GestionBD.php'; include 'DAO/EmpruntDAO.php'; include 'Metier/Emprunt.php'; $_recherche = $_POST['recherche']; $_Connexion = new ConnexionBD(); $_Connexion->connect(); $_GestionBD = new GestionBD($_Connexion); $_empruntDAO = new EmpruntDAO($_GestionBD); $_emprunt = $_empruntDAO->recherche($_recherche); ?> <table width="50%" border="0" cellspacing="0"> <tr> <td><a onClick="imprimer()" id="print"><img src="images/PNG-24/Print.png"></a> <img src="images/PNG-24/Save.png"></td> <td></td> </tr> </table> </article>
<article id="main"> <br> <?php include 'DAO/ConnexionBD.php'; include 'DAO/GestionBD.php'; include 'DAO/EmpruntDAO.php'; include 'Metier/Emprunt.php'; $isin = $_POST['isin']; $quantite = $_POST['quantite']; $cours = $_POST['cours']; $seance = $_POST['seance']; echo '<b>Code ISIN : <b>' . $isin . '<br>'; $_Connexion = new ConnexionBD(); $_Connexion->connect(); $_GestionBD = new GestionBD($_Connexion); $_empruntDAO = new EmpruntDAO($_GestionBD); $_emprunt = new Emprunt("", "", "", "", "", "", "", "", "", "", "", "", "", "", ""); $_emprunt = $_empruntDAO->LoadByIsin($isin); //echo $_emprunt->__toString(); // Calcul MT $nominal = $_emprunt->get_nominal(); echo '<b>Nominal : </b>' . $nominal . '<br>'; $duree = $_emprunt->get_duree(); echo '<b>Durée : <b>' . $duree . ' ans <br>'; $amortissment = $nominal / $duree; echo '<b>Amortissment : </b>' . $amortissment . '<br>'; echo '<b>Date Séance : </b>' . $seance . '<br>'; echo '<b>Date Jouissance : </b>' . $_emprunt->get_dateJouissance() . '<br>'; echo '<b>Cours en % : </b>' . $cours . '<br>'; $dateSeance = new DateTime($seance); $dateJouissance = new DateTime($_emprunt->get_dateJouissance());
<div class="8u skel-cell-mainContent" id="content"> <!--<form action='save.php' method='post' target="_blank">--> <article id="main"> <h2> </h2> <br> <?php include 'DAO/ConnexionBD.php'; include 'DAO/GestionBD.php'; include 'DAO/EmpruntDAO.php'; include 'Metier/Emprunt.php'; $id = $_GET['id']; $_Connexion = new ConnexionBD(); $_Connexion->connect(); $_GestionBD = new GestionBD($_Connexion); $_empruntDAO = new EmpruntDAO($_GestionBD); $_emprunt = $_empruntDAO->affiche($id); ?> </article> <!-- </form>--> </div> </div> </div> </div> </body> </html>
include 'Metier/Emprunt.php'; $_libelleEmp = $_POST['libelleEmp']; $_emetteur = $_POST['emetteur']; $_inter = $_POST['inter']; $_isin = $_POST['isin']; $_mnemonique = $_POST['mnemonique']; $_libelle = $_POST['libelle']; $_taux = $_POST['taux']; $_duree = $_POST['duree']; $_nominal = $_POST['nominal']; $_mode = $_POST['mode']; $_nombre = $_POST['nombre']; $_montant = $_POST['montant']; $_dateJ = $_POST['dateJ']; $_datePE = $_POST['datePE']; $_dateDE = $_POST['dateDE']; $_Connexion = new ConnexionBD(); $_Connexion->connect(); $_GestionBD = new GestionBD($_Connexion); $_empruntDAO = new EmpruntDAO($_GestionBD); $_emprunt = new emprunt($_libelleEmp, $_emetteur, $_inter, $_isin, $_mnemonique, $_libelle, $_taux, $_duree, $_nominal, $_mode, $_nombre, $_montant, $_dateJ, $_datePE, $_dateDE); //echo $_emprunt; try { $_empruntDAO->Update($_emprunt); ?> <script language="javascript"> $.bootstrapGrowl("Emprunt updated !")</script><?php } catch (Exception $e) { ?> <script language="javascript"> $.bootstrapGrowl("Error !")</script><?php } header("Location: index.php#start");