		<div id="content">
		 <style>
      
      .add{ font-size: 14px; color: #EB028F; border: none; }
      .rem a{ font-size: 14px; color: #f00; border: none; }
      .submit{width: 110px; height: 30px; background: #FF6600; color: #fff;text-align: center;}
    </style>
	 <script src="js/jquery-1.9.0.min.js"></script>
    <script>
      $(document).ready(function() {
        $(".add").click(function() {
          $('<div> Upload your document here.. <table><tr><td><input class="form-field" name="document[]"accept=""  type="file" ></td><td> <input class="form-field" name="documentname[]" placeholder="Enter Document name e.g fees structure" style="width:300px;" type="text" > </td></tr> </table> <span class="rem" > <a href="javascript:void(0);" >remove </span></div>').appendTo(".contents");

        });
        $('.contents').on('click', '.rem', function() {
          $(this).parent("div").remove();
        });

      });
    </script>
<table width="100%" border="1" >

<tr>

<td width="40%" valign="top" style="color:blue; badding:10px; ">



<b style="color:red; badding:10px;">Enter Message<br></b>
<fieldset id="fieldHolder"><legend id="formHeader">Please pass a message to those who are admitted for this course..</legend>
	<?PHP

 echo $this->session->flashdata('msg'); 
		echo form_open_multipart('admin/addmessage');
		 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
<table>
	<tr>
		 <td colspan="3">Enter the Requirements to be viewed by those who applied for this course<br />
		<input type="hidden" name="courseid"  readonly="readonly" value="<?php echo set_value('courseid', $id); ?>" id="regnumber" class="form-field" >

			<textarea rows="10" cols="20" style="width:400px; aliggment:left;" name="requirements" class="form-field" value="<?php echo set_value('requirements'); ?>" >
<?php echo set_value('requirements',$message[0]['requirements']); ?>
			</textarea>
			</td>
			</tr>
			<tr>
		 <td colspan="3">Enter the message to be viewed by those who applied for this course<br />
		<input type="hidden" name="courseid"  readonly="readonly" value="<?php echo set_value('courseid', $id); ?>" id="regnumber" class="form-field" >

			<textarea rows="10" cols="20" style="width:400px; aliggment:left;" name="message" class="form-field" value="<?php echo set_value('message'); ?>" >
<?php echo set_value('courseid',$message[0]['message']); ?>
			</textarea>
			</td>
			</tr>
			<tr>
			<td>
			  <td>Status <br />
				
		  <select class="form-field" name="status" required>
		   <option value="<?=   $message[0]['status']  ?>"><?=   $message[0]['status']  ?></option>
				<option value="Active">Active</option>
				<option value="Inactive" > Inactive </option>
			
				</select>
		</td>	


	<td>
	<button type="submit" name="btn_sendmessage" class="btn success" value="sendmessage">
                                <span class="glyphicon glyphicon-log-in"></span> Add/ Update Message                          
								 </button>
								 
								 
	
		</td>
	</tr>


</table>


</fieldset>
		
			<?PHP
		echo form_close();
		?>





</td>
<td width="60%" valign="top">
	<center>






 <fieldset id="fieldHolder"><legend id="formHeader">Upload / Download all documents for a specific course </legend>

<table>
		<?PHP

 echo $this->session->flashdata('msg1'); 
		echo form_open_multipart('admin/addcoursedocument');
		 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>

	<tr>
<td> 
		<input type="hidden" name="courseid"  readonly="readonly" value="<?php echo set_value('courseid', $id); ?>" id="regnumber" class="form-field" >

Upload your pdf document here.. <br>
   <input  name="document[]" class="form-field"  type="file"  value="upload/defaultimage.png"multiple="multiple" >

</td>
<td>

 Name of the document e.g Fees structure<br>
		<input type="text" name="documentname[]" style="width:300px" required value="<?php echo set_value('documentname') ;?>" placeholder="Enter the name of document e.g fees structure"  class="form-field"  >

</td>

<td>
</td>

</tr>
<tr>
<td colspan="2">

<div class="contents" ></div>
                  <div class="height10"></div>
				  
				  
				
</td>

</tr>
<tr>
<td colspan="2">
	<button type="submit" name="btn_upload" class="btn success" value="coursedocument">
                                <span class="glyphicon glyphicon-log-in"></span> Upload documents                         
								 </button>
								 
								 
	
		</td>
	</tr>
			<?PHP
		echo form_close();
		?>

</table>


<?php 

if(is_array($documets)) {

?>

  <table cellpadding="0" cellspacing="0" border="0" class="table  table" id="example" style="border-color:#CCCCCC; width:100%;"  >

  <tr>

    <th>Document</th>

    <th>Document Name</th>    



      
<th>Date uploaded</th> 

<th>View document </th>   

  </tr>
  <?php


   foreach($documets as $row){

  echo "<tr>";

    
  echo "<td style='color:green'><b>". $row->document ."</b></td>";
   

 echo "<td>". $row->documentname ."</td>";
 
      echo "<td>". $row->createddate ."</td>";



$document=$row->document;
?>
<td  style='color:green'> 
		 
 <a href="<?php echo base_url();?>courseapplications/<?php echo  $row->document;?>"> view document  </a>	 

 </td>



<?php
			    
  
}} else {
 //$this->session->set_flashdata('msg', '<div class="alert alert-danger text-center">There is no any course application  that you have submitted.... Please apply now...</div>');

 // echo 'There is no any course application  that you have submitted.... Please apply now....';
   echo '<div class="alert alert-danger text-center">There is no document uploaaded for this course...You can upload any required document.</div>';
}

 echo "</tr>";   




?>

</table>
<table>
	


</table>
		
</fieldset>
	

		</center>

		
</div>