HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/vangogh.komma-mediadesign.nl/wwwroot/kms/auto_overzicht.php
<h1>Auto's</h1>

<p><br /><a href="index.php?p=auto_toevoegen" title="Auto toevoegen">Auto toevoegen</a></p>

<table cellpadding="20" cellspacing="0" border="0">
    <tr height="40">
        <th width="150"><span style="padding-left:10px;">Image</span></th>
        <th width="260">Naam</th>
        <th width="125">Prijs</th>
        <th width="100">Bouwjaar</th>
        <th width="100">Verkocht</th>
        <th width="110">Wijzigen</th>
        <th width="110">Verwijderen</th>
    </tr>

<?php
	
	$q_nieuws = "SELECT kms_autos.auto_id, kms_autos.naam, kms_autos.prijs, kms_autos.brand_id, kms_autos.bouwmaand, kms_autos.bouwjaar, kms_autos.verkocht, kms_autos.image_dir FROM kms_autos ORDER BY kms_autos.naam ASC";

		
	$r_nieuws = mysql_query($q_nieuws);
	
	$kleur = true;
	
	while($rec_nieuws = mysql_fetch_array($r_nieuws)){ ?>
        <tr height="120" <?php if($kleur) { echo("style=\"background-color:#eee\""); $kleur = false; }else{ $kleur = true; }?>>
        
            <td><?php 
					$q_foto = sprintf("SELECT kms_images.icon_dir FROM kms_images WHERE kms_images.auto_id='%s' ORDER BY kms_images.sort_order ASC LIMIT 0,1", $rec_nieuws[0]);
					$r_foto = mysql_query($q_foto);
					$rec_foto = mysql_fetch_array($r_foto);
			
			if(!empty($rec_nieuws[7])){ ?><div class="thumb" style="width:125px; height:95px; margin-left:10px;"><img width="125" src="/auto_images/<?php echo($rec_nieuws[7]); ?>/tegel_<?php echo($rec_foto[0]); ?>.jpg" alt="<?php echo(html_entity_decode($rec_nieuws[1])); ?>" /></div><?php } ?></td>
            <td>
				<?php 
					$q_merk = sprintf("SELECT kms_brands.brand_name FROM kms_brands WHERE brand_id='%s'", $rec_nieuws[3]);
					$r_merk = mysql_query($q_merk);
					$rec_merk = mysql_fetch_array($r_merk);
					
					echo(html_entity_decode($rec_merk['brand_name']." ".$rec_nieuws[1])); 
				?>   
			</td>
            
            <td>&euro; <?php echo(html_entity_decode($rec_nieuws[2])); ?></td>
            
            <td><?php echo(html_entity_decode($rec_nieuws[4].", ".$rec_nieuws[5])); ?></td>
         
            <td><?php if($rec_nieuws[6] == "ja"){ echo("ja"); }else{ echo("nee"); }?></td>
            
            <td>
            
            <a href="index.php?p=auto_wijzigen&amp;auto_id=<?php echo($rec_nieuws[0]); ?>">Wijzigen</a>
            <br /><br />
            <a href="index.php?p=foto_overzicht&amp;auto_id=<?php echo($rec_nieuws[0]); ?>">Foto´s wijzigen</a>

            </td>
            <td><a href="index.php?p=auto_verwijderen&amp;auto_id=<?php echo($rec_nieuws[0]); ?>">Verwijderen</a>
            <br /><br /><br />
            </td>
        </tr>
<?php } ?>

</table>