From e7a1075434f172fc6bd2d57a7aa0be91c9819068 Mon Sep 17 00:00:00 2001 From: hecht Date: Thu, 28 Aug 2014 14:37:43 +0000 Subject: [PATCH] Nun werden alle inhalte des Marktes angezeigt wenn man nicht auf onepiece oder dragonball filtert --- ag/markt.php | 9 ++++++--- ag/path.inc.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ag/markt.php b/ag/markt.php index 15e3f56..5db2b25 100644 --- a/ag/markt.php +++ b/ag/markt.php @@ -169,7 +169,10 @@ exit; ////ITEMS in der navi - + $filter = '1'; + if(isset($charm)) { + $filter = '(type=\''.$charm.'\' OR type=\'ALL\')'; + } if($pagenum == "" or $pagenum == 1) { @@ -182,7 +185,7 @@ exit; if(!$oder) { $oder = 'level,preis'; } if(!$ords) { $ords = "Trank"; } - $item_name = mysql_query("SELECT * FROM item WHERE (type='$charm' OR type='ALL') AND s_type='$ords' order by $oder ASC LIMIT $pagenum, 10"); + $item_name = mysql_query("SELECT * FROM item WHERE $filter AND s_type='$ords' order by $oder ASC LIMIT $pagenum, 10"); $user = mysql_Fetch_array(mysql_query("SELECT id, geld, item_res FROM user WHERE id='$user_ida[id]' LIMIT 1")); $user_item = mysql_query("SELECT name, id FROM item "); @@ -239,7 +242,7 @@ exit; } - $Total = mysql_num_rows(mysql_query("SELECT id FROM item WHERE (type='$charm' OR type='ALL') AND s_type='$ords'")); + $Total = mysql_num_rows(mysql_query("SELECT id FROM item WHERE $filter AND s_type='$ords'")); $pages = ceil($Total/10); $z = 1; diff --git a/ag/path.inc.php b/ag/path.inc.php index e72da5c..0a30982 100644 --- a/ag/path.inc.php +++ b/ag/path.inc.php @@ -23,7 +23,7 @@ if(!defined('ROOT_PATH')) { if($url_path != null) { define('ROOT_URL', $url_path); } else { - define('ROOT_URL', '/ag'); // --> currently no support for cronjobs + define('ROOT_URL', '/'); // --> currently no support for cronjobs } } }