<?
$server = 'Rexxar';
$gilde ='HugoSimon%20auf%20ET';
$url = 'http://www.blasc.de/guild.php?g=38766';
$file = file_get_contents($url);
if(!$file) die("Fehler beim Öffnen von $url");
$uncompressed = gzuncompress($file);
$guild = unserialize($uncompressed);
$wahl = $_GET['wahl'] ? $_GET['wahl'] : 'level';
$sort = $_GET['sort'] ? $_GET['sort'] : 'desc';
$charlvl = 0;
foreach($guild['character'] as $char) {
$charlvl = ($charlvl + $char['level']);
}
$avlvl = (int) ($charlvl/$guild['numchars']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?=$guild['guild_name'] ?> - Gildenübersicht</title>
<style type="text/css" media="screen">
<!--
body {
margin: 0px;
color: rgb(255, 255, 255);
font: 12px "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif;
line-height: 16px;
background-color: rgb(0, 0, 0);
}
td {
color: rgb(255, 255, 255);
font: 12px "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif;
line-height: 16px;
}
h1 {
color: rgb(218, 182, 86);
}
a {
color: rgb(218, 182, 86);
font: 12px "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif;
line-height: 16px;
text-decoration: none;
}
a:hover {
color: rgb(245, 213, 129);
}
a.bold {
color: rgb(218, 182, 86);
font: 12px "Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif;
line-height: 16px;
font-weight: bold;
text-decoration: none;
}
a.bold:hover {
color: rgb(245, 213, 129);
}
-->
</style>
</head>
<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<a name="top"></a>
<div align="center" style="padding: 10px">
<table border="0" width="95%" cellpadding="2" cellspacing="2">
<tr>
<td colspan="8">
<div style="border-bottom: 2px solid rgb(218, 182, 86)">
<table border="0" cellpadding="2" cellspacing="2">
<tr>
<td>
</td>
<td><h1><i><?=$guild['guild_name'] ?> - Gildenübersicht</i></h1></td>
</tr>
</table>
</div>
<table border="0" cellpadding="2" cellspacing="2">
<tr valign="top">
<td>
<b>Server:</b> <?=$guild['server'] ?> •
<b>Fraktion:</b> <?=$guild['faction'] ?> •
<b>registrierte Charaktere:</b> <?=$guild['numchars'] ?> •
<b>Level-Durchschnitt:</b> <?=$avlvl ?>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top" style="font-size: 14px">
<td>
<?
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'namel' && $_GET['sort'] == 'level') {
$pic = 'up_akt';
}
elseif(!isset($_GET['wahl']) && !isset($_GET['sort'])) {
$pic = 'up_akt';
}
else { $pic = 'up'; }
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'name' && $_GET['sort'] == 'desc') {
$apic = 'down_akt';
}
else { $apic = 'down'; }
?>
<b>Name:</b>
</td>
<td align="center">
<?
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'level' && $_GET['sort'] == 'asc') {
$pic = 'up_akt';
}
else { $pic = 'up'; }
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'level' && $_GET['sort'] == 'desc') {
$apic = 'down_akt';
}
else { $apic = 'down'; }
?>
<b>Level:</b>
</td>
<td>
<?
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'race' && $_GET['sort'] == 'asc') {
$pic = 'up_akt';
}
else { $pic = 'up'; }
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'race' && $_GET['sort'] == 'desc') {
$apic = 'down_akt';
}
else { $apic = 'down'; }
?>
<b>Rasse:</b>
</td>
<td>
<?
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'class' && $_GET['sort'] == 'asc') {
$pic = 'up_akt';
}
else { $pic = 'up'; }
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'class' && $_GET['sort'] == 'desc') {
$apic = 'down_akt';
}
else { $apic = 'down'; }
?>
<b>Klasse:</b>
</td>
<td align="center">
<?
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'sex' && $_GET['sort'] == 'asc') {
$pic = 'up_akt';
}
else { $pic = 'up'; }
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'sex' && $_GET['sort'] == 'desc') {
$apic = 'down_akt';
}
else { $apic = 'down'; }
?>
<b>Geschlecht:</b>
</td>
<td>
<?
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'guild_title' && $_GET['sort'] == 'asc') {
$pic = 'up_akt';
}
else { $pic = 'up'; }
if(isset($_GET['wahl']) && isset($_GET['sort']) && $_GET['wahl'] == 'guild_title' && $_GET['sort'] == 'desc') {
$apic = 'down_akt';
}
else { $apic = 'down'; }
?>
<b>Rang:</b>
<?
function sortierung($a, $b) {
global $wahl, $sort;
if ($a[$wahl] == $b[$wahl]) {
return 0;
}
if($sort == 'desc') {
return ($a[$wahl] < $b[$wahl]) ? 1 : -1;
}
elseif($sort == 'asc') {
return ($a[$wahl] < $b[$wahl]) ? -1 : 1;
}
else {
return ($a[$wahl] < $b[$wahl]) ? -1 : 1;
}
}
usort($guild['character'], 'sortierung');
foreach($guild['character'] as $c) {
if($i %2 == 0) { $bgc = '#442109'; } else { $bgc = '#592c0c'; }
if($c['sex'] == 'm') { $sex = 'männlich'; } else { $sex = 'weiblich'; }
echo '<tr valign="top" bgcolor="'.$bgc.'">
<td>
<a class="bold" href="http://www.blasc.de/index.php?c='.$c['id'].'&showguild=&server='.$server.'&search=suchen" target="_blank" title="Profil von '.$c['name'].'...">'.$c['name'].'</a><br>
</td>
<td align="center">'.$c['level'].'</td>
<td>'.$c['race'].'</td>
<td>'.$c['class'].'</td>
<td align="center">
'.$sex.'
</td>';
echo '<td>'.$c['guild_title'].'</td>';
echo "<td>";
?>
<table cellspacing="0" border="0" width="100%" cellpadding="0">
<tr>
<td width="30%">
</td>
<td width="70%">
<table cellpadding="0" cellspacing="1" border="0">
<tr>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?
}
?>
<table cellspacing="0" border="0" width="100%" cellpadding="0">
<tr>
<td width="50%">
</td>
<td width="50%">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
</td>
</tr>
</table>
</td>
</tr>
</table>
<tr>
<td colspan="8">
<div align="right" style="border-top: 1px solid rgb(218, 182, 86)">
powered by <a href="http://www.blasc.de" target="_blank">BLASC</a> ::
© copyright<? echo date( ' Y '); ?><a href="http://www.blasc.de/index.php?id=3⊂=1&showguild=<?=$guild['guild_name'] ?>&server=<?=$server ?>" target="_blank"><?=$guild['guild_name'] ?></a> ::
<a class="bold" href="#top" title="zum Seitenanfang...">^</a>
</div>
</td>
</tr>
</table>
<br>
</div>
</body>
</html>