update 20.10.2025
This commit is contained in:
parent
8c11130b5d
commit
a939cd51ef
616 changed files with 84821 additions and 4121 deletions
117
app/Http/Controllers/HomeController.php
Executable file → Normal file
117
app/Http/Controllers/HomeController.php
Executable file → Normal file
|
|
@ -4,7 +4,7 @@ namespace App\Http\Controllers;
|
|||
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\User;
|
||||
use Auth;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use Request;
|
||||
|
|
@ -17,26 +17,23 @@ class HomeController extends Controller
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
public function __construct() {}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
if(!Auth::check()){
|
||||
if (!Auth::check()) {
|
||||
return redirect('login');
|
||||
}
|
||||
return redirect('home');
|
||||
|
||||
}
|
||||
|
||||
//login / Dashboard
|
||||
public function show()
|
||||
{
|
||||
|
||||
if(!Auth::check()){
|
||||
return redirect('login');
|
||||
|
||||
if (!Auth::check()) {
|
||||
return redirect('login');
|
||||
}
|
||||
|
||||
$data = [
|
||||
|
|
@ -47,12 +44,13 @@ class HomeController extends Controller
|
|||
}
|
||||
|
||||
|
||||
public function loadingModal(){
|
||||
public function loadingModal()
|
||||
{
|
||||
|
||||
$data = Request::get('data');
|
||||
$target = Request::get('target');
|
||||
$response = "";
|
||||
if($data === "data_protection"){
|
||||
if ($data === "data_protection") {
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => true,
|
||||
|
|
@ -60,34 +58,34 @@ class HomeController extends Controller
|
|||
];
|
||||
$response = view('legal.data_protect_de', $data)->render();
|
||||
}
|
||||
if($data === "imprint"){
|
||||
if ($data === "imprint") {
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
$response = view('legal.imprint_de', $data)->render();
|
||||
}
|
||||
if($data === "shop_term_of_use"){
|
||||
if ($data === "shop_term_of_use") {
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
$response = view('legal.shop_term_of_use_de', $data)->render();
|
||||
}
|
||||
if($data === "agb"){
|
||||
if ($data === "agb") {
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
$response = view('legal.agb_de', $data)->render();
|
||||
}
|
||||
if(Request::ajax()) {
|
||||
return response()->json(['response' => $response, 'target'=>$target]);
|
||||
if (Request::ajax()) {
|
||||
return response()->json(['response' => $response, 'target' => $target]);
|
||||
}
|
||||
abort(404);
|
||||
}
|
||||
|
||||
/* public function checkLogin($identify, $token)
|
||||
/* public function checkLogin($identify, $token)
|
||||
{
|
||||
if($identify){
|
||||
//user find by $identify
|
||||
|
|
@ -129,7 +127,8 @@ class HomeController extends Controller
|
|||
return abort(404);
|
||||
}
|
||||
*/
|
||||
public function zahlungsarten(){
|
||||
public function zahlungsarten()
|
||||
{
|
||||
return view('web.templates.zahlungsarten', [
|
||||
'user_shop' => Util::getUserShop(),
|
||||
'isMivitaShop' => Util::isMivitaShop(),
|
||||
|
|
@ -137,7 +136,8 @@ class HomeController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
public function versandkosten(){
|
||||
public function versandkosten()
|
||||
{
|
||||
return view('web.templates.versandkosten', [
|
||||
'user_shop' => Util::getUserShop(),
|
||||
'isMivitaShop' => Util::isMivitaShop(),
|
||||
|
|
@ -170,7 +170,7 @@ class HomeController extends Controller
|
|||
|
||||
public function legalImprint()
|
||||
{
|
||||
|
||||
|
||||
$data = [
|
||||
'modal' => false,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
|
|
@ -179,44 +179,51 @@ class HomeController extends Controller
|
|||
return view('legal.imprint', $data);
|
||||
}
|
||||
|
||||
public function verify($confirmation_code){
|
||||
if( ! $confirmation_code)
|
||||
{
|
||||
public function verify($confirmation_code)
|
||||
{
|
||||
if (! $confirmation_code) {
|
||||
return redirect('/status/error');
|
||||
}
|
||||
|
||||
$user = User::whereConfirmationCode($confirmation_code)->first();
|
||||
|
||||
if ( ! $user)
|
||||
{
|
||||
return redirect('/status/not/found');
|
||||
if (! $user) {
|
||||
return redirect('/status/not/found');
|
||||
}
|
||||
if($user->confirmed === 0){
|
||||
$user_auto_login = false;
|
||||
if ($user->confirmed === 0) {
|
||||
$user->confirmed = 1;
|
||||
$user->confirmation_date = now();
|
||||
$user_auto_login = true;
|
||||
//nur bei der ersten Verifizierung den user auto login
|
||||
}
|
||||
|
||||
// $user->confirmation_code = null;
|
||||
// $user->confirmation_code_to = null;
|
||||
// $user->confirmation_code_remider = 0;
|
||||
//wird nun in WizardController::releaseAccount() auf null gesetzt
|
||||
//$user->confirmation_code = null;
|
||||
//$user->confirmation_code_to = null;
|
||||
//$user->confirmation_code_remider = 0;
|
||||
$user->save();
|
||||
|
||||
//Login!
|
||||
Auth::login($user);
|
||||
|
||||
return redirect('/home');
|
||||
if ($user_auto_login) {
|
||||
Auth::login($user);
|
||||
}
|
||||
$url = Util::getMyMivitaUrl();
|
||||
return redirect($url);
|
||||
}
|
||||
|
||||
public function statusRegister(){
|
||||
public function statusRegister()
|
||||
{
|
||||
return view('status.status_register');
|
||||
}
|
||||
public function statusVerify(){
|
||||
public function statusVerify()
|
||||
{
|
||||
return view('status.status_verify');
|
||||
}
|
||||
public function statusError(){
|
||||
public function statusError()
|
||||
{
|
||||
return view('status.status_error');
|
||||
}
|
||||
public function notFound(){
|
||||
public function notFound()
|
||||
{
|
||||
return view('status.not_found');
|
||||
}
|
||||
|
||||
|
|
@ -224,15 +231,16 @@ class HomeController extends Controller
|
|||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function checkMail(){
|
||||
public function checkMail()
|
||||
{
|
||||
|
||||
$data = Request::all();
|
||||
if($data['user_id'] === "new"){
|
||||
if(User::where('email', $data['email'])->count()){
|
||||
if ($data['user_id'] === "new") {
|
||||
if (User::where('email', $data['email'])->count()) {
|
||||
return json_encode(false);
|
||||
}
|
||||
}else{
|
||||
if(User::where('email', $data['email'])->where('id', '!=', $data['user_id'])->count()){
|
||||
} else {
|
||||
if (User::where('email', $data['email'])->where('id', '!=', $data['user_id'])->count()) {
|
||||
return json_encode(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -244,24 +252,23 @@ class HomeController extends Controller
|
|||
return view('status.user_blocked');
|
||||
}
|
||||
|
||||
public function backToShop($reference = ""){
|
||||
public function backToShop($reference = "")
|
||||
{
|
||||
|
||||
if($reference){
|
||||
if ($reference) {
|
||||
$ShoppingPayment = ShoppingPayment::where('reference', $reference)->first();
|
||||
if($ShoppingPayment && $ShoppingPayment->status === 'success'){
|
||||
if ($ShoppingPayment && $ShoppingPayment->status === 'success') {
|
||||
$user = Auth::user();
|
||||
//is form wizard create payment
|
||||
if($user && ($user->wizard == 13 || $user->wizard == 20)){
|
||||
$user->wizard = 15; //realese Payments
|
||||
$user->save();
|
||||
return redirect(route('wizard_create', [15]));
|
||||
if ($user && ($user->wizard == 13 || $user->wizard == 20)) {
|
||||
$user->wizard = 15; //realese Payments
|
||||
$user->save();
|
||||
return redirect(route('wizard_create', [15]));
|
||||
}
|
||||
|
||||
}else{
|
||||
} else {
|
||||
\Session()->flash('alert-error', __('msg.error_occurred_with_order'));
|
||||
return redirect(route('/'));
|
||||
return redirect(url('/'));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue