Esempio n. 1
0
$get_region = array_key_exists('region', $_GET) ? $_GET['region'] : '';
$get_prop = isset($_GET['prop']) ? $_GET['prop'] : 'char';
$get_guild = isset($_GET['guild']) ? urldecode($_GET['guild']) : '';
if ($get_guild != '') {
    $get_prop = 'guild';
}
if (empty($get_guild) && empty($get_char) || empty($get_realm)) {
    $cache->close();
    exit;
}
if ($get_prop == 'char') {
    $uniquekey = $cache->generateKey($get_char, $get_realm, $get_region);
    $result = $cache->getArmory($uniquekey, $armory_char_cache);
    if ($result) {
        header("Content-Type: text/html");
        print utf8_encode(stripslashes($result['tooltip']));
    } else {
        print "Tooltip information not found.<br/>Cache time may have expired, try reloading the page.<br/>Unique Key: {$uniquekey}<br/>Name: {$get_char}<br/>Realm: {$get_realm}<br/>Region: {$get_region}";
    }
}
if ($get_prop == 'guild') {
    $uniquekey = $cache->generateKey($get_guild, $get_realm, $get_region);
    $result = $cache->getGuild($uniquekey, $armory_guild_cache);
    if ($result) {
        header("Content-Type: text/html");
        print utf8_encode(stripslashes($result['tooltip']));
    } else {
        print "Tooltip information not found.<br/><strong>Key:</strong> " . $uniquekey;
    }
}
$cache->close();