Da nun wieder etwas public ist was ich gemacht habe versuche ich euch hier mit dem Tutorial zu zeigen wie man so etwas anstellen kann und gebe ich euch ein template dafür.
Fangen wir einmal an.
Wir erstellen eine neue php datei und schreiben zuerst die verbindungsdaten zur db hin, in meinem fall ist dies in einer anderen datei daher include ich diese.
PHP Code:
<?
require_once 'conn.php';
?>
Die Datenbank wird erst nach einigen Minuten geupdated ich habe deshalb eine Verzögerung von 10 Minuten genommen
Vorab brauchen wir erstmal die aktuelle zeit dies machen wir wie folgt:
PHP Code:
$i = 0;
$timestamp = time();
$year1 = date("Y",$timestamp);
$month12 = date("m",$timestamp);
$day = date("d",$timestamp);
$datum = date("d.m.Y",$timestamp);
$hour = date("H",$timestamp);
$min = date("i",$timestamp);
$uhrzeit = date("H:i:s",$timestamp);
PHP Code:
$dayonline = 0;
$currentonline = 0;
$currentonlinered = 0;
$currentonlineyel = 0;
$currentonlineblue = 0;
$currentonlineeis = 0;
$currentonlinefeuer = 0;
$currentonlinewueste = 0;
$currentonlineot = 0;
$currentonlinedt = 0;
$currentonlinegw = 0;
$currentonlinerw = 0;
$currentonlinesd = 0;
$currentonlinetempel = 0;
nun schauen wir mal wie viele "in diesem Moment" online sind.
PHP Code:
require_once 'conn.php';
mysql_select_db("player");
$exec="select id from player";
$result=mysql_query($exec);
$numplayer = mysql_numrows($result);
PHP Code:
$exec="select id,last_play from player";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result))
{
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33){
$dayonline = $dayonline+1;
}else{}
}
Wir gehen einen Schritt weiter und schauen wer in den letzen 10 Minuten online war (soll die aktuelle online Anzahl ermitteln...)
PHP Code:
$exec="select map_index,last_play from player";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result))
{
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
$map = $row->map_index;
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$currentonline = $currentonline+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map < 6){
$currentonlinered = $currentonlinered+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map > 20 and $map < 26){
$currentonlineyel = $currentonlineyel+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map > 40 and $map < 46){
$currentonlineblue = $currentonlineblue+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 61){
$currentonlineeis = $currentonlineeis+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 62){
$currentonlinefeuer = $currentonlinefeuer+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 63){
$currentonlinewueste = $currentonlinewueste+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 64){
$currentonlineot = $currentonlineot+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 66){
$currentonlinedt = $currentonlinedt+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 67){
$currentonlinegw = $currentonlinegw+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 68){
$currentonlinerw = $currentonlinerw+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 104){
$currentonlinesd = $currentonlinesd+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 65){
$currentonlinetempel = $currentonlinetempel+1;
}else{}
}
Diese Abfrage zählt die aktuellen Spiele die Online sind in den letzen 10 Minuten. D.h wenn ihr den Server rebootet und die Anzeige zeigt an, dass welche online sind ist das ein Schönheitsfehler. (Die Zeit könnt ihr hier auch einstellen. Bsp letze Stunde usw nur dann müsst ihr nicht nur die Minuten beachten. Es könnten hier auch kleine Fehler entstehen aber das werdet ihr evtl selber bemerken.)Quote:
PHP Code:if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$currentonline = $currentonline+1;
}else{}
Jetzt würde eure "Landkarte" oder Auswahl der Maps folgen.
Meine gebe ich jetzt nicht her verständlich oder?
als nächstes könnte man noch auf der anfangsseite der Worldmap die Statistik anzeigen die wir oben abgefragt haben.
PHP Code:
<table width="278" border="0">
<tr>
<td width="268" colspan="2"><p>Heute waren bisher <? echo $dayonline ?> Spieler online.</p>
<p>Im moment sind <? echo $currentonline ?> Spieler online.</p>
<table width="200" border="0" align="center">
<tr>
<td width="113">Blaues Reich</td>
<td width="71"><? echo $currentonlineblue ?></td>
</tr>
<tr>
<td>Rotes Reich</td>
<td><? echo $currentonlinered ?></td>
</tr>
<tr>
<td>Gelbes Reich</td>
<td><? echo $currentonlineyel ?></td>
</tr>
<tr>
<td>Orktal</td>
<td><? echo $currentonlineot ?></td>
</tr>
<tr>
<td>Eisland</td>
<td><? echo $currentonlineeis ?></td>
</tr>
<tr>
<td>Wüste</td>
<td><? echo $currentonlinewueste ?></td>
</tr>
<tr>
<td>Feuerland</td>
<td><? echo $currentonlinefeuer ?></td>
</tr>
<tr>
<td>Tempel</td>
<td><? echo $currentonlinetempel ?></td>
</tr>
</table>
<p> </p></td>
</tr>
</table>
Wir untermauern den Abfrageteil der Statistik mit einem Get parameter damit dies nur angezeigt wird wenn im link auch der parameter gegeben ist.
ein kleines beispiel wie es bis jetzt aussehen könnte:
PHP Code:
<?
require_once 'conn.php';
$i = 0;
$timestamp = time();
$year1 = date("Y",$timestamp);
$month12 = date("m",$timestamp);
$day = date("d",$timestamp);
$datum = date("d.m.Y",$timestamp);
$hour = date("H",$timestamp);
$min = date("i",$timestamp);
$uhrzeit = date("H:i:s",$timestamp);
$page = $_GET['page']; // linkbsp : test.de/index.php?page=index dann würde der untere inhalt angezeigt werden.
if($page=='index'){
$dayonline = 0;
$currentonline = 0;
$currentonlinered = 0;
$currentonlineyel = 0;
$currentonlineblue = 0;
$currentonlineeis = 0;
$currentonlinefeuer = 0;
$currentonlinewueste = 0;
$currentonlineot = 0;
$currentonlinedt = 0;
$currentonlinegw = 0;
$currentonlinerw = 0;
$currentonlinesd = 0;
$currentonlinetempel = 0;
//################################################################################################################
require_once 'conn.php';
mysql_select_db("player");
$exec="select id from player";
$result=mysql_query($exec);
$numplayer = mysql_numrows($result);
//################################################################################################################
$exec="select id,last_play from player";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result))
{
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33){
$dayonline = $dayonline+1;
}else{}
}
//################################################################################################################
$exec="select map_index,last_play from player";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result))
{
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
$map = $row->map_index;
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$currentonline = $currentonline+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map < 6){
$currentonlinered = $currentonlinered+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map > 20 and $map < 26){
$currentonlineyel = $currentonlineyel+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map > 40 and $map < 46){
$currentonlineblue = $currentonlineblue+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 61){
$currentonlineeis = $currentonlineeis+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 62){
$currentonlinefeuer = $currentonlinefeuer+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 63){
$currentonlinewueste = $currentonlinewueste+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 64){
$currentonlineot = $currentonlineot+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 66){
$currentonlinedt = $currentonlinedt+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 67){
$currentonlinegw = $currentonlinegw+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 68){
$currentonlinerw = $currentonlinerw+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 104){
$currentonlinesd = $currentonlinesd+1;
}else{}
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10 and $map == 65){
$currentonlinetempel = $currentonlinetempel+1;
}else{}
}
?>
<center>
<a href="map.php?page=rot1"><img src="Rot1.png" border="0" /></a>
<a href="map.php?page=rot2"><img src="Rot1.png" border="0" /></a>
<!-- Kann ausgebaut werden.-->
<br>
<table width="278" border="0">
<tr>
<td width="268" colspan="2"><p>Heute waren bisher <? echo $dayonline ?> Spieler online.</p>
<p>Im moment sind <? echo $currentonline ?> Spieler online.</p>
<table width="200" border="0" align="center">
<tr>
<td width="113">Blaues Reich</td>
<td width="71"><? echo $currentonlineblue ?></td>
</tr>
<tr>
<td>Rotes Reich</td>
<td><? echo $currentonlinered ?></td>
</tr>
<tr>
<td>Gelbes Reich</td>
<td><? echo $currentonlineyel ?></td>
</tr>
<tr>
<td>Orktal</td>
<td><? echo $currentonlineot ?></td>
</tr>
<tr>
<td>Eisland</td>
<td><? echo $currentonlineeis ?></td>
</tr>
<tr>
<td>Wüste</td>
<td><? echo $currentonlinewueste ?></td>
</tr>
<tr>
<td>Feuerland</td>
<td><? echo $currentonlinefeuer ?></td>
</tr>
<tr>
<td>Tempel</td>
<td><? echo $currentonlinetempel ?></td>
</tr>
</table>
<p> </p></td>
</tr>
</table>
</center>
<center>
<?
}
... weiterer Inhalt kommt ja noch
PHP Code:
// BLAU 1
if($page=='blau1'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='41'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-921600)/500);
$y = round(($row->y-204800)/500);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild"><img src="Blau1.png" style="top:5px; left:0px"></div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='41'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-921600)/500);
$y = round(($row->y-204800)/500);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
Dies macht ihr dann für jede map und ihr seit fertig ;D
Was noch zu beachten ist:
Die Koordinaten in der Db wurden mit einem Wert addiert dieser steht in den Serverfiles.
Das ist eine nicht elegante Lösung von mir, da das Script schon älter ist und ich es auf zeitdruck geschrieben habe + probiert habe bis es funktioniert hat, daher könnte es sein dass überflüssige Codeschnippsel sich wiederholen.
Hier geht der 2. Teil Weiter bis zum Ende.
PHP Code:
// BLAU 1
if($page=='blau1'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='41'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-921600)/500);
$y = round(($row->y-204800)/500);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild"><img src="Blau1.png" style="top:5px; left:0px"></div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='41'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-921600)/500);
$y = round(($row->y-204800)/500);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
// BLAU 2
if($page=='blau2'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='43'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-819200)/400);
$y = round(($row->y-204800)/400);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild"><img src="Blau2.bmp" style="top:5px; left:0px"></div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='43'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-819200)/400);
$y = round(($row->y-204800)/400);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
//ROT1
if($page=='rot1'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='1'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-409600)/500);
$y = round(($row->y-896000)/500);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild"><img src="Rot1.png" style="top:5px; left:0px"></div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='1'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-409600)/500);
$y = round(($row->y-896000)/500);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
//rot2
if($page=='rot2'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='3'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-307200)/400);
$y = round(($row->y-819200)/400);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild"><img src="Rot2.bmp" style="top:5px; left:0px"></div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='3'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-307200)/400);
$y = round(($row->y-819200)/400);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
//Gelb1
if($page=='gelb1'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='21'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-0)/500);
$y = round(($row->y-102400)/500);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild"><img src="Gelb1.png" style="top:5px; left:0px"></div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='21'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-0)/500);
$y = round(($row->y-102400)/500);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
//GELB2
if($page=='gelb2'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='23'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-102400)/400);
$y = round(($row->y-204800)/400);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild"><img src="Gelb2.bmp" style="top:5px; left:0px"></div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='23'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-102400)/400);
$y = round(($row->y-204800)/400);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
//Orktal
if($page=='ot'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='64'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-256000)/600);
$y = round(($row->y-665600)/600);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild"><img src="Orktal.bmp" style="top:5px; left:0px"></div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='64'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-256000)/600);
$y = round(($row->y-665600)/600);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
//Eisland
if($page=='eisland'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='61'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-358400)/600);
$y = round(($row->y-153600)/600);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild">
<img src="Eisland.bmp" style="top:5px; left:0px" border=0 alt="">
</div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='61'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-358400)/600);
$y = round(($row->y-153600)/600);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
//Wüste
if($page=='wueste'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='63'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-204800)/600);
$y = round(($row->y-486400)/600);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild"><img src="Wueste.bmp" style="top:5px; left:0px"></div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='63'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-204800)/600);
$y = round(($row->y-486400)/600);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
//Feuerland
if($page=='feuerland'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='62'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-588800)/600);
$y = round(($row->y-614400)/600);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild">
<img src="Feuerland.bmp" style="top:5px; left:0px" border=0 alt="">
</div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='62'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-588800)/600);
$y = round(($row->y-614400)/600);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<br /><br /><br /><br /><br /><br /><br /><br />
<center>Möglicher back link.</center>
<?
}
//Tempel
if($page=='tempel'){
?>
<style type="text/css">
<!--
body {
background-color: #ceb982;
}
#bild {
position:absolute;
top:14px;
left:1px;
}
<?
require_once 'conn.php';
mysql_select_db('player');
$exec="select name,x,y,last_play,account_id,id,level from player where map_index='65'";
$result=mysql_query($exec);
$i = 0;
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-537600)/400);
$y = round(($row->y-51200)/400);
?>
#test<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x; ?>px;
color:#F00;
}
.infobox<? echo $i; ?>{
position:absolute;
top:<? echo $y; ?>px;
left:<? echo $x;+15 ?>px;
color:#F00;
}
<?
$i = $i+1;
}
}
?>
-->
</style>
<div class="bild" id="bild">
<img src="Tempel.png" style="top:5px; left:0px" border=0 alt="">
</div>
<?
$i = 0;
$exec="select name,x,y,last_play,account_id,id,level,account_id,id,level from player where map_index='65'";
$result=mysql_query($exec);
while($row = mysql_fetch_object($result)){
$last_play = $row->last_play;
$year33 = substr($last_play,0,4);
$month33 = substr($last_play,5,2);
$day33 = substr($last_play,8,2);
$hour33 = substr($last_play,11,2);
$min33 = substr($last_play,14,2);
if($year33 == $year1 and $month12 == $month33 and $day == $day33 and $hour33 == $hour and $min33 > $min-10){
$x = round(($row->x-537600)/400);
$y = round(($row->y-51200)/400);
$charname = $row->name;
$level = $row->level;
$id = $row->id;
$accountid = $row->account_id;
$exec1="select guild_id from guild_member where pid='$id'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$guildid = $row->guild_id;
$exec1="select name from guild where id='$guildid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$gildenname = $row->name;
$exec1="select empire from player_index where id='$accountid'";
$result1=mysql_query($exec1);
$row = mysql_fetch_object($result1);
$empire = $row->empire;
if($empire==1){$empire="rotes Reich";}
if($empire==2){$empire="gelbes Reich";}
if($empire==3){$empire="blaues Reich";}
?>
<div class="test<? echo $i; ?>" id="test<? echo $i; ?>" style="top:<? echo $y; ?>px; left:<? echo $x; ?>px"><b><a onmouseover="document.getElementById('infobox<? echo $i; ?>').style.visibility='visible'" onmouseout="document.getElementById('infobox<? echo $i ?>').style.visibility='hidden'" style="cursor:default">.</a></b>
</div>
<div id="infobox<? echo $i; ?>" style="position:absolute; visibility:hidden; top:<? echo $y; ?>px; left:<? echo $x+15; ?>px">
<table width="150" border="1" cellpadding="1" cellspacing="0" bgcolor="#666666" style="color:#FFF">
<tr>
<td valign="top">Name:</td>
<td valign="top"><? echo $charname ?></td>
</tr>
<tr>
<td valign="top">Level</td>
<td valign="top"><? echo $level ?></td>
</tr>
<tr>
<td valign="top">Gilde:</td>
<td valign="top"><?
if(strlen($gildenname)<2){$gildenname = "Keine Gilde";}
echo $gildenname ;
?>
</td>
</tr>
<tr>
<td valign="top">Reich</td>
<td valign="top"><? echo $empire ?></td>
</tr>
</table>
</div>
<?
$i = $i +1;
}
}
?>
<?
}
?>
(ich habe jetzt nur teile meines scripts verwendet es könnte daher sein, dass was fehlen könnte.)
hmm ist zu lang -> siehe Anhang
Falls euch die Positionierung der Infobox stört, könnt ihr diese auch unterhalb des bildes wiedergeben sodas keine Überlagerung mit den Punkten herscht.
Falls Fragen oder so da sind wie was gemacht wurde oder sonstiges könnt ihr ja posten.
Bilder im Anhang.






