diff options
Diffstat (limited to 'frontend/payments/classes/class.UserMailCron.php')
-rw-r--r-- | frontend/payments/classes/class.UserMailCron.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/frontend/payments/classes/class.UserMailCron.php b/frontend/payments/classes/class.UserMailCron.php new file mode 100644 index 0000000..8f588c7 --- /dev/null +++ b/frontend/payments/classes/class.UserMailCron.php @@ -0,0 +1,44 @@ +<?php
+
+/**
+ *
+ * Class ki skrbi za posiljanje cron emailov povezanih z racunom, placili...
+ *
+ */
+
+class UserMailCron{
+
+
+ // ID userja
+ private $usr_id = '';
+
+
+ function __construct(){
+
+ }
+
+
+ // Nastavimo fazo v kateri se nahaja uporabnik
+ public function setStage($stage){
+
+ }
+
+
+ // Izvedemo cron ob 9h zjutraj
+ public static function executeCron(){
+
+ // Loop cez vse userje v bazi
+ $sql = sisplet_query("SELECT c.*, u.email, u.ime, u.type, u.status, u.name, u.surname
+ FROM user_cronjob c, users u
+ WHERE (a.package_id = 2 OR a.package_id = 3)
+ AND ".$interval_query."
+ AND u.id=a.usr_id
+ ");
+
+ while($row = mysqli_fetch_array($sql)){
+
+ // Process cronjob for user
+ }
+ }
+
+}
\ No newline at end of file |