best cp leden
gelukkig nieuwjaar:),
ik heb een vraag over css/php ik wil voor mijn plattegrond graag een afbeelding mee geven die de gene die dat stukje grond heeft, maar ik krijg het niet voor elkaar. Ik heb verschillende dingen geprobeerd maar ik blijf de afbeelding zien van id=1. Heeft iemand van jullie enig idee hoe ik dat voor elkaar zou kunnen krijgen..
het script:
PHP
<?
include_once "_include-config.php";
?>
<html>
<head>
<title>UnitedWar</title>
<link rel="stylesheet" type="text/css" href="<?=$style;?>" />
</head>
<table width="100%">
<?
if($_GET['p'] == "plattegrond" && isset($_GET['id']) && Isset($_GET['x'])) {
$dbres = mysql_query("SELECT * FROM `plattegrond` WHERE `land`='". $_GET['x'] ."' AND `id`='". $_GET['id'] ."'") or die (mysql_error());
$land = mysql_fetch_Assoc($dbres);
$dbresclan = mysql_query("SELECT * FROM `[clans]` WHERE `name`='". $data->clan ."'");
$clan = mysql_fetch_assoc($dbresclan);
?>
<tr>
<td class="subTitle" colspan="6">
Grond eigenaar
</td>
</tr>
<?
if(isset($_POST['koop']) && isset($_GET['x'])) {
if($data->cash < 1000000) {
echo '<tr>
<td class="mainTxt" colspan="6">
Je hebt niet genoeg geld contant!
</td>
</tr>
';
} else {
echo '<tr>
<td class="mainTxt" colspan="6">
Je hebt dit stuk land gekocht!
</td>
</tR>
';
mysql_query("UPDATE `plattegrond` SET `afbeelding`='". $clan['avatar'] ."' WHERE `land`='". $_GET['x'] ."' && id='". $_GET['id'] ."'") or die (mysql_Error());
mysql_query("UPDATE `plattegrond` SET `owner`='". $data->login ."' WHERE `land`='". $_GET['x'] ."' && id='". $_GET['id'] ."'") or die (mysql_error());
}
}
?>
<tr>
<td class="mainTxt" colspan="6">
<center>
<? if(empty($land['owner'])) { ?>
Dit stuk land is vrij!<br />
Koop dit stuk grond voor $1.000.000 <form method="POST"><input type="submit" name="koop" value="Koop!"/></form>
<?
} else {
?>
Dit land heeft als eigenaar: <? echo $land['owner'] .'.';}?>
</center>
</td>
</tr>
<tr>
<td class="mainTxt">
Irish Rub<br>
<img src="images/irishrub.jpg" alt="">
</td>
<td class="mainTxt">
Coffeeshop <br>
<img src="images/coffeshop.jpg" alt="">
</td>
<td class="mainTxt">
Nachtclub<br>
<img src="images/nachtclub.JPG" alt="">
</td>
<td class="mainTxt">
Motel <br>
<img src="images/motel.jpg" alt="">
</td>
<td class="mainTxt">
Casino <br>
<img src="images/casino.jpg" alt="">
</td>
</tr>
</table>
<?
} else {
$select = mysql_query("SELECT * FROM `[users]`");
$login = mysql_Fetch_Assoc($select);
$dbresclan = mysql_query("SELECT * FROM `plattegrond` WHERE `owner`='". $login['login'] ."'");
$plattegrond = mysql_fetch_assoc($dbresclan);
?>
<table width="100%">
<tr>
<td class="subTitle" colspan="2">California</td>
</tr>
<tr>
<Td class="mainTxt" align="center">
<select name="state" onchange='document.location="plattegrond.php?x="+this.value;'>
<option value="4">Illinois</option>
<option value="1" selected="selected">California</option>
<option value="2">New York</option>
<option value="7">Colorado</option>
<option value="5">Michigan</option>
<option value="10">Pennsylvania</option>
<option value="9">Louisiana</option>
<option value="8">Nevada</option>
<option value="3">New Jersey</option>
<option value="6">Ohio</option>
<option value="11">Texas</option>
</select>
</td>
</tr>
<tr><td rowspan="2" width="50%">
<div style="position: relative; margin-left: 30px; margin-top: 85px; height: 500px;">
<img style="position: absolute; left: 0px; top: 0px; z-index: 3;" src="images/stad1.png" usemap="#Map" border="0">
<img style="position: absolute; left: 0px; top: 0px; z-index: 1;" src="images/grid1.png" border="0">
<div style="position: absolute; left: 22px; top: 17px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);"></div>
<div style="position: absolute; left: 61px; top: 17px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);"></div>
<div style="position: absolute; left: 100px; top: 17px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding'] ;?>);"></div>
<div style="position: absolute; left: 139px; top: 17px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 22px; top: 56px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 61px; top: 56px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 100px; top: 56px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 139px; top: 56px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 22px; top: 95px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 61px; top: 95px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 100px; top: 95px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 139px; top: 95px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 22px; top: 134px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 61px; top: 134px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 100px; top: 134px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 139px; top: 134px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 22px; top: 173px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 61px; top: 173px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 100px; top: 173px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 139px; top: 173px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 178px; top: 173px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 61px; top: 212px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 100px; top: 212px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 139px; top: 212px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 178px; top: 212px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 217px; top: 212px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 61px; top: 251px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 100px; top: 251px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 139px; top: 251px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 178px; top: 251px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 217px; top: 251px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 256px; top: 251px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 100px; top: 290px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 139px; top: 290px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 178px; top: 290px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 217px; top: 290px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 256px; top: 290px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 295px; top: 290px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 100px; top: 329px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 139px; top: 329px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 178px; top: 329px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 217px; top: 329px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 256px; top: 329px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 295px; top: 329px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 334px; top: 329px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 139px; top: 368px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 178px; top: 368px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 217px; top: 368px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 256px; top: 368px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 295px; top: 368px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 334px; top: 368px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 217px; top: 407px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 256px; top: 407px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 295px; top: 407px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 334px; top: 407px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 256px; top: 446px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<div style="position: absolute; left: 295px; top: 446px; z-index: 2; width: 38px; height: 38px; background-color: rgb(153, 153, 153); background-image: url(<? echo $plattegrond['afbeelding']; ?>);;"></div>
<map name="Map">
<area shape="rect" href="?p=plattegrond&x=1&id=1" coords="22,17,60,55" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=2" coords="61,17,99,55" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=3" coords="100,17,138,55" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=4" coords="139,17,177,55" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=5" coords="22,56,60,94" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=6" coords="61,56,99,94" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=7" coords="100,56,138,94" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=8" coords="139,56,177,94" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=9" coords="22,95,60,133" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=10" coords="61,95,99,133" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=11" coords="100,95,138,133" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=12" coords="139,95,177,133" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=13" coords="22,134,60,172" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=14" coords="61,134,99,172" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=15" coords="100,134,138,172" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=16" coords="139,134,177,172" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=17" coords="22,173,60,211" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=18" coords="61,173,99,211" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=19" coords="100,173,138,211" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=20" coords="139,173,177,211" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=21" coords="178,173,216,211" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=22" coords="61,212,99,250" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=23" coords="100,212,138,250" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=24" coords="139,212,177,250" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=25" coords="178,212,216,250" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=26" coords="217,212,255,250" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=27" coords="61,251,99,289" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=28" coords="100,251,138,289" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=29" coords="139,251,177,289" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=30" coords="178,251,216,289" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=31" coords="217,251,255,289" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=32" coords="256,251,294,289" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=33" coords="100,290,138,328" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=34" coords="139,290,177,328" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=35" coords="178,290,216,328" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=36" coords="217,290,255,328" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=37" coords="256,290,294,328" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=38" coords="295,290,333,328" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=39" coords="100,329,138,367" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=40" coords="139,329,177,367" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=41" coords="178,329,216,367" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=42" coords="217,329,255,367" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=43" coords="256,329,294,367" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=44" coords="295,329,333,367" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=45" coords="334,329,372,367" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=46" coords="139,368,177,406" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=47" coords="178,368,216,406" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=48" coords="217,368,255,406" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=49" coords="256,368,294,406" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=50" coords="295,368,333,406" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=51" coords="334,368,372,406" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=52" coords="217,407,255,445" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=53" coords="256,407,294,445" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=54" coords="295,407,333,445" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=55" coords="334,407,372,445" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=56" coords="256,446,294,484" target="menu">
<area shape="rect" href="?p=plattegrond&x=1&id=57" coords="295,446,333,484" target="menu">
</map>
</div>
<?
}
?></td>
</html>
Toon Meer
Liever zeggen dan veranderen maar moet je zelf weten:)
Met vriendelijke groet,
FRankY