示例#1
0
文件: rooms.php 项目: Mayyad/Tigers
        ?>
        <div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span >&times;</span></button>
                <h4 class="modal-title text-left">Add New Room</h4>
              </div>
              <div class="modal-body ">
				  <?php 
        if (isset($_POST['addRoomBtn'])) {
            $roomNum = $_POST['roomNum'];
            //Check if is not Null
            if ($validate->checkNotNull($roomNum)) {
                if ($validate->checkNumeric($roomNum)) {
                    if ($rooms->checkRoomNum($roomNum)) {
                        if ($rooms->addRoom($roomNum)) {
                            header("location:rooms.php?action=Insert Sucsessful Completed");
                        } else {
                            ?>
											<p class="alert alert-danger">Some Things Wrong in Connection With DataBase Try Again Later</p>    
										<?php 
                        }
                    } else {
                        ?>
										<p class="alert alert-danger">This Room Inserted To The DataBase Befor</p>    
									<?php 
                    }
                } else {
                    ?>
                            	<p class="alert alert-danger">Room Number Must Be Number </p>