<table> <tr> <th>Guid</th> <th>Name</th> <th>Level</th> <th>Class</th> <th>Race</th> <th>Realm</th> <th>Status</th> <th>Actions</th> </tr> <?php $server->selectDB('webdb'); $result = mysql_query("SELECT name,id FROM realms"); while ($row = mysql_fetch_assoc($result)) { $acct_id = $account->getAccID($_GET['user']); $server->connectToRealmDB($row['id']); $result = mysql_query("SELECT name,guid,level,class,race,gender,online FROM characters WHERE account='" . (int) $_GET['user'] . "'\r\n\t\t\t\tOR account='" . $acct_id . "'"); while ($rows = mysql_fetch_assoc($result)) { ?> <tr class="center"> <td><?php echo $rows['guid']; ?> </td> <td><?php echo $rows['name']; ?> </td> <td><?php echo $rows['level'];
$realm = mysql_real_escape_string($_POST['realm']); mysql_query("UPDATE account_access SET gmlevel='" . $rank . "',RealmID='" . $realm . "' WHERE id='" . $id . "'"); $server->logThis("Modified account access for " . ucfirst(strtolower($account->getAccName($id)))); } ############################### if ($_POST['action'] == 'removeAccA') { $id = (int) $_POST['id']; mysql_query("DELETE FROM account_access WHERE id='" . $id . "'"); $server->logThis("Modified GM account access for " . ucfirst(strtolower($account->getAccName($id)))); } ############################### if ($_POST['action'] == 'addAccA') { $user = mysql_real_escape_string($_POST['user']); $realm = mysql_real_escape_string($_POST['realm']); $rank = (int) $_POST['rank']; $guid = $account->getAccID($user); mysql_query("INSERT INTO account_access VALUES('" . $guid . "','" . $rank . "','" . $realm . "')"); $server->logThis("Added GM account access for " . ucfirst(strtolower($account->getAccName($guid)))); } ############################### if ($_POST['action'] == 'editChar') { $guid = (int) $_POST['guid']; $rid = (int) $_POST['rid']; $name = mysql_real_escape_string(trim(ucfirst(strtolower($_POST['name'])))); $class = (int) $_POST['class']; $race = (int) $_POST['race']; $gender = (int) $_POST['gender']; $money = (int) $_POST['money']; $accountname = mysql_real_escape_string($_POST['account']); $accountid = $account->getAccID($accountname); if (empty($guid) || empty($rid) || empty($name) || empty($class) || empty($race)) {