} $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 _AU_BAN_AUTHOR_STR($X) { global $L; return empty($X) ? $L[39] : $X; }
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); }
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_TO_CHAR_ACTIONS($CA, $HEADER, $REALSON = "", $PRICE, $NL = null, $NN = null, $NR = null, $NC = null, $C = null) { global $L; echo "\n <form action = " . $_SERVER['PHP_SELF'] . " method = 'POST'>\n <fieldset>\n <div class = 'text-center'>" . $REALSON . "\n <h2>" . $HEADER . "</h2>\n <fieldset>"; _FORM_CHAR_BLOCK($CA, $L[114]); _FORM_CHAR_BLOCK($CA, $L[115], true, $NL, $NN, $NR, $NC, $C); echo "</fieldset>" . _BDiv(_PRICE_STR($PRICE)) . "\n <p><button class = 'btn btn-primary' type = 'submit'>" . _getPriceButtonSTR($PRICE) . "</button></p>\n </div>\n </fieldset>\n </form>"; }
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>"; }