
<div class="container"> 
<?php 
$logged_in=$this->session->userdata('logged_in');
		$uid=$logged_in['uid'];	 
			
			?>
   
 <!-- <h3><?php echo $title;?></h3> -->
    <?php 
	$list_view="table";
	     $acp=explode(',',$logged_in['quiz']);
			if(in_array('List_all',$acp)){
		?>
		<div class="row">
 
  <div class="col-lg-6">
    <form method="post" action="<?php echo site_url('quiz/index/0/'.$list_view);?>">
	<div class="input-group">
    <input type="text" class="form-control" name="search" placeholder="<?php echo $this->lang->line('search');?>...">
      <span class="input-group-btn">
        <button class="btn btn-default" type="submit"><?php echo $this->lang->line('search');?></button>
      </span>
	 
	  
    </div><!-- /input-group -->
	 </form>
  </div><!-- /.col-lg-6 -->
  <div class="col-lg-6">
  <p style="float:right;">
 
  </p>
  
  </div>
</div><!-- /.row -->

<?php 
	}
?>
<div class="row">
 
 
 

 
</div>


  <div class="row">
 
<div class="col-md-12">
<br> 
			
        	   <?php 
   $logged_in=$this->session->userdata('logged_in');
   ?>
		   <?php 
	   if($this->session->flashdata('message')){
		   echo $this->session->flashdata('message');	
	   }
	   ?>	
	   
<table class="table table-bordered" >
<font color="orange">
<span><img src="<?php echo base_url(); ?>images/ajatus-logo-black.svg"  width="1100" height="100"></span>
	<h3>Instructions</h3><br>
 <!-- <ul>
	 
  <li>As you enter show your Student ID card.</li><br></td></tr>
 <li>Make sure your mobile phone is switched off and place it at the front together with any bags, books, coats etc. Then find your
seat.</li><br></td></tr>
 <li>Duration of the exam will be of fourty minutes </li><br></td></tr>
 <li>Each question will have four option </li><br></td></tr>
 <li>Each question is of one mark and there is no negative marking.</li><br></td></tr>
<li>Pencil cases/glasses cases: Students are NOT permitted to have these on their desks. Pens/glasses must be removed and
placed on the desk and all cases must be left at the front/side of the room with other belongings.
</li><br></td></tr>
<tr><td><li>Remember that talking is not allowed at any time in the exam hall.</li><br></td></tr>
<tr><td><li>Listen carefully to instructions. Students are required to comply with the instructions of invigilators at all times. For example,
if you are asked to sit in a designated place then you must do so and you must not move.</li></td></tr>
<tr><td><li>Keep your eyes on your own paper. Remember, copying is cheating!</li></td></tr>
<tr><td><li>Leave the exam hall quickly and quietly. Remember to take all your belongings with you. (Remember to collect all your
belongings from holding rooms.) You must remain silent until after you have exited the building.</li></td></tr>

</ul> -->
<?php
foreach($instruictions as $key => $val){
?>
<tr><td><li><font color="blue"><?php echo $val['content'];?></font></li>
</td></tr>
<?php
}?>
<!-- <tr><td><?php echo $this->lang->line('maximum_attempts');?></td><td><?php echo $quiz['maximum_attempts'];?></td></tr>

<?php $ex=explode(',',$quiz['correct_score']); if(count($ex)<=1){ ?>

<?php } ?>
<!-- <tr> <td><?php echo $this->lang->line('select_language');?></td><td> <select name="selected_lang"  id="changelang">
<?php
foreach($this->config->item('question_lang') as $lk => $val){
?>
<option value="<?php echo $lk;?>"><?php echo $val;?></option>
<?php 
}
?>
</select>
</td></tr> -->
</table>
		 
<table class="table table-bordered">

<?php 
if(count($result)==0){
	?>
<tr>
 <td colspan="3"> <button type="button" disabled>Start Quiz</button></td>
</tr>	
	
	
	<?php
}
foreach($result as $key => $val){
?>

 
 <?php 
 if($val['quiz_price'] == 0 || in_array($val['quid'],$purchased_quiz)){
if($val['end_date'] >=time()){	 
	if(!in_array('List_all',explode(',',$logged_in['users']))){
		?>
	 <?php if($val['status']==1){?>
<a  href="<?php echo site_url('quiz/validate_quiz/'.$val['quid']);?>" class="btn btn-info"  ><?php echo $this->lang->line('start_quiz');?> </a>
<?php 
		  }
		  else{?>
		  <button type="button" disabled>Start Quiz</button>
		  <?php  }?>
 
<?php
	}else{
		?>
		<?php if($val['status']==1){?>
		<a href="<?php echo site_url('quiz/quiz_lock/'.$val['quid'].'/'.$val['status']);?>" class="btn btn-success"  >Activate </a>
		<?php 
		  }
		  else{?>
		  	<a href="<?php echo site_url('quiz/quiz_lock/'.$val['quid'].'/'.$val['status']);?>" class="btn btn-danger"  >Deactivate </a>
		 <?php  }
 }
 ?>
<?php
}
if($val['end_date'] < time()){	 ?>
	 
<a href="#" class="btn btn-warning"  ><?php echo $this->lang->line('expired');?> </a>

<?php
}
if($val['start_date'] > time()){	 ?>
	 
<a href="#" class="btn btn-default"  ><?php echo $this->lang->line('upcoming');?> </a>

<?php
}
 
 }else{
 ?>
<a href="<?php echo site_url('payment_gateway_2/subscribe/0/'.$uid.'/'.$val['quid']);?>" class="btn btn-primary"  ><?php echo $this->config->item('base_currency_prefix').' '.$val['quiz_price'].' '.$this->config->item('base_currency_sufix')." ".$this->lang->line('paynow');?> </a>

 
 <?php 
 }
 ?>
<?php 
	     $acp=explode(',',$logged_in['quiz']);
		
			if(in_array('List_all',$acp)){
	?>
		 
<a href="<?php echo site_url('quiz/edit_quiz/'.$val['quid']);?>"><img src="<?php echo base_url('images/edit.png');?>"></a>
<a href="javascript:remove_entry('quiz/remove_quiz/<?php echo $val['quid'];?>');"><img src="<?php echo base_url('images/cross.png');?>"></a>
<?php 
}
?>


<?php 
}
?>
</table>

   

</div>

</div>
<br><br>




</div>

