
<div class="well">

      <ul class="tabs">
        <li><a href="#view1">Hostel Rooms</a></li>

      </ul>
      <div class="tabcontents">
        <div id="view1" class="row">


        	<div class="col-lg-12">

            	<div class="col-lg-8" style="margin-left:200px">



             			<fieldset>
                            <legend>Add Room <span class="ast">*</span> indicate required fields </legend>



        					<!-- form cut to the toolbar add user-->
               	    	<input type="hidden" name="MAX_FILE_SIZE" value="MAX_FILE_SIZE" />







                           <div class="form-group">
                                 <label for="title" style="margin-top:10px;" class="col-sm-2 control-label">Room Title </label>
                                 <div class="col-sm-10">
                                 	<div class="input-group" style="margin-top:10px;">
                                   <input  id="title" class="form-control input-sm" type="text" placeholder="Title"  name="title"
                                    required></input>
                                   <div class="input-group-addon"> <span class="ast">*</span></div>
                                   </div>

                                 </div>
                              </div>



                            <div class="form-group">
                              <label for="other_names" style="margin-top:10px;" class="col-sm-2 control-label">Description </label>
                              <div class="col-sm-10">
                              	<div class="input-group" style="margin-top:10px;">
                                <textarea id="description" class="form-control input-sm" type="text" placeholder="Room Description" name="description"
                              required></textarea>
                                  <div class="input-group-addon"> <span class="ast">*</span></div>
                                 </div>
                              </div>
                           </div>




                         <div class="form-group">
                          <label class="col-sm-2 control-label" style="margin-top:10px;" for="gender">Reserved</label>
                          <div class="col-sm-10">
                          <div class="input-group" style="margin-top:10px;">
                            <select id="reserved" class="form-control input-sm" name="gender" required>
                                <option value="1" selected>Yes</option>
                                <option value="0">No</option>


                             </select>
                             <div class="input-group-addon"> <span class="ast">*</span></div>
                             </div>
                          </div>

                        </div>

                         <div class="form-group">
                          <label for="email" style="margin-top:10px;" class="col-sm-2 control-label">Date Added</label>
                          <div class="col-sm-10">
                          <div class="input-group" style="margin-top:10px;">
                            <input id="date_added" class="form-control input-sm" type="date" placeholder="Date Added" name="date_added" required

                             ></input>

                             <div class="input-group-addon"> <span class="ast">*</span></div><span id="email_msg_box" style="display:none"></span>
                           </div>

                          </div>
                       </div>



                         <div class="form-group">

                          <label for="username" style="margin-top:10px;" class="col-sm-2 control-label"> Added By</label>
                          <div class="col-sm-10">

                          <div class="input-group" style="margin-top:10px;">
                           <span class="input-group-addon"> @</span>
                             <input id="added_by" class="form-control input-sm" type="text" placeholder="Added By" name="added_by" required

                             ></input>

                             <div class="input-group-addon"> <span class="ast">*</span></div> <span id="user_msg_box" style="display:none"></span>

                            </div>
                          </div>
                        </div>


                        <div class="form-group">

                         <label for="username" style="margin-top:10px;" class="col-sm-2 control-label"> Total Bedspace</label>
                         <div class="col-sm-10">

                         <div class="input-group" style="margin-top:10px;">
                          <span class="input-group-addon"> @</span>
                            <input id="bedspace" class="form-control input-sm" type="number" placeholder="Bedspace" name="bedspace" required

                            ></input>

                            <div class="input-group-addon"> <span class="ast">*</span></div> <span id="user_msg_box" style="display:none"></span>

                           </div>
                         </div>
                      </div>




                         <div class="form-group">
                              <label class="col-sm-2 control-label" style="margin-top:10px;" for="user_status">Room Status</label>
                              <div class="col-sm-10">
                              	<div class="input-group" style="margin-top:10px;">
                                	<select  class="form-control input-sm" name="user_status"  id="user_status" required>
                                  	 <option value="1"  selected> Unblock </option>
                                  	 <option value="0" <?php if($_SESSION['user_status']=='0') echo "selected";?>> Block </option>
                               	    </select>
                                    <div class="input-group-addon"> <span class="ast">*</span></div>
                          		</div>
                         	  </div>
                         </div>


                         <div class="form-group">
                          <label class="col-sm-2 control-label" style="margin-top:10px;" for="gender">Status</label>
                          <div class="col-sm-10" style="margin-top:10px;">

                            <select id="status" class="form-control input-sm" name="status" required>

                            <?php  echo select_status($_SESSION['status']); ?>

                             </select>


                          </div>

                        </div>

                        <div class="form-group">
                         <label class="col-sm-2 control-label" style="margin-top:10px;" for="gender">Gender</label>
                         <div class="col-sm-10" style="margin-top:10px;">

                           <select id="gender" class="form-control input-sm" name="status" required>

                           <option>Male</option>
                           <option>Female</option>

                            </select>


                         </div>

                       </div>
                        <div class="form-group">
                              <label for="title" class="col-sm-2 control-label" style="margin-top:10px;">Select Campus </label>
                              <div class="col-sm-10">
                              	<div class="input-group" style="margin-top:10px;">
                                <select class="form-control" id="campus" onchange="ggg()">
                                  <option></option>
                                  <?php

                                        $sql_get_state=mysqli_query($conn_1, "SELECT *FROM hostel_campuses WHERE status='1'") or die(mysqli_error($dbc));
                                        if($sql_get_state){
                                          $sql_get_state_row=mysqli_num_rows($sql_get_state);
                                          if($sql_get_state_row > 0){
                                            while($row=mysqli_fetch_array($sql_get_state)){
                                              $id = $row['id'];
                                              //echo'<input type="text" name="id" value="'.$id.'"/>';
                                              echo '<option name="title" value="'.$id.'">'.$row['title'].'</option>';
                                            }
                                          }
                                        }


                                    ?>
                                </select>
                                <div class="input-group-addon"> <span class="ast">*</span></div>
                                </div>

                              </div>
                           </div>
                           <div id="q"></div>

                          <input type="hidden" value="save_users" name="act" />
                  		  <input type="hidden" value="TRUE" name="upload" />
                        <br>
                        <div id="q" style="font-size: 20px; text-align: center;margin-top:30px; color:red;"></div>
                  </div><!-- /col-lg- 6 -->
                  </fieldset>
