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/recent_project.php
<?php

	$q_project = "SELECT kms_projecten.project_id, kms_projecten.naam, kms_projecten.categorie, kms_projecten.bouwmaand, kms_projecten.bouwjaar, kms_projecten.architect, kms_projecten.locatie, kms_projecten.image_dir, kms_projecten.url FROM kms_projecten WHERE kms_projecten.sort_order = '1' OR kms_projecten.sort_order = '2' ORDER BY rand() LIMIT 0,1";
	
	$r_project = mysql_query($q_project);

	$rec_project = mysql_fetch_array($r_project);
	
	switch ($rec_project['bouwmaand']) {
		case "jan":	$maand = "Januari";	break;
		case "feb": $maand = "Februari"; break;
		case "mrt": $maand = "Maart"; break;
		case "apr": $maand = "April"; break; 
		case "mei": $maand = "Mei";	break;
		case "juni": $maand = "Juni"; break;
		case "julie": $maand = "Juli"; break;
		case "aug": $maand = "Augustus"; break;
		case "sept": $maand = "September"; break;
		case "okt": $maand = "Oktober"; break;
		case "nov": $maand = "November"; break;
		case "dec": $maand = "December"; break;
	}
	
	$categorie_naam = str_replace("_"," ",ucfirst($rec_project['categorie']));
	$categorie_naam = str_replace(" en "," &amp; ",$categorie_naam);
	$categorie_url = str_replace("_","-",$rec_project['categorie']);
	
	$q_foto = sprintf("SELECT kms_project_images.icon_dir FROM kms_project_images WHERE kms_project_images.project_id='%s' ORDER BY kms_project_images.sort_order ASC LIMIT 0,1", $rec_project['project_id']);
	$r_foto = mysql_query($q_foto);
	$rec_foto = mysql_fetch_array($r_foto);
	
?>

<div class="recentProject">
    <div class="image"><img src="/project_images/<?php echo($rec_project['image_dir']); ?>/tegel_<?php echo($rec_foto[0]); ?>.jpg" width="228" /></div>
    <span class="title"><a href="/projecten/<?php echo($categorie_url); ?>/<?php echo($rec_project['url']); ?>">Recent project:<br /><?php echo(html_entity_decode($rec_project['naam'])); ?></a></span>
    <div class="data">
        <em>Bouwjaar</em> <?php echo($maand); ?> <?php echo($rec_project['bouwjaar']); ?><br />
        <em>Architect</em> <?php echo(html_entity_decode($rec_project['architect'])); ?><br />
        <em>Locatie</em> <?php echo(html_entity_decode($rec_project['locatie'])); ?><br />
        <em>Categorie</em> <?php echo(html_entity_decode($categorie_naam)); ?>
    </div>       
</div>