Subversion-Projekte lars-tiefland.webanos.faltradxxs.de

Revision

Revision 138 | Revision 143 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 138 Revision 141
Zeile 19... Zeile 19...
19
    use Illuminate\Support\Facades\Route;
19
    use Illuminate\Support\Facades\Route;
Zeile 20... Zeile 20...
20
 
20
 
21
    session_start();
21
    session_start();
Zeile -... Zeile 22...
-
 
22
    setlocale( LC_TIME, 'de_DE.UTF-8' );
-
 
23
 
-
 
24
    if ( php_sapi_name() == "cli" )
-
 
25
    {
-
 
26
        return false;
22
    setlocale( LC_TIME, 'de_DE.UTF-8' );
27
    }
23
 
28
 
24
    $w = new Web();
29
    $w = new Web();
25
    $GLOBALS["web"] = $w->where( "domain", "=", env( 'shop' ) )->first();
30
    $GLOBALS["web"] = $w->where( "domain", "=", env( 'shop' ) )->first();
26
    if ( php_sapi_name() != "cli" )
31
    if ( php_sapi_name() != "cli" )
Zeile 35... Zeile 40...
35
    $c_shops = array();
40
    $c_shops = array();
36
    $d_shops = array();
41
    $d_shops = array();
37
    $ba = OrderType::get();
42
    $ba = OrderType::get();
38
    foreach ( $ba as $ba_id => $bestellart )
43
    foreach ( $ba as $ba_id => $bestellart )
39
    {
44
    {
40
        $c_bestellarten[ $bestellart->id ] = $bestellart->name;
45
        $c_bestellarten[$bestellart->id] = $bestellart->name;
41
    }
46
    }
42
    $shops = Shop::get();
47
    $shops = Shop::get();
43
    View::share( "shops", $shops );
48
    View::share( "shops", $shops );
44
    foreach ( $shops as $s_id => $shop )
49
    foreach ( $shops as $s_id => $shop )
45
    {
50
    {
46
        $c_shops[ $shop->id ] = $shop->name;
51
        $c_shops[$shop->id] = $shop->name;
47
        $d_shops[ $shop->id ] = $shop;
52
        $d_shops[$shop->id] = $shop;
48
    }
53
    }
49
    \View::share( "c_bestellarten", $c_bestellarten );
54
    \View::share( "c_bestellarten", $c_bestellarten );
50
    \View::share( "c_shops", $c_shops );
55
    \View::share( "c_shops", $c_shops );
51
    \View::share( "d_shops", $d_shops );
56
    \View::share( "d_shops", $d_shops );
52
    $_SESSION["loadingGif"] = "/images/navigation/loading.gif";
57
    $_SESSION["loadingGif"] = "/images/navigation/loading.gif";
Zeile 64... Zeile 69...
64
    foreach ( $webRechte as $web_recht )
69
    foreach ( $webRechte as $web_recht )
65
    {
70
    {
66
        $property = $web_recht->property;
71
        $property = $web_recht->property;
67
        $tool = $property->tool;
72
        $tool = $property->tool;
68
        $module = $tool->module;
73
        $module = $tool->module;
69
        $GLOBALS["web_rechte"][ $module->interner_name ][ $tool->button_name ][ $property->interner_name ] = $web_recht->Bezeichnung;
74
        $GLOBALS["web_rechte"][$module->interner_name][$tool->button_name][$property->interner_name] = $web_recht->Bezeichnung;
70
    }
75
    }
71
    \View::share( "web_rechte", $GLOBALS["web_rechte"] );
76
    \View::share( "web_rechte", $GLOBALS["web_rechte"] );
72
    if ( isset( $_SESSION["admin"]["uid"] ) )
77
    if ( isset( $_SESSION["admin"]["uid"] ) )
73
    {
78
    {
74
        $uId = $_SESSION["admin"]["uid"];
79
        $uId = $_SESSION["admin"]["uid"];
Zeile 105... Zeile 110...
105
        Route::prefix( "/toolbox" )->group( function ()
110
        Route::prefix( "/toolbox" )->group( function ()
106
        {
111
        {
107
            Route::get( "/ga", [
112
            Route::get( "/ga", [
108
                GoogleAuthenticatorController::class,
113
                GoogleAuthenticatorController::class,
109
                "create"
114
                "create"
110
            ] )->name('complete.registration');
115
            ] )->name( 'complete.registration' );
111
            Route::post( "/ga", [
116
            Route::post( "/ga", [
112
                GoogleAuthenticatorController::class,
117
                GoogleAuthenticatorController::class,
113
                "store"
118
                "store"
114
            ] )->name('2fa');
119
            ] )->name( '2fa' );
115
            Route::delete( "/ga", [
120
            Route::delete( "/ga", [
116
                GoogleAuthenticatorController::class,
121
                GoogleAuthenticatorController::class,
117
                "DESTROY"
122
                "DESTROY"
118
            ] );
123
            ] );
119
            Route::get( "/", [
124
            Route::get( "/", [