Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 1693 Revision 1699
Zeile 136... Zeile 136...
136
        {
136
        {
137
        }
137
        }
138
        return array( "menu" => $menu, "content" => $content, );
138
        return array( "menu" => $menu, "content" => $content, );
139
    }
139
    }
Zeile 140... Zeile -...
140
 
-
 
141
    function getConfig()
-
 
142
    {
-
 
143
        define( '__SITE__', env( 'site' ) );
-
 
144
        define( '__SHOP__', env( 'shop' ) );
-
 
145
        define( "__CFG_PATH__", "/etc/shop_configs/" . __SITE__ . "/" . __SHOP__ );
-
 
146
 
-
 
147
        $cfg_file = __CFG_PATH__ . "/config.de.xml";
-
 
148
        if ( !file_exists( $cfg_file ) )
-
 
149
        {
-
 
150
            trigger_error( "Konnte keine Konfigurationsdatei für das Shopsystem " . __SITE__ . " -> " . __SHOP__ . " finden (" . ( $cfg_file ) . ")!", E_USER_ERROR );
-
 
151
        }
-
 
152
        $xml = simplexml_load_file( $cfg_file, "SimpleXMLElement", LIBXML_NOCDATA );
-
 
153
        $ini = json_decode( json_encode( $xml ), true );
-
 
154
        foreach ( $ini as $key => $wert )
-
 
155
        {
-
 
156
            if ( $wert == array() )
-
 
157
            {
-
 
158
                $ini[$key] = "";
-
 
159
            }
-
 
160
            elseif ( is_array( $wert ) )
-
 
161
            {
-
 
162
                foreach ( $wert as $key2 => $wert2 )
-
 
163
                {
-
 
164
                    if ( $wert2 == array() )
-
 
165
                    {
-
 
166
                        $ini[$key][$key2] = "";
-
 
167
                    }
-
 
168
                }
-
 
169
            }
-
 
170
        }
-
 
171
 
-
 
172
        $v_file = __CFG_PATH__ . "/versand.xml";
-
 
173
        if ( file_exists( $v_file ) )
-
 
174
        {
-
 
175
            $xml = simplexml_load_file( $v_file, "SimpleXMLElement", LIBXML_NOCDATA );
-
 
176
            $ini["shipping"] = json_decode( json_encode( $xml ), true );
-
 
177
            foreach ( $ini["shipping"] as $key => $wert )
-
 
178
            {
-
 
179
                if ( $wert == array() )
-
 
180
                {
-
 
181
                    $ini["shipping"][$key] = "";
-
 
182
                }
-
 
183
                elseif ( is_array( $wert ) )
-
 
184
                {
-
 
185
                    foreach ( $wert as $key2 => $wert2 )
-
 
186
                    {
-
 
187
                        if ( $wert2 == array() )
-
 
188
                        {
-
 
189
                            $ini["shipping"][$key][$key2] = "";
-
 
190
                        }
-
 
191
                    }
-
 
192
                }
-
 
193
            }
-
 
194
        }
-
 
195
        return $ini;
-
 
196
    }
-
 
197
 
140
 
198
    if ( !isset( $_SESSION["navigation"]["position"] ) )
141
    if ( !isset( $_SESSION["navigation"]["position"] ) )
199
    {
142
    {
200
        $_SESSION["navigation"]["position"] = null;
143
        $_SESSION["navigation"]["position"] = null;
201
    }
144
    }