08 2024
This commit is contained in:
parent
04d677d37a
commit
bfa3bb1df4
1191 changed files with 637397 additions and 10619 deletions
|
|
@ -2,14 +2,15 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Mail\MailCustomMessage;
|
||||
use App\Mail\MailVerifyAccount;
|
||||
use Carbon;
|
||||
use App\User;
|
||||
use App\Services\Util;
|
||||
use App\Models\UserHistory;
|
||||
use App\Models\UserMessage;
|
||||
use App\Repositories\UserRepository;
|
||||
use App\Mail\MailCustomMessage;
|
||||
use App\Mail\MailVerifyAccount;
|
||||
use App\Services\PaymentHelper;
|
||||
use App\User;
|
||||
use Carbon;
|
||||
use App\Repositories\UserRepository;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
|
||||
|
|
@ -69,7 +70,7 @@ class CronController extends Controller
|
|||
}
|
||||
//send new remider
|
||||
if ($user->confirmation_code_remider == 0) {
|
||||
Mail::to($user->email)->send(new MailVerifyAccount($user->confirmation_code, $user));
|
||||
Mail::to($user->email)->locale($user->getLocale())->send(new MailVerifyAccount($user->confirmation_code, $user));
|
||||
$user->confirmation_code_to = $next;
|
||||
$user->confirmation_code_remider = 1;
|
||||
$user->save();
|
||||
|
|
@ -106,7 +107,9 @@ class CronController extends Controller
|
|||
die();*/
|
||||
foreach ($users as $user){
|
||||
$this->checkReminderPayments($user);
|
||||
/* Abo Option deaktiviert
|
||||
$this->userInitAboPayment($user);
|
||||
*/
|
||||
}
|
||||
return "TOSK";
|
||||
}
|
||||
|
|
@ -151,11 +154,13 @@ class CronController extends Controller
|
|||
|
||||
//35 reminder_deaktiv, 36 reminder_deaktiv_sepa
|
||||
if(!$user->isActiveAccount()){
|
||||
if($user->isAboOption()){
|
||||
$isSend = $this->checkIsReminderSend($user, 35);
|
||||
/* Abo Option deaktiviert
|
||||
if($user->isAboOption()){
|
||||
$isSend = $this->checkIsReminderSend($user, 36);
|
||||
return $isSend;
|
||||
}
|
||||
$isSend = $this->checkIsReminderSend($user, 36);
|
||||
*/
|
||||
$isSend = $this->checkIsReminderSend($user, 35);
|
||||
return $isSend;
|
||||
}
|
||||
|
||||
|
|
@ -167,18 +172,24 @@ class CronController extends Controller
|
|||
|
||||
//33 reminder_sec
|
||||
if($user->daysActiveAccount() <= config('mivita.remind_sec_days')){
|
||||
if(!$user->isAboOption()){
|
||||
/* Abo Option deaktiviert
|
||||
if(!$user->isAboOption()){
|
||||
$isSend = $this->checkIsReminderSend($user, 33);
|
||||
return $isSend;
|
||||
}
|
||||
*/
|
||||
|
||||
$isSend = $this->checkIsReminderSend($user, 33);
|
||||
return $isSend;
|
||||
}
|
||||
|
||||
//31 reminder_first, 32 reminder_first_sepa
|
||||
if($user->daysActiveAccount() > config('mivita.remind_sec_days')){
|
||||
/* Abo Option deaktiviert
|
||||
if($user->isAboOption()){
|
||||
$isSend = $this->checkIsReminderSend($user, 32);
|
||||
return $isSend;
|
||||
}
|
||||
} */
|
||||
$isSend = $this->checkIsReminderSend($user, 31);
|
||||
return $isSend;
|
||||
}
|
||||
|
|
@ -233,6 +244,7 @@ class CronController extends Controller
|
|||
'button' => $button,
|
||||
];
|
||||
//dump($data);
|
||||
|
||||
$sender = User::find(1);
|
||||
$customer_mail = UserMessage::create([
|
||||
'user_id' => $user->id,
|
||||
|
|
@ -243,9 +255,9 @@ class CronController extends Controller
|
|||
]);
|
||||
try{
|
||||
if($status >= 34){
|
||||
Mail::to($user->email)->bcc(config('app.default_mail'))->send(new MailCustomMessage($user, $data, $sender, false));
|
||||
Mail::to($user->email)->locale($user->getLocale())->bcc(config('app.default_mail'))->send(new MailCustomMessage($user, $data, $sender, false));
|
||||
}else{
|
||||
Mail::to($user->email)->send(new MailCustomMessage($user, $data, $sender, false));
|
||||
Mail::to($user->email)->locale($user->getLocale())->send(new MailCustomMessage($user, $data, $sender, false));
|
||||
}
|
||||
}
|
||||
catch(\Exception $e){
|
||||
|
|
@ -274,7 +286,11 @@ class CronController extends Controller
|
|||
if($key !== 'G8ZvEbnP8fEPfnWX4L'){
|
||||
abort(404);
|
||||
}
|
||||
exec("/bin/bash ../cron_script.sh 2>&1", $out, $result);
|
||||
if(Util::isTestSystem()){
|
||||
exec("/bin/bash ../cron_script_local.sh 2>&1", $out, $result);
|
||||
}else{
|
||||
exec("/bin/bash ../cron_script_server.sh 2>&1", $out, $result);
|
||||
}
|
||||
echo "Returncode: " .$result ."<br>";
|
||||
echo "Ausgabe des Scripts: " ."<br>";
|
||||
echo "<pre>"; print_r($out);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue