Ejemplo n.º 1
0
         $result_inhalt = $db->query("SELECT * FROM cc" . $n . "_groups_inhalt WHERE group_id='{$row['groupid']}'");
         $inhalt = "";
         while ($row_inhalt = $db->fetch_array($result_inhalt)) {
             $result_name = $db->query("SELECT * FROM cc" . $n . "_soldiers WHERE tabless='{$row_inhalt['type']}' AND race = '{$userdata['rassenid']}'");
             $row_name = $db->fetch_array($result_name);
             $inhalt .= trim($row_name['name']) . " -> " . $row_inhalt['anzahl'] . "<br>";
         }
         $inhalt .= "---------------<br>";
         $inhalt .= "{$op_set_n_res1}: {$res1}<br>";
         $inhalt .= "{$op_set_n_res2}: {$res2}<br>";
         $inhalt .= "{$op_set_n_res3}: {$res3}<br>";
         $inhalt .= "{$op_set_n_res4}: {$res4}<br>";
         $backurl = "battle.php";
         $message = make_timebanner($row['starttime'], $row['traveltime'], $z, "battle.php", "progressBar_blue");
         $target_name = get_countrie_name_from_id($row['islandid'], 1);
         $battle_back[$battle_back_count]['tt'] = make_tooltip_text($inhalt);
         $battle_back[$battle_back_count]['island_name'] = $target_name;
         $battle_back[$battle_back_count]['group_name'] = $group_name;
         $battle_back[$battle_back_count]['message'] = $message;
         $battle_back_count++;
     } else {
         $db->query("UPDATE cc" . $n . "_groups SET group_status = 0, traveltime = 0, endx = 0, endy = 0 WHERE groupid='{$row['groupid']}'");
         header("LOCATION: battle.php");
         exit;
     }
 }
 $tpl->assign('daten_battle_back', $battle_back);
 $time = time();
 $count = 0;
 $result = $db->query("SELECT * FROM cc" . $n . "_groups WHERE endy = '{$userdata['y']}' AND endx = {$userdata['x']} AND group_status = 1");
 $battle_def_count = 0;
Ejemplo n.º 2
0
     $res2 = $row['res2'];
     $res3 = $row['res3'];
     $res4 = $row['res4'];
     $result_inhalt = $db->query("SELECT * FROM cc" . $n . "_groups_inhalt WHERE group_id='{$row['groupid']}'");
     $inhalt = "";
     while ($row_inhalt = $db->fetch_array($result_inhalt)) {
         $result_name = $db->query("SELECT * FROM cc" . $n . "_soldiers WHERE tabless='{$row_inhalt['type']}' AND race = '{$userdata['rassenid']}'");
         $row_name = $db->fetch_array($result_name);
         $inhalt .= trim($row_name['name']) . " -> " . $row_inhalt['anzahl'] . "<br>";
     }
     $inhalt .= "---------------<br>";
     $inhalt .= "{$op_set_n_res1}: {$res1}<br>";
     $inhalt .= "{$op_set_n_res2}: {$res2}<br>";
     $inhalt .= "{$op_set_n_res3}: {$res3}<br>";
     $inhalt .= "{$op_set_n_res4}: {$res4}<br>";
     $tt = make_tooltip_text($inhalt);
     $delete_url = "grouping.php?action=remove&groupid=" . $row['groupid'];
     if ($res1 > 0 || $res2 > 0 || $res3 > 0 || $res4 > 0) {
         $empty_url = "grouping.php?action=make_empty&id=" . $row['groupid'];
     } else {
         $empty_url = "";
     }
     $new_found_inhalt = array($row['name'], $row['speed'], $tt, $delete_url, $empty_url);
     array_push($new_found, $new_found_inhalt);
 }
 $result_new = $db->query("SELECT * FROM cc" . $n . "_soldiers WHERE race='{$userdata['rassenid']}' AND sol_type = 0");
 while ($row_new = $db->fetch_array($result_new)) {
     $new_found_inhalt_2 = array($row_new['name'], "\"" . $row_new['tabless'] . "\"", $userdata[$row_new['tabless']]);
     array_push($new_found_2, $new_found_inhalt_2);
 }
 $tpl->assign('daten', $new_found);