} $charCount = count($yourChars); $yourAccess = accountAccess($user_data['id'], $config['TFSVersion']); if ($admin) { if (!empty($_POST)) { $guilds = mysql_select_multi("SELECT `id`, `name` FROM `guilds` ORDER BY `name`;"); $guilds[] = array('id' => '0', 'name' => 'No guild'); } $yourAccess = 100; } // Your characters, indexed by char_id $charData = array(); foreach ($yourChars as $char) { $charData[$char['id']] = $char; if (get_character_guild_rank($char['id']) > 0) { $guild = get_player_guild_data($char['id']); $charData[$char['id']]['guild'] = $guild['guild_id']; $charData[$char['id']]['guild_rank'] = $guild['rank_level']; } else { $charData[$char['id']]['guild'] = '0'; } } $cooldownw = array($user_znote_data['cooldown'], time(), $user_znote_data['cooldown'] - time()); ///////////////// // Guild Leader & admin $leader = false; foreach ($charData as $char) { if ($char['guild'] > 0 && $char['guild_rank'] == 3) { $leader = true; } }
$user_id = user_character_exist($name); if ($user_id !== false) { if ($config['TFSVersion'] == 'TFS_10') { $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'sex'); $profile_data['online'] = user_is_online_10($user_id); if ($config['Ach'] == true) { $achievementPoints = mysql_select_single("SELECT SUM(`value`) AS `sum` FROM `player_storage` WHERE `key` LIKE '30___' AND `player_id`='{$user_id}'"); } } else { $profile_data = user_character_data($user_id, 'name', 'level', 'vocation', 'lastlogin', 'online', 'sex'); } $profile_znote_data = user_znote_character_data($user_id, 'created', 'hide_char', 'comment'); $guild_exist = false; if (get_character_guild_rank($user_id) > 0) { $guild_exist = true; $guild = get_player_guild_data($user_id); $guild_name = get_guild_name($guild['guild_id']); } ?> <!-- PROFILE MARKUP HERE--> <h1><font class="profile_font" name="profile_font_header">Profile: <?php echo $profile_data['name']; ?> </font></h1> <ul class="unstyled"> <li><font class="profile_font" name="profile_font_level">Sex:<?php if ($profile_data['sex'] == 1) { echo 'Male'; } else {
?> ">Visit Guild Board</a></font><br><br><br><?php } ?> <form action="" method="post"> <ul> <li> Leave Guild:<br> <select name="leave_guild"> <option disabled>With...</option> <?php for ($i = 0; $i < $char_count; $i++) { foreach ($players as $player) { if ($player['name'] == $characters[$i]) { $data = get_player_guild_data(user_character_id($player['name'])); if ($data['rank_level'] != 3) { echo '<option value="' . $characters[$i] . '">' . $characters[$i] . '</option>'; } else { echo '<option disabled>' . $characters[$i] . ' [disabled:Leader]</option>'; } } } } ?> </select> <input type="submit" value="Leave Guild"> </li> </ul> </form> <?php