	<ul class="nav nav-tabs bordered">
			<li class="active">
            	<a href="#list" data-toggle="tab"><i class="entypo-menu"></i> 
					All SMS Category
                    	</a></li>
			<li>
            	<a href="#add" data-toggle="tab"><i class="entypo-plus-circled"></i>
					Add SMS Category
                    	</a></li>
		</ul>
    	<!------CONTROL TABS END------>
        
		<div class="tab-content">
            <!----TABLE LISTING STARTS-->
            <div class="tab-pane box active" id="list">
				
     


 <div class="panel panel-primary" data-collapsed="0">
 
<table id="example"  cellspacing="1" class="table  table" width="100%">
             <thead>
		
         <tr>
    
    <th>Category Name </th>

           
	<th>Description</th> 
	<th>Date created</th> 
	<th>Update</th> 




                 </tr>
             </thead>
<?php
echo $this->session->flashdata('msg'); 
 if(!is_array($smscategory)) 

 {


   echo "<tr  style='margin-bottom:0px;margin-top:0px;' '>";
      echo "<td colspan='1'>";
    
       echo '<div class="alert alert-warning text-center">There is no sms category  found by now from system..</div>';
    echo "</td>";
   echo "</tr>";
    }else {
?>
    
             <?php 
  
  	foreach ($smscategory as $c): 

		 

             ?>



             <tr>
                
            <?php 
		$id=$c->id;


?>

             <td><?php echo $c->category ; ?></td> 
				<td><?php echo $c->	message ; ?></td> 

				
                     <td><?php echo $c->createdat; ?></td>   
                     <td>
                     <a class="btn btn-primary" id="more" href="<?php echo base_url();?>admin/editsmscategory?randomitemidentifier=<?php   {echo  $id;}  ?>">Update </a>
         </td>

             </tr>

             <?php endforeach; ?>

              <?php }?>

        </table>

</div>

</div>
<div class="tab-pane box" id="add" style="padding: 5px">




		
<div class="row">
	<div class="col-md-12">
		<div class="panel panel-primary" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" >
            		<i class="entypo-plus-circled"></i>
				Add SMS Category
            	</div>
            </div>
			<div class="panel-body">





				<?PHP
				echo $this->session->flashdata('msg'); 
		
                 echo form_open('admin/addsmscategory' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
					
  <div class="form-group">

    <label for="inputcategory" class="col-sm-2 control-label">Category Name</label>
    <div class="col-sm-7">
		  		<input type="text" name="category" value="<?php echo set_value('category'); ?>"id="category" class="form-control" required placeholder="Enter category name">
     <span class="text-danger"><?php echo form_error('category'); ?></span>
   </div>
  </div>
   			
  		<input type="hidden" name="action" value="<?php echo set_value('action','insert'); ?>"id="action" class="form-control" required placeholder="Enter action">

  
   <div class="form-group">
    <label for="inputmessage" class="col-sm-2 control-label">message </label>
    <div class="col-sm-7">
	<textarea name="message" id="ttt" rows="5" placeholder="add message" class="form-control"></textarea>
    <span class="text-danger"><?php echo form_error('message'); ?></span>
   </div>
  </div>
    
  
  
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-7">
     
	       <button type="submit" name="btn_smscategory"value="smscategory" class="btn btn-primary">Add Category</button>

    </div>
  </div>
                    
                <?php echo form_close();?>
            </div>
        </div>
    </div>
</div>


    </div>
</div>




