File: D:/HostingSpaces/SBogers25/superbedrukt.nl/wwwroot/kms/populair_overzicht.php
<h1>Populaire artikelen</h1>
<p><br /><a href="index.php?p=artikel_overzicht" title="Artikel overzicht">Om een artikel toe te voegen moet u naar het artikel 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="200">Naam</th>
<th width="200">Subcategorie</th>
<th width="80">Populair</th>
<th width="200">Verwijderen</th>
</tr>
<?php
$q_nieuws = "SELECT kms_articles.article_id, kms_articles.article_name, kms_articles.article_number, kms_articles.subcategorie_id, kms_articles.popular, kms_articles.image_dir FROM kms_articles WHERE kms_articles.popular='yes' ORDER BY kms_articles.subcategorie_id ASC";
$r_nieuws = mysql_query($q_nieuws);
$kleur = true;
while($rec_nieuws = mysql_fetch_array($r_nieuws)){ ?>
<tr height="140" <?php if($kleur) { echo("style=\"background-color:#eee\""); $kleur = false; }else{ $kleur = true; }?>>
<td><?php if(!empty($rec_nieuws[5])){ ?><div class="thumb" style="width:125px; height:125px; margin-left:10px;"><img src="../article_images/<?php echo($rec_nieuws[5]); ?>/thumb.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
$q_subcategorie = sprintf("SELECT kms_subcategories.subcategorie_name FROM kms_subcategories WHERE subcategorie_id='%s'", $rec_nieuws[3]);
$r_subcategorie = mysql_query($q_subcategorie);
$rec_subcategorie = mysql_fetch_array($r_subcategorie);
$subcategorie_naam = $rec_subcategorie['subcategorie_name'];
echo(html_entity_decode($subcategorie_naam));
?>
</td>
<td><?php if($rec_nieuws[4] == "yes"){ echo("ja"); }?></td>
<td><a href="index.php?p=populair_verwijderen&artikel_id=<?php echo($rec_nieuws[0]); ?>">Verwijderen uit de lijst</a></td>
</tr>
<?php } ?>
</table>