</th> <th> Vocation: </th> <th> Last login: </th> <th> Status: </th> </tr> <?php // Design and present the list foreach ($characters as $char) { if ($char['name'] != $profile_data['name']) { if (hide_char_to_name(user_character_hide($char['name'])) != 'hidden') { echo '<tr>'; echo '<td><a href="characterprofile.php?name=' . $char['name'] . '">' . $char['name'] . '</a></td>'; echo '<td>' . $char['level'] . '</td>'; echo '<td>' . $char['vocation'] . '</td>'; echo '<td>' . $char['lastlogin'] . '</td>'; echo '<td>' . $char['online'] . '</td>'; echo '</tr>'; } } } ?> </table> <?php } else { echo '<b><font color="green">This player has never died.</font></b>';
<?php // Echo character list! $char_array = user_character_list($user_data['id']); // Design and present the list if ($char_array) { ?> <table id="myaccountTable" class="table table-striped table-hover"> <tr class="yellow"> <th>NAME</th><th>LEVEL</th><th>VOCATION</th><th>TOWN</th><th>LAST LOGIN</th><th>STATUS</th><th>HIDE</th> </tr> <?php $characters = array(); foreach ($char_array as $value) { // characters: [0] = name, [1] = level, [2] = vocation, [3] = town_id, [4] = lastlogin, [5] = online echo '<tr>'; echo '<td><a href="characterprofile.php?name=' . $value['name'] . '">' . $value['name'] . '</a></td><td>' . $value['level'] . '</td><td>' . $value['vocation'] . '</td><td>' . $value['town_id'] . '</td><td>' . $value['lastlogin'] . '</td><td>' . $value['online'] . '</td><td>' . hide_char_to_name(user_character_hide($value['name'])) . '</td>'; echo '</tr>'; $characters[] = $value['name']; } ?> </table> <!-- FORMS TO EDIT CHARACTER--> <form action="" method="post"> <table class="table"> <tr> <td> <select id="selected_character" name="selected_character" class="form-control"> <?php for ($i = 0; $i < $char_count; $i++) { if (user_character_hide($characters[$i]) == 1) { echo '<option value="' . $characters[$i] . '">' . $characters[$i] . '</option>';