?>
            </li><?php 
    }
}
?>
         </ul>
      </nav>
   </div>
</header>

<?php 
$term = sp_get_term($_GET['id']);
$child_terms = sp_get_child_terms($term['parent']);
$pterm = sp_get_term($term['parent']);
$nav_label = $pterm['name'];
$lists = sp_sql_posts_paged_bycatid($_GET['id'], "order:post_modified DESC,listorder ASC;", 33, "{prev}{liststart}{list}{listend}{next}");
$kaoyan_img = sp_getslide('kaoyan_img');
$kyimg = $kaoyan_img[0];
$nav_label = isset($nav_label) ? $nav_label : $post_title;
$nid = sp_nav_id($nav_label);
$nav_cid = sp_nav_cid($nid);
if ($nav_cid == 1) {
    $navList = tree_to_list($navTree);
} else {
    $navT = sp_get_menu_tree($nav_cid);
    $navList = tree_to_list($navT);
}
$snav = getParents($navList, $nid);
$parent_sid = $snav[0]['id'];
$parent_slabel = $snav[0]['label'];
$parent_shref = $snav[0]['href'];
    }
}
?>
            &nbsp;<span><?php 
echo $nav_label;
?>
</span>
        </div>
    </div>
</div>
</div>
<?php 
$term_id = I('get.id', 1);
$childterm = sp_get_child_terms($term_id);
$type = isset($_GET['type']) ? $_GET['type'] : $_GET['id'];
$lists = $type == $_GET['id'] ? sp_sql_posts_paged_bycatid($_GET['id'], $tag, 12, "{prev}{liststart}{list}{listend}{next}") : sp_sql_posts_paged("cid:{$type};order:post_modified DESC;", 12, "{prev}{liststart}{list}{listend}{next}");
?>
<section class="contentbox">
	<div class="container">
    	<div class="conboxcon">
			<div class="conboxcon_1">
				<div class="lecturecont">
					<div class="recselcon">
						<ul class="res_sel">
							<li <?php 
if ($type == I('id')) {
    ?>
class="active"<?php 
}
?>
>
}
?>
            &nbsp;<span><?php 
echo $nav_label;
?>
</span>
        </div>
    </div>
</div>
</div>
<?php 
$term_id = I('get.id', 1);
$childterm = sp_get_child_terms($term_id);
$type = isset($_GET['type']) ? $_GET['type'] : $_GET['id'];
$tag = "field:post_title,post_content,post_modified,post_source,smeta;limit:0,8;order:listorder asc,post_modified desc;";
$lists = $type == $_GET['id'] ? sp_sql_posts_paged_bycatid($_GET['id'], $tag, 12, "{prev}{liststart}{list}{listend}{next}") : sp_sql_posts_paged_bycatid($type, $tag, 12, "{prev}{liststart}{list}{listend}{next}");
$posts = array_chunk($lists['posts'], 4);
?>
<section class="contentbox">
	<div class="container">
    	<div class="conboxcon">
			<div class="conboxcon_1">
				<div class="lecturecont">
					<div class="recselcon">
						<ul class="res_sel">
							<li <?php 
if ($type == I('id')) {
    ?>
class="active"<?php 
}
?>
</a>
                </dt><?php 
        }
    }
} else {
    echo "";
}
?>
                
            </dl>
        </div>
		<div class="main">                                            
			<?php 
$type = isset($_GET['type']) ? $_GET['type'] : $_GET['id'];
$type = isset($_GET['type']) ? $_GET['type'] : $_GET['id'];
$lists = $type == $_GET['id'] ? sp_sql_posts_paged_bycatid($_GET['id'], "order:listorder ASC,post_modified DESC;", 33, "{prev}{liststart}{list}{listend}{next}") : sp_sql_posts_paged("cid:{$type};order:listorder ASC,post_modified DESC;;", 33, "{prev}{liststart}{list}{listend}{next}");
?>
	    	<div style="height:100px;"></div>       
		    <div id="pageflow" class="page-content clearfix enable-waterflow waterfall-container">
		    	<?php 
if (is_array($lists['posts'])) {
    $i = 0;
    $__LIST__ = $lists['posts'];
    if (count($__LIST__) == 0) {
        echo "";
    } else {
        foreach ($__LIST__ as $key => $vo) {
            $mod = $i % 2;
            ++$i;
            ?>
<div class="block item">