Hallo, mijn haven werkt niet, en m´n vliegveld wel.
Dit komt omdat ik haven om de 30 minuten wou laten vertrekken, en het uit het vliegveld gebaseerd heb.
Nu doet het vliegveld het wel, maar de haven niet.
Als je bij de haven de boot neemt naar bv. Berlijn, dan stata er dat de boot over een 10 minuten vertekt, vervolgens klik je ergens anders op, en dan ben je al aangekomen in Berlijn.
Ik weet niet wat er mis is. Dit zijn de scripts:
HAVEN:
PHP
<?
date_default_timezone_set('Europe/Amsterdam');
setlocale(LC_ALL, 'nl_NL');
$train = $_POST['train'];
$dituur = date(H);
$ditminuut = date(i);
$laatsteminuut = vloeren($ditminuut, 30);
$extraminuten = $laatsteminuut+30;
$extrauur = $dituur;
if($extraminuten > 59){$extrauur = $dituur+1; $extraminuten = "00";}
if($extrauur > 24){$extrauur = 00;}
$uur = "$extrauur:$extraminuten";
$update = (date("Y-m-d"));
$update2 = "$update $uur:00";
if($train > 0){
if($data->contant >= 15000){
$error = niks;
$select = mysql_query("SELECT * FROM `haven` WHERE `stad`='$train'");
$select2 = mysql_fetch_object($select);
mysql_query("UPDATE `users` SET `varen`='$update2',`aankomst`='25',`contant`=`contant`-'7500',`aankomststad`='$train' WHERE `id`='$data->id'");
mysql_query("UPDATE `users` SET `vaarkaarten`=`vaarkaarten`+'1', `bank`=`bank`+'7500' WHERE `login`='$select2->eigenaar'");
$_SESSION['mission'] = "Reis naar een andere stad";
}
else{$error = 1;}
}
if($_GET['f'] == cancel){
$error = annuleren;
mysql_query("UPDATE `users` SET `varen`='0000-00-00 00:00:00' WHERE `id`='$data->id'");
?>
<table width="100%">
<tr>
<td align="center">
<br><br><br><br>
<table class="div_popup" align="center">
<tr>
<td>
Je reis is geannuleerd </td>
</tr>
<tr>
<td>
<br><br>
<a href="index.php?a=haven" class="msg_ok">Klik hier indien je niet automatisch verder gaat.</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script language="javascript">
setTimeout("document.location.href='index.php?a=haven'",(2000*2));
</script>
</div>
</td>
</tr>
</table>
</td>
<?}
if($error == niks){?>
<table width="100%">
<tr>
<td align="center">
<br><br><br><br>
<table class="div_popup" align="center">
<tr>
<td>
Het ticket is geboekt, je zal automatisch met de volgende boot meegaan </td>
</tr>
<tr>
<td>
<br><br>
<a href="index.php?a=haven" class="msg_ok">Klik hier indien je niet automatisch verder gaat.</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script language="javascript">
setTimeout("document.location.href='index.php?a=haven'",(4000*2));
</script>
</div>
</td>
</tr>
</table>
</td>
<?}
if($error == 1){
?>
<table width="100%">
<tr>
<td align="center">
<br><br><br><br>
<table class="div_popup_error" align="center">
<tr>
<td style="color:red">
<b>FOUT!</b><br><br>Je hebt niet genoeg geld om deze reis te maken </td>
</tr>
<tr>
<td>
<br><br>
<a href="#" onclick="history.go(-1); return false" class="error_ok">OK</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<?}
$dit1 = mysql_query("SELECT * FROM `haven` WHERE `stad`='$data->city'");
$dit = mysql_fetch_object($dit1);
if($dit->eigenaar == ""){
$error = eigenaar;
?>
<div class="title_bg">
<div class="title">Haven</div>
</div>
<div style="background-color:#dbd2b7; padding:10px; padding-top:4px;">
<table cellpadding="0" cellspacing="0" width="100%"><tr><td>
<br>
<img src='images/icons_gif/information.gif' align='top'>
<font color='#3673AF'>
<b>
Deze haven heeft nog geen eigenaar!<br>
Ga naar de veiling om de haven te kopen! </b>
</font>
<br>
<br>
<input type="button" name="cancel" value="Koop haven!" class="mod_submit" onclick="document.location.href = 'index.php?a=veiling'"><br>
</td></tr></table>
</div>
<table width='100%' cellspacing='2' cellpadding='2'>
<tr>
<td class='content_bottom'></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<?
}
if($error == ""){
if($data->varen != "0000-00-00 00:00:00" && $data->aankomststad != 0){
$error = aanhetreizen;
$next = array("","Amersfoort","Auschwitz","Berlijn","Verdun","Brussel","Amsterdam");
$next = $next[$data->aankomststad];
?>
<div class="title_bg">
<div class="title">Haven</div>
</div>
<div style="background-color:#dbd2b7; padding:10px; padding-top:4px;">
<table cellpadding="0" cellspacing="0" width="100%"><tr><td>
<br>
<img src='images/icons_gif/information.gif' align='top'>
<font color='#3673AF'>
<b>
Je zit te wachten op de boot naar <?echo$next;?>...<br>
Deze reis vertrekt om <?echo$uur;?> uur </b>
</font>
<br>
<br>
<input type="button" name="cancel" value="Annuleer de reis!" class="mod_submit" onclick="document.location.href = 'index.php?a=haven&f=cancel'"><br>
<small>*Let op! Je krijg je geld niet meer terug bij annulering</small>
</td></tr></table>
</div>
<table width='100%' cellspacing='2' cellpadding='2'>
<tr>
<td class='content_bottom'></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<?}}
if($error == ""){
$stations1 = mysql_query("SELECT * FROM `haven` WHERE `stad`='$data->city'");
$stations = mysql_fetch_object($stations1);
$station11 = mysql_query("SELECT * FROM `haven` WHERE `stad`='1'");
$station1 = mysql_fetch_object($station11);
$station22 = mysql_query("SELECT * FROM `haven` WHERE `stad`='2'");
$station2 = mysql_fetch_object($station22);
$station33 = mysql_query("SELECT * FROM `haven` WHERE `stad`='3'");
$station3 = mysql_fetch_object($station33);
$station44 = mysql_query("SELECT * FROM `haven` WHERE `stad`='4'");
$station4 = mysql_fetch_object($station44);
$station55 = mysql_query("SELECT * FROM `haven` WHERE `stad`='5'");
$station5 = mysql_fetch_object($station55);
$station66 = mysql_query("SELECT * FROM `haven` WHERE `stad`='6'");
$station6 = mysql_fetch_object($station66);
$turijn1 = mysql_query("SELECT * FROM `users` WHERE `city`='1'");
$turijn = mysql_num_rows($turijn1);
$palermo1 = mysql_query("SELECT * FROM `users` WHERE `city`='2'");
$palermo = mysql_num_rows($palermo1);
$milaan1 = mysql_query("SELECT * FROM `users` WHERE `city`='3'");
$milaan = mysql_num_rows($milaan1);
$rome1 = mysql_query("SELECT * FROM `users` WHERE `city`='4'");
$rome = mysql_num_rows($rome1);
$catania1 = mysql_query("SELECT * FROM `users` WHERE `city`='5'");
$catania = mysql_num_rows($catania1);
$corleone1 = mysql_query("SELECT * FROM `users` WHERE `city`='6'");
$corleone = mysql_num_rows($corleone1);
$turijn = number_format($turijn, 0, '.', '.');
$palermo = number_format($palermo, 0, '.', '.');
$milaan = number_format($milaan, 0, '.', '.');
$rome = number_format($rome, 0, '.', '.');
$catania = number_format($catania, 0, '.', '.');
$corleone = number_format($corleone, 0, '.', '.');
$stationowner11 = mysql_query("SELECT * FROM `users` WHERE `login`='$station1->eigenaar'");
$user1 = mysql_fetch_object($stationowner11);
$stationowner22 = mysql_query("SELECT * FROM `users` WHERE `login`='$station2->eigenaar'");
$user2 = mysql_fetch_object($stationowner22);
$stationowner33 = mysql_query("SELECT * FROM `users` WHERE `login`='$station3->eigenaar'");
$user3 = mysql_fetch_object($stationowner33);
$stationowner44 = mysql_query("SELECT * FROM `users` WHERE `login`='$station4->eigenaar'");
$user4 = mysql_fetch_object($stationowner44);
$stationowner55 = mysql_query("SELECT * FROM `users` WHERE `login`='$station5->eigenaar'");
$user5 = mysql_fetch_object($stationowner55);
$stationowner66 = mysql_query("SELECT * FROM `users` WHERE `login`='$station6->eigenaar'");
$user6 = mysql_fetch_object($stationowner66);
$online11 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user1->login'");
$online22 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user2->login'");
$online33 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user3->login'");
$online44 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user4->login'");
$online55 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user5->login'");
$online66 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user6->login'");
$online1 = mysql_num_rows($online11);
$online2 = mysql_num_rows($online22);
$online3 = mysql_num_rows($online33);
$online4 = mysql_num_rows($online44);
$online5 = mysql_num_rows($online55);
$online6 = mysql_num_rows($online66);
if($stations->eigenaar == ""){
$stations->eigenaar = niemand;
}
?>
<div class="title_bg">
<div class="title">Haven</div>
</div>
<div style="background-color:#dbd2b7; padding:10px; padding-top:4px;">
<table cellpadding="0" cellspacing="0" width="100%"><tr><td>
<table width='100%'>
<tr>
<td valign='top'>
Welkom in <b><?echo$city;?></b>!<br /><br />
De eigenaar van deze haven is <b><?echo$stations->eigenaar;?></b>.<br /><br />
Je kan vanaf deze haven naar een andere haven reizen.<br /><br />
De volgende boot vertrekt om <?echo$uur;?> uur.<br /><br />
Voordelen van het reizen naar verschillende steden zijn onder meer dat de persoon die je probeert aan te vallen in dezelfde stad moet zijn en dat de rookkoersen per stad verschillen. </td>
<td>
<img src='images/kaart.gif' width='242' height='208' align='right' border='1'>
</td>
</tr>
</table>
<br>
<form method="POST" onsubmit="return checkError(this);">
<input type="hidden" name="sel" id="sel" value="">
<table width='100%' class="mod_list" cellspacing='2' cellpadding='2'>
<tr>
<td></td>
<td></td>
<td align='center'><b>Stad</b></td>
<td></td>
<td align='center'><b>Kosten</b></td>
<td></td>
<td align='center'><b>Inwoners</b></td>
<td></td>
<td align='center'><b>Eigenaar</b></td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 1){?> <?}?>
<?if($data->city != 1){?><input type="radio" name="train" value="1" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Amersfoort</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 7.500</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$turijn;?></td>
<?if($online1 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user1->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profile&x=<?echo$user1->id?>"><?echo$user1->login?></a>
<?}?>
</td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 2){?> <?}?>
<?if($data->city != 2){?><input type="radio" name="train" value="2" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Auschwitz</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 7.500</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$palermo;?></td>
<?if($online2 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user2->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profile&x=<?echo$user2->id?>"><?echo$user2->login?></a>
<?}?>
</td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 3){?> <?}?>
<?if($data->city != 3){?><input type="radio" name="train" value="3" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Berlijn</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 7.500</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$milaan;?></td>
<?if($online3 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user3->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profilex=<?echo$user3->id?>"><?echo$user3->login?></a>
<?}?>
</td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 4){?> <?}?>
<?if($data->city != 4){?><input type="radio" name="train" value="4" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Verdun</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 7.500</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$rome;?></td>
<?if($online4 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user4->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profile&x=<?echo$user4->id?>"><?echo$user4->login?></a>
<?}?>
</td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 5){?> <?}?>
<?if($data->city != 5){?><input type="radio" name="train" value="5" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Brussel</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 7.500</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$catania;?></td>
<?if($online5 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user5->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profile&x=<?echo$user5->id?>"><?echo$user5->login?></a>
<?}?>
</td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 6){?> <?}?>
<?if($data->city != 6){?><input type="radio" name="train" value="6" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Amsterdam</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 7.500</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$corleone;?></td>
<?if($online6 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user6->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profile&x=<?echo$user6->id?>"><?echo$user6->login?></a>
<?}?>
</td>
</tr>
<tr height='20px'>
<td colspan='9'>
<input type='submit' name='koop' value='Koop kaartje' class="mod_submit">
</td>
</tr>
</table>
</td></tr></table>
</div>
<table width='100%' cellspacing='2' cellpadding='2'>
<tr>
<td class='content_bottom'></td>
</tr>
</table>
<script language="javascript">
function checkError(pForm){
var errormsg = '';
if(pForm.sel.value != 'true') errormsg += 'Je hebt geen haven gekozen!<br>';
if(errormsg != ''){
showError(errormsg);
return false;
}
return true;
}
</script> </div>
</td>
</tr>
</table>
</td>
<?}?>
Toon Meer
VLIEGVELD:
PHP
<?
date_default_timezone_set('Europe/Amsterdam');
setlocale(LC_ALL, 'nl_NL');
$train = $_POST['train'];
$dituur = date(H);
$ditminuut = date(i);
$laatsteminuut = vloeren($ditminuut, 5);
$extraminuten = $laatsteminuut+5;
if($extraminuten == 5){$extraminuten = "05";}
$extrauur = $dituur;
if($extraminuten > 59){$extrauur = $dituur+1; $extraminuten = "00";}
if($extrauur > 24){$extrauur = 00;}
$uur = "$extrauur:$extraminuten";
$update = (date("Y-m-d"));
$update2 = "$update $uur:00";
if($train > 0){
if($data->contant >= 15000){
$error = niks;
$select = mysql_query("SELECT * FROM `vliegveld` WHERE `stad`='$train'");
$select2 = mysql_fetch_object($select);
mysql_query("UPDATE `users` SET `vliegen`='$update2',`aankomst`='25',`contant`=`contant`-'15000',`aankomststad`='$train' WHERE `id`='$data->id'");
mysql_query("UPDATE `users` SET `vliegveldkaarten`=`vliegveldkaarten`+'1', `bank`=`bank`+'15000' WHERE `login`='$select2->eigenaar'");
$_SESSION['mission'] = "Reis naar een andere stad";
}
else{$error = 1;}
}
if($_GET['f'] == cancel){
$error = annuleren;
mysql_query("UPDATE `users` SET `vliegen`='0000-00-00 00:00:00' WHERE `id`='$data->id'");
?>
<table width="100%">
<tr>
<td align="center">
<br><br><br><br>
<table class="div_popup" align="center">
<tr>
<td>
Je reis is geannuleerd </td>
</tr>
<tr>
<td>
<br><br>
<a href="index.php?a=airport" class="msg_ok">Klik hier indien je niet automatisch verder gaat.</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script language="javascript">
setTimeout("document.location.href='index.php?a=airport'",(2000*2));
</script>
</div>
</td>
</tr>
</table>
</td>
<?}
if($error == niks){?>
<table width="100%">
<tr>
<td align="center">
<br><br><br><br>
<table class="div_popup" align="center">
<tr>
<td>
Het ticket is geboekt, je zal automatisch met het volgende vliegtuig meegaan </td>
</tr>
<tr>
<td>
<br><br>
<a href="index.php?a=airport" class="msg_ok">Klik hier indien je niet automatisch verder gaat.</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script language="javascript">
setTimeout("document.location.href='index.php?a=airport'",(4000*2));
</script>
</div>
</td>
</tr>
</table>
</td>
<?}
if($error == 1){
?>
<table width="100%">
<tr>
<td align="center">
<br><br><br><br>
<table class="div_popup_error" align="center">
<tr>
<td style="color:red">
<b>FOUT!</b><br><br>Je hebt niet genoeg geld om deze reis te maken </td>
</tr>
<tr>
<td>
<br><br>
<a href="#" onclick="history.go(-1); return false" class="error_ok">OK</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<?}
$dit1 = mysql_query("SELECT * FROM `vliegveld` WHERE `stad`='$data->city'");
$dit = mysql_fetch_object($dit1);
if($dit->eigenaar == ""){
$error = eigenaar;
?>
<div class="title_bg">
<div class="title">Vliegveld</div>
</div>
<div style="background-color:#dbd2b7; padding:10px; padding-top:4px;">
<table cellpadding="0" cellspacing="0" width="100%"><tr><td>
<br>
<img src='images/icons_gif/information.gif' align='top'>
<font color='#3673AF'>
<b>
Dit vliegveld heeft nog geen eigenaar!<br>
Ga naar de veiling om het vliegveld te kopen! </b>
</font>
<br>
<br>
<input type="button" name="cancel" value="Koop vliegveld!" class="mod_submit" onclick="document.location.href = 'index.php?a=veiling'"><br>
</td></tr></table>
</div>
<table width='100%' cellspacing='2' cellpadding='2'>
<tr>
<td class='content_bottom'></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<?
}
if($error == ""){
if($data->vliegen != "0000-00-00 00:00:00" && $data->aankomststad != 0){
$error = aanhetreizen;
$next = array("","Amersfoort","Auschwitz","Berlijn","Verdun","Brussel","Amsterdam");
$next = $next[$data->aankomststad];
?>
<div class="title_bg">
<div class="title">Vliegveld</div>
</div>
<div style="background-color:#dbd2b7; padding:10px; padding-top:4px;">
<table cellpadding="0" cellspacing="0" width="100%"><tr><td>
<br>
<img src='images/icons_gif/information.gif' align='top'>
<font color='#3673AF'>
<b>
Je zit te wachten op het vliegtuig naar <?echo$next;?>...<br>
Deze reis vertrekt om <?echo$uur;?> uur </b>
</font>
<br>
<br>
<input type="button" name="cancel" value="Annuleer de reis!" class="mod_submit" onclick="document.location.href = 'index.php?a=airport&f=cancel'"><br>
<small>*Let op! Je krijg je geld niet meer terug bij annulering</small>
</td></tr></table>
</div>
<table width='100%' cellspacing='2' cellpadding='2'>
<tr>
<td class='content_bottom'></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<?}}
if($error == ""){
$stations1 = mysql_query("SELECT * FROM `vliegveld` WHERE `stad`='$data->city'");
$stations = mysql_fetch_object($stations1);
$station11 = mysql_query("SELECT * FROM `vliegveld` WHERE `stad`='1'");
$station1 = mysql_fetch_object($station11);
$station22 = mysql_query("SELECT * FROM `vliegveld` WHERE `stad`='2'");
$station2 = mysql_fetch_object($station22);
$station33 = mysql_query("SELECT * FROM `vliegveld` WHERE `stad`='3'");
$station3 = mysql_fetch_object($station33);
$station44 = mysql_query("SELECT * FROM `vliegveld` WHERE `stad`='4'");
$station4 = mysql_fetch_object($station44);
$station55 = mysql_query("SELECT * FROM `vliegveld` WHERE `stad`='5'");
$station5 = mysql_fetch_object($station55);
$station66 = mysql_query("SELECT * FROM `vliegveld` WHERE `stad`='6'");
$station6 = mysql_fetch_object($station66);
$turijn1 = mysql_query("SELECT * FROM `users` WHERE `city`='1'");
$turijn = mysql_num_rows($turijn1);
$palermo1 = mysql_query("SELECT * FROM `users` WHERE `city`='2'");
$palermo = mysql_num_rows($palermo1);
$milaan1 = mysql_query("SELECT * FROM `users` WHERE `city`='3'");
$milaan = mysql_num_rows($milaan1);
$rome1 = mysql_query("SELECT * FROM `users` WHERE `city`='4'");
$rome = mysql_num_rows($rome1);
$catania1 = mysql_query("SELECT * FROM `users` WHERE `city`='5'");
$catania = mysql_num_rows($catania1);
$corleone1 = mysql_query("SELECT * FROM `users` WHERE `city`='6'");
$corleone = mysql_num_rows($corleone1);
$turijn = number_format($turijn, 0, '.', '.');
$palermo = number_format($palermo, 0, '.', '.');
$milaan = number_format($milaan, 0, '.', '.');
$rome = number_format($rome, 0, '.', '.');
$catania = number_format($catania, 0, '.', '.');
$corleone = number_format($corleone, 0, '.', '.');
$stationowner11 = mysql_query("SELECT * FROM `users` WHERE `login`='$station1->eigenaar'");
$user1 = mysql_fetch_object($stationowner11);
$stationowner22 = mysql_query("SELECT * FROM `users` WHERE `login`='$station2->eigenaar'");
$user2 = mysql_fetch_object($stationowner22);
$stationowner33 = mysql_query("SELECT * FROM `users` WHERE `login`='$station3->eigenaar'");
$user3 = mysql_fetch_object($stationowner33);
$stationowner44 = mysql_query("SELECT * FROM `users` WHERE `login`='$station4->eigenaar'");
$user4 = mysql_fetch_object($stationowner44);
$stationowner55 = mysql_query("SELECT * FROM `users` WHERE `login`='$station5->eigenaar'");
$user5 = mysql_fetch_object($stationowner55);
$stationowner66 = mysql_query("SELECT * FROM `users` WHERE `login`='$station6->eigenaar'");
$user6 = mysql_fetch_object($stationowner66);
$online11 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user1->login'");
$online22 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user2->login'");
$online33 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user3->login'");
$online44 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user4->login'");
$online55 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user5->login'");
$online66 = mysql_query("SELECT * FROM `users` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `login`='$user6->login'");
$online1 = mysql_num_rows($online11);
$online2 = mysql_num_rows($online22);
$online3 = mysql_num_rows($online33);
$online4 = mysql_num_rows($online44);
$online5 = mysql_num_rows($online55);
$online6 = mysql_num_rows($online66);
if($stations->eigenaar == ""){
$stations->eigenaar = niemand;
}
?>
<div class="title_bg">
<div class="title">Vliegveld</div>
</div>
<div style="background-color:#dbd2b7; padding:10px; padding-top:4px;">
<table cellpadding="0" cellspacing="0" width="100%"><tr><td>
<table width='100%'>
<tr>
<td valign='top'>
Welkom in <b><?echo$city;?></b>!<br /><br />
De eigenaar van dit vliegveld is <b><?echo$stations->eigenaar;?></b>.<br /><br />
Je kan van dit vliegveld naar een ander vliegveld reizen.<br /><br />
Het volgende vliegtuig vertrekt om <?echo$uur;?> uur.<br /><br />
Voordelen van het reizen naar verschillende steden zijn onder meer dat de persoon die je probeert aan te vallen in dezelfde stad moet zijn en dat de rookkoersen per stad verschillen. </td>
<td>
<img src='images/kaart.gif' width='242' height='208' align='right' border='1'>
</td>
</tr>
</table>
<br>
<form method="POST" onsubmit="return checkError(this);">
<input type="hidden" name="sel" id="sel" value="">
<table width='100%' class="mod_list" cellspacing='2' cellpadding='2'>
<tr>
<td></td>
<td></td>
<td align='center'><b>Stad</b></td>
<td></td>
<td align='center'><b>Kosten</b></td>
<td></td>
<td align='center'><b>Inwoners</b></td>
<td></td>
<td align='center'><b>Eigenaar</b></td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 1){?> <?}?>
<?if($data->city != 1){?><input type="radio" name="train" value="1" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Amersfoort</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 15.000</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$turijn;?></td>
<?if($online1 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user1->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profile&x=<?echo$user1->id?>"><?echo$user1->login?></a>
<?}?>
</td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 2){?> <?}?>
<?if($data->city != 2){?><input type="radio" name="train" value="2" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Auschwitz</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 15.000</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$palermo;?></td>
<?if($online2 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user2->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profile&x=<?echo$user2->id?>"><?echo$user2->login?></a>
<?}?>
</td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 3){?> <?}?>
<?if($data->city != 3){?><input type="radio" name="train" value="3" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Berlijn</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 15.000</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$milaan;?></td>
<?if($online3 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user3->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profilex=<?echo$user3->id?>"><?echo$user3->login?></a>
<?}?>
</td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 4){?> <?}?>
<?if($data->city != 4){?><input type="radio" name="train" value="4" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Verdun</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 15.000</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$rome;?></td>
<?if($online4 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user4->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profile&x=<?echo$user4->id?>"><?echo$user4->login?></a>
<?}?>
</td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 5){?> <?}?>
<?if($data->city != 5){?><input type="radio" name="train" value="5" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Brussel</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 15.000</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$catania;?></td>
<?if($online5 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user5->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profile&x=<?echo$user5->id?>"><?echo$user5->login?></a>
<?}?>
</td>
</tr>
<tr class='top'>
<td align='center' width='5%'>
<?if($data->city == 6){?> <?}?>
<?if($data->city != 6){?><input type="radio" name="train" value="6" onclick="document.getElementById('sel').value = 'true'"><?}?>
</td>
<td align='center' width='5%'><img src='images/icons_gif/world.gif'></td>
<td> Amsterdam</td>
<td align='center' width='5%'><img src='images/icons_gif/money.gif'></td>
<td align='center'>ƒ 15.000</td>
<td align='center' width='5%'><img src='images/icons_gif/chart_bar.gif'></td>
<td align='center'><?echo$corleone;?></td>
<?if($online6 > 0){?>
<td align='center' width='5%'><img src='images/icons_gif/status_online.gif'></td>
<?}else{?>
<td align='center' width='5%'><img src='images/icons_gif/status_offline.gif'></td>
<?}?>
<td align='center'>
<?if($user6->login == ""){?>
<a href="index.php?a=veiling"><b>Kopen</b></a>
<?}else{?>
<a href="index.php?a=profile&x=<?echo$user6->id?>"><?echo$user6->login?></a>
<?}?>
</td>
</tr>
<tr height='20px'>
<td colspan='9'>
<input type='submit' name='koop' value='Koop kaartje' class="mod_submit">
</td>
</tr>
</table>
</td></tr></table>
</div>
<table width='100%' cellspacing='2' cellpadding='2'>
<tr>
<td class='content_bottom'></td>
</tr>
</table>
<script language="javascript">
function checkError(pForm){
var errormsg = '';
if(pForm.sel.value != 'true') errormsg += 'Je hebt geen station gekozen!<br>';
if(errormsg != ''){
showError(errormsg);
return false;
}
return true;
}
</script> </div>
</td>
</tr>
</table>
</td>
<?}?>
Toon Meer
En de haven moet dus over 30 minuten vertrekken, en het vliegveld om de 5 minuten.