Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 367 Revision 368
Zeile 41... Zeile 41...
41
            $dom->loadFromUrl( $url );
41
            $dom->loadFromUrl( $url );
42
        }
42
        }
43
        catch ( ChildNotFoundException|CircularException|CurlException|StrictException $e )
43
        catch ( ChildNotFoundException|CircularException|CurlException|StrictException $e )
44
        {
44
        {
45
        }
45
        }
46
        $menu = $dom->getElementById('menu')->innerHtml;
46
        $menu = $dom->getElementById( 'menu' )->innerHtml;
47
        $content = $dom->getElementById('content')->innerHtml;
47
        $content = $dom->getElementById( 'content' )->innerHtml;
48
        return array( "menu" => $menu, "content" => $content, );
48
        return array( "menu" => $menu, "content" => $content, );
49
    }
49
    }
Zeile 50... Zeile 50...
50
 
50
 
51
    function getConfig()
51
    function getConfig()
Zeile 108... Zeile 108...
108
    session_start();
108
    session_start();
109
    $GLOBALS["INI"] = getConfig();
109
    $GLOBALS["INI"] = getConfig();
110
    $GLOBALS["menu"] = array();
110
    $GLOBALS["menu"] = array();
111
    $nav = new Directory();
111
    $nav = new Directory();
112
    $GLOBALS["menu"] = $nav->nav_menu();
112
    $GLOBALS["menu"] = $nav->nav_menu();
-
 
113
    $sc = parseCMSPage( $GLOBALS["INI"]["typo3"]["url"] . "/typo3/" );
-
 
114
    $GLOBALS["serviceCenterMenu"] = $sc["menu"];
113
    /* Mobile Weiche */
115
    /* Mobile Weiche */
114
    if ( isset( $_SERVER["HTTP_USER_AGENT"] ) )
116
    if ( isset( $_SERVER["HTTP_USER_AGENT"] ) )
115
    {
117
    {
116
        if ( !isset( $_SESSION['isMobile'] ) || $_SESSION['isMobile'] == false || !isset( $GLOBALS['isMobile'] ) || $GLOBALS['isMobile'] == false )
118
        if ( !isset( $_SESSION['isMobile'] ) || $_SESSION['isMobile'] == false || !isset( $GLOBALS['isMobile'] ) || $GLOBALS['isMobile'] == false )
117
        {
119
        {
Zeile 137... Zeile 139...
137
    {
139
    {
138
        $url = $GLOBALS["INI"]["typo3"]["url"] . "/typo3/" . $slug;
140
        $url = $GLOBALS["INI"]["typo3"]["url"] . "/typo3/" . $slug;
139
        $arr = parseCMSPage( $url );
141
        $arr = parseCMSPage( $url );
140
        $content = $arr["content"];
142
        $content = $arr["content"];
141
        return view( 'service_center_content', [
143
        return view( 'service_center_content', [
142
            "serviceContent" => $content,
144
            "serviceContent"    => $content,
-
 
145
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
143
            "nav"            => $GLOBALS["menu"],
146
            "nav"               => $GLOBALS["menu"],
144
            "ini"            => $GLOBALS["INI"],
147
            "ini"               => $GLOBALS["INI"],
145
            "langstrings"    => $GLOBALS["langstrings"],
148
            "langstrings"       => $GLOBALS["langstrings"],
146
        ] );
149
        ] );
147
    } );
150
    } );
148
    Route::get( "basket.html", function ()
151
    Route::get( "basket.html", function ()
149
    {
152
    {
150
        return view( 'basket', [
153
        return view( 'basket', [
-
 
154
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
151
            "nav"         => $GLOBALS["menu"],
155
            "nav"               => $GLOBALS["menu"],
152
            "ini"         => $GLOBALS["INI"],
156
            "ini"               => $GLOBALS["INI"],
153
            "langstrings" => $GLOBALS["langstrings"],
157
            "langstrings"       => $GLOBALS["langstrings"],
154
        ] );
158
        ] );
155
    } );
159
    } );
156
    Route::get( "/directory/{id}", function ( $id )
160
    Route::get( "/directory/{id}", function ( $id )
157
    {
161
    {
158
        list( $dirId, $dirName ) = explode( "-", $id, 2 );
162
        list( $dirId, $dirName ) = explode( "-", $id, 2 );
Zeile 167... Zeile 171...
167
        ] )->get();
171
        ] )->get();
168
        $subdir = Directory::with( 'medium.medium' )->find( $dirId );
172
        $subdir = Directory::with( 'medium.medium' )->find( $dirId );
169
        $subdir["subdirs"] = $dirs;
173
        $subdir["subdirs"] = $dirs;
170
        $subdir["items"] = $items;
174
        $subdir["items"] = $items;
171
        return view( 'subdir', [
175
        return view( 'subdir', [
-
 
176
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
172
            "subdir"      => $subdir,
177
            "subdir"            => $subdir,
173
            "nav"         => $GLOBALS["menu"],
178
            "nav"               => $GLOBALS["menu"],
174
            "ini"         => $GLOBALS["INI"],
179
            "ini"               => $GLOBALS["INI"],
175
            "langstrings" => $GLOBALS["langstrings"],
180
            "langstrings"       => $GLOBALS["langstrings"],
176
        ] );
181
        ] );
177
    } );
182
    } );
178
    Route::get( "{item:slug}.html", function ( Item $item )
183
    Route::get( "{item:slug}.html", function ( Item $item )
179
    {
184
    {
180
        $item->load( 'price', 'medium.medium' );
185
        $item->load( 'price', 'medium.medium' );
181
        return view( 'item', [
186
        return view( 'item', [
-
 
187
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
182
            "item"        => $item,
188
            "item"              => $item,
183
            "nav"         => $GLOBALS["menu"],
189
            "nav"               => $GLOBALS["menu"],
184
            "ini"         => $GLOBALS["INI"],
190
            "ini"               => $GLOBALS["INI"],
185
            "langstrings" => $GLOBALS["langstrings"],
191
            "langstrings"       => $GLOBALS["langstrings"],
186
        ] );
192
        ] );
187
    } );
193
    } );
188
    Route::get( '/', function ()
194
    Route::get( '/', function ()
189
    {
195
    {
190
        $aktion = Action::with( 'medium.medium' )->get();
196
        $aktion = Action::with( 'medium.medium' )->get();
191
        return view( 'startpage', [
197
        return view( 'startpage', [
-
 
198
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
192
            "pagetype"    => "Startseite",
199
            "pagetype"          => "Startseite",
193
            "aktion"      => $aktion,
200
            "aktion"            => $aktion,
194
            "nav"         => $GLOBALS["menu"],
201
            "nav"               => $GLOBALS["menu"],
195
            "ini"         => $GLOBALS["INI"],
202
            "ini"               => $GLOBALS["INI"],
196
            "langstrings" => $GLOBALS["langstrings"],
203
            "langstrings"       => $GLOBALS["langstrings"],
197
        ] );
204
        ] );
198
    } );
205
    } );