// *** Clan leader Invite Action *** if ($failure_message == "None.") { echo "<p>You have invited {$person_invited} to join your clan.</p>"; } else { echo "<p>You cannot invite {$person_invited}. " . $failure_message . "</p>"; } } } } } } echo "<div id='leader-panel'>\n\t <div id='leader-panel-title'>{$player_clan_long_name} Clan Leader Panel</div>\n\t <ul id='leader-options'>\n\t <li><a href=\"clan.php?command=invite\">Recruit for your Clan</a></li>\n\t <li><a href=\"clan.php?command=rename\">Rename Clan</a></li>\n\t <li><a href=\"clan.php?command=disband\">Disband Your Clan</a></li>\n\t <li><a href=\"clan.php?command=kick\">Kick a Clan Member</a></li>\n\t </ul>\n\t </div>"; } else { if ($command == "leave") { // *** Clan Member Action to Leave their Clan *** setClan($username, ""); setClanLongName($username, ""); echo "<p>You have left your clan.</p>"; die; } echo "<p>You are currently a member of the {$clan} Clan.</p>"; echo "<p><a href=\"clan.php?command=leave\" onclick='leave_clan(); return false;'>Leave Current Clan</a></p>"; } if ($command == "msgclan") { // *** Clan Member Input for Messaging their Entire Clan *** echo "<form id='msg_clan' action='clan.php' method='get' name='msg_clan'>\n\t <div>\n\t Message: <input id=\"message\" type=\"text\" size=\"50\" maxlength=\"1000\" name=\"message\" class=\"textField\">\n\t <input type=\"submit\" value=\"Send This Message\" class=\"formButton\">\n\t </div>\n\t </form>\n"; } echo "<ul id='clan-options'>\n\t <li><a href=\"clan.php?command=msgclan\">Message Clan Members</a></li>\n\t <li><a href=\"clan.php?command=view&clan_name={$clan}\">View Your Clan</a></li>\n\t </ul>"; } else { if ($command == "join") { // *** Clan Joining Action ***
function disbandClan($clan_name) { global $sql; setClan($clan_name, ""); $sql->Query("SELECT uname FROM players WHERE clan = '{$clan_name}'"); $message = "Your leader has disbanded your clan. You are alone again."; while ($data = $sql->Fetch()) { $name = $data[0]; sendMessage($clan_name, $name, $message); } $sql->Update("UPDATE players SET clan = '', clan_long_name = '' WHERE clan = '{$clan_name}'"); }