garage == 99999999) { $data2 = mysql_query("SELECT * FROM `[users]` WHERE `login`='{$_SESSION['login']}'"); $data = mysql_fetch_object($data2); ?> cash < 80000) { print ""; } else { mysql_query("UPDATE `[users]` SET `cash`=`cash`-80000, `garage`='1' WHERE `login`='{$data->login}'"); print ""; } } print"
Garage kopen
Je hebt nog geen garage gekocht,
je kunt er hier een kopen voor €80.000.
Garage
€80.000
Je hebt niet genoeg geld contant staan.
Je hebt een garage gekocht.
"; } else { ?> login != $rij->owner){ print ""; } if($data->login == $rij->owner){ if(isset($_POST['repareer'])) { $dbres = mysql_query("SELECT * FROM `[auto]` WHERE `owner`='$data->login' AND `id`='{$_GET['x']}'"); while($rij = mysql_fetch_object($dbres)) { $waard = Array('','5000','10000','15000','20000','25000','30000','35000','40000','45000','50000','55000','60000','65000','70000','75000','80000','85000','90000','95000','100000','105000','110000','130000','130000','130000','14000'); $geld1 = Array('','200','500','600','900','1200','1500','1800','2100','2400','1700','2500','3000','2900','2700','3200','3500','3300','3900','4500','5000','5500','6000','7500','7500','7500','8000'); $geld2 = $geld1[$rij->soort]; $geld3 = $waard[$rij->soort]; $geld = $geld3-$rij->schade*$geld2; $geld4 = Array('','400','1000','1200','1800','2400','3000','3600','4200','4800','3400','5000','6000','5800','5400','6400','7000','6600','7800','9000','10000','11000','12000','15000','15000','15000','17500'); $geld5 = $geld4[$rij->soort]; $geld6 = $rij->schade*$geld5; $soort = Array('','Seat','Opel','Nissan','Fiat','Ford','Mini','Toyota','Honda','Smart','Volkswagen','Lotus','Bmw','Dodge','Jeep','Pontiac','Mercedes','Eagle','CHrysler','Porsche','Jaguar','Viper','Ferarri','Ford Shelby GT500','Mitsubishi Eclipse GT','Audi Le Mans quattro','Jaguar XK'); $soortauto = $soort[$rij->soort]; if($data->cash < $geld6) { print ""; exit; } else{ mysql_query("UPDATE `[users]` SET `cash`=`cash`-'$geld6' WHERE `login`='$data->login'"); mysql_query("UPDATE `[auto]` SET `schade`=0 WHERE `owner`='$data->login' AND `id`='{$_GET['x']}'"); print ""; exit; } } } if(isset($_POST['verkoop'])) { $dbres = mysql_query("SELECT * FROM `[auto]` WHERE `owner`='$data->login' AND `id`='{$_GET['x']}'"); while($rij = mysql_fetch_object($dbres)) { if($data->land != $rij->land) { $land1 = Array("","Belgie","Duitsland","Engeland","Frankrijk","Griekenland","Italie","Aruba","Nederland",""); $land = $land1[$data->land]; print ""; exit; } else{ $waard = Array('','5000','10000','15000','20000','25000','30000','35000','40000','45000','50000','55000','60000','65000','70000','75000','80000','85000','90000','95000','100000','105000','110000','130000','130000','130000','140000'); $geld1 = Array('','200','500','600','900','1200','1500','1800','2100','2400','1700','2500','3000','2900','2700','3200','3500','3300','3900','4500','5000','5500','6000','7500','7500','7500','8000'); $geld2 = $geld1[$rij->soort]; $geld3 = $waard[$rij->soort]; $geld = $geld3-$rij->schade*$geld2; $soort = Array('','Seat','Opel','Nissan','Fiat','Ford','Mini','Toyota','Honda','Smart','Volkswagen','Lotus','Bmw','Dodge','Jeep','Pontiac','Mercedes','Eagle','CHrysler','Porsche','Jaguar','Viper','Ferarri','Ford Shelby GT500','Mitsubishi Eclipse GT','Audi Le Mans quattro','Jaguar XK'); $soortauto = $soort[$rij->soort]; if($geld < 1000) { $geld = 1000; } mysql_query("UPDATE `[users]` SET `cash`=`cash`+'$geld' WHERE `login`='$data->login'"); mysql_query("DELETE FROM `[auto]` WHERE `owner`='$data->login' AND `id`='{$_GET['x']}'"); print ""; exit; } } } if(isset($_POST['veiling'])) { $dbres = mysql_query("SELECT * FROM `[auto]` WHERE `owner`='$data->login' AND `id`='{$_GET['x']}'"); while($rij = mysql_fetch_object($dbres)) { $waard = Array('','5000','10000','15000','20000','25000','30000','35000','40000','45000','50000','55000','60000','65000','70000','75000','80000','85000','90000','95000','100000','105000','110000','130000','130000','130000','140000'); $geld1 = Array('','200','500','600','900','1200','1500','1800','2100','2400','1700','2500','3000','2900','2700','3200','3500','3300','3900','4500','5000','5500','6000','7500','7500','7500','8000'); $geld2 = $geld1[$rij->soort]; $geld3 = $waard[$rij->soort]; $geld = $geld3-$rij->schade*$geld2; if($geld < 1000) { $geld = 1000; } $soort = Array('','Seat','Opel','Nissan','Fiat','Ford','Mini','Toyota','Honda','Smart','Volkswagen','Lotus','Bmw','Dodge','Jeep','Pontiac','Mercedes','Eagle','CHrysler','Porsche','Jaguar','Viper','Ferarri','Ford Shelby GT500','Mitsubishi Eclipse GT','Audi Le Mans quattro','Jaguar XK'); $soortauto = $soort[$rij->soort]; mysql_query("INSERT INTO `[autoveiling]` (`plaatser`,`vid`,`wat`,`wat1`,`bod1`,`tijd`) values('$data->login','{$_GET['x']}','auto','$soortauto','$bod',NOW())"); mysql_query("UPDATE `[auto]` SET `veiling`=1 WHERE `id`='{$_GET['x']}'"); print ""; exit; } } $waard = Array('','5000','10000','15000','20000','25000','30000','35000','40000','45000','50000','55000','60000','65000','70000','75000','80000','85000','90000','95000','100000','105000','110000','130000','130000','130000','14000'); $geld1 = Array('','200','500','600','900','1200','1500','1800','2100','2400','1700','2500','3000','2900','2700','3200','3500','3300','3900','4500','5000','5500','6000','7500','7500','7500',''); $geld2 = $geld1[$rij->soort]; $geld3 = $waard[$rij->soort]; $geld = $geld3-$rij->schade*$geld2; $geld4 = Array('','400','1000','1200','1800','2400','3000','3600','4200','4800','3400','5000','6000','5800','5400','6400','7000','6600','7800','9000','10000','11000','12000','15000','15000','15000','17500'); $geld5 = $geld4[$rij->soort]; $geld6 = $rij->schade*$geld5; $soort = Array('','Seat','Opel','Nissan','Fiat','Ford','Mini','Toyota','Honda','Smart','Volkswagen','Lotus','Bmw','Dodge','Jeep','Pontiac','Mercedes','Eagle','CHrysler','Porsche','Jaguar','Viper','Ferarri','Ford Shelby GT500','Mitsubishi Eclipse GT','Audi Le Mans quattro','Jaguar XK'); $soortauto = $soort[$rij->soort]; if($geld < 1000) { $geld = 1000; } $land1 = Array("","Belgie","Duitsland","Engeland","Frankrijk","Griekenland","Italie","Aruba","Nederland",""); $land = $land1[$rij->land]; print <<
Garage
Deze auto is niet van jou.
Je hebt niet genoeg geld contant, je moet $geld6 contant hebben.
Je hebt je auto gerepareert.
Je auto staat niet $land.
Je hebt je auto verkocht.
Je hebt je auto verkocht verkocht.
ID: {$rij->id}
Auto: {$soortauto}
Schade: {$rij->schade}%
Waarde: €{$geld}
Reparatie: €{$geld6}
ENDHTML; if($rij->bezig == 0) { print << ENDHTML; if($rij->schade != 0){ print << ENDHTML; } print << ENDHTML; } exit; } } } else { print << ENDHTML; $dbres = mysql_query("SELECT * FROM `[auto]` WHERE `owner`='$data->login'"); while($rij = mysql_fetch_object($dbres)) { $soort = Array('','Seat','Opel','Nissan','Fiat','Ford','Mini','Toyota','Honda','Smart','Volkswagen','Lotus','Bmw','Dodge','Jeep','Pontiac','Mercedes','Eagle','CHrysler','Porsche','Jaguar','Viper','Ferarri','Ford Shelby GT500','Mitsubishi Eclipse GT','Audi Le Mans quattro','Jaguar XK'); $soortauto = $soort[$rij->soort]; $land = Array("Nederland","België","Duitsland","Frankrijk","Spanje","Portugal","Italië","Polen","Griekenland"); $land = $land[$rij->land]; echo(" "); } } } /* ------------------------- */ ?>
ID Auto Schade Meer
$rij->id
$soortauto
$rij->schade%
id}>
Meer