File: D:/HostingSpaces/SBogers10/vangogh.komma-mediadesign.nl/wwwroot/kms/logboek_overzicht.php
<?php
$ontwikkeling_id = $_GET['ontwikkeling_id'];
$ontwikkeling_id = checkData($ontwikkeling_id);
$q_nieuws = sprintf("SELECT kms_projectontwikkeling.naam, kms_projectontwikkeling.image_dir FROM kms_projectontwikkeling WHERE ontwikkeling_id='%s'", $ontwikkeling_id);
$r_nieuws = mysql_query($q_nieuws);
$rec_nieuws = mysql_fetch_array($r_nieuws);
$ontwikkeling_naam = html_entity_decode($rec_nieuws['naam']);
$ontwikkeling_image_dir = $rec_nieuws['image_dir'];
?>
<h1>Logboek van <?php echo($ontwikkeling_naam ); ?></h1>
<p><br /><a href="index.php?p=logboek_toevoegen&ontwikkeling_id=<?php echo($ontwikkeling_id); ?>" title="Logboek item toevoegen">Logboek item toevoegen</a> | <a href="index.php?p=ontwikkeling_overzicht" title="Terug naar het overzicht">Terug naar het overzicht</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="400">Naam</th>
<th width="150">Datum</th>
<th width="110">Wijzigen</th>
<th width="110">Verwijderen</th>
</tr>
<?php
$q_nieuws = "SELECT kms_ontwikkeling_logboek.logboek_id, kms_ontwikkeling_logboek.naam, kms_ontwikkeling_logboek.datum, kms_ontwikkeling_logboek.image_dir FROM kms_ontwikkeling_logboek WHERE ontwikkeling_id = '$ontwikkeling_id' ORDER BY kms_ontwikkeling_logboek.datum DESC";
$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_logboek_images.icon_dir FROM kms_logboek_images WHERE kms_logboek_images.logboek_id='%s' ORDER BY kms_logboek_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="/ontwikkeling_images/<?php echo($ontwikkeling_image_dir); ?>/<?php echo($rec_nieuws[3]); ?>/thumb_<?php echo($rec_foto[0]); ?>.jpg" alt="<?php echo(html_entity_decode($rec_nieuws[1])); ?>" /></div></td>
<?php } ?>
<td><?php echo(html_entity_decode($rec_nieuws[1])); ?></td>
<td><?php echo(date_dutch($rec_nieuws[2])); ?></td>
<td>
<a href="index.php?p=logboek_wijzigen&ontwikkeling_id=<?php echo($ontwikkeling_id); ?>&logboek_id=<?php echo($rec_nieuws[0]); ?>">Wijzigen</a>
<br /><br />
<a href="index.php?p=logboekfoto_overzicht&ontwikkeling_id=<?php echo($ontwikkeling_id); ?>&logboek_id=<?php echo($rec_nieuws[0]); ?>">Foto's beheren</a>
</td>
<td><a href="index.php?p=logboek_verwijderen&ontwikkeling_id=<?php echo($ontwikkeling_id); ?>&logboek_id=<?php echo($rec_nieuws[0]); ?>">Verwijderen</a>
<br /><br /><br />
</td>
</tr>
<?php } ?>
</table>