";
		$text .= "Verteidigung: $item[verteidigung]
";
		$text .= "Geschwindigkeit: $item[speed]
";
		$text .= "HP: $item[hp]
";
		$text .= "MP: $item[mp]
";
		$text .= "Type: $item[s_type]
";
		$text .= 'Preis: '.displayMoney($item['preis']).'
';
		$text .= "Anzahl?: $item[anzahl]
";
		$text .= "ab welchen Level?: $item[level]
";
		$text .= "Info?: $item[info]";
		eval("\$infos.=\"".gettemplate("gfx/info")."\";");
		echo $infos;
		exit;
}
/////////////////////////auf Kauf Button Klicken
if($id == 1) {
if($user_ida['cheater'] == 0) {
	if(false && !checkref()) {
		displayErrorMessage(NULL,'Nicht schummeln!', displayHistoryBackLink());
		exit;
	}
}
//FIXME move to bottom!
if($anzahl_1) { $anzahl .= ",".$anzahl_1."";  $item .= ",".$item_1.""; 	}
if($anzahl_2) { $anzahl .= ",".$anzahl_2."";  $item .= ",".$item_2.""; 	}
if($anzahl_3) { $anzahl .= ",".$anzahl_3."";  $item .= ",".$item_3.""; 	}
if($anzahl_4) { $anzahl .= ",".$anzahl_4."";  $item .= ",".$item_4.""; 	}
if($anzahl_5) { $anzahl .= ",".$anzahl_5."";  $item .= ",".$item_5.""; 	}
if($anzahl_6) { $anzahl .= ",".$anzahl_6."";  $item .= ",".$item_6.""; 	}
if($anzahl_7) { $anzahl .= ",".$anzahl_7."";  $item .= ",".$item_7.""; 	}
if($anzahl_8) { $anzahl .= ",".$anzahl_8."";  $item .= ",".$item_8.""; 	}
if($anzahl_9) { $anzahl .= ",".$anzahl_9."";  $item .= ",".$item_9.""; 	}
if($anzahl_10) { $anzahl .= ",".$anzahl_10."";  $item .= ",".$item_10.""; 	}
$w_item_anzahl = explode(",",$anzahl);
$w_item_id = explode(",",$item);
$u=1;
while($u < count($w_item_anzahl)) {
if($w_item_anzahl[$u]) {
$item = mysql_fetch_array(mysql_query("SELECT preis, anzahl, name FROM item WHERE id='$w_item_id[$u]' LIMIT 1"));
$item_preis = $item_preis + ($item[preis] * $w_item_anzahl[$u]);
	if($item[anzahl] < $w_item_anzahl[$u]) {
		$fehler = "Fehler! $item[name] Ausverkauft.";
		$link = $back;
		eval("\$fehler1.=\"".gettemplate("gfx/markt_fehler")."\";");
		echo $fehler1;
	exit;
	}
	if($w_item_anzahl[$u] < 0){
		mysql_query("INSERT INTO cheater values('$user_ida[id]','Versuchte negative Werte in den Markt einzufuegen!',now())");
		$fehler = "NICHT CHEATEN, VERDAMMT NOCHMAL!!!!!";
		$link = $back;
		eval("\$fehler1.=\"".gettemplate("gfx/markt_fehler")."\";");
		echo $fehler1;
	exit;
	}
}
$u++;
}
$user = mysql_fetch_array(mysql_query("SELECT geld, item_res FROM user WHERE id='$user_ida[id]'"));
		$item_preis = ($item_preis / 100) * (100 - $user[item_res]);
$auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = '.$user_ida[id].' GROUP BY bieter'));
$auktionensumme = $auktionensumme[summe];
if($user[geld]<$item_preis+$auktionensumme) {
		$fehler = "Sie haben nicht genug Geld!";
		$link = $back;
		eval("\$fehler1.=\"".gettemplate("gfx/markt_fehler")."\";");
		echo $fehler1;
exit;
}
$u=1;
while($u < count($w_item_anzahl)) {
	if($w_item_anzahl[$u]) {
		$item = mysql_fetch_array(mysql_query("SELECT anzahl, name, s_type FROM item WHERE id='$w_item_id[$u]' LIMIT 1"));
		$t=0;
		while($t < $w_item_anzahl[$u]) {
			if($item[s_type] != "Trank") { $ru_malss = 1; }
			mysql_query("INSERT ware SET ru_mal='$ru_malss', item_id='$w_item_id[$u]', user='$user_ida[id]'");
			$t++;
		}
		mysql_query("UPDATE item SET anzahl=anzahl-'$w_item_anzahl[$u]' WHERE id='$w_item_id[$u]' LIMIT 1");
		$fehler .= "Sie haben $item[name] x $w_item_anzahl[$u] gekauft!
";
	}
$u++;
}
mysql_query("UPDATE user SET geld=geld-'$item_preis' WHERE id='$user_ida[id]' LIMIT 1");
$fehler .= "
für $item_preis ¥";
$link = "weiter...";
		eval("\$fehler1.=\"".gettemplate("gfx/markt_fehler")."\";");
		echo $fehler1;
exit;
}
////ITEMS in der navi
	if($pagenum == "" or $pagenum == 1)
	{
		$pagenum = 0;
	}
	if($pagenum != "" and $pagenum != 1)
	{
		$pagenum = ($pagenum - 1) * 10;
	}
	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");
	$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 ");
	$GELD = $user[geld];
	if ($ords == 'Trank') {
		$MAXLENGTH= 2;
		$MAXNUMBER= 98;
	} else {
		$MAXLENGTH= 1;
		$MAXNUMBER= 8;
	}
	$x=0;
	$y=1;
	while($row = mysql_fetch_array($item_name))
	{
		$ITEM = $row[name];
		$TYPE = $row[type];
		$ANZAHL = $row[anzahl];
		$row[preis] = $row[preis] / 100;
		$row[preis] = $row[preis] * (100 - $user[item_res]);
		$PREIS = $row['preis'];
		$PREIS1 = 'preis_'.$y;
		$ANZAHL1 = "anzahl_".$y."";
		$ITEM_ID1 = "item_".$y."";
		$ITEM_ID = $row[id];
		$info_id = $row[id];
		if($x==1) {
			$FARBE = "#A5B197";
			$x=0;
		} else {
		$x=1;
		$FARBE = "";
		}
		$y++;
	eval("\$ITEMS.=\"".gettemplate("gfx/markt_inhalt")."\";");
	}
////////////STORE
	while($row2 = mysql_fetch_array($user_item)) {
		$user_items = mysql_num_rows(mysql_query("SELECT id FROM ware WHERE item_id='$row2[id]' AND user='$user_ida[id]' LIMIT 100"));
		if($user_items) {
		$STORE_ITEMS .= "".$row2[name]." x ".$user_items."
";
		}
	}
	$Total = mysql_num_rows(mysql_query("SELECT id FROM item WHERE (type='$charm' OR type='ALL') AND s_type='$ords'"));
	$pages = ceil($Total/10);
	$z = 1;
	$i = 0;
	while($pages > $i)
	{
			$seiten .= " $z ";
			$z++;
			$i++;
	}
eval("\$output=\"".gettemplate("gfx/markt")."\";");
echo $output;
?>