From bbbd354f953dbec4774a8c677d4a86e74f724f17 Mon Sep 17 00:00:00 2001 From: hecht Date: Sun, 10 Aug 2014 10:42:05 +0000 Subject: [PATCH] =?UTF-8?q?#130=20Die=20neuen=20Rassen=20werden=20nun=20au?= =?UTF-8?q?ch=20unter=20"Alle=20Attacken"=20ber=C3=BCcksichtigt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ag/info/attacken.php | 172 ++++++++++++++++++++----------------------- 1 file changed, 80 insertions(+), 92 deletions(-) diff --git a/ag/info/attacken.php b/ag/info/attacken.php index 4e5a607..eb9407b 100644 --- a/ag/info/attacken.php +++ b/ag/info/attacken.php @@ -6,6 +6,8 @@ * */ include_once (ROOT_PATH . '//include/config.inc.php'); +include_once (ROOT_PATH . '//include/sqlwrapper.inc.php'); +include_once (ROOT_PATH . '//include/rassen.inc.php'); include_once (ROOT_PATH . '//include/designfunctions.inc.php'); // TODO: Muss noch angepasst werden! @@ -148,6 +150,35 @@ function showAttDetails($at_id) { @@ -225,29 +233,8 @@ function showAtks($linkz,$tf='',$rassen='',$order='',$type='',$pagenum='',$fruch } - 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') { - $condition = getFruchtCondition($fruchttyp); - $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%\'')); - } 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%' ")); - } - } - + $row = mysql_fetch_row(db_query(getAttackenSQLStatement($tf, $rassen, $type, $search, 'count(attacken.id)'))); + $total = $row[0]; $pages = ceil($total / 20); $z = 1; @@ -304,14 +291,24 @@ function searchAtks() { } function atksHeaderType() { + $choseable = array(); + $race_types = getRaceTypes(); + foreach($race_types as $type) { + if($type['gm_only'] == false) { + $choseable[] = $type; + } + } + $choseable[] = array('name' => 'Teufelsfrüchte', 'id' => -1); ?> @@ -324,54 +321,45 @@ function atksHeaderRasse($type,$link,$fruchttyp) { @@ -458,9 +446,9 @@ if ($order) { #$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; + $linkz = 'type='.$type.'&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; + $linkz = 'type='.$type.'&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; }
- Alle Attacken | - Dragon-Ball | - One Piece | - Teufelsfrüchte + Alle Attacken + '.$choice['name'].''; + } + ?>
  - Pirat - - Schwert Kämpfer - - Grandline Maschine - - Shichibukai
- - Mensch - - Saiyajin - - Dämon - - Mutant - - Cyborg - - Namekianer - - Kaioshin
- - Parameciafrüchte - - Zoanfrüchte - - Logiafrüchte - '.$race['name'].''; + } + } else if($type == -1) { // TF's + $links[] = 'Parameciafrüchte'; + $links[] = 'Zoanfrüchte'; + $links[] = 'Logiafrüchte'; } + echo implode(' - ', $links); + + ?> -
+
  '.$tf_array['item'].''; - } - + $condition = getFruchtCondition($fruchttyp); + $tf_query = db_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 ''.$tf_array['item'].''; + } ?>