Memberliste

Pepper

NPC
Mitglied seit
28.04.2005
Beiträge
2
Reaktionspunkte
0
Hi Wahrscheinlcih ist die frage schon oft aufgetreten!

wie kann ich auf der gildenpage eine memberliste hinzufügen also so das es im design von der page ist und die aktuellen daten hat. z.B. Lvl, ausrüstung ...



Sry für den post


MfG Pepper
 
aja ich habe schon mal getestet
http://www.2advanced.at/atc/memb.html

<?
$server = 'Blackhand';
$gilde ='Kinder%20der%20Tr%E4ume';
$url = 'http://black-legion.info/guild_php.php?server='.$server.'&guild='.$gilde;

$file = file_get_contents($url);
if(!$file) die("Fehler beim &Ouml;ffnen von $url");

$guild = unserialize(gzuncompress($file));

$wahl = $_GET['wahl'] ? $_GET['wahl'] : 'name';
$sort = $_GET['sort'] ? $_GET['sort'] : 'asc';

$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&uuml;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-image: url(../images/gilde/gbg.gif);
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>
<a href="<?=$PHP_SELF ?>"><img src="../images/gilde/gtab.gif" alt="" height="30" width="41" border="0"></a>
</td>
<td><h1><i><?=$guild['guild_name'] ?> - Gilden&uuml;bersicht</i></h1></td>
</tr>
</table>
</div>
<table border="0" cellpadding="2" cellspacing="2">
<tr valign="top">
<td>
<b>Server:</b> <?=$guild['server'] ?> &bull;
<b>Fraktion:</b> <?=$guild['faction'] ?> &bull;
<b>registrierte Charaktere:</b> <?=$guild['numchars'] ?> &bull;
<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'] == 'name' && $_GET['sort'] == 'asc') {
$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>
<a href="<?=$PHP_SELF ?>?wahl=name&sort=asc" title="Aufsteigend sortieren..."><img src="../images/gilde/<?=$pic ?>.gif" alt="up" height="9" width="6" border="0"></a>
<a href="<?=$PHP_SELF ?>?wahl=name&sort=desc" title="Absteigend sortieren..."><img src="../images/gilde/<?=$apic ?>.gif" alt="down" height="9" width="6" border="0"></a>
</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>
<a href="<?=$PHP_SELF ?>?wahl=level&sort=asc" title="Aufsteigend sortieren..."><img src="../images/gilde/<?=$pic ?>.gif" alt="up" height="9" width="6" border="0"></a>
<a href="<?=$PHP_SELF ?>?wahl=level&sort=desc" title="Absteigend sortieren..."><img src="../images/gilde/<?=$apic ?>.gif" alt="down" height="9" width="6" border="0"></a>
</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>
<a href="<?=$PHP_SELF ?>?wahl=race&sort=asc" title="Aufsteigend sortieren..."><img src="../images/gilde/<?=$pic ?>.gif" alt="up" height="9" width="6" border="0"></a>
<a href="<?=$PHP_SELF ?>?wahl=race&sort=desc" title="Absteigend sortieren..."><img src="../images/gilde/<?=$apic ?>.gif" alt="down" height="9" width="6" border="0"></a>
</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>
<a href="<?=$PHP_SELF ?>?wahl=class&sort=asc" title="Aufsteigend sortieren..."><img src="../images/gilde/<?=$pic ?>.gif" alt="up" height="9" width="6" border="0"></a>
<a href="<?=$PHP_SELF ?>?wahl=class&sort=desc" title="Absteigend sortieren..."><img src="../images/gilde/<?=$apic ?>.gif" alt="down" height="9" width="6" border="0"></a>
</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>
<a href="<?=$PHP_SELF ?>?wahl=sex&sort=asc" title="Aufsteigend sortieren..."><img src="../images/gilde/<?=$pic ?>.gif" alt="up" height="9" width="6" border="0"></a>
<a href="<?=$PHP_SELF ?>?wahl=sex&sort=desc" title="Absteigend sortieren..."><img src="../images/gilde/<?=$apic ?>.gif" alt="down" height="9" width="6" border="0"></a>
</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>
<a href="<?=$PHP_SELF ?>?wahl=guild_title&sort=asc" title="Aufsteigend sortieren..."><img src="../images/gilde/<?=$pic ?>.gif" alt="up" height="9" width="6" border="0"></a>
<a href="<?=$PHP_SELF ?>?wahl=guild_title&sort=desc" title="Absteigend sortieren..."><img src="../images/gilde/<?=$apic ?>.gif" alt="down" height="9" width="6" border="0"></a>
</td>
<td><b>Berufe:</b></td>
<td><b>Sek. Fertigkeit(en):</b></td>
</tr>

