Wie |
Autoschade |
Bod |
Bieden |
ENDHTML;
$garage1 = mysql_query("SELECT * FROM `[autoveiling]` WHERE `soort`='{$_GET['A']}' ");
while($veiling = mysql_fetch_object($garage1))
{
$garage = mysql_query("SELECT * FROM `[auto]` WHERE `id`='$veiling->bel'");
$garage = mysql_fetch_object($garage);
print <<
$veiling->naam |
$garage->schade% |
€$veiling->bod |
Bieden/info |
ENDHTML;
}
}
else{
if(isset($_POST['submit']) && preg_match('/^[0-9]+$/',$_POST['bel'])) {
$_POST['inzet'] = substr($_POST['inzet'],0,11);
$prijs = $_POST['prijs'];
$bel = $_POST['bel'];
$info = $_POST['info'];
$dbres = mysql_query("SELECT * FROM `[auto]` WHERE `owner`='$data->login' AND `id`='$bel'");
while($rij = mysql_fetch_object($dbres)) {
$id1 = mysql_query("SELECT * FROM `[auto]` WHERE `id`='$bel'");
$id1 = mysql_num_rows($id1);
if($id1->bezig = 1){
print " \n";
exit;
}
if($id1 ==0){
print "Die auto is niet van jou. |
";
exit;
}
$auto = 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','Lamborghini Gallardo');
$soortauto = $auto[$rij->soort];
$dbres = mysql_query("SELECT `naam` FROM `[autoveiling]` WHERE `naam`='$data->login' AND `soort`='$rij->soort'");
$logincheck = mysql_fetch_object($dbres);
$logincheck1 = mysql_num_rows($dbres);
if ($logincheck1 >0){
print " | Je hebt al een $soortauto op autoveiling staan! | ";
exit;}
if($rij->soort >= 23){
print "$soortauto Kan je niet verkopen op de veiling. | \n";
exit;}
mysql_query("INSERT INTO `[autoveiling]` (date2,naam,bel,text,soort) values(NOW(),'$data->login','$bel','$info','$rij->soort')");
mysql_query("UPDATE `[auto]` SET `owner`='veiling' WHERE `id`='$bel'");
print "Je $soortauto staat op de veiing. | \n";
exit;
}
}
$select = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 1 AND id != '0'");
$aantal = mysql_num_rows($select);
$select2 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 2 AND id != '0'");
$aantal2 = mysql_num_rows($select2);
$select3 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 3 AND id != '0'");
$aantal3 = mysql_num_rows($select3);
$select4 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 4 AND id != '0'");
$aantal4 = mysql_num_rows($select4);
$select5 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 5 AND id != '0'");
$aantal5 = mysql_num_rows($select5);
$select6 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 6 AND id != '0'");
$aantal6 = mysql_num_rows($select6);
$select7 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 7 AND id != '0'");
$aantal7 = mysql_num_rows($select7);
$select8 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 8 AND id != '0'");
$aantal8 = mysql_num_rows($select8);
$select9 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 9 AND id != '0'");
$aantal9 = mysql_num_rows($select9);
$select10 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 10 AND id != '0'");
$aantal10= mysql_num_rows($select10);
$select11 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 11 AND id != '0'");
$aantal11 = mysql_num_rows($select11);
$select12 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 12 AND id != '0'");
$aantal12 = mysql_num_rows($select12);
$select13 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 13 AND id != '0'");
$aantal13 = mysql_num_rows($select13);
$select14 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 14 AND id != '0'");
$aantal14 = mysql_num_rows($select14);
$select15 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 15 AND id != '0'");
$aantal15 = mysql_num_rows($select15);
$select16 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 16 AND id != '0'");
$aantal16 = mysql_num_rows($select16);
$select17 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 17 AND id != '0'");
$aantal17 = mysql_num_rows($select17);
$select18 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 18 AND id != '0'");
$aantal18 = mysql_num_rows($select18);
$select19 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 19 AND id != '0'");
$aantal19 = mysql_num_rows($select19);
$select20 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 20 AND id != '0'");
$aantal20 = mysql_num_rows($select20);
$select21 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 21 AND id != '0'");
$aantal21 = mysql_num_rows($select21);
$select22 = mysql_query("SELECT * FROM `[autoveiling]` WHERE soort= 22 AND id != '0'");
$aantal22 = mysql_num_rows($select22);
print <<
Je hebt €$data->cash contant.
ENDHTML;
}
?> | | |