if ($_GET['achievementdata'] == 'true') {
    d($armory->getdata_achievements('character', $tmp_force));
    die;
}
$output .= "<b>battle.net Armory Class Tester - CHARACTER</b> ( bnetArmory [" . $armory->getVersion() . "]), connection method: <span style='color:red;'>" . $get_method . "</span> <span>Memory: " . convert(memory_get_usage(true)) . " [" . convert(memory_get_peak_usage()) . "]</span><br/><br/>";
if (!isset($testdata['status'])) {
    $output .= '<div class="ui-grid ui-widget ui-widget-content ui-corner-all">
				<div class="ui-grid-header ui-widget-header ui-corner-top">Profile information of "' . $tmp_charname . '" on realm "' . $tmp_servername . '"</div>';
    $output .= '<table class="ui-grid-content ui-widget-content">';
    $output .= '<tr>
					<th class="ui-state-default" width="220">Field name</th>
					<th class="ui-state-default" width="580">Data</th>
				</tr>';
    $output .= '<tr>
					<td width="220" class="ui-widget-content left">Icon</td>
					<td width="580" class="ui-widget-content left"><img src="' . $armory->characterIcon($testdata) . '" alt="charicon" /></td>
				</tr>';
    $output .= '<tr>
					<td width="220" class="ui-widget-content left">GET Parameters</td>
					<td width="580" class="ui-widget-content left">character [corgan], realm [Antonidas], loc [eu], lang [de_DE], force [false]</td>
				</tr>';
    $output .= '<tr>
					<td width="220" class="ui-widget-content left">Image</td>
					<td width="580" class="ui-widget-content left"><img src="' . $armory->characterImage($testdata) . '" alt="charimage" /></td>
				</tr>';
    $output .= '<tr>
					<td width="220" class="ui-widget-content left">Name</td>
					<td width="580" class="ui-widget-content left"><a href="' . $armory->bnlink($tmp_charname, $tmp_servername, 'char') . '">' . $testdata['name'] . '</a></td>
				</tr>';
    $output .= '<tr>
					<td width="220" class="ui-widget-content left">Class</td>
    include_once 'classes/bnet_armory_old.class.php';
} else {
    include_once 'classes/bnet_armory.class.php';
}
$armory = new bnet_armory($tmp_loc, $tmp_language);
if ($api_version > '1') {
    $armory->setSettings(array('apiKey' => $api_key));
}
$dataarry = $armory->guild($tmp_guild, $tmp_servername, $tmp_force);
$get_method = $puf->get_method() ? $puf->get_method() : 'Cached';
if ($_GET['array'] == 'true') {
    d($dataarry);
    die;
}
if ($_POST['charimg'] == 'true') {
    die('<img src="' . $armory->characterIcon($chars['character']['thumbnail']) . '" alt="charicon" />');
}
$output .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
		<head>
			<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
			<title>battle.net Armory Class Tester ' . $armory->getVersion() . ' - GUILD</title>
			<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/base/jquery-ui.css" type="text/css" media="all" />
			<style type="text/css">
				.ui-grid { width: 900px; padding: .4em;  background-image: none; }
				.ui-grid .ui-grid-content { width: 100%; border-collapse: collapse; }
				.ui-grid table tbody td, .ui-grid .ui-grid-header, .ui-grid table thead a { padding: .4em;  }
				.ui-grid table tbody td {  text-align: center; font-weight: normal;  }
				.ui-grid table tbody td.left {  text-align: left; font-weight: normal;  }
				.ui-grid .ui-grid-header, .ui-grid .ui-grid-footer { padding: .8em .4em; text-align: center; }
				.ui-grid .ui-grid-footer { background-image: none; font-weight: normal; text-align: left; }