      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            Next of Kin
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">User Management</a></li>
            <li class="active">Next of Kin</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">
          <div class="row">         
           
           <div class="col-md-12">
              <div class="box box-success">
                <div class="box-header with-border">
                  <h3 class="box-title heading">Next of Kin Details</h3>
                </div><!-- /.box-header -->
                	<div class="box-body">
                    	<div  class="col-md-4">
                            
                            <form class="form-horizontal" role="form" action="<?php echo site_url(); ?>user_management/insert_next_of_kin" method="post" >
                            <input type="hidden" name="subject_id" value="<?php echo $subject_id;?>" />
                            <div class="form-group">                            
                              <label class="col-sm-4 control-label reg_label">First Name</label>
                              <div class="col-sm-8">
                              <?php echo form_error('first_name'); ?> <br/>                        	
                              <input type="text" class="form-control" name="first_name" placeholder="First Name"
                               data-toggle="tooltip" data-placement="bottom" value="<?php echo set_value('first_name'); ?>" title="First Name">
                              </div>					
							</div>
                            <div class="form-group">                            
                              <label class="col-sm-4 control-label reg_label">Other Names</label>
                              <div class="col-sm-8">
                              <?php echo form_error('other_names'); ?> <br/>                        	
                              <input type="text" class="form-control" name="other_names" placeholder="Other Names"
                               data-toggle="tooltip" data-placement="bottom" value="<?php echo set_value('other_names'); ?>" title="Other Names">
                              </div>                              					
							</div>
                            <div class="form-group">                            
                              <label class="col-sm-4 control-label reg_label">Relationship</label>
                              <div class="col-sm-8">
                              <?php echo form_error('relationship'); ?> <br/>
                              <select class="form-control" name="relationship" placeholder="Relationship"
                               data-toggle="tooltip" data-placement="bottom"  title="Relationship">
                                <option value="" selected disabled>Select Relationship</option>
                                <option value="Spouse" <?php echo set_select('relationship', 'Spouse'); ?>>Spouse</option>
                                <option value="Sibling" <?php echo set_select('relationship', 'Sibling'); ?>>Sibling</option>
                                <option value="Son" <?php echo set_select('relationship', 'Son'); ?>>Son</option>
                                <option value="Daughter" <?php echo set_select('relationship', 'Daughter'); ?>>Daughter</option>
                                <option value="Mother" <?php echo set_select('relationship', 'Mother'); ?>>Mother</option>
                                <option value="Father" <?php echo set_select('relationship', 'Father'); ?>>Father</option>
                                <option value="Relative" <?php echo set_select('relationship', 'Relative'); ?>>Relative</option>
                                <option value="Friend" <?php echo set_select('relationship', 'Friend'); ?>>Friend</option>
                              </select>
                         
                              </div>                              					
							</div>
                            <div class="form-group">                            
                              <label class="col-sm-4 control-label reg_label">Phone NO.</label>
                              <div class="col-sm-8">
                              <?php echo form_error('phone_no'); ?> <br/>                      	
                              <input type="text" class="form-control" name="phone_no" placeholder="Phone NO."
                               data-toggle="tooltip" data-placement="bottom" value="<?php echo set_value('phone_no'); ?>" title="Phone NO.">
                              </div>                              					
							</div>
                            
                            <div class="clearfix"></div>
					<div class="form-group">						
						
                        <div class="col-md-12">
							<button type="submit" class="btn btn-success btn-label-left btn-block">
								Submit
							</button>
						</div>
						
					</div>
                            
                            </form>
                 </div>      
                            
               <div  class="col-md-8">
                        
                <div class="box-content no-padding">
				<table id="next_of_kin" class="table table-bordered table-striped">
					<thead>
						<tr>
							<th>First Name</th>
							<th>Other Names</th>
							<th>Relationship</th>
							<th>Phone No.</th>
						</tr>
					</thead>
					<tbody>
                    <?php
					$x=0;
					if($kin == NULL){?>
					
					<tr>
							<td colspan="4"> Currently there is no next of kin in the system </td>
                            <td></td>
                            <td></td>
                            <td></td>
					</tr>
					<?php } else{
					foreach($kin as $row){$x++;
					?>
					<!-- Start: list_row -->
						<tr>
							<td><?php echo $row->first_name;?></td>
							<td><?php echo $row->other_names;?></td>
							<td><?php echo $row->relationship;?></td>
							<td><?php echo $row->phone_no;?></td>
						</tr>
                      <?php  }} ?>
					
					<!-- End: list_row -->
					</tbody>
					
				</table>
                </div>                            
                </div>
             
                </div><!-- /.box-body -->      
             </div><!-- /.box -->   
             
          	</div><!-- /.close wrapper div for col-md-12 -->
           
          </div>   <!-- /.row -->
        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->