Please activate PHP 5.'); } if (function_exists('ini_get') && ini_get("session.auto_start") == false) session_start(); if (!file_exists('_config/account_cfg.inc.php')) { header('location: admin/installer/install.php'); exit; } else { @ini_set("display_errors", DEBUG ? "on" : "off"); @ini_set("error_reporting", E_ALL ^ E_NOTICE); if (defined("DEBUG") && DEBUG == true) $sDEBUG = ''; require_once('_config/account_cfg.inc.php'); if (ACCOUNT_NAME == 'shop' && SQL_USER == 'root' && SQL_PASS == 'pass') { header('location: admin/installer/install.php'); exit; } } /** * PHP IDS */ unset($_SESSION['aQuery']); require_once SYS_PATH . '/_libs/IDS/Monitor.php'; require_once SYS_PATH . '/_libs/IDS/Filter/Storage.php'; $oStorage = new IDS_Filter_Storage(); $oStorage->getFilterFromXML(SYS_PATH . '/_libs/IDS/default_filter.xml'); $oGet = new IDS_Monitor($_GET, $oStorage); $oPost = new IDS_Monitor($_POST, $oStorage); $oGetRes = $oGet->run(); $oPostRes = $oPost->run(); if (!$oGetRes->isEmpty()) { header ("HTTP/1.0 403 Forbidden"); exit('forbidden'); } if (!$oPostRes->isEmpty()) { header ("HTTP/1.0 403 Forbidden"); exit('forbidden'); } if (preg_match('/tag/', $_SERVER['REQUEST_URI'])) { $oServer = new IDS_Monitor(array(urldecode($_SERVER['REQUEST_URI'])), $oStorage); $oServerRes = $oServer->run(); if (!$oServerRes->isEmpty()) { header ("HTTP/1.0 403 Forbidden"); exit('forbidden'); } } // Load Basic Stuff require_once(SYS_PATH . '/_inc/base.inc.php'); // init session class $oSession = new fwpSession(); if (MySQL_EXT == "mysql") { require_once(SYS_PATH . '/_classesphp/sql_mysql_std.inc.php'); $oDB = new sql_mysql(ACCOUNT_NAME); // Initialize Database Object } else { // Load MySQL Improved Class require_once(SYS_PATH . '/_classesphp/sql_mysqli_std.inc.php'); $oDB = new sql_mysqli(ACCOUNT_NAME); // Initialize Database Object } unset($_SESSION['iDBConnect']); $aOutputDB = array(); if (!isset($_GET['sPage'])) $_GET['sPage'] = ""; if (!isset($_GET['sAction'])) $_GET['sAction'] = ""; // Initialize website template object (Smarty) $oWebsite = new website(); $oWebsite->clear_all_cache(); $oWebsite->force_compile = true; #$oWebsite->caching = true; //load basic stuff for frontend require_once(SYS_PATH . '/_inc/base_front.inc.php'); // Include content by given sPage GET-VAR if(load::content('frontend')) ; // load all information about site elements if (load::content('frontend/elements')) ; $oWebsite->assign('aOutput',$aOutput); if (isset($_SESSION['bLogin']) && $_SESSION['bLogin'] == 1) { $oWebsite->assign('bLogin',1); } $oWebsite->assign('PHPSESS',session_id()); $oWebsite->assign('sLId',$_SESSION['sLanguageId']); /** * finish seo settings */ // title if (isset($aOutput['aSeo']['aReplace']) && is_array($aOutput['aSeo']['aReplace']) && count($aOutput['aSeo']['aReplace']) > 0) { foreach ($aOutput['aSeo']['aReplace'] as $sKey => $sValue) { $aOutput['aSeo']['sTitle'] = preg_replace('/' . $sKey . '/is', $sValue, $aOutput['aSeo']['sTitle']); $aOutput['aSeo']['sKeywords'] = preg_replace('/' . $sKey . '/is', $sValue, $aOutput['aSeo']['sKeywords']); $aOutput['aSeo']['sDescription'] = preg_replace('/' . $sKey . '/is', $sValue, $aOutput['aSeo']['sDescription']); } } $oWebsite->assign('sTitle', $aOutput['aSeo']['sTitle']); $oWebsite->assign('sKeywords', $aOutput['aSeo']['sKeywords']); $oWebsite->assign('sDescription', $aOutput['aSeo']['sDescription']); // Display Output if (isset($_COOKIE['bAdmin']) && $_COOKIE['bAdmin'] == '1' && isset($_SESSION['iUserId'])) { $sOutput = $oWebsite->fetch(TPL_DIR . '/_front/shape_new.tpl'); while (preg_match('#(<[^>]+)]+>(.*?)([^>]+>)#i', $sOutput)) { $sOutput = preg_replace('#(<[^>]+)]+>(.*?)([^>]+>)#i', '\\1\\2\\3', $sOutput); } while (preg_match('#(.*?)(.*?)#is', $sOutput)) { $sOutput = preg_replace('#(.*?)(.*?)#is', '\\1\\2', $sOutput); } preg_match_all('#(]*>)\s*]+>(.*?)\s*()#is', $sOutput, $aMatches); if (isset($aMatches[0])) { foreach ($aMatches[0] as $iKey => $sMatch) { $sOutput = str_replace($sMatch, $aMatches[1][$iKey] . $aMatches[2][$iKey] . $aMatches[3][$iKey], $sOutput); } } preg_match_all('#(]*>).*?span title=.*?;span>(.*?)<.*?()#i', $sOutput, $aMatches); if (isset($aMatches[0])) { foreach ($aMatches[0] as $iKey => $sMatch) { $sOutput = str_replace($sMatch, $aMatches[1][$iKey] . $aMatches[2][$iKey] . $aMatches[3][$iKey], $sOutput); } } echo $sOutput; } else { echo $oWebsite->fetch(TPL_DIR . '/_front/shape_new.tpl'); } if (DEBUG) { // Doppelte eintraege entfernen $aDEBUG = explode("\n", $sDEBUG); sort($aDEBUG); echo implode("\n", array_unique($aDEBUG)) . "\n"; echo ""; } ?>