Exemple #1
0
    $sales['win'] = floatval($sales['total']) - floatval($sales['receive']) - floatval($sales['referal']);
    abr('sales', $sales);
}
unset($ref);
#LOAD USERS COUNT
require_once ROOT_PATH . '/apps/users/models/users.class.php';
$usersClass = new users();
//	$users['month'] = $usersClass->getUsersCount(" `register_datetime` > '".date('Y-m')."-01 00:00:00' AND `status` = 'activate' ");
//	$users['total'] = $usersClass->getUsersCount(" `status` = 'activate' ");
abr('users', $users);
$topAuthors = $usersClass->getAll(0, 5, " `status` = 'activate' ", "`sales` DESC");
abr('topAuthors', $topAuthors);
#LOAD WITHDRAW
require_once ROOT_PATH . '/apps/users/models/deposit.class.php';
$depositClass = new deposit();
$withdraw['no'] = $depositClass->getWithdrawCount(" `paid` = 'false' AND `datetime` > '" . date('Y-m') . "-01 00:00:00' ");
$withdraw['paid'] = $depositClass->getWithdrawCount(" `paid` = 'true' AND `paid_datetime` > '" . date('Y-m') . "-01 00:00:00' ");
abr('withdraw', $withdraw);
#LOAD THEMES
require_once ROOT_PATH . '/apps/items/models/items.class.php';
$itemsClass = new items();
$items = $itemsClass->getAll(0, 10, " `status` = 'queue' ");
abr('items', $items);
$updated_items = $itemsClass->getAllForUpdate(0, 10);
abr('updated_items', $updated_items);
#LOAD LAST REQUEST
require_once ROOT_PATH . '/apps/contacts/models/contacts.class.php';
$contactsClass = new contacts();
$lastContact = $contactsClass->getAll(0, 10, " `answer` = '' ");
abr('lastContact', $lastContact);
#CHECK FOR ATTRIBUTES