
  <div class="container-fluid">
 
 <div class="row">

						<div class="col-md-12">
  
		<div class="panel panel-primary" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				Please Enter Correct Details of the New module
            	</div>
            </div>
			<div class="panel-body">

			
										
					<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">
							
					
	
				<?PHP
 echo $this->session->flashdata('msg'); 
		?>
		
		
			<?PHP
				$session_data = $this->session->userdata('adminlogged_in');


		
                 echo form_open('admin/addmodule' , 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="inputname" class="col-sm-2 control-label">	module Name</label>
    <div class="col-sm-10">

		  		<input type="text" name="name" value="<?php echo set_value('name'); ?>"id="name" class="form-control"  placeholder="Enter module Name">
		 
				
		<span class="text-danger"> 	<?php echo form_error('name'); ?>
		
		</span>
	</div>
  </div>					
	<div class="form-group">
    <label for="inputcode" class="col-sm-2 control-label">	module Code</label>
    <div class="col-sm-10">

		  		<input type="text" name="code" value="<?php echo set_value('code'); ?>"id="code" class="form-control"  placeholder="Enter module code">
		 
				
		<span class="text-danger"> 	<?php echo form_error('code'); ?>
		
		</span>
	</div>
  </div>	



	

	<div class="form-group">
    <label for="inputurl" class="col-sm-2 control-label">	module URL</label>
    <div class="col-sm-10">

		  		<input type="text" name="url" value="<?php echo set_value('url'); ?>"id="url" class="form-control"  placeholder="Enter module URL">
		 
				
		<span class="text-danger"> 	<?php echo form_error('url'); ?>
		
		</span>
	</div>
  </div>	
	<div class="form-group">
    <label for="inputicon" class="col-sm-2 control-label">	module icon</label>
    <div class="col-sm-10">

		  		<input type="text" name="icon" value="<?php echo set_value('icon'); ?>"id="url" class="form-control"  placeholder="Enter module icon">
		 
				
		<span class="text-danger"> 	<?php echo form_error('icon'); ?>
		
		</span>
	</div>
  </div>	

	<div class="form-group">
    <label for="inputsort" class="col-sm-2 control-label">	module Sorting</label>
    <div class="col-sm-10">

		  		<input type="text" name="sort" value="<?php echo set_value('sort'); ?>"id="sort" class="form-control"  placeholder="Enter module sort">
		 
				
		<span class="text-danger"> 	<?php echo form_error('sort'); ?>
		
		</span>
	</div>
  </div>	


  

<div class="form-group">
    <label for="inputtype" class="col-sm-2 control-label">	module Type</label>
    <div class="col-sm-10">

		  		<input type="text" name="type" value="<?php echo set_value('type','side'); ?>"id="type" class="form-control"  placeholder="Enter module type">
		 
				
		<span class="text-danger"> 	<?php echo form_error('type'); ?>
		
		</span>
	</div>
  </div>
		
  
  
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="btn_module" class="btn btn-primary" value="module">
                                <span class="glyphicon glyphicon-log-in"></span> Add module                           
								 </button>
    </div>
  </div>
			</div>							   
									<?php echo form_close();?>

							
						</div>
					</div>



 <div class="table-responsive">
 
<table id="example"  cellspacing="1" class="table  table" width="100%">
   <thead>
  <tr>

    <th>Module Code</th>

    <th>Module Name</th>    

    <th>Module URL</th>    

    <th>Module icons</th> 
	
    <th> Sorting</th> 
		    <th> Menu</th> 

    <th> Type</th> 
	<th> Status</th> 
    <th>Action</th>    

  </tr>
   </thead>
<?php 
	

if(is_array($module)) {

   foreach($module as $row){

  echo "<tr>";

    $id=$row->id;

    echo "<td>". $row->id ."</td>";

    echo "<td>". $row->name ."</td>";

    echo "<td>". $row->url ."</td>";
	    echo "<td>". $row->icon ."</td>";
			    echo "<td>". $row->sort ."</td>";
							    echo "<td>". $row->menu ."</td>";

				    echo "<td>". $row->type ."</td>";
					?>
					  <td><?php  

  //$mystatus="";
$mystatus=$row->status;
			  if( $mystatus =="1"){
				 echo $mystatus="active"; 
			  } else if( $mystatus =="0"){
				    echo $mystatus="inactive";
				  
			  }else{
echo $c->status ;
}

?></td>
     <td>
	                              <a  id="more" class="btn btn-primary" href="<?php echo base_url();?>admin/editmodules?randomitemidentifier=<?php   {echo  $id;}  ?>">Edit  </a>
</td>
<?PHP
 

}} else {
    echo 'There is no any module data available.... try again.';
}

 echo "</tr>";   




?>

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




















































