Example #1
0
<?php

require_once '../../incl/incl.php';
require_once '../../incl/memcache.incl.php';
require_once '../../incl/api.incl.php';
if (!isset($_GET['house']) || !isset($_GET['id'])) {
    json_return(array());
}
$house = intval($_GET['house'], 10);
$page = preg_replace('/[^a-z]/', '', strtolower(trim($_GET['id'])));
$resultFunc = 'TransmogResult_' . $page;
if (!function_exists($resultFunc)) {
    json_return(array());
}
$canCache = true;
BotCheck();
if ($canCache) {
    HouseETag($house);
}
json_return($resultFunc($house));
function TransmogResult_cloth($house)
{
    return TransmogArmor($house, 'i.class = 4 and i.subclass = 1');
}
function TransmogResult_leather($house)
{
    return TransmogArmor($house, 'i.class = 4 and i.subclass = 2');
}
function TransmogResult_mail($house)
{
    return TransmogArmor($house, 'i.class = 4 and i.subclass = 3');
Example #2
0
            }
            unset($value);
        }
    }
}
$headers = array();
$headers['Date'] = date(DATE_RFC2822);
$headers['Content-Type'] = 'text/plain; charset=UTF-8; format="flowed"';
$headers['Content-Transfer-Encoding'] = 'base64';
$headers['From'] = 'Contact Form <*****@*****.**>';
if (preg_match('/\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b/i', $_POST['from'], $res) > 0) {
    $headers['Reply-To'] = $res[0];
}
$_POST['message'] = preg_replace('/\\r\\n?/', "\n", $_POST['message']);
$body = "Date: " . date('Y-m-d H:i:s') . "\nFrom: " . $_POST['from'] . "\nIP: " . $_SERVER['REMOTE_ADDR'] . "\nUser Agent: " . $_SERVER['HTTP_USER_AGENT'] . "\n";
$banned = BotCheck(true);
$body .= "Banned: " . ($banned['isbanned'] ? 'yes: ' . $banned['reason'] . ' ' . $banned['ip'] : 'no') . "\n";
$loginState = GetLoginState();
$body .= "User: "******"\n";
if (isset($loginState['id'])) {
    $body .= "Paid until: " . date('Y-m-d H:i:s', GetUserPaidUntil($loginState['id'])) . "\n";
}
if (isset($_POST['region'])) {
    $body .= "Region: " . $_POST['region'] . "\n";
}
if (isset($_POST['realm'])) {
    $body .= "Realm: " . $_POST['realm'] . "\n";
}
if (isset($_POST['house'])) {
    $body .= "House: " . $_POST['house'] . "\n";
}
Example #3
0
<?php

require_once '../../incl/incl.php';
require_once '../../incl/memcache.incl.php';
require_once '../../incl/api.incl.php';
require_once '../../incl/subscription.incl.php';
header('Cache-Control: no-cache');
if (isset($_COOKIE['__cfduid'])) {
    // cloudflare
    setcookie('__cfduid', '', strtotime('1 year ago'), '/', '.theunderminejournal.com', false, true);
}
$loginState = ['ads' => true];
if (isset($_POST['getuser'])) {
    $loginState = RedactLoginState(GetLoginState());
}
json_return(['version' => API_VERSION, 'language' => isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : 'en-US,en;q=0.5', 'banned' => BotCheck(true), 'user' => $loginState, 'realms' => [GetRealms('US'), GetRealms('EU')]]);