ich pinsel jetzt hier mal die commerce_seo_url.php, ich entdecke da keinen Fehler (ist ja die Originale aus dem Paket):
<?php
/*
$Id: commerce_seo_url.php 2 2011-02-17 13:35:25Z akausch $
Copyright - 2010 - Daniel Siekiera
commerce:SEO - ein Projekt von webdesign-erfurt.de
*/
if (file_exists('includes/local/configure.php')) {
include ('includes/local/configure.php');
} elseif(file_exists('includes/configure.php')) {
include ('includes/configure.php');
} else {
header('Location: installer/');
exit;
}
if(COMMERCE_SEO_INSTALLED != 'true') {
header('Location: installer/');
exit;
}
if(!empty($_GET['linkurl']) !empty($_GET['manu']) && empty($_GET['error'])) {
$connect = mysql_connect(DB_SERVER,DB_SERVER_USERNAME,DB_SERVER_PASSWORD);
mysql_select_db(DB_DATABASE);
$data_query = mysql_query(" SELECT url_text, products_id, categories_id, blog_id, blog_cat, content_group, language_id FROM commerce_seo_url WHERE url_text = '".mysql_escape_string($_GET['linkurl'])."' LIMIT 1");
if(mysql_num_rows($data_query) > 0)
$data = mysql_fetch_array($data_query);
else {
$link_query = mysql_query("SELECT
cn.file_name_php
FROM
commerce_seo_url_names AS cn
JOIN
commerce_seo_url_personal_links AS cp
ON
cp.url_text = '".mysql_escape_string($_GET['linkurl'])."'
AND cn.file_name = cp.file_name LIMIT 1");
if(mysql_num_rows($link_query) > 0)
$link = mysql_fetch_array($link_query);
}
function get_cpath ($category) {
$cPath = $category;
while($category != '0') {
$category_data = mysql_fetch_array(mysql_query(" SELECT parent_id FROM categories WHERE categories_id = '".mysql_real_escape_string($category)."' LIMIT 1"));
if($category_data['parent_id'] != '0')
$cPath = $category_data['parent_id'].'_'.$cPath;
if($category_data['parent_id'] == 0)
break;
$category = $category_data['parent_id'];
}
return $cPath;
}
unset($_GET['linkurl']);
if(!empty($data['products_id'])) {
$cat_data = mysql_fetch_array(mysql_query(" SELECT categories_id FROM commerce_seo_url WHERE url_text = '".substr($data['url_text'],0,strrpos($data['url_text'],'/'))."' LIMIT 1"));
$_GET['cPath'] = get_cpath($cat_data['categories_id']);
if(preg_match('/_/i',$_GET['cPath']))
$_GET['cat'] = substr($_GET['cPath'],strrpos( $_GET['cPath'], '_' )+1);
else
$_GET['cat'] = $_GET['cPath'];
$_GET['products_id'] = $data['products_id'];
if(empty($_GET['cat']) (empty($_GET['cPath']))) {
$getCat = mysql_fetch_array(mysql_query("SELECT categories_id FROM products_to_categories WHERE products_id = '".$data['products_id']."' "));
$_GET['cat'] = $getCat['categories_id'];
$_GET['cPath'] = $getCat['categories_id'];
}
include('product_info.php');
} elseif(!empty($data['categories_id'])) {
$_GET['cPath'] = get_cpath($data['categories_id']);
if(preg_match('/_/i',$_GET['cPath']))
$_GET['cat'] = substr($_GET['cPath'],strrpos( $_GET['cPath'], '_' )+1);
else
$_GET['cat'] = $_GET['cPath'];
include('index.php');
} elseif (!empty($data['content_group'])) {
$_GET['coID'] = $data['content_group'];
include('shop_content.php');
} elseif (!empty($data['blog_id'])) {
$_GET['blog_item'] = $data['blog_id'];
include('blog.php');
} elseif (!empty($data['blog_cat'])) {
$_GET['blog_cat'] = $data['blog_cat'];
include('blog.php');
} elseif ((!empty($data['url_text'])) && (!empty($data['language_id'])))
include('index.php');
elseif(!empty($link['file_name_php'])) {
$aktuelle_datei = $link['file_name_php'];
$_SESSION['this_page'] = $link['file_name_php'];
include($link['file_name_php']);
}
elseif (!empty($mf_data['manufacturers_id'])) {
$_GET['manufacturers_id'] = $mf_data['manufacturers_id'];
include('index.php');
}
else
header('Location: '.HTTP_SERVER.DIR_WS_CATALOG.'404.php?error=404');
} elseif(!empty($_GET['error']))
header('Location: '.HTTP_SERVER.DIR_WS_CATALOG.'404.php?error=404');
else
include('index.php');
?>