Prev
Next
-
$status = " WHERE status = 'tekoop' ";
if ($_GET['show']) {
$status = " WHERE status = '".mysql_real_escape_string($_GET['show'])."' ";
}
$q = "SELECT * FROM autos_taal ".$status." ORDER BY volgorde";
$r = db_query($q);
$i = 0;
$start = 1;
while ($a = db_fetch_array($r)) {
$img = '';
$q = "SELECT fotos.foto FROM fotos,autos_fotos WHERE autos_fotos.auto = '".$a['id']."' AND fotos.id = autos_fotos.foto ORDER BY volgorde LIMIT 1";
$re = db_query($q);
if (db_num_rows($re) == 1) {
$foto = db_fetch_array($re);
if (file_exists('../beheer/fotos/'.str_replace(".jpg","",$foto['foto']).'_158.jpg')) {
$foto['foto'] = str_replace(' ','%20', $foto['foto']);
$img = '';
}
}
$i++;
if ($_REQUEST['id'] == $a['id']) $start = $i;
if ($img != '') {
?>
- } } ?>
$q = "SELECT fotos.foto FROM fotos,autos_fotos WHERE autos_fotos.auto = '".$_REQUEST['id']."' AND fotos.id = autos_fotos.foto ORDER BY volgorde";
$re = db_query($q);
if (db_num_rows($re) > 0) {
$i = 1;
while ($foto = db_fetch_array($re)) {
if ($i == 1) {
if (file_exists('../beheer/fotos/'.str_replace(".jpg","",$foto['foto']).'_410.jpg') && file_exists('../beheer/fotos/'.str_replace(".jpg","",$foto['foto']).'_650.jpg')) {
$foto['foto'] = str_replace(' ','%20', $foto['foto']);
$img = '';
}
}
else {
$class = ($i > 3)?'':'';
if (file_exists('../beheer/fotos/'.str_replace(".jpg","",$foto['foto']).'_158.jpg') && file_exists('../beheer/fotos/'.str_replace(".jpg","",$foto['foto']).'_650.jpg')) {
$foto['foto'] = str_replace(' ','%20', $foto['foto']);
$imgs[] = '';
}
}
$i++;
}
}
?>
if ($auto['verkocht_datum'] != '') { ?>
} ?>
} ?>
// foto's
if (is_array($imgs)) {
foreach($imgs as $i) {
echo $i;
}
}
?>
<
<