diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-05-19 20:04:56 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-05-19 20:04:56 +0200 |
commit | 5e8d6a6810112a36c70feb51b2115616cddf9f0e (patch) | |
tree | 7bba8b75810345baf4db089f05ce2339b6bc8d8c | |
parent | 408f8b32419167a112222319909290b99463eb63 (diff) | |
download | delta-5e8d6a6810112a36c70feb51b2115616cddf9f0e.tar.gz delta-5e8d6a6810112a36c70feb51b2115616cddf9f0e.tar.bz2 delta-5e8d6a6810112a36c70feb51b2115616cddf9f0e.zip |
Test build
-rw-r--r-- | includes/jobs-handler.php | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/includes/jobs-handler.php b/includes/jobs-handler.php index d4e554c..2a01cf8 100644 --- a/includes/jobs-handler.php +++ b/includes/jobs-handler.php @@ -36,20 +36,6 @@ foreach ($list as $file) { $data["nick_name"] = null; } - if (substr($data["birth"], 5) === date('m-d') && (!isset($data["birthday_given"]) || !$data["birthday_given"])) { - $data["birthday_given"] = true; - println(" Birthday"); - if ($data["balance"] !== -1) $data["balance"] += 4; - $data["alerts"][] = [ - "title" => l("lang_notifications_birthday_title"), - "message" => l("lang_notifications_birthday_message"), - "date" => date('c'), - "read" => false - ]; - } elseif (!(substr($data["birth"], 5) === date('m-d'))) { - $data["birthday_given"] = false; - } - if ($data["blocked"] !== $data["last_blocked"]) { println(" Block level update"); @@ -136,73 +122,6 @@ foreach ($list as $file) { println(" Removed " . $removed . " session(s)"); - /*if ($data["plus"]) { - println(" Subscription renewal"); - - if (strtotime($data["renewal"]) - time() < 0) { - if ($data["ultra"]) { - $cost = $price * 2; - } else { - $cost = $price; - } - - println(" Attempting to renew subscription for " . $cost . " coins"); - - if ($data["balance"] >= $cost || $data["balance"] === -1) { - println(" Sufficient balance, proceeding"); - - if ($data["balance"] === -1) { - println(" User has unlimited balance, no takeout required"); - } else { - $data["balance"] -= $cost; - } - - $data["renewal"] = date('Y-m-d', time() + (86400 * (int)date('t'))); - println(" User balance is now " . $data["balance"] . " coins, next renewal on the " . date('j F', strtotime($data["renewal"]))); - - if ($data["ultra"]) { - $data["alerts"][] = [ - "title" => l("lang_notifications_renewal2_title"), - "message" => str_replace("%2", formatDate($data["renewal"]), str_replace("%1", $cost, l("lang_notifications_renewal2_message"))), - "date" => date('c'), - "read" => false - ]; - } else { - $data["alerts"][] = [ - "title" => l("lang_notifications_renewal1_title"), - "message" => str_replace("%2", formatDate($data["renewal"]), str_replace("%1", $cost, l("lang_notifications_renewal1_message"))), - "date" => date('c'), - "read" => false - ]; - } - } else { - println(" Insufficient balance, ending subscription"); - - if ($data["ultra"]) { - $data["alerts"][] = [ - "title" => l("lang_notifications_expired2_title"), - "message" => l("lang_notifications_expired2_message"), - "date" => date('c'), - "read" => false - ]; - } else { - $data["alerts"][] = [ - "title" => l("lang_notifications_expired1_title"), - "message" => l("lang_notifications_expired1_message"), - "date" => date('c'), - "read" => false - ]; - } - - $data["ultra"] = false; - $data["plus"] = false; - $data["renewal"] = null; - } - } else { - println(" Renewal due in " . (timeAgo($data["renewal"], false))); - } - }*/ - $alertsToSend = []; foreach ($data["alerts"] as $alert) { |