
 <div class="row">
  
   	<div class="col-md-12">
		<div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				Report new Issue to the Ministry of Eduction
				
								                   <span class="pull-right">  <a  id="more" class="btn btn-primary" href="<?php echo base_url();?>user/report">View your reports  </a>

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

			
										
					<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">
					
	
				<?PHP
					$session_data = $this->session->userdata('logged_in');
$data['username'] = $session_data['username'];
$data['id'] = $session_data['id'];

 $username=$data['username'];
$id=$data['id'];

$imgid = rand(100, 990000).time();
				echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/postissue' , 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="inputtype" class="col-sm-2 control-label">	Report type</label>
    <div class="col-sm-10">
	<select class="form-control" name="type" required>
	
	<option value=""  >---Select type issue to report---</option>
	<option value="all"  >---All school levels---</option>

	
	<?php 
					 
			
	
	$type = $this->studentbiodatamodel->populatetypeofcategory();

var_dump($type);
if(is_array($type)) {

   foreach($type as $typerow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $typerow->id;   ?>"><?=  $typerow->name; ?></option>



	<?php

}} else {
    echo 'No Campus.';
}
	
   


?>
			 
			
				
				</select>
		
						<span class="text-danger"><?php echo form_error('type'); ?>

	</div>
  </div>
  
  
  
  
     <div class="form-group">
    <label for="inputcountry" class="col-sm-2 control-label">	Country</label>
    <div class="col-sm-10">
		
<select name="country" id="country"class="form-control" required>
    <?php

 ?>
<option value=""  >---Select your country---</option>

		<?php 

	
$country = $this->nationmodel->populatenation();


if(is_array($country)) {

   foreach($country as $countryrow){

    ?>
	    <option value="<?php echo set_value('country',$countryrow->id); ?> "><?=$countryrow->name;?></option>

   
    <?php

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

?>
	</select>
		
		
		<span class="text-danger"> <?php echo form_error('country'); ?>
		
		</span>
	</div>
  </div>
  
  
  

     <div class="form-group">
    <label for="inputcounty" class="col-sm-2 control-label">	County</label>
    <div class="col-sm-10">
		
<select name="county" id="county"class="form-control" required>
    <?php

 ?>
<option value=""  >---Select the county---</option>
<option value="N/A"  >---N/A---</option>


		<?php 

	
$country = $this->countymodel->populatecounty();


if(is_array($country)) {

   foreach($country as $countryrow){

    ?>
	    <option value="<?php echo set_value('country',$countryrow->id); ?> "><?=$countryrow->name;?></option>

   
    <?php

}} else {
    echo 'There is no county  available.... try again.';
}

?>
	</select>
		
		
		<span class="text-danger"> <?php echo form_error('county'); ?>
		
		</span>
	</div>
  </div>
  

  
  
  
  
     <div class="form-group">
    <label for="inputcategory" class="col-sm-2 control-label">	School Category</label>
    <div class="col-sm-10">
	<select class="form-control" name="category" required>
	
	<option value=""  >---Select Item category---</option>

	
	<?php 
					 
			
	
	$category = $this->studentbiodatamodel->populatelostfoundcategory();


if(is_array($category)) {

   foreach($category as $categoryrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $categoryrow->id;   ?>"><?=  $categoryrow->name; ?></option>



	<?php

}} else {
    echo 'No category available.';
}
	
   


?>
			 
			
				
				</select>
		
						<span class="text-danger"><?php echo form_error('category'); ?>

	</div>
  </div>
  
  

  
   <div class="form-group">
    <label for="inputplace" class="col-sm-2 control-label">	Specific place </label>
    <div class="col-sm-10">

	<input type="text" name="place" value="<?php echo set_value('place'); ?>"id="place" class="form-control" required placeholder="Enter the name where Item was found ">
			<span class="text-danger"> <?php echo form_error('place'); ?>
		
		</span>
	</div>
  </div>
  <div class="form-group">
    <label for="inputoccurancedate" class="col-sm-2 control-label">	Occurance Date ?</label>
    <div class="col-sm-10">

	<input type="text" name="occurancedate" value="<?php echo set_value('occurancedate'); ?>"id="occurancedate" class="form-control" required placeholder="Enter the Date of ocurrance if there is ">
			<span class="text-danger"> <?php echo form_error('occurancedate'); ?>
		
		</span>
	</div>
  </div>
  
  <div class="form-group">
    <label for="inputdescription" class="col-sm-2 control-label">Report	Details </label>
    <div class="col-sm-10">

	<textarea name="description" class="form-control" placeholder="You can describe the issues into details details ">
				
				<?php echo set_value('description'); ?>
			</textarea> 
			<span class="text-danger"> <?php echo form_error('description'); ?>
		
		</span>
	</div>
  </div>
  
  

  
  
  
  
  <div class="form-group">
    <label for="inputphoto" class="col-sm-2 control-label">	Upload Image</label>
    <div class="col-sm-10">
	<input type="hidden" name="img_id"   value="<?php if(isset($imgid)) {echo $imgid; }?>"  class="form-control">


	<input type="file" name="photo" value="<?php echo set_value('photo'); ?>"id="img_id" class="form-control"  placeholder="Please upload image if any">
			<span class="text-danger"> <?php echo form_error('photo'); ?>
		
		</span>
	</div>
  </div>
  


  


  
  
  
   
  
  
  
  
  
  
  
  
   
  
  
  
  
  
  
  
  
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  name="btn_postissue"  value="issue"  class="btn btn-primary"> Report Issue  </button>

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

								
			
			
			
			
			
			
		
		</div>
  
  </div>

</div>
















