function _PushCharactersTable($AccountDBHost, $DBUser, $DBPassword, $AccountDB, $URL, $_80) { global $L; $connection = _MySQLConnect($AccountDBHost, $DBUser, $DBPassword, $AccountDB); $REALM_ARRAY = array(); $CHAR_ARRAY = array(); $query = mysql_query("SELECT `id`,`name` FROM `realmlist`;", $connection) or die(mysql_error()); while ($result = mysql_fetch_array($query)) { $REALM_ARRAY[$result['name']] = $result['id']; } foreach ($REALM_ARRAY as $RealmName => $RealmID) { $connection = _MySQLConnect(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($RealmID)); $query = mysql_query("SELECT `guid`,`name`,`level`,`race`,`class`,`gender` FROM `characters` WHERE `account` = " . (int) _getAccountID() . ";", $connection) or die(mysql_error()); while ($result = mysql_fetch_array($query)) { if ($_80 == 80 && $result['level'] < 80) { continue; } $CHAR_ARRAY[$RealmID . $result['guid']]['CharName'] = $result['name']; $CHAR_ARRAY[$RealmID . $result['guid']]['CharGUID'] = $result['guid']; $CHAR_ARRAY[$RealmID . $result['guid']]['CharClass'] = $result['class']; $CHAR_ARRAY[$RealmID . $result['guid']]['CharRace'] = $result['race']; $CHAR_ARRAY[$RealmID . $result['guid']]['CharLevel'] = $result['level']; $CHAR_ARRAY[$RealmID . $result['guid']]['CharGender'] = $result['gender']; $CHAR_ARRAY[$RealmID . $result['guid']]['RealmName'] = $RealmName; $CHAR_ARRAY[$RealmID . $result['guid']]['RealmID'] = $RealmID; } mysql_close($connection) or die(mysql_error()); } $TRIGGER = ""; $H2 = empty($CHAR_ARRAY) ? $L[62] : $L[61]; echo "\n <div class = 'text-center'>\n <h2>" . $H2 . "</h2>\n <fieldset>"; foreach ($CHAR_ARRAY as $key => $value) { if ($TRIGGER != $value['RealmID']) { echo "<legend>" . $value['RealmName'] . "</legend>"; $TRIGGER = $value['RealmID']; } echo "\n <a href = " . $URL . "?realmid=" . $value['RealmID'] . "&guid=" . $value['CharGUID'] . "><div style = 'width:273px;' class = 'charBox alert'>\n <table>\n <tr>\n <td width = '73'>\n <img class = 'img-rounded' src = '_template/img/_faces/" . _getAvatarPicString($value['CharLevel'], $value['CharGender'], $value['CharRace'], $value['CharClass']) . "'\n border = 'none'>\n </td>\n <td width = '200'>\n <h4>" . $value['CharName'] . "</h4>\n <span class = ''>" . _getCharacter_L_R_S_C_STR($value['CharLevel'], $value['CharGender'], $value['CharRace'], $value['CharClass']) . "</span><br/>\n </td>\n </tr>\n </table>\n </div></a>"; } echo "</fieldset>\n </div>"; }
function _FORM_INSTANT_EXT_REPUTATION($SA, $RealmID, $DBUser, $DBPassword, $faction, $level, $PRICE, $REALSON = "") { $connection = _MySQLConnect(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($RealmID)); $query = mysql_query("SELECT `faction`,`standing`,`flags` FROM `character_reputation` WHERE `guid` = " . $SA['CharGUID'] . " AND `flags` & 1;", $connection) or die(mysql_error()); while ($result = mysql_fetch_array($query)) { $SA['ReputationList'][$result['faction']]['Level'] = $result['standing']; $SA['ReputationList'][$result['faction']]['Flag'] = $result['flags']; } global $L; echo "\n <form action = " . $_SERVER['PHP_SELF'] . " method = 'POST'>\n <fieldset>\n <div class = 'text-center'>" . $REALSON . "\n <h2>" . $L[88] . "</h2>\n <fieldset>"; _FORM_CHAR_BLOCK($SA, null, true); include_once '_core/f_switch.php'; if (isset($faction) && isset($level)) { $faction = mb_convert_case(_getFactionNameFromID($faction), MB_CASE_TITLE, 'UTF-8'); echo "<div class = 'alert service " . _getColorOfReputationBlock($level) . " reputationBlock'>\n <div class = 'service_icon'><img src = '_template/img/reputation.png'></div>\n <h4>" . $faction . " (" . $L[114] . ")</h4>\n <div class = 'service_desc'>" . _getReputationRank($level) . "</div>\n </div>\n <div class = 'alert service alert-success reputationBlock'>\n <div class = 'service_icon'><img src = '_template/img/reputation.png'></div>\n <h4>" . $faction . " (" . $L[115] . ")</h4>\n <div class = 'service_desc'>" . _getReputationRank(42001) . "</div>\n </div>"; } echo "\n </fieldset>"; if (isset($faction) && isset($level)) { echo "\n <fieldset>\n " . _BDiv(_PRICE_STR($PRICE)) . "\n <form action = " . $_SERVER['PHP_SELF'] . " method = 'POST'>\n <p><button class = 'btn btn-primary' type = 'submit'>" . _getPriceButtonSTR($PRICE) . "</button></p>\n <input type = 'hidden' name = '2nd_checker' value = '" . $faction . "' id = '2nd_checker' />\n </form>\n </div>\n </fieldset>"; } else { echo "\n <legend>" . $L[81] . "</legend>\n <fieldset>"; if (isset($SA['ReputationList'])) { foreach ($SA['ReputationList'] as $ID => $Array) { $faction = mb_convert_case(_getFactionNameFromID($ID), MB_CASE_TITLE, 'UTF-8'); if ($faction < 0) { continue; } echo "<a href = '_a_instant_exalted_reputation.php?faction=" . $ID . "&level=" . $Array['Level'] . "'><div class = 'alert service " . _getColorOfReputationBlock($Array['Level']) . "'>\n <div class = 'service_icon'><img src = '_template/img/reputation.png'></div>\n <h4>" . $faction . "</h4>\n <div class = 'service_desc'>" . _getReputationRank($Array['Level']) . "</div>\n </div></a>"; } } else { echo _getAlreadyEffectSTR("<h2>" . $L[270] . "</h2>"); } echo "\n </fieldset>"; } echo "</fieldset>\n </form>"; }
<?php include_once '_template/_header.php'; if (!_getUsername()) { Header('Location: index.php'); } $REALSON = null; $connection = _MySQLConnect($AccountDBHost, $DBUser, $DBPassword, $AccountDB); $query = mysql_query("SELECT FROM_UNIXTIME(`bandate`) AS `BAN_DATE`, FROM_UNIXTIME(`unbandate`) AS `UNBAN_DATE`,`bannedby`,`banreason` FROM `account_banned` WHERE `id` = " . (int) _getAccountID() . " AND `active` = 1;", $connection) or die(mysql_error()); $result = mysql_fetch_array($query); if (!$result) { $_SESSION['TCA'] = false; echo _getAlreadyEffectSTR("<h2>" . $L[38] . "</h2>"); } else { if (isset($_SESSION['TCA']) && $_SESSION['TCA']) { if (_isEnoughMythCoins($PriceForUnban, $connection)) { _SpendMythCoins($PriceForUnban, 9, $_SESSION['AccountUN'], (int) _getAccountID(), 0, 0, !empty($result['bannedby']) ? $result['bannedby'] : "Server" . " : " . $result['banreason'], $connection); //_UnbanAccount($connection); $REALSON = _GDiv($L[17]); $_SESSION['TCA'] = false; } else { $REALSON = _RDiv($L[18]); } } else { $_SESSION['TCA'] = true; } echo "\n <div class = 'text-center'>" . $REALSON . "\n <h2>" . $L[94] . "</h2>\n </div>\n <fieldset>\n <div class = 'charBox alert alert-error'>\n <table>\n <tr>\n <td width = '73'>\n <img class = 'img-rounded' src = '_template/img/_faces/0-0-0-0.png' border = 'none'>\n </td>\n <td width = '340'>\n <h4>" . $result['banreason'] . "</h4>\n <span class = ''>" . $L[165] . "</span>" . _AU_BAN_AUTHOR_STR($result['bannedby']) . "<br/>\n <span class = ''>" . $L[166] . "</span>" . $result['BAN_DATE'] . "<br/>\n <span class = ''>" . $L[167] . "</span>" . $result['UNBAN_DATE'] . "\n </td>\n </tr>\n </table>\n </div>\n <div class = 'charBox alert alert-success'>\n <table>\n <tr>\n <td width = '73'>\n <img class = 'img-rounded' src = '_template/img/_faces/0-0-0-0.png' border = 'none'>\n </td>\n <td width = '340'>\n <h4>" . $result['banreason'] . "</h4>\n <span class = ''>" . $L[165] . "</span>" . _AU_BAN_AUTHOR_STR($result['bannedby']) . "<br/>\n <span class = ''>" . $L[166] . "</span>" . $result['BAN_DATE'] . "<br/>\n <span class = ''>" . $L[167] . "</span>" . $L[168] . "\n </td>\n </tr>\n </table>\n </div>\n </fieldset>\n <fieldset>\n <form action = " . $_SERVER['PHP_SELF'] . " method = 'POST'>\n " . _BDiv(_PRICE_STR($PriceForUnban)) . "\n <div class = 'text-center'>\n <button class = 'btn btn-primary' type = 'submit'>" . _getPriceButtonSTR($PriceForUnban) . "</button>\n </div>\n </form>\n </fieldset>"; } mysql_close($connection) or die(mysql_error()); include_once '_template/_footer.php'; ob_end_flush();
function _FORM_ITEM_SHOP($SA, $RealmID, $DBUser, $DBPassword, $GUID, $ItemID, $MinPrice, $PriceX, $DisplayPrice, $ITEM_DISCOUNT_MODE, $DISCOUNT_CONF, $REALSON = "") { global $L, $AccountDBHost, $AccountDB, $PageListRecordsAmmount; echo "\n <fieldset>\n <div class = 'text-center'>" . $REALSON . "\n <h2>" . $L[82] . "</h2>"; _FORM_CHAR_BLOCK($SA, null, true); echo "</fieldset>"; $connection = _MySQLConnect(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _WorldDBSwitch($RealmID)); // ----------------------------------------------------------------- if (isset($ItemID)) { $query = mysql_query("\n SELECT\n `entry` AS `id`,\n `class`,\n `subclass`,\n `ItemLevel`,\n `RequiredLevel`,\n `Quality`,\n `name`\n FROM `item_template`\n WHERE `entry` = " . $ItemID . ";", $connection) or die(mysql_error()); $QueryResult = mysql_fetch_array($query); if (!empty($QueryResult['id'])) { $PRICE = _CalculatePrise($QueryResult, $MinPrice, $PriceX); $DISCOUNT = null; if ($PRICE > 1 && $ITEM_DISCOUNT_MODE) { $DISCOUNT = round($PRICE - $PRICE * $DISCOUNT_CONF); } $_SESSION['TCA']['SItemPrice'] = isset($DISCOUNT) ? $DISCOUNT : $PRICE; $_SESSION['TCA']['SItemName'] = $QueryResult['name']; echo "\n <fieldset class = 'text-center'>\n <div style = 'width: 800px;' class = 'alert service alert-success'>\n <div class = 'service_icon'></div>\n <h4><a href = 'http://old.wowhead.com/item=" . $QueryResult['id'] . "' target = '_blank'></a></h4>\n <div class = 'service_desc'>" . _PRICE_STR($PRICE, true, isset($DISCOUNT) && $PRICE > $DISCOUNT ? $DISCOUNT : null) . "</div>\n </div>\n </fieldset></br>"; } } // ----------------------------------------------------------------- $ITEM_CLASS = _refleshSessionValue(isset($_SESSION['TCA']['ItemClass']) ? $_SESSION['TCA']['ItemClass'] : null, isset($_GET['C']) ? (int) $_GET['C'] : null, 2); if (!isset($_SESSION['TCA']['ItemClass']) || $_SESSION['TCA']['ItemClass'] != $ITEM_CLASS) { unset($_GET['page']); unset($_SESSION['TCA']['P']); } $_SESSION['TCA']['ItemClass'] = $ITEM_CLASS; $PAGE_INDEX = _refleshSessionValue(isset($_SESSION['TCA']['P']) ? $_SESSION['TCA']['P'] : null, isset($_GET['page']) ? (int) $_GET['page'] : null, 1); $PAGE_INDEX = $PAGE_INDEX < 1 ? 1 : $PAGE_INDEX; $_SESSION['TCA']['P'] = $PAGE_INDEX; if (isset($ITEM_CLASS) && $ITEM_CLASS === 7) { $ITEM_CLASS_Q_STR = isset($ITEM_CLASS) ? "WHERE `class` IN (5, 6, 7) ORDER BY `class`,`itemlevel`" : null; } else { $ITEM_CLASS_Q_STR = isset($ITEM_CLASS) ? "WHERE `class` = " . $ITEM_CLASS . " ORDER BY `itemlevel`" : null; } $query = mysql_query("\n SELECT\n `entry` AS `id`,\n `class`,\n `subclass`,\n `ItemLevel`,\n `RequiredLevel`,\n `Quality`,\n `name`\n FROM `item_template` " . $ITEM_CLASS_Q_STR . "\n DESC LIMIT " . ($PAGE_INDEX * $PageListRecordsAmmount - $PageListRecordsAmmount) . ", " . $PageListRecordsAmmount . ";", $connection) or die(mysql_error()); mysql_close($connection); echo "\n <fieldset class = 'text-center'>\n <form action = " . $_SERVER['PHP_SELF'] . " method = 'POST'>\n <div class = 'clearfix'>"; if (isset($ItemID)) { echo " \n <input name = 'itemID' type = 'text' placeholder = '" . $L[19] . "'>\n </div>\n <p>\n <button class = 'btn btn-primary' type = 'submit'>" . _getPriceButtonSTR(11) . "</button>\n </p>\n <input type = 'hidden' name = 'isItemSame' value = '" . $ItemID . "'/>"; } else { echo "\n <input name = 'itemID' type = 'text' placeholder = '" . $L[49] . "'>\n </div>\n <p>\n <button class = 'btn btn-primary' type = 'submit'>" . $L[48] . "</button>\n </p>"; } echo "\n </form>\n </fieldset>\n <ul class = 'nav nav-tabs'>\n <li" . _getBISelector(2, $ITEM_CLASS) . "><a href = '?C=2'>" . $L[282] . "</a></li> <!-- Weapon -->\n <li" . _getBISelector(4, $ITEM_CLASS) . "><a href = '?C=4'>" . $L[284] . "</a></li> <!-- Armor -->\n <li" . _getBISelector(16, $ITEM_CLASS) . "><a href = '?C=16'>" . $L[296] . "</a></li> <!-- Glyph -->\n <li" . _getBISelector(3, $ITEM_CLASS) . "><a href = '?C=3'>" . $L[283] . "</a></li> <!-- Gem -->\n <li" . _getBISelector(9, $ITEM_CLASS) . "><a href = '?C=9'>" . $L[289] . "</a></li> <!-- Recipe -->\n\n <li" . _getBISelector(0, $ITEM_CLASS) . "><a href = '?C=0'>" . $L[280] . "</a></li> <!-- Consumable -->\n <li" . _getBISelector(1, $ITEM_CLASS) . "><a href = '?C=1'>" . $L[281] . "</a></li> <!-- Container --> \n <li" . _getBISelector(7, $ITEM_CLASS, "title = '" . $L[285] . ", " . $L[286] . ", " . $L[287] . "' ") . "><a href = '?C=7'>" . $L[287] . "</a></li> <!-- Trade Goods -->\n <li" . _getBISelector(12, $ITEM_CLASS) . "><a href = '?C=12'>" . $L[292] . "</a></li> <!-- Quest -->\n <li" . _getBISelector(13, $ITEM_CLASS) . "><a href = '?C=13'>" . $L[293] . "</a></li> <!-- Key -->\n <li" . _getBISelector(15, $ITEM_CLASS) . "><a href = '?C=15'>" . $L[295] . "</a></li> <!-- Miscellaneous -->\n </ul>\n " . _pushPageNav($PAGE_INDEX) . "\n <table class = 'table table-condensed'>\n <tr class = 'menuBar'>\n <td>" . $L[275] . "</td>\n <td>" . $L[64] . "</td>\n <td></td>\n </tr>"; while ($QueryResult = mysql_fetch_array($query)) { $PRICE = _CalculatePrise($QueryResult, $MinPrice, $PriceX); $DISCOUNT = null; if ($PRICE > 1 && $ITEM_DISCOUNT_MODE) { $DISCOUNT = round($PRICE - $PRICE * 0.1); } $class = isset($DISCOUNT) && $PRICE > $DISCOUNT ? "success" : "info"; echo "\n <tr class = '" . $class . "'>\n <td><a href = 'http://" . _getWHLanguage() . "wowhead.com/item=" . $QueryResult['id'] . "' target = '_blank'></a></td>"; if (isset($DISCOUNT) && $PRICE > $DISCOUNT) { echo "<td>" . _PRICE_STR($PRICE, true, $DISCOUNT) . "</td>"; } else { echo "\n <td>" . _PRICE_STR($PRICE, true) . "</td>"; } echo "<td><a href = '" . _AddGETAtributeToURL("itemID", $QueryResult['id']) . "'>" . $L[299] . "</a></td>\n </tr>"; } echo "\n </table>" . _pushPageNav($PAGE_INDEX); }
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]; } else { $ACount += (int) $result[1]; } $CCount += (int) $result[1]; } if ($CCount > 0) { $CUR_RATE = $CCount / $MAX_ONLINE * 100; $CUR_HORDE = $HCount / $CCount * 100; $CUR_ALLIANCE = $ACount / $CCount * 100; } mysql_close($connection) or die(mysql_error());
function _is_details_already_used($AccountDBHost, $AccountDB, $DBUser, $DBPassword, $D, $X) { $connection = _MySQLConnect($AccountDBHost, $DBUser, $DBPassword, $AccountDB); $query = mysql_query("SELECT `id` FROM `account` WHERE `" . $D . "` = '" . _X($X) . "';", $connection) or die(mysql_error()); $result = mysql_num_rows($query); mysql_close($connection) or die(mysql_error()); if ($result > 0) { return false; } return true; }
function _FORM_QUEST_COMPLETE($SA, $RealmID, $AccountDBHost, $AccountDB, $DBUser, $DBPassword, $GUID, $PRICE, $REALSON = "") { global $L; $QueryString = ""; $connection = _MySQLConnect(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($RealmID)); $query = mysql_query("SELECT `quest` FROM `character_queststatus` WHERE `status` = 3 AND `guid` = " . (int) $GUID . ";", $connection) or die(mysql_error()); while ($result = mysql_fetch_array($query)) { $QueryString .= $result['quest'] . ", "; } $QueryString = substr($QueryString, 0, -2); mysql_close($connection) or die(mysql_error()); if ($QueryString != "") { $connection = _MySQLConnect(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _WorldDBSwitch($RealmID)); $query = mysql_query("SELECT \n `Id` AS `id`,\n `RewardChoiceItemId1` AS `I1`,\n `RewardChoiceItemId2` AS `I2`,\n `RewardChoiceItemId3` AS `I3`,\n `RewardChoiceItemId4` AS `I4`,\n `RewardChoiceItemId5` AS `I5`,\n `RewardChoiceItemId6` AS `I6`\n FROM\n `quest_template` WHERE `Id` IN (" . $QueryString . ");", $connection) or die(mysql_error()); while ($result = mysql_fetch_array($query)) { if ($result['I1'] < 1 && $result['I2'] < 1 && $result['I3'] < 1 && $result['I4'] < 1 && $result['I5'] < 1 && $result['I6'] < 1) { $SA['qList'][$result['id']] = true; } else { $ID = $result['id']; $i = 1; foreach ($result as $ITEM) { if ($ITEM === $ID) { continue; } if ($ITEM < 1) { continue; } if (isset($SA['qList'][$ID]) && in_array($ITEM, $SA['qList'][$ID])) { continue; } $SA['qList'][$ID][$i] = $ITEM; $i++; } } } mysql_close($connection) or die(mysql_error()); } else { die("EXCEPTION QUESTLIST-CREATE"); } $_SESSION['TCA'] = $SA; echo "\n <fieldset>\n <form action = " . $_SERVER['PHP_SELF'] . " method = 'POST'>\n <div class = 'text-center'>" . $REALSON . "\n <h2>" . $L[89] . "</h2>\n <fieldset>"; _FORM_CHAR_BLOCK($SA, null, true); echo "\n <div class = 'charBoxClean'>"; $STEP = null; $BN = null; if (isset($_SESSION['pQuest']) && isset($SA['qList'][$_SESSION['pQuest']]) && $SA['qList'][$_SESSION['pQuest']] != true) { $STEP = 2; $BN = $L[291]; $Q = $_SESSION['pQuest']; echo "\n <ul class = 'nav nav-pills'>\n <li class = 'dropdown'>\n <a id = 'QuestSelector" . $STEP . "' class = 'dropdown-toggle' role = 'button' data-toggle = 'dropdown' href = '#'>" . $L[71] . ":<b class = 'caret'></b></a>\n <ul id = 'QuestSelectorList" . $STEP . "' class = 'dropdown-menu' role = 'menu'>"; foreach ($SA['qList'][$Q] as $ItemID) { if ($ItemID < 2) { continue; } echo "<li><a tabindex = '-1' href= '#' onclick = 'QuestJS(\$(this).html());'>" . $ItemID . "</a></li>"; } echo "</ul>\n </li>\n </ul>"; } else { $STEP = 1; $BN = $L[290]; $DN = isset($_SESSION['pQuest']) ? $L[288] . $_SESSION['pQuest'] : $L[70]; echo "\n <ul class = 'nav nav-pills'>\n <li class = 'dropdown'>\n <a id = 'QuestSelector" . $STEP . "' class = 'dropdown-toggle' role = 'button' data-toggle = 'dropdown' href = '#'>" . $DN . ":<b class = 'caret'></b></a>\n <ul id = 'QuestSelectorList" . $STEP . "' class = 'dropdown-menu' role = 'menu'>"; foreach ($SA['qList'] as $QuestID => $ENABLED) { echo "<li><a tabindex = '-1' href= '# ' onclick = 'QuestJS(\$(this).html());'>" . $QuestID . "</a></li>"; } echo "</ul>\n </li>\n </ul>"; } echo "\n </div>\n </fieldset>\n <br/>"; if (isset($_SESSION['pQuest'])) { echo _BDiv(_PRICE_STR($PRICE)); echo "<input type = 'hidden' name = 'QuestList" . $STEP . "' value = '" . $_SESSION['pQuest'] . "'/>"; } else { $BN = $L[146]; echo "<input type = 'hidden' name = 'QuestList" . $STEP . "' value = ''/>"; } echo "<button class = 'btn btn-info' type = 'submit'>" . $BN . "</button>\n </div>\n </form>\n </fieldset>\n <script>\n \$('#QuestSelector" . $STEP . "').click(function() {\n \$('#QuestSelectorList" . $STEP . "').toggle();\n })\n function QuestJS(html) {\n \$('#QuestSelectorList" . $STEP . "').hide();\n \$('#QuestSelector" . $STEP . "').html(html);\n \$('input[name = \"QuestList" . $STEP . "\"]').val(\$('#QuestSelector" . $STEP . "').text());\n }\n </script>"; }
function _FORM_CHAR_ARRAY($AccountDBHost, $AccountDB, $DBUser, $DBPassword, $RealmID, $GUID) { $SA = null; $connection = _MySQLConnect($AccountDBHost, $DBUser, $DBPassword, $AccountDB); $query = mysql_query("SELECT `name` FROM `realmlist` WHERE `id` = " . (int) $RealmID . ";", $connection) or die(mysql_error()); while ($result = mysql_fetch_array($query)) { $RealmName = $result['name']; } $connection = _MySQLConnect(_HostDBSwitch($RealmID), $DBUser, $DBPassword, _CharacterDBSwitch($RealmID)); $query = mysql_query("SELECT `guid`,`name`,`level`,`race`,`class`,`gender`,`money`,`totalKills` FROM `characters` WHERE `account` = " . (int) _getAccountID() . " AND `guid` = " . $GUID . ";", $connection) or die(mysql_error()); while ($result = mysql_fetch_array($query)) { $SA['CharName'] = $result['name']; $SA['CharGUID'] = $result['guid']; $SA['CharClass'] = $result['class']; $SA['CharRace'] = $result['race']; $SA['CharLevel'] = $result['level']; $SA['CharGender'] = $result['gender']; $SA['CharMoney'] = $result['money']; $SA['CharHKills'] = $result['totalKills']; $SA['RealmName'] = $RealmName; $SA['RealmID'] = $RealmID; } mysql_close($connection) or die(mysql_error()); $_SESSION['TCA'] = $SA; return $SA; }
$QUERYFOREXECUTE_CON = new mysqli(_HostDBSwitch($CHAR_REALM), $DBUser, $DBPassword, _CharacterDBSwitch($CHAR_REALM)); mysqli_multi_query($QUERYFOREXECUTE_CON, $QUERYFOREXECUTE) or die(mysqli_error($QUERYFOREXECUTE_CON)); $row = trim($INVrow . $GEMrow . $CURrow); _DUMP_UpdateItemRow($DBUser, $DBPassword, $ID, $row); if (_CheckCharacterName($DBUser, $DBPassword, $CHAR_REALM, $CHAR_NAME) > 1) { $_SESSION['guid'] = $GUID; $_SESSION['realm'] = $CHAR_REALM; $_SESSION['dumpID'] = $ID; $_SESSION['STEP2'] = 1; include "step2.php"; } else { $connection = _MySQLConnect($AccountDBHost, $DBUser, $DBPassword, $AccountDB); _updateMigrationStatusAndCharacterName($connection, $ID, $CHAR_NAME, 0); mysql_close($connection); _PreparateMails($row, $CHAR_NAME, $SOAPUser, $SOAPPassword, $CHAR_REALM); $connection = _MySQLConnect(_HostDBSwitch($CHAR_REALM), $DBUser, $DBPassword, _CharacterDBSwitch($CHAR_REALM)); _TalentsReset($connection, $GUID); _MoveToGMAccount($connection, $GUID); mysql_close($connection); echo _GDiv($L[51]); } } } else { _Migration_STEP1FORM($AuthConnection); } function _CHECK_PLAYTIME($TIME1, $TIME2) { return floor(($TIME1 - $TIME2) / 86400); } function _Migration_STEP1FORM($connection, $REALSON = "") {