<?php

require_once("headHotelStaff.php");

if($_POST["submit"])
{ 

     $hnm=$_POST['hiD']; $ownID=$_POST['owniD']; $payment =$_POST['payment'];
     $accountId =$_POST['accountId'];$roomid =$_POST['roomid'];
     $noguest =$_POST['noguest'];$departon =$_POST['departon'];
     $arrivedfrom =$_POST['arrivedfrom'];$arrivedon =$_POST['arrivedon'];
     $departto =$_POST['departto'];$carregno=$_POST['carregno'];
    
   
   if($con->vPayment($payment) && $con->vRroomid($roomid) && $con->vNoguest($noguest) &&  $con->vDepartto($departto) && $con->vArrivedon($arrivedon)&& $con->vArrivedfrom($arrivedfrom) &&$con->vDeparton($departon))
      {
       require("successAddHotelVistorsFormStaff.php");

      }
   else
      {
        
	     if(isset($_POST['hiD']) && isset($_POST['owniD']))
           {
            ?>

         <center>
         <div>
          <sup>
          <?php
            echo $con->eCarregno($carregno)."<p/>"; 
            echo $con->eArrivedfrom($arrivedfrom)."<p/>";
            echo $con->ePayment($payment)."<p/>"; 
            echo $con->eRroomid($roomid)."<p/>"; 
            echo $con->eNoguest($noguest)."<p/>"; 
            echo $con->eDepartto($departto)."<p/>"; 
            echo $con->eDeparton($departon)."<p/>";   
            echo $con->eArrivedon($arrivedon)."<p/>";
           ?>
  </sup>
</div>
</center> 
  



            <?php
            require("respostAddHotelInvalidAccVistorsFormStaff.php");
           }
      }

 
     }
else 
     {
	echo "Error occured when saving data!..";
     }

?>