You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

491 lines
21 KiB

<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
include_once (ROOT_PATH . '//include/config.inc.php');
include_once (ROOT_PATH . '//include/designfunctions.inc.php');
// TODO: Muss noch angepasst werden!
function showAttDetails($at_id) {
$at_info = mysql_Fetch_array(mysql_query("SELECT * FROM attacken WHERE id='".$at_id."' LIMIT 1"));
$req_atk = explode(",", $at_info['req_atk']);
$req_lvl = explode(",", $at_info['req_lvl']);
$req_attack = mysql_fetch_array(mysql_query("SELECT f.name AS f_name, b.name AS b_name, c.name AS c_name, d.name AS d_name, e.name AS e_name FROM attacken a LEFT JOIN attacken b ON(b.id='".$req_atk[0]."') LEFT JOIN attacken c ON(c.id='".$req_atk[1]."') LEFT JOIN attacken d ON(d.id='".$req_atk[2]."') LEFT JOIN attacken e ON(e.id='".$req_atk[3]."') LEFT JOIN attacken f ON(f.id='".$req_atk[4]."') WHERE a.id='".$at_id."'"));
?>
<div align="center">
<input type="button" value="Zur&uuml;ck" onClick="history.back()">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="25">
<tr>
<td width="504" height="25" colspan="2">
<p align="center"><b><?php echo $at_info['name']; ?></b></td>
</tr>
<tr>
<td width="158" height="25">
<p align="center"><b>Name</b></td>
<td width="340" height="25">&nbsp;<?php echo $at_info['name']; ?></td>
</tr>
<tr>
<td width="158" height="25">
<p align="center"><b>St&auml;rke</b></td>
<td width="340" height="25">&nbsp;<?php echo $at_info['starke']; ?></td>
</tr>
<tr>
<td width="158" height="25">
<p align="center"><b>Verteidigung</b></td>
<td width="340" height="25">&nbsp;<?php echo $at_info['verteidigung']; ?></td>
</tr>
<tr>
<td width="158" height="25">
<p align="center"><b>Geschwindigkeit</b></td>
<td width="340" height="25">&nbsp;<?php echo $at_info['speed']; ?></td>
</tr>
<tr>
<td width="158" height="25">
<p align="center"><b>HP</b></td>
<td width="340" height="25">&nbsp;<?php echo $at_info['hp']; ?></td>
</tr>
<tr>
<td width="158" height="25">
<p align="center"><b>MP</b></td>
<td width="340" height="25">&nbsp;<?php echo $at_info['mp']; ?></td>
</tr>
<tr>
<td width="158" height="25">
<p align="center"><b>Level</b></td>
<td width="340" height="25">&nbsp;<?php echo $at_info['level']; ?></td>
</tr>
<tr>
<td width="158" height="25">
<p align="center"><b>Geld</b></td>
<td width="340" height="25">&nbsp;<?php echo $at_info['geld']; ?></td>
</tr>
<tr>
<td width="158" height="25">
<p align="center"><b>Type</b></td>
<td width="340" height="25">&nbsp;<?php echo $at_info['type']; ?></td>
</tr>
<tr>
<td width="158" height="25">
<p align="center"><b>Info</b></td>
<td width="340" height="25">&nbsp;<?php echo $at_info['info']; ?></td>
</tr>
<?php
$rassen_1 = explode(",", $at_info['rassen']);
$runde = 0;
include (ROOT_PATH . '//include/array.php');
while ($runde +1 < count($rassen_1)) {
$runden = $runde +1;
$rassen_na = $rassen_1[$runde] - 1;
$rassen_name = $rassen_werte[$rassen_na];
?>
<tr>
<td width="158" height="25">
<p align="center"><b>Rassen <?php echo $runden; ?></b></td>
<td width="340" height="25">&nbsp;<?php echo $rassen_name; ?></td>
</tr>
<?php
$runde++;
}
$x = 0;
$req_x = 0;
if ($req_atk[0] > 0) {
$req_x++;
}
if ($req_atk[1] > 0) {
$req_x++;
}
if ($req_atk[2] > 0) {
$req_x++;
}
if ($req_atk[3] > 0) {
$req_x++;
}
if ($req_atk[4] > 0) {
$req_x++;
}
while ($x < $req_x) {
if ($x == 0) {
$req_attack1 = $req_attack['b_name'];
}
if ($x == 1) {
$req_attack1 = $req_attack['c_name'];
}
if ($x == 2) {
$req_attack1 = $req_attack['d_name'];
}
if ($x == 3) {
$req_attack1 = $req_attack['e_name'];
}
if ($x == 4) {
$req_attack1 = $req_attack['f_name'];
}
echo "
<tr>
<td width=158 height=25>
<p align=center><b>Req Technik</b></td>
<td width=340 height=25>&nbsp; $req_attack1 $at_info[geld] mal nutzen.</td>
</tr>
";
$x++;
}
?>
</table>
</div>
<?php
}
function showAtks($linkz,$tf='',$rassen='',$order='',$type='',$pagenum='',$fruchttyp='',$search='') {
?>
<table border="1" cellspacing="1" width="500" bgcolor="#FFFFFF"
bordercolor="#292929" bordercolordark="#C0C0C0"
bordercolorlight="#C0C0C0">
<tr>
<td align="center" valign="top"><font color="#333333"
size="1" face="Verdana"><b>ID</b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
color="#FFFFFF" size="1" face="Verdana"><b> <a href="index.php?as=info/attacken&<?php echo $linkz; ?>&order=name">Name</a></b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
color="#FFFFFF" size="1" face="Verdana"><b><a href="index.php?as=info/attacken&<?php echo $linkz; ?>&order=starke">St&auml;rke</a></b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
color="#FFFFFF" size="1" face="Verdana"><b><a href="index.php?as=info/attacken&<?php echo $linkz; ?>&order=verteidigung">Ver.</a></b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
color="#FFFFFF" size="1" face="Verdana"><b><a href="index.php?as=info/attacken&<?php echo $linkz; ?>&order=speed">Geschw.</a></b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
color="#FFFFFF" size="1" face="Verdana"><b>Info</b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
color="#FFFFFF" size="1" face="Verdana"><b><a href="index.php?as=info/attacken&<?php echo $linkz; ?>&order=level">LvL:</a></b></font></td>
</tr>
<?php
if (!empty($tf) AND is_numeric($tf)) {
$attacken = mysql_query('SELECT * FROM attacken WHERE Frucht='.$tf.' '.$order.' LIMIT '.($pagenum * 20).', 20 ');
} else {
if ($rassen == 1) {
$attacken = mysql_query("SELECT * FROM attacken WHERE (rassen LIKE '%1,%11,%' OR (rassen LIKE '%1,%' AND rassen NOT LIKE '%11,%')) AND Frucht is NULL AND info not like '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
} elseif (!empty($search)) {
$attacken = mysql_query("SELECT * FROM attacken WHERE name LIKE '%".$search."%' AND info not like '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
} elseif (empty($rassen)) {
if ($type == 'op') {
$attacken = mysql_query("SELECT * FROM attacken WHERE (rassen LIKE '%1,%' OR rassen LIKE '%8,%' OR rassen LIKE '%9,%' OR rassen LIKE '%12,%') AND Frucht is NULL AND rassen!='11,' AND info not like '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
} elseif ($type == 'db') {
$attacken = mysql_query("SELECT * FROM attacken WHERE (rassen LIKE '%2,%' OR rassen LIKE '%3,%' OR rassen LIKE '%4,%' OR rassen LIKE '%5,%' OR rassen LIKE '%6,%' OR rassen LIKE '%7,%' OR rassen LIKE '%10,%') AND Frucht is NULL AND rassen!='11,' AND info not like '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
} elseif ($type == 'tf') {
if ($fruchttyp == 'paramecia') {
$attacken = mysql_query("SELECT * FROM attacken WHERE (Frucht=3 OR Frucht=4 OR Frucht=9 OR Frucht=11 OR Frucht=12 OR Frucht=38 OR Frucht=14 OR Frucht=17 OR Frucht=26 OR Frucht=2 OR Frucht=19 OR Frucht=20 OR Frucht=21 OR Frucht=22) AND info not like '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
} elseif ($fruchttyp == 'zoan') {
$attacken = mysql_query("SELECT * FROM attacken WHERE (Frucht=31 OR Frucht=30 OR Frucht=33 OR Frucht=34 OR Frucht=35 OR Frucht=32 OR Frucht=29 OR Frucht=16) AND info not like '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
} elseif ($fruchttyp == 'logia') {
$attacken = mysql_query("SELECT * FROM attacken WHERE (Frucht=23 OR Frucht=24 OR Frucht=8 OR Frucht=15 OR Frucht=6) AND info not like '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
} else {
$attacken = mysql_query("SELECT * FROM attacken WHERE Frucht!=0 AND rassen!='11,' AND info not like '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
}
} else {
$attacken = mysql_query("SELECT * FROM attacken WHERE info NOT LIKE '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
}
} else {
$attacken = mysql_query("SELECT * FROM attacken WHERE rassen LIKE '%$rassen%' AND Frucht is NULL AND info not like '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
}
}
while ($row = mysql_fetch_array($attacken)) {
?>
<tr>
<td align="center" valign="top"><font size="1"
face="Verdana" color="#333333"><b><?php echo $row['id']; ?></b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
size="1" face="Verdana">&nbsp;</font><font
color="#FFFFFF" size="1" face="Verdana"><b> <?php echo $row['name']; ?> </b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
color="#D1D1D1" size="1" face="Verdana"><b>&nbsp;<?php echo $row['starke']; ?></b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
color="#D1D1D1" size="1" face="Verdana"><b>&nbsp;<?php echo $row['verteidigung']; ?></b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
color="#D1D1D1" size="1" face="Verdana"><b>&nbsp;<?php echo $row['speed']; ?></b></font></td>
<td align="center" valign="top" bgcolor="#333333"><font
color="#FFFFFF" size="1" face="Verdana"><b>&nbsp;<a href="index.php?as=info/attacken&p=1&at_id=<?php echo $row['id']; ?>">Info</a></b></font></td>
<td align="center" valign="top" bgcolor="#FFFFFF"><font
color="#510002" size="1" face="Verdana"><b><?php echo $row['level']; ?></b></font></td>
</tr>
<?php
}
if (!empty($tf) AND is_numeric($tf)) {
$total = mysql_num_rows(mysql_query('SELECT id FROM attacken WHERE Frucht='.$tf));
} else {
if ($rassen == 1) {
$total = mysql_num_rows(mysql_query("SELECT * FROM attacken WHERE (rassen LIKE '%1,%11,%' OR (rassen LIKE '%1,%' AND rassen NOT LIKE '%11,%')) AND Frucht is NULL AND info not like '%npc attacke%' "));
} elseif (!empty($search)) {
$total = mysql_num_rows(mysql_query("SELECT * FROM attacken WHERE name LIKE '%".$search."%' AND info not like '%npc attacke%' "));
} elseif (empty($rassen)) {
if ($type == 'op') {
$total = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE (rassen LIKE '%1,%' OR rassen LIKE '%8,%' OR rassen LIKE '%9,%' OR rassen LIKE '%12,%') AND Frucht is NULL AND rassen!='11,' AND info not like '%npc attacke%' "));
} elseif ($type == 'db') {
$total = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE (rassen LIKE '%2,%' OR rassen LIKE '%3,%' OR rassen LIKE '%4,%' OR rassen LIKE '%5,%' OR rassen LIKE '%6,%' OR rassen LIKE '%7,%' OR rassen LIKE '%10,%') AND Frucht is NULL AND rassen!='11,' AND info not like '%npc attacke%' "));
} elseif ($type == 'tf') {
if ($fruchttyp == 'paramecia') {
$total = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE (Frucht=3 OR Frucht=4 OR Frucht=9 OR Frucht=11 OR Frucht=12 OR Frucht=38 OR Frucht=14 OR Frucht=17 OR Frucht=26 OR Frucht=2 OR Frucht=19 OR Frucht=20 OR Frucht=21 OR Frucht=22) AND info not like '%npc attacke%' "));
} elseif ($fruchttyp == 'zoan') {
$total = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE (Frucht=31 OR Frucht=30 OR Frucht=33 OR Frucht=34 OR Frucht=35 OR Frucht=32 OR Frucht=29 OR Frucht=16) AND info not like '%npc attacke%' "));
} elseif ($fruchttyp == 'logia') {
$total = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE (Frucht=23 OR Frucht=24 OR Frucht=8 OR Frucht=15 OR Frucht=6) AND info not like '%npc attacke%' "));
} else {
$total = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE Frucht!=0 AND rassen!='11,' AND info not like '%npc attacke%' "));
}
} else {
$total = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE info NOT LIKE '%npc attacke%' "));
}
} else {
$total = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE rassen LIKE '%$rassen%' AND Frucht is NULL AND info not like '%npc attacke%' "));
}
}
$pages = ceil($total / 20);
$z = 1;
$i = 0;
#$rassen++;
while ($pages > $i) {
$seiten .= '&nbsp;<a href="index.php?as=info/attacken&type='.$type.'&pagenum='.$z.'&order_art='.$order_art.'&order='.$last_klick1.'&rassen='.$rassen.'">$z</a>&nbsp;';
$z++;
$i++;
}
if (!empty($search)) {
$url = '<a href="index.php?as=info/attacken&p=1&search='.$search.'&pagenum=###PAGE###&order_art='.$order_art.'&order='.$last_klick1.'&rassen='.$rassen.'&tf='.$tf.'&fruchttyp='.$fruchttyp.'">###LABEL###</a>';
} else {
$url = '<a href="index.php?as=info/attacken&type='.$type.'&pagenum=###PAGE###&order_art='.$order_art.'&order='.$last_klick1.'&rassen='.$rassen.'&tf='.$tf.'&fruchttyp='.$fruchttyp.'">###LABEL###</a>';
}
?>
<?php
/*
<tr>
<td vAlign="top" align="middle"><font color="#333333">Seiten</font></td>
<td vAlign="top" bgColor="#333333" colspan="6">
<font face="Verdana" size="1">&nbsp;</font><font face="Verdana" color="#ffffff" size="1"><b><?php echo $seiten; ?></b></font></td>
</tr>*/
echo '<tr><td bgcolor="#333333" colspan="7">'.displayPagelinksNew(20, $total, $pagenum, $url).'</td></tr>';
?>
</table>
<?php
}
function searchAtks() {
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
<input type="hidden" name="as" value="info/attacken">
<input type="hidden" name="p" value="1">
<table border="1" cellspacing="1" width="500" bgcolor="#F8F8F8"
bordercolor="#292929" bordercolordark="#C0C0C0"
bordercolorlight="#C0C0C0">
<tr>
<td align="center" width="100%" bgcolor="#333333">
<font color="#FFFFFF" size="1" face="Verdana"><b>Suchen: </b></font>
<font size="1" face="Verdana">
<input id="input" name="search">
<input id="input" type=submit value="suche">
</font>
</td>
</tr>
</table>
</form>
<?php
}
function atksHeaderType() {
?>
<tr>
<td align="center" width="100%" bgcolor="#333333">
<span style="color:#FFF;font-family:Verdana;font-size:10;font-weight:bold;">
<a href="index.php?as=info/attacken" style="color:#FFF;text-decoration:none;">Alle Attacken</a> |
<a href="index.php?as=info/attacken&type=db" style="color:#FFF;text-decoration:none;">Dragon-Ball</a> |
<a href="index.php?as=info/attacken&type=op" style="color:#FFF;text-decoration:none;">One Piece</a> |
<a href="index.php?as=info/attacken&type=tf" style="color:#FFF;text-decoration:none;">Teufelsfr&uuml;chte</a>
</span>
</td>
</tr>
<?php
}
function atksHeaderRasse($type,$link,$fruchttyp) {
?>
<tr>
<td align="center" bgcolor="#333333">
<font color="#FFFFFF">&nbsp;</font><font color="#FFFFFF" size="1" face="Verdana"><b>
<?php
if ($type == 'op') {
?>
<a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=7">Pirat</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=10">Schwert K&auml;mpfer</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=11">Grandline Maschine</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=8">Shichibukai</a><br>
<?php
} elseif ($type == 'db') {
?>
<a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=1">Mensch</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=2">Saiyajin</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=3">D&auml;mon</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=4">Mutant</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=5">Cyborg</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=6">Namekianer</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=9">Kaioshin</a><br>
<?php
} elseif ($type == 'tf') {
if (!isset($fruchttyp)) {
?>
<a href="index.php?as=info/attacken&type=<?php echo $type; ?>&fruchttyp=paramecia">Parameciafr&uuml;chte</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&fruchttyp=zoan">Zoanfr&uuml;chte</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&fruchttyp=logia">Logiafr&uuml;chte</a>
<?php
} elseif ($fruchttyp == 'paramecia') {
$tf_query= mysql_query('SELECT * FROM wochen_markt WHERE (id!=25 AND id!=41 AND id!=42) AND (id=4 OR id=11 OR id=9 OR id=14 OR id=20 OR id=3 OR id=12 OR id=38 OR id=17 OR id=26 OR id=2 OR id=19 OR id=21 OR id=22 OR id=409 OR id=410 OR id=411 OR id=412) ORDER BY item ASC');
while ($tf_array= mysql_fetch_assoc($tf_query)) {
echo ' - <a href="index.php?as=info/attacken&type='.$type.'&fruchttyp=paramecia&'.$link.'&tf='.$tf_array['id'].'">'.$tf_array['item'].'</a>';
}
} elseif ($fruchttyp == 'zoan') {
$tf_query= mysql_query('SELECT * FROM wochen_markt WHERE (id!=25 AND id!=41 AND id!=42) AND (id=29 OR id=31 OR id=34 OR id=35 OR id=30 OR id=33 OR id=16 OR id=32 OR id=401 OR id=403 OR id=405 OR id=407) ORDER BY item ASC');
while ($tf_array= mysql_fetch_assoc($tf_query)) {
echo ' - <a href="index.php?as=info/attacken&type='.$type.'&fruchttyp=zoan&'.$link.'&tf='.$tf_array['id'].'">'.$tf_array['item'].'</a>';
}
} elseif ($fruchttyp == 'logia') {
$tf_query= mysql_query('SELECT * FROM wochen_markt WHERE (id!=25 AND id!=41 AND id!=42) AND (id=8 OR id=23 OR id=24 OR id=6 OR id=15 OR id=413 OR id=414) ORDER BY item ASC');
while ($tf_array= mysql_fetch_assoc($tf_query)) {
echo ' - <a href="index.php?as=info/attacken&type='.$type.'&fruchttyp=logia&'.$link.'&tf='.$tf_array['id'].'">'.$tf_array['item'].'</a>';
}
}
}
?>
<b></font><font color="#FFFFFF"></font>
</td>
</tr>
<?php
}
function atksHeader($link,$type='',$fruchttyp='') {
?>
<table border="1" cellspacing="1" width="500" bgcolor="#F8F8F8"
bordercolor="#292929" bordercolordark="#C0C0C0"
bordercolorlight="#C0C0C0">
<?php
atksHeaderType();
atksHeaderRasse($type,$link,$fruchttyp);
?>
</table>
<?php
}
$type= $_GET['type'];
$fruchttyp= $_GET['fruchttyp'];
$rassen = $_GET['rassen'];
$tf = $_GET['tf'];
$search = $_GET['search'];
$order = $_GET['order'];
$order_art = $_GET['order_art'];
$pagenum = $_GET['pagenum'];
$seiten = $_GET['seiten'];
$last_klick1 = $_GET['last_klick1'];
$p = $_GET['p'];
$at_id = $_GET['at_id'];
if (!isset($pagenum)) {
$pagenum= 0;
}
if (!$order_art) {
$order_art = "asc";
$last_klick = "id";
}
if (!$last_klick1) {
$last_klick1 = 'id';
}
if ($order_art == "asc" AND $last_klick1 == $order) {
$order_art = "desc";
} else {
if ($order_art == "desc" AND $last_klick1 == $order) {
$order_art = "asc";
}
}
$last_klick1 = $order;
if (!empty($rassen)) {
$rassen= $rassen;
} else {
$rassen= '';
}
/*if ($rassen AND $rassen1 != ",") {
$rassen--;
} else {
$rassen = ",";
$rassen1 = 0;
}*/
if ($order) {
$order = "order by $order $order_art";
} else {
$order = "order by frucht,level,id asc";
}
#$rassen1 = $rassen +1;
#$linkz = "seiten=$seiten&order_art=$order_art&last_klick1=$last_klick1&rassen=$rassen1&teufel=$teufel";
if (!empty($type) AND empty($fruchttyp)) {
$linkz = 'type=tf&pagenum='.$pagenum.'&order_art='.$order_art.'&last_klick1='.$last_klick1.'&rassen='.$rassen.'&teufel='.$teufel;
} elseif (!empty($type) AND !empty($fruchttyp)) {
$linkz = 'type=tf&fruchttyp='.$fruchttyp.'&pagenum='.$pagenum.'&order_art='.$order_art.'&last_klick1='.$last_klick1.'&rassen='.$rassen.'&teufel='.$teufel;
} else {
$linkz = 'pagenum='.$pagenum.'&order_art='.$order_art.'&last_klick1='.$last_klick1.'&rassen='.$rassen.'&teufel='.$teufel;
}
$link = "pagenum=$pagenum&order_art=$order_art&last_klick1=$last_klick1";
if ($p) {
if ($_GET['search']) {
$anzahl_atks = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE name LIKE '%".trim($search)."%'"));
if ($anzahl_atks == 1) {
$at_z = mysql_fetch_array(mysql_query("SELECT id FROM attacken WHERE name='".trim($search)."' LIMIT 1"));
if (empty($at_z)) {
$at_z = mysql_fetch_array(mysql_query("SELECT id FROM attacken WHERE name LIKE '%".trim($search)."%' LIMIT 1"));
}
showAttDetails($at_z[id]);
} else {
$linkz = 'p=1&search='.trim($search).'&seiten='.$seiten.'&order_art='.$order_art.'&last_klick1='.$last_klick1.'';
searchAtks();
atksHeader($link,$type,$fruchttyp);
showAtks($linkz,$tf,'',$order,$type,$pagenum,$fruchttyp,trim($search));
}
} elseif (isset($at_id)) {
showAttDetails($at_id);
}
exit;
}
?>
<?php
searchAtks();
atksHeader($link,$type,$fruchttyp);
showAtks($linkz,$tf,$rassen,$order,$type,$pagenum,$fruchttyp);
?>
</center>
</div>