



	
   	<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>
				View Issues  already reported
			


				</div>
            </div>
			<div class="panel-body">

			
										
					<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">
	
									
									
							
<table id="example"  cellspacing="1" class="border  table" width="100%">
             <thead>
         <tr>
		  <th>Image</th>
     <th>Type of Issue</th>
    
	     
   <th>School Category</th>
    <th>School affected</th>         
<th>Date created</th> 

<th>View more</th> 




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

 {


   echo "<tr  style='margin-bottom:0px;margin-top:0px;' '>";
      echo "<td colspan='6'>";
    
       echo '<div class="alert alert-warning text-center">You have not reported any issue please feel free to do so..</div>';
    echo "</td>";
   echo "</tr>";
    }else {
?>
    
             <?php 
  
  	foreach ($report as $c): 

		 

             ?>



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


?>

              
 

<td>

      <?php 


 $img_id=$c->img_id;

      $usr_result= $this->studentbiodatamodel->populateuploadedimages($img_id);
   
 $img1='alllostfound/';
        if($usr_result==FALSE){

       ?>
<img class="img-circle" src="<?php echo base_url(); ?>images/img/picture.png"     width="70" style="border-radius:15px;  margin:2px;  border-color:#000066;box-shadow:0 2px 4px rgba(30,30,30,0.5)inset; ">          

                <?php
     
 }else{
        

$img=$usr_result[0]->name;
 



  $url = base_url().$img1.$img;

 
 ?>
<img class="img-circle" src="<?php echo $url ?>"  width="70" style="border-radius:15px; margin:2px;  border-color:#000066;box-shadow:0 2px 4px rgba(30,30,30,0.5)inset; ">          



<?PHP

        
        }
 ?>
</td>

 <td><?php ; 
   $alltype=$c->type;
   if($alltype!=""){
	  
      $mytype = $this->studentbiodatamodel->gettypegorybyid($c->type);
  
  echo  $type=$mytype[0]['name']; 
	
   }else{
	    echo "General";  
   }
  
  
  ?></td>

                 <td><?php
                   $category= $c->category; 
         $mycategory = $this->studentbiodatamodel->getcatereportgorybyid($category);

 if($mycategory==FALSE){
    echo"general";
}else{

    foreach ($mycategory as $cat): 
      echo $cat->name;
  endforeach;
}
                   ?></td>  
                 <td><?php
				 
				   $allschool=$c->school;
   if($allschool!=""){
	  
      $mytype = $this->schoolmodel->getschoolbyid($allschool);
  
  echo  $type=$mytype[0]['name']; 
	
   }else{
	    echo "General";  
   }
  
				 
				 ?></td>
                     <td><?php echo $c->postedtime; ?></td>   
                     <td>
                     <a  id="more" class="btn btn-primary" href="<?php echo base_url();?>admin/viewmore?randomitemidentifier=<?php   {echo  $id;}  ?>">View More  </a>
         </td>
             </tr>

             <?php endforeach; ?>

              <?php }?>

        </table>

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

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

 
</div>


















