File: D:/HostingSpaces/SBogers10/vangogh.komma-mediadesign.nl/wwwroot/kms/project_overzicht.php
<h1>Projecten</h1>
<p><br /><a href="index.php?p=project_toevoegen" title="Project toevoegen">Project 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="220">Categorie</th>
<th width="100">Bouwjaar</th>
<th width="110">Wijzigen</th>
<th width="110">Verwijderen</th>
</tr>
<?php
$q_nieuws = "SELECT kms_projecten.project_id, kms_projecten.naam, kms_projecten.categorie, kms_projecten.bouwmaand, kms_projecten.bouwjaar, kms_projecten.image_dir FROM kms_projecten ORDER BY kms_projecten.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_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_nieuws[0]);
$r_foto = mysql_query($q_foto);
$rec_foto = mysql_fetch_array($r_foto);
if(!empty($rec_foto[0])){ ?><div class="thumb" style="width:125px; height:95px; margin-left:10px;"><img width="125" src="/project_images/<?php echo($rec_nieuws[5]); ?>/thumb_<?php echo($rec_foto[0]); ?>.jpg" alt="<?php echo(html_entity_decode($rec_nieuws[1])); ?>" /></div><?php } ?></td>
<td><?php echo(html_entity_decode($rec_nieuws[1])); ?></td>
<td><?php $rec_nieuws[2] = str_replace("_"," ",ucfirst($rec_nieuws[2])); echo(html_entity_decode($rec_nieuws[2])); ?></td>
<td><?php echo(html_entity_decode($rec_nieuws[3].", ".$rec_nieuws[4])); ?></td>
<td>
<a href="index.php?p=project_wijzigen&project_id=<?php echo($rec_nieuws[0]); ?>">Wijzigen</a>
<br /><br />
<a href="index.php?p=projectfoto_overzicht&project_id=<?php echo($rec_nieuws[0]); ?>">Foto´s wijzigen</a>
</td>
<td><a href="index.php?p=project_verwijderen&project_id=<?php echo($rec_nieuws[0]); ?>">Verwijderen</a>
<br /><br /><br />
</td>
</tr>
<?php } ?>
</table>