<?php
$catName = getCategoryName($_GET['cat']);
?>
<div class="pmlt1"><img src="images/ic_p.gif" width="40" height="26"><?php echo $catName?></div>
<div class="h10"></div>
<?php 
$theCat = trim($_GET['cat']);
$sql = "SELECT * FROM posts, rel_post_cat
		WHERE posts.id = rel_post_cat.post_id
		AND posts.status <> 'deleted'
		AND rel_post_cat.cat_id = {$theCat} 
		ORDER BY posts.date DESC";
$pager = new Pager($nsodb, $sql, 8);
$posts = $pager->getResults();
if ($posts): foreach ($posts as $post):
	$image = getFileWithFullPathByPost($post['post_id'], 'image');
?>
<div class="pmlt3 pj2h10">
    <div class="pjtt"></div>
    <div class="pjltc pj2tc">
        <div class="pjltca"><a href="solution_detail.php?id=<?php echo $post['post_id']?>"><img src="<?php echo $image?>" alt="<?php echo $post['title']?>" border="0" height="94" width="94"></a></div>
        <div class="pjltcb pj2t">
            <h5><a href="solution_detail.php?id=<?php echo $post['post_id']?>" class="STYLE17"><?php echo $post['title']?></a></h5>
            <h6><?php echo $post['preview']?><a href="solution_detail.php?id=<?php echo $post['post_id']?>"><strong>[详细]</strong></a></h6>
        </div>
    </div>
</div>
<?php endforeach; endif;?>
<div class="pj2nex"><?php echo $pager->getNavigation(); ?></div>
<div class="h15"></div>
