<?php include_once '_template/_header.php'; echo "\n <div class = 'text-center'>\n <h2>" . $L[250] . "</h2>\n </div>"; $RealmID = isset($_GET['R']) ? (int) $_GET['R'] : null; $connection = _MySQLConnect($AccountDBHost, $DBUser, $DBPassword, $AccountDB); _getRealmArray($connection); mysql_close($connection) or die(mysql_error()); echo "\n <ul class = 'nav nav-tabs'>"; echo !isset($RealmID) ? "<li class = 'active'>" : "<li>"; echo "<a href = '?page=_online.php&ALL'>" . $L[110] . "</a></li>"; foreach ($_SESSION['R']['W'] as $ID => $NA) { echo $RealmID === (int) $ID ? "<li class = 'active'>" : "<li>"; echo "<a href = '?page=_online.php&R=" . $ID . "'>" . $NA['N'] . "</a></li>"; } echo "</ul>"; foreach ($_SESSION['R']['W'] as $ID => $NA) { if (!isset($RealmID) || (int) $RealmID === (int) $ID) { $_RealmID = isset($RealmID) ? $RealmID : (int) $ID; $HCount = null; $ACount = null; $CCount = 0; $MAX_ONLINE = _MaxOnlineForR($_RealmID); $CUR_RATE = null; $CUR_HORDE = null; $CUR_ALLIANCE = null; $connection = _MySQLConnect(_HostDBSwitch($_RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($_RealmID)); $query = mysql_query("SELECT `race`, COUNT(*) FROM `characters` WHERE `online` = 1 GROUP BY `race`;", $connection); while ($result = mysql_fetch_array($query)) { if (_isHorde((int) $result[0])) { $HCount += (int) $result[1];
function _AH_FORM($connection, $ADMIN_MODE = false) { global $L; $RealmID = isset($_GET['R']) ? (int) $_GET['R'] : null; $PostQuery = isset($_POST['U']) ? trim($_POST['U']) : null; if (isset($PostQuery)) { $PostQuery = !empty($PostQuery) ? $PostQuery : null; } $Done = null; $H = $ADMIN_MODE ? $L[221] : $L[95]; $Q_STR = "SELECT DATE(`whenItDone`),`action`,`text`,`realmName`,`charName`,`myth_coins_spend`,`myth_coins_balance`,`IP`\n FROM `account_billing_history` "; _getRealmArray($connection); echo "\n <div class = 'text-center'>\n <h2>" . $H . "</h2>"; if ($ADMIN_MODE) { if (isset($PostQuery) && isset($_SESSION['R']['Username']) && $PostQuery === $_SESSION['R']['Username']) { $Done = true; } else { if (!isset($PostQuery) && isset($_SESSION['R']['Username'])) { $Done = true; } else { $_SESSION['R']['Username'] = isset($PostQuery) ? $PostQuery : null; } } if (!isset($Done) && isset($_SESSION['R']['Username'])) { $_SESSION['R']['ID'] = _lookForAccount($connection, $_SESSION['R']['Username']); } $PLACEHOLDER = isset($_SESSION['R']['ID']) ? $_SESSION['R']['Username'] : $L[219]; if (isset($_SESSION['R']['ID'])) { $InfoAccountQuery = mysql_query("SELECT\n `t2`.`myth_coins`,`t1`.`id`,`t1`.`email`,`t1`.`last_ip`,DATE(`t1`.`joindate`) AS `joindate`,DATE(`t1`.`last_login`) AS `last_login`\n FROM `account` `t1` LEFT JOIN `account_details` `t2` ON `t1`.`id` = `t2`.`id` WHERE `t1`.`id` = " . $_SESSION['R']['ID'] . ";", $connection) or die(mysql_error()); $InfoAccountResult = mysql_fetch_array($InfoAccountQuery); echo "\n <div class = 'modal hide' id = 'ModifyFirePoints'>\n <div class = 'modal-header'>\n <button type = 'button' class = 'close' data-dismiss = 'modal'>×</button>\n <h3>" . $_SESSION['R']['Username'] . "</h3>\n </div>\n <form action = " . $_SERVER['PHP_SELF'] . " method = 'POST'>\n <div class = 'modal-body'>\n <p class = 'text-center'>" . $L[253] . "</p>\n <input name = 'HowMuch' type = 'text' size = '60' placeholder = '" . $L[255] . "'>\n <input name = 'HowMuchReason' type = 'text' size = '100' placeholder = '" . $L[256] . "'>\n </div>\n <div class = 'modal-footer'>\n <a href = '#' class = 'btn' data-dismiss = 'modal'>" . $L[254] . "</a>\n <input class = 'btn' type = 'submit' value = '" . $L[146] . "' />\n </div>\n </form>\n </div>\n <div class = 'modal hide' id = 'AccountInfo'>\n <div class = 'modal-header'>\n <button type = 'button' class = 'close' data-dismiss = 'modal'>×</button>\n <h3>" . $_SESSION['R']['Username'] . "</h3>\n </div>\n <div class = 'modal-body'>\n <table class = 'table table-hover'>\n <tr class = 'menuBar'>\n <td>#</td>\n <td>" . $_SESSION['R']['ID'] . "</td>\n </tr><tr>\n <td>" . $L[271] . "</td>\n <td>" . $InfoAccountResult['email'] . "</td>\n </tr><tr>\n <td>" . $L[272] . "</td>\n <td>" . $InfoAccountResult['joindate'] . "</td>\n </tr><tr>\n <td>" . $L[273] . "</td>\n <td>" . $InfoAccountResult['last_login'] . "</td>\n </tr><tr>\n <td>" . $L[274] . "</td>\n <td>" . $InfoAccountResult['last_ip'] . "</td>\n </tr>\n </tr><tr>\n <td><i class = 'icon-fire'></i></td>\n <td>" . $InfoAccountResult['myth_coins'] . "</td>\n </tr>\n </table>\n </div>\n </div>\n <script>\n \$('ModifyFirePoints').click(function() {\n \$('#ModifyFirePoints').modal('toggle');\n })\n \$('AccountInfo').click(function() {\n \$('#AccountInfo').modal('toggle');\n })\n </script>"; } $D = !isset($_SESSION['R']['Username']) ? "disabled = 'disabled'" : ""; echo "\n <form action = " . $_SERVER['PHP_SELF'] . " method = 'POST'>\n <input name = 'U' type = 'text' size = '60' placeholder = '" . $PLACEHOLDER . "'>\n <input class = 'btn btn-info BillingB' type = 'submit' value = '" . $L[220] . "' />\n <a href = '?CL'><input class = 'btn btn-inverse BillingB' " . $D . " value = '" . $L[251] . "'/></a>\n <a class = 'btn BillingB' data-toggle = 'modal' href = '#ModifyFirePoints' " . $D . ">" . $L[252] . "<i class = 'icon-fire'></i></a>\n <a class = 'btn BillingB' data-toggle = 'modal' href = '#AccountInfo' " . $D . ">" . $L[261] . "</a>\n </form>"; $STR_P1 = isset($_SESSION['R']['ID']) ? "`id` = " . (int) $_SESSION['R']['ID'] : ""; $STR_P2 = _AH_REALMID(isset($RealmID) ? $RealmID : -1); if (!empty($STR_P1) || !empty($STR_P2)) { $Q_STR .= " WHERE "; } $Q_STR .= $STR_P1; if (!empty($STR_P1) && !empty($STR_P2)) { $Q_STR .= " AND "; } $Q_STR .= $STR_P2; } else { $Q_STR .= " WHERE `id` = " . (int) _getAccountID(); if (isset($RealmID)) { $Q_STR .= " AND "; } $Q_STR .= _AH_REALMID(isset($RealmID) ? $RealmID : -1); } $Q_STR .= " ORDER BY `whenItDone` DESC;"; echo "\n </div>\n <ul class = 'nav nav-tabs'>"; echo !isset($RealmID) ? "<li class = 'active'>" : "<li>"; echo "<a href = '?ALL'>" . $L[110] . "</a></li>"; foreach ($_SESSION['R']['W'] as $ID => $NA) { echo $RealmID === (int) $ID ? "<li class = 'active'>" : "<li>"; echo "<a href = '?R=" . $ID . "'>" . $NA['N'] . "</a></li>"; } echo "</ul>"; $query = mysql_query($Q_STR, $connection) or die(mysql_error()); $row_num = mysql_num_rows($query); if ($row_num < 1) { echo _getAlreadyEffectSTR("<h2>" . $L[163] . "</h2>"); } else { echo "\n <fieldset>\n <table class = 'table table-hover'>\n <tr class = 'menuBar'>\n <td>" . $L[140] . "</td>\n <td>" . $L[141] . "</td>\n <td>" . $L[119] . "</td>\n <td>" . $L[142] . "</td>\n <td>" . $L[64] . "</td>\n <td>" . $L[260] . "</td>\n <td>" . $L[143] . "</td>\n </tr>"; while ($result = mysql_fetch_array($query)) { if ($result['action'] === 14 && _isset($result['text'])) { $STR = explode('_REPLACE_', $result['text']); $result['text'] = $STR[0] . _getWHLanguage() . $STR[1]; } echo "<tr class = '" . _AH_TR_STR($result, $result['action']) . "'>\n <td>" . $result[0] . "</td>\n <td>" . _AH_STR($result['action'], !empty($result['text']) ? $result['text'] : "") . "</td>\n <td>" . $result['realmName'] . "</td>\n <td>" . $result['charName'] . "</td>\n <td>" . _AH_PRICE_STR($result['myth_coins_spend']) . "</td>\n <td>" . $result['myth_coins_balance'] . " <i class = 'icon-fire'></i></td>\n <td>" . $result['IP'] . "</td>\n </tr>"; } echo "\n </table>\n </fieldset>"; } }