forked from kevinowino869/mitrobill
default widgets
This commit is contained in:
28
system/widgets/graph_customers_insight.php
Normal file
28
system/widgets/graph_customers_insight.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
class graph_customers_insight
|
||||
{
|
||||
public function getWidget()
|
||||
{
|
||||
global $CACHE_PATH,$ui;
|
||||
$u_act = ORM::for_table('tbl_user_recharges')->where('status', 'on')->count();
|
||||
if (empty($u_act)) {
|
||||
$u_act = '0';
|
||||
}
|
||||
$ui->assign('u_act', $u_act);
|
||||
|
||||
$u_all = ORM::for_table('tbl_user_recharges')->count();
|
||||
if (empty($u_all)) {
|
||||
$u_all = '0';
|
||||
}
|
||||
$ui->assign('u_all', $u_all);
|
||||
|
||||
|
||||
$c_all = ORM::for_table('tbl_customers')->count();
|
||||
if (empty($c_all)) {
|
||||
$c_all = '0';
|
||||
}
|
||||
$ui->assign('c_all', $c_all);
|
||||
return $ui->fetch('widget/graph_customers_insight.tpl');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user