<?php $enrolments = $this->user_model->my_courses()->result_array(); ?>
<?php $user_details = $this->user_model->get_all_user($this->session->userdata('user_id'))->row_array();
$userid = $this->session->userdata('user_id'); ?>
<?php include "breadcrumb.php"; ?>

<section class="wish-list-body ">
    <div class="container">
        <div class="row">
            <div class="col-lg-3 col-md-4 col-sm-12">
                <?php include "profile_menus.php"; ?>
            </div>
            <div class="col-lg-9 col-md-8 col-sm-12">
                <div class="my-course-1-full-body">
                    <h1><?php echo get_phrase('Student Dashboard'); ?></h1>
                    
                    
            <div class="row justify-content-center">
                <div class="col-lg-6 py-4 pull-right">
                  <div class="card bg-card">
                    <div class="card-body">
                      <div class="float-right bg-white">
                        <i class="mdi mdi-currency-usd widget-icon text-secondary"></i>
                      </div>
                      <h5 class="total_text" title="Total affiliate earnings :">Enrolled Courses</h5>
                      <h3 class="mt-3 mb-3">
                        <span class="text-white"><i class="mdi mdi-arrow-down-bold"></i></span>
                        <?php echo $this->db->get_where('enrol', array('user_id' => $userid))->num_rows();?> </h3>
                    </div> <!-- end card-body-->
                  </div> <!-- end card-->
                </div> <!-- end col-->

                <div class="col-lg-6 py-4 pull-right">
                  <div class="card bg-card">
                    <div class="card-body">
                      <div class="float-right bg-white">
                        <i class="mdi mdi-currency-usd widget-icon text-success"></i>
                      </div>
                      <h5 class="total_text" title="Available balance to withdrawal">Inprogress Courses</h5>
                                              <h3 class="mt-3"><span class="text-white"><i class="mdi mdi-arrow-down-bold"></i></span> <?php echo $this->db->get_where('enrol', array('user_id' => $userid, 'completed' => 0))->num_rows();?></h3>


                                          </div> <!-- end card-body-->
                  </div> <!-- end card-->
                </div> <!-- end col-->
                
                
                
                  <div class="col-lg-6 py-4 pull-right">
                  <div class="card bg-card">
                    <div class="card-body">
                      <div class="float-right bg-white">
                        <i class="mdi mdi-currency-usd widget-icon text-success"></i>
                      </div>
                      <h5 class="total_text" title="Available balance to withdrawal">Finished Courses</h5>
                                              <h3 class="mt-3"><span class="text-white"><i class="mdi mdi-arrow-down-bold"></i></span> <?php echo $this->db->get_where('enrol', array('user_id' => $userid,'completed' => 1))->num_rows();?></h3>


                                          </div> <!-- end card-body-->
                  </div> <!-- end card-->
                </div> <!-- end col-->
                
                
                
                
                  <div class="col-lg-6 py-4 pull-right">
                  <div class="card bg-card">
                    <div class="card-body">
                      <div class="float-right bg-white">
                        <i class="mdi mdi-currency-usd widget-icon text-success"></i>
                      </div>
                      <h5 class="total_text" title="Available balance to withdrawal">Passed Courses</h5>
                                              <h3 class="mt-3"><span class="text-white"><i class="mdi mdi-arrow-down-bold"></i></span> <?php echo $this->db->get_where('enrol', array('user_id' => $userid,'passed' => 1))->num_rows();?></h3>


                                          </div> <!-- end card-body-->
                  </div> <!-- end card-->
                </div> <!-- end col-->
                
                
                
                  <div class="col-lg-6 py-4 pull-right">
                  <div class="card bg-card">
                    <div class="card-body">
                      <div class="float-right bg-white">
                        <i class="mdi mdi-currency-usd widget-icon text-success"></i>
                      </div>
                      <h5 class="total_text" title="Available balance to withdrawal">Failed Courses</h5>
                                              <h3 class="mt-3"><span class="text-white"><i class="mdi mdi-arrow-down-bold"></i></span> <?php echo $this->db->get_where('enrol', array('user_id' => $userid,'passed' => 0))->num_rows();?></h3>


                                          </div> <!-- end card-body-->
                  </div> <!-- end card-->
                </div> <!-- end col-->
                
                
                
              </div>
                    
                    
                </div>
            </div>
        </div>
    </div>
</section>