
<?php defined('BASEPATH')or exit("NO DIRECT ACCESS iS ALLOWED");?>
<!-- main content -->

<section class="content patients">
    <div class="container-fluid">
        <div class="block-header">
            <h2>All Request</h2>
            <small class="text-muted">Course Request List</small>
        </div>

        <div class="row clearfix">
          <?php if ($this->session->flashdata('message') == TRUE): ?>
            <div class="alert alert-success"><?php echo $this->session->flashdata('message'); ?></div>
          <?php endif; ?>
          <?php if( count($list) ):$sn=1;
              $count = $this->uri->segment(4);
              foreach($list as $lists ): ?>
              <?php $json2 =  json_decode($lists->info);?>
            <div class="col-lg-4 col-md-6 col-sm-12">
                <div class="card all-patients">
                    <div class="body">
                        <div class="row">
                            <div class="col-lg-4 col-md-12 m-b-0">
                                <a href="#" class="p-profile-pix">
                                  <?php if($lists->profile_image==""){ ?>
                                    <?php echo img(array("src"=>'assets/university/assets/images/sm/user-128.png',"alt"=>'user','class'=>'img-thumbnail img-fluid'))?>
                                <?php } else { ?>
                                  <?php echo img(array("src"=>$lists->profile_image,"alt"=>'user','class'=>'img-thumbnail img-fluid'))?>
                                <?php }?>
                                  </a>
                            </div>
                            <div class="col-lg-8 col-md-12 m-b-0">
                                <h5 class="m-b-0"><?php echo  ucfirst($lists->first_name)." ".ucfirst($lists->last_name);?>
                                  <a href="#" class="edit"><i class="zmdi zmdi-edit"></i></a></h5>
                                  <small><?=ucwords($lists->class);?><?=nbs(4);?><?=ucwords($lists->subject);?><?=nbs(4);?>
                                  <?php //echo ucwords($lists->request_date);?></small>
                                  
                                <address class="m-t-10 m-b-0">
                                  <?php echo  ucfirst($lists->request_date)."<br>";?>
                                  <!--  <i class="material-icons">home</i> <span class="icon-name"><?php //echo ucwords($lists->email);?></span><br>-->
                                    <i class="material-icons">phone_in_talk</i><!--<abbr title="Phone">P:</abbr>-->
                                     <?=ucwords($lists->mobile);?>
                                </address>
                              
                               <?php if($lists->is_see_by_admin==1){
                                           echo anchor("Admin/unapprove_class/{$lists->id}",'UnApprove',['title'=>'UnApprove Request',
                                                'onClick' =>"return confirm('Are you sure you want to UnApprove?')"]);
                                        }else{
                                            echo anchor("Admin/approve_class/{$lists->id}",'Approve',['title'=>'Approve Request',
                                                'onClick' =>"return confirm('Are you sure you want to Approve?')"]);
                                        }?>
                                        
                                        <?php if($lists->is_paid==1){
                                           echo anchor("Admin/unpaid_user_request/{$lists->id}",'Unpaid',['title'=>'UnApprove Paid',
                                                'onClick' =>"return confirm('Are you sure you want to Unpaid?')"]);
                                        }else{
                                            echo anchor("Admin/paid_user_request/{$lists->id}",'Paid',['title'=>'Approve Paid',
                                                'onClick' =>"return confirm('Are you sure you want to Paid?')"]);
                                        }?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <?php $sn++; unset($json2);?>
            <?php endforeach; ?>
            <?php else : ?>
              <tr>
              <td colspan="6"><strong>No record found</strong></td>
              </tr>
            <?php endif; ?>
            <?php $count++; echo  $link; ?>
        </div>
    </div>
</section>
<!-- main content -->
