balance notification

This commit is contained in:
Ibnu Maksum
2023-08-24 11:35:23 +07:00
parent 75cbe2b1ec
commit 15b9744b18
11 changed files with 82 additions and 26 deletions

View File

@ -19,11 +19,10 @@ ORM::configure('logging', true);
include "autoload/Hookers.php";
// notification message
if (file_exists("uploads/notifications.json")) {
$_notifmsg = json_decode(file_get_contents('uploads/notifications.json'), true);
} else {
$_notifmsg = json_decode(file_get_contents('uploads/notifications.default.json'), true);
if(file_exists("system/uploads/notifications.json")){
$_notifmsg =json_decode(file_get_contents('system/uploads/notifications.json'), true);
}
$_notifmsg_default = json_decode(file_get_contents('system/uploads/notifications.default.json'), true);
//register all plugin
foreach (glob("plugin/*.php") as $filename) {
@ -64,10 +63,10 @@ $_c = $config;
date_default_timezone_set($config['timezone']);
$textExpired = $_notifmsg['expired'];
$textExpired = Lang::getNotifText('expired');
$d = ORM::for_table('tbl_user_recharges')->where('status', 'on')->where('expiration', date("Y-m-d"))->find_many();
echo "Found ".count($d)." user(s)\n";
run_hook('cronjob'); #HOOK
foreach ($d as $ds) {