1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?php
$status_wise_courses = $this->crud_model->get_status_wise_courses();
$number_of_courses = $status_wise_courses['pending']->num_rows() + $status_wise_courses['active']->num_rows();
$number_of_lessons = $this->crud_model->get_lessons()->num_rows();
$number_of_enrolment = $this->crud_model->enrol_history()->num_rows();
$number_of_students = $this->user_model->get_user()->num_rows();
?>
<div class="row">
<div class="col-xl-12">
<div class="card">
<div class="card-body">
<h4 class="page-title"> <i class="mdi mdi-apple-keyboard-command title_icon"></i> <?php echo get_phrase('dashboard'); ?></h4>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
<div class="row">
<div class="col-xl-12">
<div class="card">
<div class="card-body">
<h4 class="header-title mb-4"><?php echo get_phrase('admin_revenue_this_year'); ?></h4>
<div class="mt-3 chartjs-chart" style="height: 320px;">
<canvas id="task-area-chart"></canvas>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
<div class="row">
<div class="col-12">
<div class="card widget-inline">
<div class="card-body p-0">
<div class="row no-gutters">
<div class="col-sm-6 col-xl-3">
<a href="<?php echo site_url('admin/courses'); ?>" class="text-secondary">
<div class="card shadow-none m-0">
<div class="card-body text-center">
<i class="dripicons-archive text-muted" style="font-size: 24px;"></i>
<h3><span><?php echo $number_of_courses; ?></span></h3>
<p class="text-muted font-15 mb-0"><?php echo get_phrase('number_courses'); ?></p>
</div>
</div>
</a>
</div>
<div class="col-sm-6 col-xl-3">
<a href="<?php echo site_url('admin/courses'); ?>" class="text-secondary">
<div class="card shadow-none m-0 border-left">
<div class="card-body text-center">
<i class="dripicons-camcorder text-muted" style="font-size: 24px;"></i>
<h3><span><?php echo $number_of_lessons; ?></span></h3>
<p class="text-muted font-15 mb-0"><?php echo get_phrase('number_of_lessons'); ?></p>
</div>
</div>
</a>
</div>
<div class="col-sm-6 col-xl-3">
<a href="<?php echo site_url('admin/enrol_history'); ?>" class="text-secondary">
<div class="card shadow-none m-0 border-left">
<div class="card-body text-center">
<i class="dripicons-network-3 text-muted" style="font-size: 24px;"></i>
<h3><span><?php echo $number_of_enrolment; ?></span></h3>
<p class="text-muted font-15 mb-0"><?php echo get_phrase('number_of_enrolment'); ?></p>
</div>
</div>
</a>
</div>
<div class="col-sm-6 col-xl-3">
<a href="<?php echo site_url('admin/users'); ?>" class="text-secondary">
<div class="card shadow-none m-0 border-left">
<div class="card-body text-center">
<i class="dripicons-user-group text-muted" style="font-size: 24px;"></i>
<h3><span><?php echo $number_of_students; ?></span></h3>
<p class="text-muted font-15 mb-0"><?php echo get_phrase('number_of_student'); ?></p>
</div>
</div>
</a>
</div>
</div> <!-- end row -->
</div>
</div> <!-- end card-box-->
</div> <!-- end col-->
</div>
<div class="row">
<div class="col-xl-4">
<div class="card">
<div class="card-body">
<h4 class="header-title mb-4"><?php echo get_phrase('course_overview'); ?></h4>
<div class="my-4 chartjs-chart" style="height: 202px;">
<canvas id="project-status-chart"></canvas>
</div>
<div class="row text-center mt-2 py-2">
<div class="col-6">
<i class="mdi mdi-trending-up text-success mt-3 h3"></i>
<h3 class="font-weight-normal">
<span><?php echo $status_wise_courses['active']->num_rows(); ?></span>
</h3>
<p class="text-muted mb-0"><?php echo get_phrase('active_courses'); ?></p>
</div>
<div class="col-6">
<i class="mdi mdi-trending-down text-warning mt-3 h3"></i>
<h3 class="font-weight-normal">
<span><?php echo $status_wise_courses['pending']->num_rows(); ?></span>
</h3>
<p class="text-muted mb-0"> <?php echo get_phrase('pending_courses'); ?></p>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-8">
<div class="card" id = 'unpaid-instructor-revenue'>
<div class="card-body">
<h4 class="header-title mb-3"><?php echo get_phrase('unpaid_instructor_revenues'); ?>
<a href="<?php echo site_url('admin/instructor_revenue'); ?>" class="alignToTitle" id ="go-to-instructor-revenue"> <i class="mdi mdi-logout"></i> </a>
</h4>
<div class="table-responsive">
<table class="table table-centered table-hover mb-0">
<tbody>
<?php
$this->db->where('instructor_payment_status', 0);
$this->db->where('instructor_revenue >', 0);
$unpaid_instructor_revenues = $this->db->get('payment')->result_array();
foreach ($unpaid_instructor_revenues as $key => $row):
$course_details = $this->crud_model->get_course_by_id($row['course_id'])->row_array();
$instructor_details = $this->user_model->get_all_user($course_details['user_id'])->row_array();
?>
<tr>
<td>
<h5 class="font-14 my-1"><a href="<?php echo site_url('home/course/'.slugify($course_details['title']).'/'.$course_details['id']) ?>" class="text-body" target="_blank"><?php echo $course_details['title']; ?></a></h5>
<span class="text-muted font-13"><?php echo get_phrase('course_title'); ?></span>
</td>
<td>
<h5 class="font-14 my-1"><a href="javascript:void(0);" class="text-body" style="cursor: auto;"><?php echo $instructor_details['first_name'].' '.$instructor_details['last_name']; ?></a></h5>
<small><?php echo get_phrase('email'); ?>: <span class="text-muted font-13"><?php echo $instructor_details['email']; ?></span></small>
</td>
<td>
<h5 class="font-14 my-1"><a href="javascript:void(0);" class="text-body" style="cursor: auto;"><?php echo currency($row['instructor_revenue']); ?></a></h5>
<small><span class="text-muted font-13"><?php echo get_phrase('instructor_revenue'); ?></span></small>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$('#unpaid-instructor-revenue').mouseenter(function() {
$('#go-to-instructor-revenue').show();
});
$('#unpaid-instructor-revenue').mouseleave(function() {
$('#go-to-instructor-revenue').hide();
});
</script>