File: D:/HostingSpaces/SBogers25/superbedrukt.nl/wwwroot/kms/kleur_overzicht.php
<?php
$artikel_id = $_GET['artikel_id'];
$artikel_id = checkData($artikel_id);
$q_dirname = sprintf("SELECT kms_articles.article_name, kms_articles.image_dir FROM kms_articles WHERE article_id='%s' LIMIT 0,1", $artikel_id);
$r_dirname = mysql_query($q_dirname);
$rec_dirname = mysql_fetch_array($r_dirname);
$artikel_naam = $rec_dirname['article_name'];
$dirname = $rec_dirname['image_dir'];
?>
<h1>Kleuren bij <?php echo($artikel_naam); ?></h1>
<p><br /><a href="index.php?p=kleur_toevoegen&artikel_id=<?php echo($artikel_id); ?>" title="Kleur toevoegen">Kleur toevoegen</a> | <a href="index.php?p=artikel_overzicht" title="Artikelen overzicht">Naar het artikelen 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 van de kleur</th>
<th width="110">Wijzigen</th>
<th width="110">Verwijderen</th>
</tr>
<?php
$q_cases = sprintf("SELECT kms_colors.color_id, kms_colors.color_name, kms_colors.icon_dir FROM kms_colors WHERE article_id='%s' ORDER BY kms_colors.color_name ASC", $artikel_id);
$r_cases = mysql_query($q_cases);
$kleur = true;
while($rec_cases = mysql_fetch_array($r_cases)){ ?>
<tr height="40" <?php if($kleur) { echo("style=\"background-color:#eee\""); $kleur = false; }else{ $kleur = true; }?>>
<td><?php if(!empty($rec_cases[2])){ ?><div class="thumb" style="width:40px; height:30px; margin-left:10px;"><img src="../article_images/<?php echo($dirname); ?>/kleur_<?php echo($rec_cases[2]); ?>.jpg" alt="<?php echo(html_entity_decode($rec_cases[1])); ?>" /></div><?php } ?></td>
<td><?php echo(html_entity_decode($rec_cases[1])); ?></td>
<td><a href="index.php?p=kleur_wijzigen&kleur_id=<?php echo($rec_cases[0]); ?>&artikel_id=<?php echo($artikel_id); ?>">Wijzigen</a></td>
<td><a href="index.php?p=kleur_verwijderen&kleur_id=<?php echo($rec_cases[0]); ?>&artikel_id=<?php echo($artikel_id); ?>">Verwijderen</a></td>
</tr>
<?php } ?>
</table>