Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 398 Revision 405
Zeile 28... Zeile 28...
28
        SELECT
28
        SELECT
29
            *
29
            *
30
        FROM
30
        FROM
31
            i18n_de
31
            i18n_de
32
    ";
32
    ";
-
 
33
    if ( Schema::hasTable( 'i18n_de' ) )
-
 
34
    {
33
    $langstrings = DB::select( $sql );
35
        $langstrings = DB::select( $sql );
-
 
36
    }
-
 
37
    else
-
 
38
    {
-
 
39
        $langstrings = DB::connection( "old" )->select( $sql );
-
 
40
    }
34
    foreach ( $langstrings as $langstring )
41
    foreach ( $langstrings as $langstring )
35
    {
42
    {
36
        $GLOBALS["langstrings"][$langstring->page_id][$langstring->id] = $langstring->string;
43
        $GLOBALS["langstrings"][$langstring->page_id][$langstring->id] = $langstring->string;
37
    }
44
    }
Zeile 138... Zeile 145...
138
                $GLOBALS['isMobile'] = true;
145
                $GLOBALS['isMobile'] = true;
139
            }
146
            }
Zeile 140... Zeile 147...
140
 
147
 
141
        }
148
        }
142
    }
149
    }
143
    Route::get("/addItemToBasket",function()
150
    Route::get( "/addItemToBasket", function ()
144
    {
151
    {
145
	    Basket::addItem();
152
        Basket::addItem();
146
    });
153
    } );
147
    Route::get( "/cms/{slug}", function ( $slug )
154
    Route::get( "/cms/{slug}", function ( $slug )
148
    {
155
    {
149
        $url = $GLOBALS["INI"]["typo3"]["url"] . "/typo3/" . $slug;
156
        $url = $GLOBALS["INI"]["typo3"]["url"] . "/typo3/" . $slug;
150
        $arr = parseCMSPage( $url );
157
        $arr = parseCMSPage( $url );
Zeile 157... Zeile 164...
157
            "langstrings"       => $GLOBALS["langstrings"],
164
            "langstrings"       => $GLOBALS["langstrings"],
158
        ] );
165
        ] );
159
    } );
166
    } );
160
    Route::get( "/bestellen_seite_{id}.html", function ( $id )
167
    Route::get( "/bestellen_seite_{id}.html", function ( $id )
161
    {
168
    {
162
        return view( 'buy_'.$id, [
169
        return view( 'buy_' . $id, [
163
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
170
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
164
            "nav"               => $GLOBALS["menu"],
171
            "nav"               => $GLOBALS["menu"],
165
            "ini"               => $GLOBALS["INI"],
172
            "ini"               => $GLOBALS["INI"],
166
            "langstrings"       => $GLOBALS["langstrings"],
173
            "langstrings"       => $GLOBALS["langstrings"],
167
        ] );
174
        ] );
168
    } )->where('id','[1-4]{1,}[ab]{0,1}');
175
    } )->where( 'id', '[1-4]{1,}[ab]{0,1}' );
169
    Route::post( "/bestellen_seite_{id}.html", function ( $id )
176
    Route::post( "/bestellen_seite_{id}.html", function ( $id )
170
    {
177
    {
171
        return view( 'buy_'.$id, [
178
        return view( 'buy_' . $id, [
172
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
179
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
173
            "nav"               => $GLOBALS["menu"],
180
            "nav"               => $GLOBALS["menu"],
174
            "ini"               => $GLOBALS["INI"],
181
            "ini"               => $GLOBALS["INI"],
175
            "langstrings"       => $GLOBALS["langstrings"],
182
            "langstrings"       => $GLOBALS["langstrings"],
176
        ] );
183
        ] );
177
    } )->where('id','[1-4]{1,}[ab]{0,1}');
184
    } )->where( 'id', '[1-4]{1,}[ab]{0,1}' );
178
    Route::get( "basket.html", function ()
185
    Route::get( "basket.html", function ()
179
    {
186
    {
180
        return view( 'basket', [
187
        return view( 'basket', [
181
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
188
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
182
            "nav"               => $GLOBALS["menu"],
189
            "nav"               => $GLOBALS["menu"],
Zeile 218... Zeile 225...
218
            "langstrings"       => $GLOBALS["langstrings"],
225
            "langstrings"       => $GLOBALS["langstrings"],
219
        ] );
226
        ] );
220
    } );
227
    } );
221
    Route::get( '/', function ()
228
    Route::get( '/', function ()
222
    {
229
    {
223
	    $date = date("Y-m-d");
230
        $date = date( "Y-m-d" );
224
        $aktion = Action::with( 'medium.medium' )->where('valid_from','<=',$date)->where('valid_to','>=',$date)->get();
231
        $aktion = Action::with( 'medium.medium' )->where( 'valid_from', '<=', $date )->where( 'valid_to', '>=', $date )->get();
225
        return view( 'startpage', [
232
        return view( 'startpage', [
226
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
233
            "serviceCenterMenu" => $GLOBALS["serviceCenterMenu"],
227
            "pagetype"          => "Startseite",
234
            "pagetype"          => "Startseite",
228
            "aktion"            => $aktion,
235
            "aktion"            => $aktion,
229
            "nav"               => $GLOBALS["menu"],
236
            "nav"               => $GLOBALS["menu"],