
<div id="main" class="mainwarp">

<div class="clear"></div>

<div class="postcontext">
    <div id="locationnav">当前位置：
        <a href="index.php">首页</a> >
        <a href="index.php?md=Affiliate_PZone_Views_Post&cateid=<?php echo $this->p_cateid; ?>"><?php echo $this->p_posts['catename']; ?></a> >
        文章列表
    </div>
    <?php
        if($this->p_haveposts) {
            $sectionHTML = '<div class="list-section"><p class="list_title"><a href="index.php?md=Affiliate_PZone_Views_Post&id=%s">%s</a></p><p class="postpreview">%s<a href="index.php?md=Affiliate_PZone_Views_Post&id=%s" target="_blank">[阅读全文]</a></p><p class="postattrs">%s</p></div>';
            foreach($this->p_posts['articles'] as $post) {
                echo sprintf($sectionHTML,$post['ID'],$post['title'],cut_str(str_replace('&nbsp;','',strip_tags($post['context'])),200),$post['ID'],$post['postime']);
            }
            if($this->p_posts['paged']) {
                $pageNavHTML = '<div class="pagenav">第%d/%d页 每页显示%d条记录 共%d条记录 <a href="index.php?md=Affiliate_PZone_Views_Post&cateid=%s&pageid=%d">上一页</a> <a href="index.php?md=Affiliate_PZone_Views_Post&cateid=%s&pageid=%d">下一页</a></div>';
                echo sprintf($pageNavHTML,
                    $this->p_posts['pagenav']['page'],
                    $this->p_posts['pagenav']['pages'],
                    $this->p_posts['pagenav']['limit'],
                    $this->p_posts['pagenav']['total'],
                    $this->p_cateid,
                    $this->p_posts['pagenav']['page']-1,
                    $this->p_cateid,
                    $this->p_posts['pagenav']['page']+1
                );
            }
        }else {
            QUnit_Global::includeTemplate('404.tpl.php');
        }
    ?>
</div>


<?php QUnit_Global::includeTemplate('sidebox.tpl.php'); ?>

<div class="clear"></div>

</div>