87 lines
2.1 KiB
PHP
87 lines
2.1 KiB
PHP
<?php
|
|
/**
|
|
* @version $Id: index.php 10381 2008-06-01 03:35:53Z $
|
|
* @package Easyshop
|
|
* @copyright Copyright (C) 2005 - 2011 TA-EDV
|
|
* @license proprietary
|
|
* @author Richard Kammermayer <rk@ta-edv.de>
|
|
* Easyshop is a web shop system
|
|
*/
|
|
|
|
if(isset($_GET['debug']) && $_GET['debug'] == true) {
|
|
ini_set('display_errors', 1);
|
|
error_reporting(E_ALL);
|
|
}
|
|
else {
|
|
error_reporting(E_ERROR);
|
|
}
|
|
|
|
ini_set("memory_limit","1024M");
|
|
set_time_limit(60000);
|
|
|
|
// including libs
|
|
include_once './core/base.class.php';
|
|
include_once './core/registry.class.php';
|
|
include_once './core/uri.class.php';
|
|
|
|
//echo microtime_float() - $start_time;
|
|
|
|
// base object
|
|
$base_object = new base();
|
|
|
|
// show errors if modus is development or debug
|
|
if ($base_object->config->debug || $base_object->config->development) {
|
|
ini_set("display_errors",1);
|
|
}
|
|
|
|
Registry::set('base', $base_object);
|
|
|
|
if (isset($_GET['admin_modul'])) {
|
|
// go to admin website
|
|
include './modules/admin_init.php';
|
|
} elseif (isset($_GET['soap_modul'])) {
|
|
// soap
|
|
include './modules/soap_init.php';
|
|
} elseif (isset($_GET['website_modul'])) {
|
|
include './modules/website_init.php';
|
|
} elseif (isset($_GET['lightningrod'])) {
|
|
include './service/lightningrod_init.php';
|
|
} elseif (isset($_GET['exportpdf'])) {
|
|
include './scripts/exportpdf.php';
|
|
} else {
|
|
// go to shop website
|
|
// get structure
|
|
if (isset($_GET['structure_suri'])) {
|
|
$structure = URI::fetch_structure($_GET['structure_suri']);
|
|
/*if (!$structure) {
|
|
header('Location: /error_404/');
|
|
}
|
|
else {
|
|
$_GET['menu_id'] = $structure;
|
|
}*/
|
|
$_GET['menu_id'] = $structure;
|
|
}
|
|
|
|
// get parent structures 2-8
|
|
$_GET['parent_ids'] = isset($_GET['menu_id']) ? array($_GET['menu_id']) : array();
|
|
for($i=1;$i<9;$i++) {
|
|
if (isset($_GET['structure_suri'.$i])) {
|
|
$_GET['parent_ids'][] = URI::fetch_structure($_GET['structure_suri'.$i]);
|
|
}
|
|
}
|
|
|
|
// get item
|
|
if (isset($_GET['item_suri'])) {
|
|
$item = URI::fetch_item($_GET['item_suri']);
|
|
if (!$item) {
|
|
header('Location: /error_404/');
|
|
}
|
|
else {
|
|
$_GET['item_id'] = $item;
|
|
}
|
|
}
|
|
|
|
include './modules/website_init.php';
|
|
}
|
|
|
|
/* EOF */ |