<input name="lastname" class="form-control" type="text" value="<?php echo $user->getLastName(); ?> "/> </div> <div class="form-group"> <label for="firstname">Prénom</label> <input name="firstname" class="form-control" type="text" value="<?php echo $user->getFirstName(); ?> "/> </div> <div class="form-group"> <label for="mail">E-Mail</label> <input name="mail" class="form-control" type="email" value="<?php echo $user->getMail(); ?> "/> </div> <div class="form-group"> <label for="phone">Téléphone</label> <input name="phone" class="form-control" type="text" value="<?php echo $user->getPhoneNumber(); ?> "/> </div> <div class="form-group"> <label for="role">Rôle</label> <select name="role" class="form-control"> <?php foreach ($roleDao->getAll() as $role) {
/** * send order confirmation mail * @param User $user * @param MealOrder $order * @return bool * @throws Exception */ public static function sendOrderConfirmation($user, $order) { self::$mail->addAddress($user->getMail()); self::$mail->Subject = 'Confirmation de votre commande Aurore traiteur'; self::$mail->Body = ' <table width="480px" style"width:480px;"> <tbody> <tr style="background: black;"> <td><img src="' . SERVER_URL . WEB_PATH . 'img/logo_mail.jpg"></td> </tr> <tr> <td> Bonjour,<br/> <br /> Votre commande #' . sprintf("%04s", $order->getId()) . ' est validée,<br /> <br /> A bientôt sur <a href="http://aurore-traiteur.fr">aurore-traiteur.fr</a> </td> </tr> </tbody> </table>'; if (!self::$mail->send()) { throw new Exception("Message could not be sent - " . self::$mail->ErrorInfo); } else { return true; } }