} else { if ($command == "disband") { // *** Clan Leader Confirmation of Disbanding of the Clan *** if (!$sure) { echo "Are you sure you want to continue? This will remove all members from your clan.<br />\n"; echo "<form id=\"disband\" method=\"get\" action=\"clan.php\" name=\"disband\">\n"; echo "<div>\n"; echo "<input type=\"submit\" value=\"Disband\" class=\"formButton\">\n"; echo "<input id=\"command\" type=\"hidden\" value=\"disband\" name=\"command\">\n"; echo "<input id=\"sure\" type=\"hidden\" value=\"yes\" name=\"sure\">\n"; echo "</div>\n"; echo "</form>\n"; } else { if ($sure == "yes") { // **** Clan Leader Action Disbanding of the Clan *** disbandClan($username); die("<div class='notice'>Your clan has been disbanded.</div>\n"); } } } else { if ($command == "invite") { // *** Clan Leader Invite Input *** if (!$person_invited) { echo "Name of potential clan member:<br>\n"; echo "<form id=\"clan_invite\" action=\"clan.php\" name=\"clan_rename\">\n"; echo "<div>\n"; echo "<input id=\"command\" type=\"hidden\" value=\"invite\" name=\"command\">\n"; echo "<input id=\"person_invited\" type=\"text\" name=\"person_invited\" class=\"textField\">"; echo "<input type=\"submit\" class=\"formButton\" value=\"Invite\">\n"; echo "</div>\n"; echo "</form>\n";
function deleteAccount($who) { global $sql; if (getClan($who) == $who) { disbandClan($who); } $sql->Delete("DELETE FROM players WHERE uname = '{$who}'"); $sql->Delete("DELETE FROM inventory WHERE owner = '{$who}'"); $sql->Delete("DELETE FROM mail WHERE send_to = '{$who}'"); $_SESSION['username'] = false; session_destroy(); echo "Your account has been removed from Ninja Wars. If you wish to sign back up you may do so. <br>If not, we would be glad to receive an email telling us why you choose to leave the game,<br>Thank you.<br><br>Admin@NinjaWars.net\n"; }