<?
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&auml;nnlich'; } else { $sex = 'weiblich'; }

echo '<tr valign="top" bgcolor="'.$bgc.'">
<td>
<a class="bold" href="http://black-legion.planet-multiplayer.de/index.php?id=3&sub=1&showchar='.$c['name'].'&showguild=&server='.$server.'&search=suchen" target="_blank" title="Profil von '.$c['name'].'...">'.$c['name'].'</a><br>
<a style="font-size: 10px" href="http://black-legion.planet-multiplayer.de/index.php?id=3&sub=1&showprofile=true&name='.$c['name'].'&server='.$server.'" target="_blank" title="Ausr&uuml;stung von '.$c['name'].'...">&raquo;&nbsp;Ausr&uuml;stung</a>
</td>
<td align="center">'.$c['level'].'</td>
<td>'.$c['race'].'</td>
<td>'.$c['class'].'</td>
<td align="center">
<img src="../images/gilde/'.$c['sex'].'.gif" alt="'.$sex.'" title="'.$sex.'" height="10" width="10" border="0">
</td>';

echo '<td>'.$c['guild_title'].'</td>';
$s = $c['skills'];

$berufe = $s['Berufe'];
echo "<td>";
// berufe
if (count($berufe)>0) {
$berufname = array_keys($berufe);
for($x=0;$x<count($berufe);$x++) {
?>

<table cellspacing="0" border="0" width="100%" cellpadding="0">
<tr>
<td width="30%">
<b><? echo $berufname[$x]; ?>:</b>
</td>
<td width="70%">
<table cellpadding="0" cellspacing="1" border="0">
<tr>
<td background="../images/gilde/balken.gif" width="<?=$berufe[$berufname[$x]]['value'] ?>">
<? echo "&nbsp;(".$berufe[$berufname[$x]]['value']."/".$berufe[$berufname[$x]]['max'].")&nbsp;"; ?>
</td>
</tr>
</table>
</td>
</tr>
</table>

<?
}
}
else { echo '<div style="font-size: 11px">noch kein Beruf erlernt</div>'; }
echo '</td>';

$fertigkeiten = $s['Sekund?re Fertigkeiten'];
echo '<td>';
// fertigkeiten
if (count($fertigkeiten)>0) {
$fertigkeitenname = array_keys($fertigkeiten);
for($x=0;$x<count($fertigkeiten);$x++) {

?>

<table cellspacing="0" border="0" width="100%" cellpadding="0">
<tr>
<td width="30%">
<b><? echo $fertigkeitenname[$x]; ?>:</b>
</td>
<td width="70%">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td background="../images/gilde/balken.gif" width="<?=$fertigkeiten[$fertigkeitenname[$x]]['value'] ?>">
<? echo "&nbsp;(".$fertigkeiten[$fertigkeitenname[$x]]['value']."/".$fertigkeiten[$fertigkeitenname[$x]]['max'].")&nbsp;"; ?>
</td>
</tr>
</table>
</td>
</tr>
</table>

<? }
}
else { echo '<div style="font-size: 11px">noch keine weiteren Fertigkeiten erlernt</div>'; }
echo '</td>
</td>
</tr>';

$i++;
}
?>

<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> ::
&copy; copyright<? echo date( ' Y '); ?><a href="http://black-legion.planet-multiplayer.de/index.php?id=3&sub=1&showguild=<?=$guild['guild_name'] ?>&server=<?=$server ?>" target="_blank"><?=$guild['guild_name'] ?></a> ::
code by <a href="mailto:yiria@egamen.de">Yiria</a> ::
<a class="bold" href="#top" title="zum Seitenanfang...">^</a>
</div>
</td>
</tr>
</table>
<br>
</div>
</body>
</html>

PS: Das ist nicht meine gilde also der code aber die page ist meine!
 
Zurück