Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1099 | Revision 1101 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
964 lars 1
<?php
2
 
992 lars 3
    use App\Http\Controllers\BackendController;
1093 lars 4
    use App\Models\Module;
1071 lars 5
    use App\Models\Web;
1076 lars 6
    use App\Models\WebProperty;
964 lars 7
    use Illuminate\Support\Facades\Route;
8
 
1068 lars 9
    /*$bc = new BackendController();
1061 lars 10
    $user_rechte = $bc->getUserRechte();
1068 lars 11
    \View::share( "user_rechte", $user_rechte );*/
1061 lars 12
 
1071 lars 13
    $w = new Web();
14
    $GLOBALS["web"] = $w->where( "domain", "=", env( 'shop' ) )->first();
15
    \View::share( "web", $GLOBALS["web"] );
1100 lars 16
    $webRechte = WebProperty::with( [ "property", "property.tool", "property.tool.module" ] )->where( "web_id", "=", $GLOBALS["web"]->ID )->get();
17
    $navi = Module::with( 'tool' )->orderBy('module.rang')->get();
1092 lars 18
    \View::share( "navi", $navi );
1087 lars 19
    foreach ( $webRechte as $web_recht )
1081 lars 20
    {
1087 lars 21
        $property = $web_recht->property;
22
        $tool = $property->tool;
23
        $module = $tool->module;
24
        $GLOBALS["web_rechte"][$module->nume][$tool->button_name][$property->interner_name] = $property->Bezeichnung;
1081 lars 25
    }
1088 lars 26
    \View::share( "web_rechte", $GLOBALS["web_rechte"] );
1081 lars 27
    //dump( $web_rechte );
1071 lars 28
 
980 lars 29
    $_SESSION["jquery_js"] = "/js/jquery-1.7.2.min.js";
30
    $_SESSION["jquery_ui_js"] = "/js/jquery-ui-1.8.23.custom.min.js";
31
    $_SESSION["jquery_style"] = "/css/start/jquery-ui.custom.css";
32
 
33
    $_SESSION["jquery_new"] = "/css/start_new/jquery.min.js";
34
    $_SESSION["jquery_ui_new"] = "/css/start_new/jquery-ui.min.js";
35
    $_SESSION["jquery_style_new"] = "/css/start_new/jquery-ui.custom.css";
36
 
37
    $_SESSION["loadingGif"] = "/images/navigation/loading.gif";
38
 
39
    /*if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "/jquery-ui.custom.css" ) )
40
    {
41
        $_SESSION["jquery_style"] = "/css/" . $site . "/jquery-ui.custom.css";
42
    }
43
 
44
    if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "/images/loading.gif" ) )
45
    {
46
        $_SESSION["loadingGif"] = "/css/" . $site . "/images/loading.gif";
47
    }
48
 
49
    if ( file_Exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "_new/jquery.min.js" ) )
50
    {
51
        $_SESSION["jquery_new"] = "/css/" . $site . "_new/jquery.min.js";
52
        $_SESSION["jquery_ui_new"] = "/css/" . $site . "_new/jquery-ui.min.js";
53
        $_SESSION["jquery_style_new"] = "/css/" . $site . "_new/jquery-ui.custom.css";
54
    }
55
    if ( file_exists( $_SERVER["DOCUMENT_ROOT"] . "/css/" . $site . "_new/images/loading.gif" ) )
56
    {
57
        $_SESSION["loadingGif"] = "/css/" . $site . "_new/images/loading.gif";
58
    }*/
59
 
1070 lars 60
    Route::get( '/admin/login', [ BackendController::class, 'create' ] )->name( 'login' );
992 lars 61
    Route::post( '/admin/login', [ BackendController::class, 'store' ] );
1067 lars 62
    Route::prefix( 'admin' )->middleware( 'auth:admin' )->group( function ()
964 lars 63
    {
1027 lars 64
        Route::get( '/logout', [ BackendController::class, 'destroy' ] )->name( 'logout' );
1041 lars 65
        Route::view( "/index", "admin/index" );
965 lars 66
    } );