diff --git a/app/Command/Job.php b/app/Command/Job.php index 1b08de9..dda1614 100644 --- a/app/Command/Job.php +++ b/app/Command/Job.php @@ -162,28 +162,28 @@ class Job } if($shop->reset() != 0 && $shop->reset_value() != 0 && $shop->reset_exp() != 0) { - if(time() - $shop->reset_exp() * 86400 < $bought->datetime) { - if(intval((time() - $bought->datetime) / 86400) % $shop->reset() == 0 && intval((time() - $bought->datetime) / 86400) != 0) { - echo("流量重置-".$user->id."\n"); - $user->transfer_enable = Tools::toGB($shop->reset_value()); - $user->u = 0; - $user->d = 0; - $user->last_day_t = 0; - $user->save(); - - $subject = Config::get('appName')."-您的流量被重置了"; - $to = $user->email; - $text = "您好,根据您所订购的订单 ID:".$bought->id.",流量已经被重置为".$shop->reset_value().'GB' ; - try { - Mail::send($to, $subject, 'news/warn.tpl', [ - "user" => $user,"text" => $text - ], [ - ]); - } catch (Exception $e) { - echo $e->getMessage(); - } + if(time() - $shop->reset_exp() * 86400 < $bought->datetime) { + if(intval((time() - $bought->datetime) / 86400) % $shop->reset() == 0 && intval((time() - $bought->datetime) / 86400) != 0) { + echo("流量重置-".$user->id."\n"); + $user->transfer_enable = Tools::toGB($shop->reset_value()); + $user->u = 0; + $user->d = 0; + $user->last_day_t = 0; + $user->save(); + + $subject = Config::get('appName')."-您的流量被重置了"; + $to = $user->email; + $text = "您好,根据您所订购的订单 ID:".$bought->id.",流量已经被重置为".$shop->reset_value().'GB' ; + try { + Mail::send($to, $subject, 'news/warn.tpl', [ + "user" => $user,"text" => $text + ], [ + ]); + } catch (Exception $e) { + echo $e->getMessage(); + } + } } - } } } @@ -799,4 +799,4 @@ class Job } } } -} +} \ No newline at end of file diff --git a/public/.htaccess b/public/.htaccess deleted file mode 100644 index 11b28de..0000000 --- a/public/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -RewriteEngine On -RewriteCond %{REQUEST_FILENAME} !-f -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^ index.php [QSA,L] \ No newline at end of file