checkin ... die infos der attacken werden nun nicht mehr nach id gemacht ... sprich neue fruechte koennen nun eingepflegt werden ... die kategorisierung geht nach wochen_markt.kategorie

main
hecht 11 years ago
parent 6748aee106
commit a3ed44cbe3

@ -182,16 +182,12 @@ function showAtks($linkz,$tf='',$rassen='',$order='',$type='',$pagenum='',$fruch
} elseif ($type == 'db') { } 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 '); $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') { } elseif ($type == 'tf') {
if ($fruchttyp == 'paramecia') { $condition = getFruchtCondition($fruchttyp);
$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 '); // select attacken.*, wochen_markt.kategorie from attacken inner join wochen_markt on attacken.frucht = wochen_markt.id
} elseif ($fruchttyp == 'zoan') { $sql = 'SELECT attacken.* FROM attacken inner join wochen_markt on attacken.frucht = wochen_markt.id WHERE ' .$condition.' attacken.info not like \'%npc attacke%\' '.$order.' LIMIT '.($pagenum * 20).', 20 ';
$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 '); $attacken = mysql_query($sql);
} 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 {
} 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 '); $attacken = mysql_query("SELECT * FROM attacken WHERE info NOT LIKE '%npc attacke%' $order ".' LIMIT '.($pagenum * 20).', 20 ');
} }
} else { } else {
@ -237,15 +233,8 @@ function showAtks($linkz,$tf='',$rassen='',$order='',$type='',$pagenum='',$fruch
} elseif ($type == 'db') { } 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%' ")); $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') { } elseif ($type == 'tf') {
if ($fruchttyp == 'paramecia') { $condition = getFruchtCondition($fruchttyp);
$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%' ")); $total = mysql_num_rows(mysql_query('SELECT attacken.* FROM attacken inner join wochen_markt on attacken.frucht = wochen_markt.id WHERE ' .$condition.' attacken.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 { } else {
$total = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE info NOT LIKE '%npc attacke%' ")); $total = mysql_num_rows(mysql_query("SELECT id FROM attacken WHERE info NOT LIKE '%npc attacke%' "));
} }
@ -348,34 +337,44 @@ function atksHeaderRasse($type,$link,$fruchttyp) {
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=9">Kaioshin</a><br> - <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&<?php echo $link; ?>&rassen=9">Kaioshin</a><br>
<?php <?php
} elseif ($type == 'tf') { } 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=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=zoan">Zoanfr&uuml;chte</a>
- <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&fruchttyp=logia">Logiafr&uuml;chte</a> - <a href="index.php?as=info/attacken&type=<?php echo $type; ?>&fruchttyp=logia">Logiafr&uuml;chte</a>
<?php <?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> <b></font><font color="#FFFFFF"></font>
</td> </td>
</tr> </tr>
<?php <?php
if($type == 'tf' and isset($fruchttyp)) {
?>
<tr>
<td align="center" bgcolor="#333333">
<font color="#FFFFFF">&nbsp;</font><font color="#FFFFFF" size="1" face="Verdana"><b>
<?php
$condition = getFruchtCondition($fruchttyp);
$tf_query = mysql_query('SELECT * FROM wochen_markt WHERE '.$condition.' 1 ORDER BY item ASC');
$first = true;
while ($tf_array= mysql_fetch_assoc($tf_query)) {
if($first) {
$first = false;
} else {
echo ' - ';
}
echo '<a href="index.php?as=info/attacken&type='.$type.'&fruchttyp='.$fruchttyp.'&'.$link.'&tf='.$tf_array['id'].'">'.$tf_array['item'].'</a>';
}
?>
<b></font><font color="#FFFFFF"></font>
</td>
</tr>
<?php
}
} }
function atksHeader($link,$type='',$fruchttyp='') { function atksHeader($link,$type='',$fruchttyp='') {
@ -391,6 +390,17 @@ function atksHeader($link,$type='',$fruchttyp='') {
<?php <?php
} }
function getFruchtCondition($fruchttyp) {
switch (strtolower($fruchttyp)) {
case 'paramecia':
case 'zoan':
case 'logia':
return ' kategorie = \''.$fruchttyp.'\' AND ';
default:
return '';
}
}
$type= $_GET['type']; $type= $_GET['type'];
$fruchttyp= $_GET['fruchttyp']; $fruchttyp= $_GET['fruchttyp'];
$rassen = $_GET['rassen']; $rassen = $_GET['rassen'];

Loading…
Cancel
Save