Location: PHPKode > projects > Babylon 5: Upheaval > b5-upheaval/php_functions/sternenkarte.php
<!--    

	Copyright 2007 Martin Remisch

	This file is part of "Babylon 5: Upheaval".

    "Babylon 5: Upheaval" is free software: you can redistribute it and/or 
    modify it under the terms of the GNU General Public License as published 
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    "Babylon 5: Upheaval" is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with "Babylon 5: Upheaval".  If not, see <http://www.gnu.org/licenses/>.

 -->

<html>

<head>
	<script type="text/javascript" src="../skripte/overlib.js"></script>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../format.css">


<!-- overlib ist ein nested table -> width/height angaben nicht globalisieren für diese seite -->
	<style type="text/css">
		table
		{
			border: solid 1px #000000;
			border-collapse: collapse;
			width:200px;			
		}
	</style>

</head>

<ul id="Navigation">
Navigation
	<a href="sternenkarte.php">Sternenkarte</a>
	<a href="display_own_planets.php">Planeten</a>
	<a href="manage_planets.php">Baumenü</a>
</ul>

<body>
  <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
</body>

<div style="float:left; width:99.8%; height:500px; border-color:black; border-width:1px; border-style:solid;">
	<div style=" float:right; width:50%; height:25px; border-color:black; border-width:1px; border-style:solid; border-right-style:none; border-top-style:none;">
		<form method="post" action="<?php $_SERVER['PHP_SELF'] ?>">

<?php    if (!isset($_POST['prg']) OR $_POST['prg'] == 'planetar')
			{
				echo "<input type=\"radio\" name=\"prg\" value=\"planetar\" checked/>Planetare Übersicht";
			}
			else
			{
				echo "<input type=\"radio\" name=\"prg\" value=\"planetar\"/>Planetare Übersicht";
			}

			if (isset($_POST['prg']) && $_POST['prg'] == 'flotte')
			{
				echo "<input type=\"radio\" name=\"prg\" value=\"flotte\" checked/>Flottenverwaltung";
			}
			else
			{
				echo "<input type=\"radio\" name=\"prg\" value=\"flotte\"/>Flottenverwaltung";
			}
			
			if (isset($_POST['prg']) && $_POST['prg'] == 'scan')
			{
				echo "<input type=\"radio\" name=\"prg\" value=\"scan\" checked/>Umgebungsscan";
			}
			else
			{
				echo "<input type=\"radio\" name=\"prg\" value=\"scan\"/>Umgebungsscan";
			}
?>
			<input type="hidden" name="gewählt" value="go"> 
		<input type="submit" value="Ok" /></form>
	</div>
	<div style="position:absolute; z-index:1; background-color: black;"><img src="../bilder/test.png"></div>
	<div style="position:absolute; z-index:2;">
	
	<?php

		@session_start();
		error_reporting(E_ALL);
		include('/var/www/localhost/htdocs/alpha/db_include.inc');

		mysql_connect(HOST,USER,PASS)or die(mysql_error());
		mysql_select_db(DATABASE) or die(mysql_error());

		$sql   = "SELECT id,x,y,typ,besitzer FROM universum";
		$query = mysql_query($sql);

		$name = $_SESSION['name'];

		$planeten_namen = "planeten"."_".$name;

		while ($art = mysql_fetch_array($query))
		{
			if ($art[3] != 'raum')
			{
				
				if ($art[4] == 'keiner') 
				{ 
					echo "<img with=\"20px\" src=\"../bilder/".$art[3].".png"."\" border=\"0\" onmouseover=\"return overlib('Besitzer: $art[4]', CAPTION, 'Sie betrachten: $art[1]-$art[2]');\" onmouseout=\"return nd();\">";
				}
				elseif ($art[4] == $_SESSION['name'])
				{
					echo "<img with=\"20px\" src=\"../bilder/".$art[3]."-eigener.png"."\" border=\"0\" onmouseover=\"return overlib('Besitzer: $art[4]',CAPTION, 'Sie betrachten: $art[1]-$art[2]');\" onmouseout=\"return nd();\">";
				}
				elseif ($art[4] != '' AND $art[4] != $name)
				{
					echo "<img with=\"20px\" src=\"../bilder/".$art[3]."-gegner.png"."\" border=\"0\" onmouseover=\"return overlib('Besitzer: $art[4]',CAPTION, 'Sie betrachten: $art[1]-$art[2]');\" onmouseout=\"return nd();\">";
				}

			}
			else
			{
				echo "<img src=\"../bilder/raum.png"."\" border=\"0\">";
			}
			
			if (($art[0]%25) == 0) { echo "<br/>"; }
		}
		
		echo "</div></div>";		
?>

		</table>
	</div>

	<div style="width:100%; height:60px; clear:both">
		<div style="width:49.8%; height: 60px; float:left; border-color:black; border-width:1px; border-style:solid; margin-top: 3px;">
				<img src="../bilder/legende/terranisch.png" border="0" style="vertical-align:middle"> terranischer Planet -
				<img src="../bilder/legende/aquatisch.png" border="0" style="vertical-align:middle"> aquatischer Planet -
				<img src="../bilder/legende/lavatisch.png" border="0" style="vertical-align:middle"> lavatischer Planet<br/>
				<img src="../bilder/legende/gasförmig.png" border="0" style="vertical-align:middle"> toxischer Planet -
				<img src="../bilder/legende/raum.png" border="0" style="vertical-align:middle"> leerer Raum
		</div>
		<div style="width:49.8%; float:right; height: 60px; border-color:black; border-width:1px; border-style:solid; margin-top:3px;">
			<input type="checkbox" />
				<img src="../bilder/legende-eigene.png" border="0" style="vertical-align:middle"> eigene Planeten - 
			<input type="checkbox" />
				<img src="../bilder/legende-gegner.png" border="0" style="vertical-align:middle"> gegnerische Planeten
		</div>
	</div>
</html>
Return current item: Babylon 5: Upheaval