<?php if ($current['content']) : ?>
    <div class="html">
        <?php echo $current['content']; ?>
    </div>
<?php endif; ?>

<div class="cat clear">
    <?php foreach ($child as $c) : ?>
        <div class="item">
            <a class="title" href="product/index/<?php echo htmlspecialchars($path . $c['path']); ?>"><?php echo htmlspecialchars($c['name']); ?></a><br />
            <?php if ($c['image']) : ?>
                <table><tr><td>
                    <a class="image" href="product/index/<?php echo htmlspecialchars($path . $c['path']); ?>">
                        <img src="<?php echo htmlspecialchars(category::DIRECTORY . $c['image'] . '-m.jpg'); ?>" />
                    </a>
                </td></tr></table>
            <?php endif; ?>
        </div>
    <?php endforeach; ?>
</div>

<div class="prod">
    <?php foreach ($product as $p) : ?>
        <div class="item">
            <div class="clear">
                <div class="image">
                    <p>
                        <?php if ($p['image']) : ?>
                            <a class="thumb" href="product/view/<?php echo htmlspecialchars($path . $p['path']); ?>"><img src="<?php echo htmlspecialchars(product::DIRECTORY . $p['image'] . '-m.jpg' . '?' . time()); ?>" /></a><br />
                            <a class="price" href="product/view/<?php echo htmlspecialchars($path . $p['path']); ?>"><?php echo htmlspecialchars($p['price']); ?></a>
                        <?php endif; ?>
                    </p>
                </div>
                <div class="detail">
                    <p class="name"><a href="product/view/<?php echo htmlspecialchars($path . $p['path']); ?>"><?php echo htmlspecialchars($p['name']); ?></a></p>
                    <?php if (!$p['image']) : ?>
                        <p class="price"><?php echo htmlspecialchars($p['price']); ?></p>
                    <?php endif; ?>
                    <?php if ($p['part']) : ?>
                        <p class="part">Part Number: <?php echo htmlspecialchars($p['part']); ?></p>
                    <?php endif; ?>
                    <?php $feature = explode("\n", trim($p['feature'])); ?>
                    <?php if ($feature) : ?>
                        <ul class="feature">
                            <?php foreach ($feature as $f) : ?>
                                <?php if ($f = trim($f)) : ?>
                                    <li><?php echo htmlspecialchars($f); ?></li>
                                <?php endif; ?>
                            <?php endforeach; ?>
                        </ul>
                    <?php endif; ?>
                </div>
            </div>
            <?php if ($description = trim($p['description'])) : ?>
                <p class="desc html"><?php echo $description; ?></p>
            <?php endif; ?>
        </div>
    <?php endforeach; ?>
</div>