Add password change feature.
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 19 Jan 2018 19:09:29 +0000 (20:09 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 19 Jan 2018 19:09:29 +0000 (20:09 +0100)
And fix a couple of CSS bugs in the account informations displaying.

Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
includes/account.php
includes/formaccount.php
includes/formlogin.php
includes/formregister.php
includes/formreservations.php
includes/formsearch.php
includes/register.php
includes/reservations.php
includes/search.php
js/airpolytech.js
styles/airpolytech.css

index 7b2c366b4ddca7069f086142609a3a07189a994c..7f7f1824d15f8bf07aadadc9b5f45da799650dbc 100644 (file)
@@ -22,46 +22,46 @@ $connection->close_prepared_query();
 if (empty($action)) {
     echo "<h2>Mes informations</h2>\n";
 
-    echo "<table id=\"account\">\n";
+    echo "<table id=\"taccount\">\n";
     foreach ($rows as $row) {
         echo " <tr>\n";
-        echo "  <td>Nom : </td>\n";
-        echo "  <td>" . htmlentities($row['NomCl']) . "</td>\n";
+        echo "  <td align=\"right\" valign=\"middle\">Pre&#769;nom : </td>\n";
+        echo "  <td align=\"left\" valign=\"middle\">" . htmlentities($row['PrenomCl']) . "</td>\n";
         echo " </tr>\n";
 
         echo " <tr>\n";
-        echo "  <td>Pre&#769;nom : </td>\n";
-        echo "  <td>" . htmlentities($row['PrenomCl']) . "</td>\n";
+        echo "  <td align=\"right\" valign=\"middle\">Nom : </td>\n";
+        echo "  <td align=\"left\" valign=\"middle\">" . htmlentities($row['NomCl']) . "</td>\n";
         echo " </tr>\n";
 
         echo " <tr>\n";
-        echo "  <td>Email : </td>\n";
-        echo "  <td>" . htmlentities($row['EmailCl']) . "</td>\n";
+        echo "  <td align=\"right\" valign=\"middle\">Email : </td>\n";
+        echo "  <td align=\"left\" valign=\"middle\">" . htmlentities($row['EmailCl']) . "</td>\n";
         echo " </tr>\n";
 
         echo " <tr>\n";
-        echo "  <td>Adresse : </td>\n";
-        echo "  <td></td>\n";
+        echo "  <td align=\"right\" valign=\"middle\">Adresse : </td>\n";
+        echo "  <td align=\"left\" valign=\"middle\"></td>\n";
         echo " </tr>\n";
 
         echo " <tr>\n";
-        echo "  <td>Nume&#769;ro de rue : </td>\n";
-        echo "  <td>" . htmlentities($row['NumRueCl']) . "</td>\n";
+        echo "  <td align=\"right\" valign=\"middle\">Nume&#769;ro de rue : </td>\n";
+        echo "  <td align=\"left\" valign=\"middle\">" . htmlentities($row['NumRueCl']) . "</td>\n";
         echo " </tr>\n";
 
         echo " <tr>\n";
-        echo "  <td>Rue : </td>\n";
-        echo "  <td>" . htmlentities($row['NomRueCl']) . "</td>\n";
+        echo "  <td align=\"right\" valign=\"middle\">Rue : </td>\n";
+        echo "  <td align=\"left\" valign=\"middle\">" . htmlentities($row['NomRueCl']) . "</td>\n";
         echo " </tr>\n";
 
         echo " <tr>\n";
-        echo "  <td>Code postal : </td>\n";
-        echo "  <td>" . htmlentities($row['CodePosteCl']) . "</td>\n";
+        echo "  <td align=\"right\" valign=\"middle\">Code postal : </td>\n";
+        echo "  <td align=\"left\" valign=\"middle\">" . htmlentities($row['CodePosteCl']) . "</td>\n";
         echo " </tr>\n";
 
         echo " <tr>\n";
-        echo "  <td>Ville : </td>\n";
-        echo "  <td>" . htmlentities($row['VilleCl']) . "</td>\n";
+        echo "  <td align=\"right\" valign=\"middle\">Ville : </td>\n";
+        echo "  <td align=\"left\" valign=\"middle\">" . htmlentities($row['VilleCl']) . "</td>\n";
         echo " </tr>\n";
     }
     echo "</table>\n";
@@ -70,12 +70,14 @@ if (empty($action)) {
     echo "<h2><a href=\"" . $configs['root_url'] . "/index.php?page=reservations\">Mes re&#769;servations</a></h2>\n";
 } elseif ($action === "modifyaccount") {
     echo "
-    <form action=\"index.php\" id=\"account\" method=\"post\">
+    <form action=\"index.php\" id=\"faccount\" method=\"post\">
      <input type=\"hidden\" name=\"form\" value=\"account\" />
-     <label> Nom : </label>
-     <input type=\"text\" size=\"25\" name=\"name\" value=\"" . $rows[0]['NomCl'] . "\" required/>
      <label> Pre&#769;nom : </label>
      <input type=\"text\" size=\"25\" name=\"firstname\" value=\"" . $rows[0]['PrenomCl'] . "\" required/>
+     <label> Nom : </label>
+     <input type=\"text\" size=\"25\" name=\"name\" value=\"" . $rows[0]['NomCl'] . "\" required/>
+     <label> Email : </label>
+     <input type=\"email\" size=\"25\" name=\"email\" value=\"" . $rows[0]['EmailCl'] . "\" required/>
          <label> Adresse : <br> Nume&#769;ro de rue : </label>
          <input type=\"number\" size=\"5\" name=\"numstreet\" value=\"" . $rows[0]['NumRueCl'] . "\" required/>
          <label> Rue : </label>
@@ -84,14 +86,22 @@ if (empty($action)) {
          <input type=\"number\" size=\"5\" name=\"postalcode\" value=\"" . $rows[0]['CodePosteCl'] . "\" required/>
          <label> Ville : </label>
          <input type=\"text\" size=\"15\" name=\"city\" value=\"" . $rows[0]['VilleCl'] . "\" required/>
-     <label> Email : </label>
-     <input type=\"email\" size=\"25\" name=\"email\" value=\"" . $rows[0]['EmailCl'] . "\" required/>
      <input type=\"submit\" value=\"Valider\">
     </form>
     <br>\n";
 } elseif ($action === "modifypassword") {
-    echo "Work in progress. <br>\n";
-    redirect("index.php?page=account", 3);
+    echo "
+    <form action=\"index.php\" id=\"fpassword\" method=\"post\">
+     <input type=\"hidden\" name=\"form\" value=\"account\" />
+     <label> Ancien mot de passe : </label>
+     <input type=\"password\" size=\"15\" name=\"oldpassword\" required/>
+     <label> Nouveau mot de passe : </label>
+     <input type=\"password\" minlength=\"8\" size=\"15\" name=\"password\" pattern=\"(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*\" title=\"Doit contenir 8 caracte&#768;res minimum dont une majuscule, une minuscule et un chiffre\" required/>
+     <label> Confirmation du mot de passe : </label>
+     <input type=\"password\" minlength=\"8\" size=\"15\" name=\"confirmpassword\" pattern=\"(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*\" title=\"Doit contenir 8 caracte&#768;res minimum dont une majuscule, une minuscule et un chiffre\" required/>
+     <input type=\"submit\" value=\"Valider\">
+    </form>
+    <br>\n";
 } else {
     echo "Unknown account action. <br>\n";
 }
index 37acd6d1bc3cd845c7c4f613bca162376f65a4be..fda90b671bbf8d8e2d0e3e0d876063f36df37b39 100644 (file)
@@ -7,38 +7,72 @@ $form_postalcode = filter_input(INPUT_POST, "postalcode", FILTER_VALIDATE_INT);
 $form_city = filter_input(INPUT_POST, "city", FILTER_SANITIZE_STRING);
 $form_email = filter_input(INPUT_POST, "email", FILTER_VALIDATE_EMAIL);
 
+$form_oldpassword = filter_input(INPUT_POST, "oldpassword", FILTER_SANITIZE_STRING);
+$form_password = filter_input(INPUT_POST, "password", FILTER_SANITIZE_STRING);
+$form_confirmpassword = filter_input(INPUT_POST, "confirmpassword", FILTER_SANITIZE_STRING);
+
 $input_failure = false;
+$password_failure = false;
 
-if (!$form_numstreet) {
+if (isset($form_street) && !$form_numstreet) {
     echo "The street number is not valid. <br>" ;
     $input_failure = true;
 }
-if (!$form_postalcode) {
+if (isset($form_street) && !$form_postalcode) {
     echo "The postal code is not valid. <br>";
     $input_failure = true;
 }
-if (!$form_email) {
+if (isset($form_street) && !$form_email) {
     echo "The email is not valid. <br>";
     $input_failure = true;
 }
 
+if (isset($form_oldpassword) && isset($form_password) && strcmp($form_oldpassword, $form_password) === 0) {
+    echo "Old and new password are the same. <br>";
+    $password_failure = true;
+}
+
+if (strcmp($form_password, $form_confirmpassword) !== 0) {
+    echo "Password do not match. <br>";
+    $password_failure = true;
+}
+
 if (!empty($form_name) && !empty($form_firstname) && !empty($form_numstreet) && !empty($form_street) &&
     !empty($form_postalcode) && !empty($form_city) && !empty($form_email) &&
     !$input_failure) {
+    global $connection;
+    $client_id = get_client_id($_SESSION['email']);
+    $sql_pquery = "update CLIENTS
+                       set NomCl = ?, PrenomCl = ?, EmailCl = ?, NumRueCl = ?, NomRueCl = ?, CodePosteCl = ?, VilleCl = ?
+                       where NumCl = ?";
+    $connection->prepare_query($sql_pquery);
+    $connection->prepared_query_bind_param("sssisisi", array($form_name, $form_firstname, $form_email, $form_numstreet, $form_street, $form_postalcode, $form_city, $client_id));
+    $connection->run_prepared_query();
+    $connection->close_prepared_query();
+    echo "You've updated your personal informations, you will be redirected to your account in 3 seconds. <br>";
+    redirect("index.php?page=account", 3);
+} elseif (!empty($form_oldpassword) && !empty($form_password) && !empty($form_confirmpassword) &&
+          !$password_failure) {
+    if (chk_password($_SESSION['email'], $form_oldpassword)) {
         global $connection;
         $client_id = get_client_id($_SESSION['email']);
+        $hashed_password = password_hash($form_password, PASSWORD_DEFAULT);
         $sql_pquery = "update CLIENTS
-                       set NomCl = ?, PrenomCl = ?, EmailCl = ?, NumRueCl = ?, NomRueCl = ?, CodePosteCl = ?, VilleCl = ?
-                       where NumCl = ?";
+                                 set PasswordCl = ?
+                                 where NumCl = ?";
         $connection->prepare_query($sql_pquery);
-        $connection->prepared_query_bind_param("sssisisi", array($form_name, $form_firstname, $form_email, $form_numstreet, $form_street, $form_postalcode, $form_city, $client_id));
+        $connection->prepared_query_bind_param("si", array($hashed_password, $client_id));
         $connection->run_prepared_query();
         $connection->close_prepared_query();
-        echo "You've updated your personal informations, you will be redirected to your account in 3 seconds. <br>";
+        echo "You've successfully updated your password. <br>";
         redirect("index.php?page=account", 3);
-
+    } else {
+        echo "Your old password is incorrect. <br>";
+        redirect("index.php?page=account&action=modifypassword", 3);
+    }
 } else {
     echo "There's a required non filled field or the input in a field do not match the required pattern. <br>";
     echo "<a href=\"javascript:history.go(-1)\">Retour</a>";
 }
+
 ?>
index b07ad4eb3c0303ed17c6fcbe812da28732fa4429..bbda789d6a8c7b15411b181fd659a4819fbf7676 100644 (file)
@@ -29,3 +29,5 @@ if (!$form_email) {
     echo "Fail to authenticate for unknown reason. <br>";
     redirect("index.php?page=login", 3);
 }
+
+?>
index 4abaa5001fd1a712dcef5c3f782199814afc2dee..b79d97c0609b7fde4d0fad76ad89573e5b00fbc5 100644 (file)
@@ -50,4 +50,5 @@ if (!empty($form_name) && !empty($form_firstname) && !empty($form_numstreet) &&
     echo "There's a required non filled field or the input in a field do not match the required pattern. <br>";
     echo "<a href=\"javascript:history.go(-1)\">Retour</a>";
 }
+
 ?>
index 479489b335452a4a35d9dec6d4390b95fdd76e7f..4bca04c5c07935ce74b9184a27ce6d25d4aaf10b 100644 (file)
@@ -7,7 +7,6 @@ $form_cancel = filter_input(INPUT_POST, "cancel", FILTER_SANITIZE_STRING);
 if (isset($form_modify) && isset($form_flight_id) && isset($form_class_name)) {
     echo $form_modify;
 } elseif (isset($form_cancel) && isset($form_flight_id) && isset($form_class_name)) {
-    //FIXME: Add a confirmation step
     $client_id = get_client_id($_SESSION['email']);
     global $connection;
     $sql_pquery = "delete from RESERVATIONS
@@ -20,6 +19,7 @@ if (isset($form_modify) && isset($form_flight_id) && isset($form_class_name)) {
     redirect("index.php?page=reservations", 3);
 } else {
     echo "Make an error message. <br>";
+    echo "<a href=\"javascript:history.go(-1)\">Retour</a>";
 }
 
 ?>
index 66c57c94b8412c8c0bbe6d654acaff78b6a5ad8b..ba1572a904bc4273ada71b5f8a49de9f1cc50fa1 100644 (file)
@@ -40,11 +40,11 @@ if (empty($form_arrival_date)) {
 
 ?>
 
-<h1> Rechercher un vol <?php if ($action === "return_flight") { echo "retour"; } ?></h1>
+<h1> Rechercher un vol <?php if ($action === "return_flight") { echo "retour"; } ?> </h1>
 
 <form action="index.php" id="search" method="post">
  <input type="hidden" name="form" value="search" />
- <?php if ($action === "return_flight") echo "<input type=\"hidden\" name=\"action\" value=\"return_flight\" />" ?>
+ <?php if ($action === "return_flight") { echo "<input type=\"hidden\" name=\"action\" value=\"return_flight\" />"; } ?>
  <input type="hidden" name="date_now" value="<?php echo $form_date_now; ?>" />
  <label> De&#769;part : Ville -> </label>
  <select size="1" name="departure_city" required>
@@ -91,50 +91,50 @@ if (empty($form_arrival_date)) {
   </optgroup>
  </select>
  <label> Date -> </label>
- <input type="datetime-local" name="arrival_date" <?php if (isset($form_arrival_date)) echo "value=\"$form_arrival_date\"";?> />
+ <input type="datetime-local" name="arrival_date" <?php if (isset($form_arrival_date)) { echo "value=\"$form_arrival_date\""; } ?> />
  <input type="submit" value="Rechercher">
 </form>
 <br>
 
 <?php
 if (!$input_failure) {
-    global $connection;
-    $sql_pquery = "select VOLS.NumVol as NumVol, VilleD, DateD, VilleA, DateA, Classe, round(CoutVol*CoeffPrix, 2) as Prix, NumAv from VOLS, DEFCLASSES
-                   where DEFCLASSES.NumVol = VOLS.NumVol and
-                   DateD >= ? and VilleD = ? and DateA <= ? and VilleA = ?
-                   order by DateD, NumVol, Prix";
-    $connection->prepare_query($sql_pquery);
-    $connection->prepared_query_bind_param("ssss", array($form_departure_date, $form_departure_city, $form_arrival_date, $form_arrival_city));
-    $connection->run_prepared_query();
-    $connection->get_pquery_result();
-    $rows = $connection->get_result_array();
-    $connection->close_prepared_query();
-    //FIXME: Use NumAv to see if a flight is fully booked.
-    //var_dump($rows);
-    if (empty($rows)) {
-        echo "Aucun vol ne correspond aux crite&#768;res de recherche. <br>";
-    } else {
-        echo "<table id=\"search\">\n";
-        echo "  <tr>\n";
-        echo "    <th>Nume&#769;ro de vol</th>\n";
-        echo "    <th>Ville de de&#769;part</th>\n";
-        echo "    <th>Date de de&#769;part</th>\n";
-        echo "    <th>Ville d'arrive&#769;e</th>\n";
-        echo "    <th>Date d'arrive&#769;e</th>\n";
-        echo "    <th>Classe</th>\n";
-        echo "    <th>Prix d'une place</th>\n";
-        echo "    <th>Re&#769;server</th>\n";
-        echo "  </tr>\n";
-        foreach ($rows as $row) {
-            echo "  <tr>\n";
-            echo "    <td>" . $row['NumVol'] . "</td>\n";
-            echo "    <td>" . $row['VilleD'] . "</td>\n";
-            echo "    <td>" . $row['DateD'] . "</td>\n";
-            echo "    <td>" . $row['VilleA'] . "</td>\n";
-            echo "    <td>" . $row['DateA'] . "</td>\n";
-            echo "    <td>" . $row['Classe'] . "</td>\n";
-            echo "    <td>" . $row['Prix'] . "&euro;</td>\n";
-            echo "    <td>
+     global $connection;
+     $sql_pquery = "select VOLS.NumVol as NumVol, VilleD, DateD, VilleA, DateA, Classe, round(CoutVol*CoeffPrix, 2) as Prix, NumAv from VOLS, DEFCLASSES
+                    where DEFCLASSES.NumVol = VOLS.NumVol and
+                    DateD >= ? and VilleD = ? and DateA <= ? and VilleA = ?
+                    order by DateD, NumVol, Prix";
+     $connection->prepare_query($sql_pquery);
+     $connection->prepared_query_bind_param("ssss", array($form_departure_date, $form_departure_city, $form_arrival_date, $form_arrival_city));
+     $connection->run_prepared_query();
+     $connection->get_pquery_result();
+     $rows = $connection->get_result_array();
+     $connection->close_prepared_query();
+     //FIXME: Use NumAv to see if a flight is fully booked.
+     //var_dump($rows);
+     if (empty($rows)) {
+         echo "Aucun vol ne correspond aux crite&#768;res de recherche. <br>";
+     } else {
+         echo "<table id=\"search\">\n";
+         echo "  <tr>\n";
+         echo "    <th>Nume&#769;ro de vol</th>\n";
+         echo "    <th>Ville de de&#769;part</th>\n";
+         echo "    <th>Date de de&#769;part</th>\n";
+         echo "    <th>Ville d'arrive&#769;e</th>\n";
+         echo "    <th>Date d'arrive&#769;e</th>\n";
+         echo "    <th>Classe</th>\n";
+         echo "    <th>Prix d'une place</th>\n";
+         echo "    <th>Re&#769;server</th>\n";
+         echo "  </tr>\n";
+         foreach ($rows as $row) {
+             echo "  <tr>\n";
+             echo "    <td>" . $row['NumVol'] . "</td>\n";
+             echo "    <td>" . $row['VilleD'] . "</td>\n";
+             echo "    <td>" . $row['DateD'] . "</td>\n";
+             echo "    <td>" . $row['VilleA'] . "</td>\n";
+             echo "    <td>" . $row['DateA'] . "</td>\n";
+             echo "    <td>" . $row['Classe'] . "</td>\n";
+             echo "    <td>" . $row['Prix'] . "&euro;</td>\n";
+             echo "    <td>
                         <form action=\"index.php\" id=\"booking\" method=\"post\">
                           <input type=\"hidden\" name=\"form\" value=\"booking\" />
                           <input type=\"hidden\" name=\"flight_id\" value=\"" . $row['NumVol'] . "\" />
@@ -143,16 +143,16 @@ if (!$input_failure) {
                           <label> Place(s) : </label>
                           <input type=\"number\" name=\"nb_place\" min=\"1\" max=\"9\" value=\"1\" required/>
                           <label> Vol retour : </label>\n";
-                          if (!($action === "return_flight")) {
-                              echo "        <input type=\"checkbox\" name=\"return_flight\" checked/>\n";
-                          }
-            echo "        <input type=\"submit\" value=\"Re&#769;server\">\n";
-            echo "      </form>
-                     </td>\n";
-            echo "  </tr>\n";
-        }
-        echo "</table>\n";
-    }
-}
+             if (!($action === "return_flight")) {
+                 echo "       <input type=\"checkbox\" name=\"return_flight\" checked/>\n";
+             }
+             echo "       <input type=\"submit\" value=\"Re&#769;server\">\n";
+             echo "     </form>
+                       </td>\n";
+             echo "  </tr>\n";
+         }
+         echo "</table>\n";
+     }
+ }
 
 ?>
index 20ad69935b06fe215d44a755bceaf6a47918686c..797640f09a9bb50edce605ee2274dcd260f1f1b4 100644 (file)
@@ -2,10 +2,12 @@
 
 <form action="index.php" id="register" method="post">
  <input type="hidden" name="form" value="register" />
- <label> Nom :* </label>
- <input type="text" size="25" name="name" required/>
  <label> Pre&#769;nom :* </label>
  <input type="text" size="25" name="firstname" required/>
+ <label> Nom :* </label>
+ <input type="text" size="25" name="name" required/>
+ <label> Email :* </label>
+ <input type="email" size="25" name="email" required/>
      <label> Adresse : <br> Nume&#769;ro de rue :* </label>
      <input type="number" size="5" name="numstreet" required/>
      <label> Rue :* </label>
@@ -14,8 +16,6 @@
      <input type="number" size="5" name="postalcode" required/>
      <label> Ville :* </label>
      <input type="text" size="15" name="city" required/>
- <label> Email :* </label>
- <input type="email" size="25" name="email" required/>
  <label> Mot de passe :* </label>
  <input type="password" minlength="8" size="15" name="password" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*" title="Doit contenir 8 caracte&#768;res minimum dont une majuscule, une minuscule et un chiffre" required/>
  <label> Confirmation du mot de passe :* </label>
index 3230f342122fa57f72c52b16cd9136d04359c1b8..43148671acd1a16ce90e0ccf6032a8b4cc734599 100644 (file)
@@ -26,7 +26,6 @@ $connection->run_prepared_query();
 $connection->get_pquery_result();
 $rows = $connection->get_result_array();
 $connection->close_prepared_query();
-//var_dump($rows);
 if (empty($rows)) {
     echo "Aucune(s) re&#769;servation(s) en cours pour le moment. <br>";
 } else {
@@ -60,7 +59,7 @@ if (empty($rows)) {
                           <input type=\"hidden\" name=\"flight_id\" value=\"" . $row['NumVol'] . "\" />
                           <input type=\"hidden\" name=\"class_name\" value=\"" . $row['Classe'] . "\" />
                           <input type=\"submit\" name=\"modify\" value=\"Modifier\">
-                          <input type=\"submit\" name=\"cancel\" value=\"Annuler\">
+                          <input type=\"button\" name=\"cancel\" value=\"Annuler\" onClick=\"ConfirmCancelFlight()\">
                         </form>
                       </td>\n";
         } else {
index b35c762dec317609aeabda28eaff09c0dba2c907..e2503d96536f5e1988e5a485cf3b77d09ef5595d 100644 (file)
@@ -10,7 +10,6 @@ $return_flight_arrival_city = "";
 $return_flight_departure_date = "";
 $oDepartureDate = new DateTime("now");
 if ($action === "return_flight") {
-    //var_dump($_SESSION);
     if (isset($_SESSION['return_flight_departure_city'])) $return_flight_departure_city = $_SESSION['return_flight_departure_city'];
     if (isset($_SESSION['return_flight_arrival_city'])) $return_flight_arrival_city = $_SESSION['return_flight_arrival_city'];
     if (isset($_SESSION['return_flight_departure_date'])) {
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0f5a17a3c24710db6bd75922578455309423ef0a 100644 (file)
@@ -0,0 +1,11 @@
+function ConfirmCancelFlight() {
+    var oFormObject = document.forms['reservations'];
+    if (confirm("Voulez-vous vraiment annuler votre re&#769;servation sur le vol " + oFormObject.elements['flight_id'].value + " ?")) {
+        var input = document.createElement("input");
+        input.setAttribute("type", "hidden");
+        input.setAttribute("name", "cancel");
+        input.setAttribute("value", "Annuler");
+        oFormObject.appendChild(input);
+        oFormObject.submit();
+    }
+}
index c425d298dd9f38927285c12eeeae3942f2cbb3e4..58aaff788e51a55f33e92aa22d32f36e8243272f 100644 (file)
@@ -41,6 +41,10 @@ form#register {
     width: 720px;
 }
 
+form#fpassword {
+    width: 720px;
+}
+
 form#booking {
     width: 250px;
 }
@@ -86,8 +90,8 @@ table {
     vertical-align: middle;
 }
 
-table#account {
-    width: 40%;
+table#taccount {
+    width: 30%;
 }
 
 table#home {