<?php
$catName = getCategoryName($_GET['cat']);
?>
<div class="pmlt1"><img src="images/ic_p.gif"><?php echo $catName?></div>
<div class="h10"></div>
<div class="pmlt3">
    <div class="pjtt"></div>
    <div class="pjex">
        <h3>泽瑞为部分客户实施的项目</h3>
        <?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):
			$bigImage = getFileWithFullPathByPost($post['post_id'], 'image');
			$image = getImagePathBySize($bigImage, '200');
		?>
		
        <div class="pjex1">
            <div class="pjex1pic"><img width="148" height="90" src="<?php echo $image?>"></div>
            <div class="pjex1c">
                <p class="STYLE4">项目名称: <a href="solution_detail.php?id=<?php echo $post['post_id']?>"><?php echo $post['title']?></a></p>
                <p class="STYLE4">客户名称: <strong><?php echo $post['subtitle'];?></strong></p>
            </div>
        </div>
        <?php endforeach; endif;?>
        <div class="pj2nex"><?php echo $pager->getNavigation(); ?></div>
    </div>
</div>
<div class="h15"></div>