function include_build2_text() { global $build_cost, $local_goods, $max_build, $building_count, $wood_cost, $building_output, $building_variables, $local_build, $barren, $output_building_percent, $building_percent, $buildings_due, $current, $sub_current1, $sub_current2, $sub_current3, $userid, $local_pop; include_once 'inc/functions/build.php'; mysql_grab($userid, 'local', 'goods', 'build', 'stats', 'pop', 'army', 'user'); build_cost(); building_names(); general_build(); build_buildings(); echo '<div class="center">' . "<br /><a href=main.php?cat=game&page=build>Return To Construction</a></div>"; }
function include_raze_build2_text() { global $local_goods, $local_army, $local_build, $barren, $userid, $local_pop, $collapse, $local_stats, $unit_var, $unit_names, $gold_unit, $army_due, $max_train, $raze, $connection, $build_cost, $local_goods, $max_build, $building_count, $building_output, $building_variables, $local_build, $barren, $output_building_percent, $building_percent, $buildings_due, $current, $sub_current1, $sub_current2, $sub_current3, $userid, $local_pop; include_once 'inc/functions/build.php'; mysql_grab($userid, 'local', 'goods', 'build', 'stats', 'pop', 'army', 'user'); build_cost(); building_names(); general_build(); echo '<div id="textMedium">' . '<h2>' . "Demolision Report" . '</h2>'; $yes = 'no'; for ($i = 1; $i <= $building_count; $i++) { $current = $building_variables[$i]; $collapse[$current] = floor($collapse[$current]); if ($collapse[$current] <= 0) { $collapse[$current] = 0; } if ($collapse[$current] >= "1") { $yes = "yes"; if ($collapse[$current] > $local_build[$current]) { echo "<p>Wait... You do not own {$collapse[$current]} acres of {$building_output[$i]}, so how can you demolish them?<br><br>"; echo "<a href= main.php?cat=game&page=raze_build>Try Again</a></p></div>"; include_game_down(); exit; } echo "<p>{$collapse[$current]} {$building_output[$i]}</p>"; $new['build'] = $local_build[$current] - $collapse[$current]; $update['build'] = "UPDATE build SET {$current} ='{$new['build']}' WHERE id= {$userid}"; $update['build'] = mysql_query($update['build'], $connection); } } if ($yes == "yes") { echo "<p>Have been demolished. Such a waste of crowns and logs...</p>"; } if ($yes != "yes") { echo "<p>Sorry, what did you order demolished?</p>"; } echo "<p><a href= main.php?cat=game&page=raze_build>Demolish More</a> :: "; echo "<a href=main.php?cat=game&page=build>Return To Construction</a></p>"; echo "</div>"; }
function include_mail_text() { global $Host, $d_stats, $tribe, $mid, $subject, $set, $type, $action, $userid, $submit, $kingdom, $userid, $message, $inputBody, $orkTime, $local_stats, $connection, $posts, $replyid; include_once 'inc/functions/forums.php'; require_once 'inc/functions/mail.php'; $objSrcUser =& $GLOBALS['objSrcUser']; $local_stats = $objSrcUser->get_stats(); if (!$set) { $set = "view"; } if (!$kingdom) { $kingdom = $local_stats['kingdom']; } $count = '0'; $topLinks = '<div class="center">' . "| " . "<a href=\"main.php?cat=game&page=mail&set=compose\">" . "Compose Mail" . "</a>" . " | " . "<a href=\"main.php?cat=game&page=mail&set=view\">" . "View Inbox" . "</a>" . " | " . "<a href=\"main.php?cat=game&page=mail&set=outbox\">" . "View Outbox" . "</a>" . " | " . "<a href=\"main.php?cat=game&page=message&tribe=1&alliance=1\">" . "Send a Report" . "</a>" . " | " . "<a href=\"main.php?cat=game&page=mail&set=block\">" . "Block Mail" . "</a>"; if ($local_stats['type'] == 'elder') { $topLinks .= " | " . "<a href=\"main.php?cat=game&page=mail&set=eldermail\">" . "Alliance Mail" . "</a>"; } $topLinks .= " |</div>"; echo $topLinks; if ($set == "sendmail") { send_mail($userid, $tribe, $subject, $message); //changed to use send_mail function - AI 10/12/2006 } if ($set == "eldermailsend") { $message = safeHTML($message); $subject = safeHTML($subject); $message = "{$message}<br /><br />Your elder: " . $local_stats['name']; if (!$subject) { $subject = "No Subject"; } $query = mysql_query("SELECT id FROM stats WHERE kingdom = {$local_stats['kingdom']}"); while ($datas = mysql_fetch_array($query)) { if ($datas["id"] != $userid) { $create['message'] = mysql_query("INSERT INTO messages (id, for_user, from_user, date, subject, text, new, action) VALUES ('', '" . $datas['id'] . "', '" . $userid . "', '" . $orkTime . "', '" . $subject . "', '" . $message . "', 'new', 'received')"); $update['timestamp'] = mysql_query("UPDATE preferences SET last_m ='{$orkTime}' WHERE id= {$tribe}"); } } $create['message'] = mysql_query("INSERT INTO messages (id, for_user, from_user, date, subject, text, new, action) VALUES ('', '0', '" . $userid . "', '" . $orkTime . "', '" . $subject . "', '" . $message . "', 'old', 'sent')"); $set = "eldermail"; echo '<div class="center">' . "<h3>Message sent to all your alliance members.</h3></div>"; } if ($set == "eldermail") { $eldermail = '<div id="textBig">' . "<h2>Mail your alliance</h2>" . "<form action=\"main.php?cat=game&page=mail&set=eldermailsend\" method=\"post\">" . "<br />" . "Subject: <input type=\"text\" name=\"subject\" size=\"30\" />" . "<br />" . "<textarea name=\"message\" rows=\"10\" cols=\"70\" wrap=\"on\"></textarea>" . "<br />" . "<input type=\"submit\" value=\"Send Message\" />" . "</form>" . "</div>"; echo $eldermail; } if ($set == "compose") { $sendMailTargets = "<option value=\"spacer\">"; if (isset($_GET['aid']) && !empty($_GET['aid'])) { $kingdom = intval($_GET['aid']); } if (isset($_GET['tribe']) && !empty($_GET['tribe'])) { $replyid = intval($_GET['tribe']); } $result = mysql_query("SELECT * FROM stats WHERE kingdom = {$kingdom} ORDER BY tribe"); while ($kdstats = mysql_fetch_array($result, MYSQL_ASSOC)) { $kdstats["tribe"] = stripslashes($kdstats["tribe"]); if ($kdstats["id"] == $replyid) { $sendMailTargets .= "<option value=\"" . $kdstats['id'] . "\" selected>" . $kdstats['tribe']; } else { $sendMailTargets .= "<option value=\"" . $kdstats['id'] . "\">" . $kdstats['tribe']; } } $compose = "<br />" . "<table cellspacing=\"0\" cellpadding=\"0\" class=\"small\">" . "<tr class=\"header\">" . "<th colspan=\"2\">" . "Compose Mail" . "</th>" . "</tr>" . "<tr class=\"subheader\">" . "<th colspan=\"2\" class=\"center\">" . "Select Target" . "</th>" . "</tr>" . "<tr class=\"data\">" . "<form action=\"main.php?cat=game&page=mail&set=compose\" method=\"post\">" . "<th>" . "Alliance:" . "</th>" . "<td>" . "<input maxlength=\"4\" size=\"3\" name=\"kingdom\" value=\"{$kingdom}\" />" . "<input type=\"submit\" value=\"Change\" />" . "</td>" . "</form>" . "</tr>" . "<form id=\"center\" action=\"main.php?cat=game&page=mail&set=sendmail\" method=\"post\">" . "<tr class=\"data\">" . "<th>" . "Tribe:" . "</th>" . "<td>" . "<select name=\"tribe\">" . $sendMailTargets . "</select>" . "</td>" . "</tr>" . "</table>" . "<br />" . '<div class="center">' . "Subject: <input type=\"text\" name=\"subject\" size=\"30\" />" . "<br />" . "<textarea name=\"message\" rows=\"10\" cols=\"70\" wrap=\"on\"></textarea>" . "<br />" . "<input type=\"submit\" value=\"Send Message\" />" . "</form>" . "</div>"; echo $compose; } if ($set == "view") { $result = mysql_query("SELECT * from messages WHERE for_user ='******' AND action = 'received' AND new != 'deleted' ORDER BY date DESC") or die(mysql_error()); $num_mail = mysql_num_rows($result); if ($num_mail <= "0") { echo "You have no mail in your inbox.<br />"; include_game_down(); exit; } $update['timestamp'] = mysql_query("UPDATE preferences SET last_m_check ='{$orkTime}' WHERE id= {$userid}"); $updated['timestamp'] = mysql_query($update['timestamp'], $connection); $inbox = "<form id=\"center\" name=\"mail\" method=\"post\" action=\"main.php?cat=game&page=mail&set=delete2\">" . "<table cellpadding=\"0\" cellspacing=\"0\" class=\"big\">" . "<tr class=\"header\">" . "<th colspan=\"5\">" . "Inbox" . "</th>" . "</tr>" . "<tr class=\"subheader\">" . "<th>" . "Subject" . "</th>" . "<td class=\"left\">" . "From" . "</td>" . "<td class=\"left\">" . "Date" . "</td>" . "<td class=\"left\">" . "Status" . "</td>" . "<td class=\"center\">" . "Delete" . "</td>" . "</tr>"; while ($mail = mysql_fetch_array($result)) { $count++; if ($count == '1') { $class = ""; } else { $class = "bsup"; } mysql_grab($mail['from_user'], 'd', 'stats'); if (empty($mail['subject'])) { $mail['subject'] = 'No Subject'; } $inbox .= "<tr class=\"data\">" . "<th class=\"" . $class . "\">" . "<a href=\"main.php?cat=game&page=mail&set=read&mid=" . $mail['id'] . "\">" . cleanHTML($mail['subject']) . "</a>" . "</th>" . "<td class=\"" . $class . " left\">" . cleanHTML($d_stats['tribe']) . "(#" . $d_stats['kingdom'] . ")</td>" . "<td class=\"" . $class . " left\">" . $mail['date'] . "</td>" . "<td class=\"" . $class . " left\">" . $mail['new'] . "</td>" . "<td class=\"" . $class . " center\">" . "<input name=\"posts[]\" type=\"checkbox\" value=\"" . $mail['id'] . "\" />" . "</td>" . "</tr>"; } $inbox .= "</table>" . '<br /><div class="center">' . "| <a href='#' onclick=\"var posts=document.getElementsByName('mail')[0]['posts[]']; for(var i=0,len=posts.length;i<len;i++) posts[i].checked=true;\">Check All</a>" . " | <a href='#' onclick=\"var posts=document.getElementsByName('mail')[0]['posts[]']; for(var i=0,len=posts.length;i<len;i++) posts[i].checked=false;\">Uncheck All</a> |" . "</div><br />" . "<input type=\"submit\" name=\"submit\" value=\"Delete\" />" . "</form>"; echo $inbox; } if ($set == "outbox") { $result = mysql_query("SELECT * from messages WHERE from_user ='******' AND action = 'sent' AND new != 'deleted' ORDER BY date DESC") or die(mysql_error()); $num_mail = mysql_num_rows($result); if ($num_mail <= "0") { echo "<div class=\"center\">You have no mail in your outbox.</div>"; include_game_down(); exit; } $outbox = "<form id=\"center\" name=\"mail\" method=\"post\" action=\"main.php?cat=game&page=mail&set=deleteout2\">" . "<table cellpadding=\"0\" cellspacing=\"0\" class=\"big\">" . "<tr class=\"header\">" . "<th colspan=\"5\">" . "Outbox" . "</th>" . "</tr>" . "<tr class=\"subheader\">" . "<th>" . "Subject" . "</th>" . "<td class=\"left\">" . "To" . "</td>" . "<td class=\"left\">" . "Date" . "</td>" . "<td class=\"left\">" . "Status" . "</td>" . "<td class=\"center\">" . "Delete" . "</td>" . "</tr>"; while ($mail = mysql_fetch_array($result)) { $count++; if ($count == '1') { $class = ""; } else { $class = "bsup"; } if ($mail['for_user'] == "0") { $receiver = "Your Alliance"; } else { $foruser = mysql_query("SELECT tribe, kingdom FROM stats WHERE id = {$mail['for_user']}"); $foruser = mysql_fetch_array($foruser); $receiver = cleanHTML($foruser['tribe']) . "(#{$foruser['kingdom']})"; } if (empty($mail['subject'])) { $mail['subject'] = 'No Subject'; } $outbox .= "<tr class=\"data\">" . "<th class=\"" . $class . "\">" . "<a href=\"main.php?cat=game&page=mail&set=readout&mid=" . $mail['id'] . "\">" . cleanHTML($mail['subject']) . "</a>" . "</th>" . "<td class=\"" . $class . " left\">" . $receiver . "</td>" . "<td class=\"" . $class . " left\">" . $mail['date'] . "</td>" . "<td class=\"" . $class . " left\">" . $mail['new'] . "</td>" . "<td class=\"" . $class . " center\">" . "<input name=\"posts[]\" type=\"checkbox\" value=\"" . $mail['id'] . "\" />" . "</td>" . "</tr>"; } $outbox .= "</table>" . "<br /><br />" . "| <a href='#' onclick=\"var posts=document.getElementsByName('mail')[0]['posts[]']; for(var i=0,len=posts.length;i<len;i++) posts[i].checked=true;\">Check All</a>" . " | <a href='#' onclick=\"var posts=document.getElementsByName('mail')[0]['posts[]']; for(var i=0,len=posts.length;i<len;i++) posts[i].checked=false;\">Uncheck All</a> |" . "<br /><br />" . "<input type=\"submit\" name=\"submit\" value=\"Delete\" />" . "</form>"; echo $outbox; } if ($set == "readout") { $result = mysql_query("SELECT * from messages WHERE from_user ='******' AND id = '{$mid}' AND action = 'sent' AND new != 'deleted'"); $read = mysql_fetch_array($result); $read['subject'] = stripslashes(stripslashes($read['subject'])); $read['text'] = stripslashes(stripslashes($read['text'])); if ($read['for_user'] == "0") { $receiver = "Your Alliance"; } else { $foruser = mysql_query("SELECT tribe, kingdom FROM stats WHERE id = {$read['for_user']}"); $foruser = mysql_fetch_array($foruser); $receiver = "{$foruser['tribe']}(#{$foruser['kingdom']})"; } $readout = "<table cellpadding=\"0\" cellspacing=\"0\" class=\"medium\">" . "<tr class=\"header\">" . "<th>" . "Message to: " . $receiver . "</th>" . "</tr>" . "<tr class=\"subheader\">" . "<th>" . "Subject: " . cleanHTML($read['subject']) . "</th>" . "</tr>" . "<tr class=\"message\">" . "<td>" . "<br />" . cleanHTML($read['text']) . "<br />" . "</td>" . "</tr>" . "</table>" . "<br />" . '<div class="center">' . "| <a href=main.php?cat=game&page=mail&set=deleteout&mid={$mid}>Delete</a> | " . "<a href=main.php?cat=game&page=mail&set=outbox>Return To Outbox</a> |</div>"; echo $readout; } if ($set == "read") { $result = mysql_query("SELECT * from messages WHERE for_user ='******' AND id = '{$mid}' AND action = 'received' AND new != 'deleted'"); $read = mysql_fetch_array($result); mysql_grab($read['from_user'], 'd', 'stats'); $read['subject'] = stripslashes(stripslashes($read['subject'])); $read['text'] = stripslashes(stripslashes($read['text'])); $readin = "<br /><table cellpadding=\"0\" cellspacing=\"0\" class=\"medium\">" . "<tr class=\"header\">" . "<th>" . "Message from: " . stripslashes($d_stats['name']) . "</th>" . "</tr>" . "<tr class=\"subheader\">" . "<th>" . "Subject: " . cleanHTML($read['subject']) . "</th>" . "</tr>" . "<tr class=\"message\">" . "<td>" . "<br />" . cleanHTML($read['text']) . "<br />" . "</td>" . "</tr>" . "</table>" . "<br />" . '<div class="center">' . "| <a href=main.php?cat=game&page=mail&set=reply&mid={$mid}>Reply</a> | " . "<a href=main.php?cat=game&page=mail&set=delete&mid={$mid}>Delete</a> | " . "<a href=main.php?cat=game&page=mail&set=view&mid={$d_stats['id']}>Return To Inbox</a> | " . '</div>'; echo $readin; $old = mysql_query("UPDATE messages SET new ='old' WHERE id ='{$mid}'"); $mid2 = $mid + 1; $select = mysql_query("SELECT action FROM messages WHERE id = '{$mid2}'"); $select = mysql_fetch_array($select); if ($select['action'] == 'sent') { $old = mysql_query("UPDATE messages SET new ='old' WHERE id ='{$mid2}'"); } } if ($set == "delete") { $email_name = "UPDATE messages SET new = 'deleted' WHERE id ='{$mid}' AND for_user = '******' AND action = 'received'"; $delete = mysql_query($email_name, $connection); echo '<div id="textMedium"><p>' . "The message has been deleted.<br /><br />"; echo "<a href=main.php?cat=game&page=mail&set=view>Return To Inbox</a></p>" . '</div'; } if ($set == "delete2") { $sql = "UPDATE messages SET new = 'deleted' WHERE for_user = '******' AND action = 'received' "; $sql .= " AND id IN ("; $posts = $_POST["posts"]; $postcount = count($posts); for ($i = 0; $i < $postcount; $i++) { $sql .= "{$posts[$i]}"; if ($i != $postcount - 1) { $sql .= ","; } } $sql .= ")"; $delete = mysql_query($sql, $connection); echo '<div id="textMedium"><p>' . "The selected messages are deleted.<br /><br />"; echo "<a href=main.php?cat=game&page=mail&set=view>Return To Inbox</a></p>" . '</div'; } if ($set == "deleteout") { $email_name = "UPDATE messages SET new = 'deleted' WHERE id ='{$mid}' AND from_user = '******' AND action = 'sent'"; $delete = mysql_query($email_name, $connection); echo '<div id="textMedium"><p>' . "The message has been deleted.<br /><br />"; echo "<a href=main.php?cat=game&page=mail&set=outbox>Return To Outbox</a></p>" . '</div'; } if ($set == "deleteout2") { $sql = "UPDATE messages SET new = 'deleted' WHERE from_user = '******' AND action = 'sent' "; $sql .= " AND id IN ("; $posts = $_POST["posts"]; $postcount = count($posts); for ($i = 0; $i < $postcount; $i++) { $sql .= "{$posts[$i]}"; if ($i != $postcount - 1) { $sql .= ","; } } $sql .= ")"; $delete = mysql_query($sql, $connection); echo '<div id="textMedium"><p>' . "The selected messages are deleted.<br /><br />"; echo "<a href=main.php?cat=game&page=mail&set=outbox>Return To Outbox</a></p>" . '</div'; } if ($set == "reply") { if ($action != "post") { $result = mysql_query("SELECT * from messages WHERE for_user ='******' AND id = '{$mid}' AND action = 'received'"); $reply = mysql_fetch_array($result); $subject = "Re: " . cleanHTML($reply['subject']) . " "; $replyText = "<form action=\"main.php?cat=game&page=mail&set=reply&mid={$mid}&action=post\" method=\"post\">" . "<br />" . "Subject: <input type=\"text\" name=\"subject\" size=\"30\" value=\"" . $subject . "\" />" . "<br />" . "<textarea name=\"message\" rows=\"10\" cols=\"70\" wrap=\"virtual\"></textarea>" . "<br />" . "<input type=\"submit\" name=\"submit\" value=\"Send Message\" />" . "</form>"; echo $replyText; } if ($action == "post") { $result = mysql_query("SELECT * from messages WHERE for_user ='******' AND id = '{$mid}' AND action = 'received'"); $reply = mysql_fetch_array($result); send_mail($userid, $reply['from_user'], $subject, $message); echo "<a href=main.php?cat=game&page=mail>Return To Mailbox</a>"; } } if ($set == "block") { if (isset($_POST['tribe']) && $_POST['tribe'] != 'spacer' && $action == "block") { $blocker_id = $objSrcUser->get_userid(); $blocked_id = quote_smart($_POST['tribe']); $objTrgUser = new clsUser($blocked_id); $blocked_name = $objTrgUser->get_stat(TRIBE); echo '<br /><div class="center">' . "You have blocked {$blocked_name} from sending you any more mail.</div>"; block_mail($blocker_id, $blocked_id); } if (isset($_GET['id']) && $_GET['id'] > 0 && $action == "unblock") { $blocker_id = $objSrcUser->get_userid(); $blocked_id = quote_smart($_GET['id']); $objTrgUser = new clsUser($blocked_id); $blocked_name = $objTrgUser->get_stat(TRIBE); echo '<br /><div class="center">' . "You have unblocked {$blocked_name}, they can send you mail again.</div>"; unblock_mail($blocker_id, $blocked_id); } $tribes = mysql_query("select tribe,id from stats where kingdom = {$kingdom} order by tribe"); $blockTargets = "<option value=\"spacer\"></option"; while ($allistats = mysql_fetch_assoc($tribes)) { $tribe = stripslashes($allistats['tribe']); $id = $allistats['id']; $blockTargets .= "<option value=\"{$id}\">{$tribe}</option>"; } echo "<br /><table cellspacing=\"0\" cellpadding=\"0\" class=\"small\">" . "<tr class=\"header\"><th colspan=\"2\">Block Mail</th></tr>" . "<tr class=\"subheader\"><th colspan=\"2\" class=\"center\">Select spammer</th></tr>" . "<tr class=\"data\"><form action=\"main.php?cat=game&page=mail&set=block\" method=\"post\">" . "<th>Alliance:</th><td><input maxlength=\"4\" size=\"3\" name=\"kingdom\" value=\"{$kingdom}\" />" . "<input type=\"submit\" value=\"Change\" /></td></form></tr>" . "<form action=\"main.php?cat=game&page=mail&set=block&action=block\" method=\"post\">" . "<tr class=\"data\"><th>Tribe:</th><td><select name=\"tribe\">{$blockTargets}</select>" . "<input type=\"submit\" value=\"Block\" name=\"Block\" /></td></tr></form>" . "</table><br /><br />"; $blocked_users = get_blocks_mail($objSrcUser->get_userid()); echo "<table cellspacing=\"0\" cellpadding=\"0\" class=\"small\">" . "<tr class=\"header\"><th colspan=\"2\">Blocked users</th></tr>" . "<tr class=\"subheader\"><th colspan=\"2\" class=\"center\">Remove?</th></tr>"; foreach ($blocked_users as $blocked_user) { echo "<tr class=\"data\"><th>{$blocked_user['tribe']}</th>" . "<td><a href=\"main.php?cat=game&page=mail&set=block&" . "action=unblock&id={$blocked_user['blocked_id']}\">Remove?</td></tr>"; } echo "</table>"; } }
function include_raze_build_text() { global $Host, $build_cost, $local_goods, $max_build, $building_count, $building_output, $building_variables, $local_build, $barren, $output_building_percent, $building_percent, $buildings_due, $current, $sub_current1, $sub_current2, $sub_current3, $userid, $local_pop; include_once('inc/functions/build.php'); mysql_grab($userid, 'local', 'goods', 'build', 'pop'); build_cost(); building_names(); general_build(); $advisorLinks = '<div class="tableLinkBig">' . '<a href="main.php?cat=game&page=advisors&show=build">Tribe Architect</a>' . ' :: ' . '<a href="main.php?cat=game&page=build">Construction</a>' . '</div>'; echo $advisorLinks; ECHO "<form action=\"main.php?cat=game&page=raze_build2\" method=\"post\">"; ECHO "<table class=\"big\" cellpadding=0 cellspacing=0>"; ECHO "<tr class=\"header\"><th colspan=\"9\">"; ECHO "Demolish Buildings"; ECHO "</th></tr>"; ECHO "<tr class=\"subheader\">"; ECHO "<th>Type</th>"; ECHO "<th class=\"right\">Owned</th>"; ECHO "<th class=\"right\">Collapse</th>"; ECHO "<th> </th>"; ECHO "<th>Type</th>"; ECHO "<th class=\"right\">Owned</th>"; ECHO "<th class=\"right\">Collapse</th>"; ECHO "</tr>"; for ($i = 1; $i <= $building_count; $i++) { $current = $building_variables[$i]; $i2 = $i + 1; $current2 = $building_variables[$i2]; ECHO "<tr class=\"data\">"; ECHO "<th width=\"20%\">$building_output[$i]</th>"; ECHO "<td width=\"12%\" class=\"right\">"; IF ($buildings_due[$building_variables[$i]] > 0) { ECHO "<span style=\"font-size: 0.8em;\">(".$buildings_due[$building_variables[$i]].")</span> "; } ECHO "<b>$local_build[$current]</b></td>"; ECHO "<td width=\"13%\" class=\"right\"><input size=5 name=\"collapse[$current]\"></td>"; ECHO "<td> </td>"; ECHO "<th width=\"20%\">$building_output[$i2]</th>"; ECHO "<td width=\"12%\" class=\"right\">"; IF ($buildings_due[$building_variables[$i2]] > 0) { ECHO "<span style=\"font-size: 0.8em;\">(".$buildings_due[$building_variables[$i2]].")</span> "; } ECHO "<b>$local_build[$current2]</b></td>"; ECHO "<td width=\"13%\" class=\"right\"><input size=5 name=\"collapse[$current2]\"></td>"; ECHO "</tr>"; $i = $i +1; } ECHO "</table>"; ECHO '<div class="center" style="font-size: 0.8em;">' . "Total <strong>$local_build[land]</strong> acres.</div>"; ECHO '<div class="center">' . '<input type="submit" value="Demolish Buildings"></div>'; ECHO "</form>"; }