<?php  /* Template Name:首页模板 */  ?>



<!--站内信息统计开始-->
<div class="sjwu">
<div class="list-box list-index">
<div class="hat"><h3 class="ti ascbg"><i class="fa fa-bars"></i>数据统计</h3>
<ul>
<li><i class="fa fa-plus-square-o"></i><font color="#FFD700"><b>共：<?php  echo SiteNav_all_artiles();  ?></b>个文章</font>
<li><i class="fa fa-plus-square-o"></i><font color="#FF0000"><b>共：<?php  echo SiteNav_all_categorys();  ?></b>个分类</font>
<li><i class="fa fa-plus-square-o"></i><font color="#CD00CD"><b>共：<?php  echo SiteNav_all_comments();  ?></b>个评论</font>
<li><i class="fa fa-plus-square-o"></i><font color="#9932CC"><b>共：<?php  echo SiteNav_all_tags();  ?></b>个标签</font>
<li><i class="fa fa-plus-square-o"></i><font color="#FFFF00"><b>共：<?php  echo SiteNav_all_pages();  ?></b>个页面</font>
<li><i class="fa fa-plus-square-o"></i><font color="#00CD00"><b>共：<?php  echo SiteNav_all_views();  ?></b>次访问</font>
<li><i class="fa fa-plus-square-o"></i><font color="#FF8C00"><b>快审QQ：1735737677</b></font>
</ul>
</div></div>
</div>
<!--站内信息统计结束-->	


    <?php if ($zbp->Config('SiteNav')->SiteNav_ihotset=='2') { ?>
<div class="wrap">
    <div class="list-box index-hot">
        <div class="item">
            <ul class="clearfix">
        <?php 
        $order = array('log_ViewNums'=>'DESC');
        $where = array(array('=','log_Status','0'));
        $array = $zbp->GetArticleList(array('*'),$where,$order,array($zbp->Config('SiteNav')->SiteNav_cmsanum),'');
         ?>
        <?php  foreach ( $array as $article) { ?>
            <?php 
            $aurl=SiteNav_xyascii($article->Metas->alink);
            $aico=$article->Metas->aicon;
             ?>
            <li><a href="<?php  echo $article->Url;  ?>"<?php if ($article->Metas->alink!="" && $article->Metas->djump!=1) { ?> onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?><?php if ($article->Metas->fcolor!="" || $article->Metas->fweight==1) { ?> style="<?php if ($article->Metas->fweight==1) { ?>font-weight:bold;<?php } ?><?php if ($article->Metas->fcolor!="") { ?>color:<?php  echo $article->Metas->fcolor;  ?>;<?php } ?>"<?php } ?><?php if ($article->Metas->djump==1 || $article->Metas->alink=="") { ?> class="io"<?php } ?> target="_blank"><?php if ($article->Metas->aicon!="") { ?><img src="<?php  echo $article->Metas->aicon;  ?>" alt="<?php  echo $article->Title;  ?>"><?php }else{  ?><?php  echo $article->Title;  ?><?php } ?></a><?php if ($zbp->Config('SiteNav')->SiteNav_cmshover!="0") { ?><div><?php $description = preg_replace('/\s{2,}|　|(\&nbsp\;|\xc2\xa0)+/', '', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),48))); ?><?php  echo $description;  ?></div><?php } ?></li>
        <?php }   ?>
            </ul>
        </div>
    </div>
</div>
    <?php }elseif($zbp->Config('SiteNav')->SiteNav_ihotset=='1') {  ?>
<div class="wrap">
    <div class="list-box index-hot">
        <div class="item">
            <ul class="clearfix">
        <?php  $array = explode(',',$zbp->Config('SiteNav')->SiteNav_ihotaid);  ?>
        <?php  foreach ( $array as $ihot) { ?>
            <?php  $article=GetPost((int)$ihot);  ?>
            <?php 
            $aurl=SiteNav_xyascii($article->Metas->alink);
            $aico=$article->Metas->aicon;
             ?>
            <li><a href="<?php  echo $article->Url;  ?>"<?php if ($article->Metas->alink!="" && $article->Metas->djump!=1) { ?> onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?><?php if ($article->Metas->fcolor!="" || $article->Metas->fweight==1) { ?> style="<?php if ($article->Metas->fweight==1) { ?>font-weight:bold;<?php } ?><?php if ($article->Metas->fcolor!="") { ?>color:<?php  echo $article->Metas->fcolor;  ?>;<?php } ?>"<?php } ?><?php if ($article->Metas->djump==1 || $article->Metas->alink=="") { ?> class="io"<?php } ?> target="_blank"><?php if ($article->Metas->aicon!="") { ?><img src="<?php  echo $article->Metas->aicon;  ?>" alt="<?php  echo $article->Title;  ?>"><?php }else{  ?><?php  echo $article->Title;  ?><?php } ?></a><?php if ($zbp->Config('SiteNav')->SiteNav_cmshover!="0") { ?><div><?php $description = preg_replace('/\s{2,}|　|(\&nbsp\;|\xc2\xa0)+/', '', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),48))); ?><?php  echo $description;  ?></div><?php } ?></li>
        <?php }   ?>
            </ul>
        </div>
    </div>
</div>
    <?php }else{  ?>
    <?php } ?>
    <?php if ($zbp->Config('SiteNav')->SiteNav_itopvad!="") { ?>
    <div class="wvshow wrap">
        <?php  echo $zbp->Config('SiteNav')->SiteNav_itopvad;  ?>
    </div>
    <?php } ?>
<?php if ($zbp->Config('SiteNav')->SiteNav_cmsid!="") { ?>
    <?php if ($zbp->Config('SiteNav')->SiteNav_cmstii!="") { ?>
    <span class="sn_cmstii"><?php  echo $zbp->Config('SiteNav')->SiteNav_cmstii;  ?></span>
    <?php } ?>
    <div class="index-content wrap">
    <?php 
    $cmsid=explode('-',$zbp->Config('SiteNav')->SiteNav_cmsid);
    $cmsnum=count($cmsid);
     ?>        
    <?php  for( $x=0; $x<$cmsnum; $x++) { ?> 
        <div class="list-box list-index">
            <div class="hat">
                <h3 class="ti ascbg"><i class="fa fa-bars"></i><a href="<?php  echo $categorys[$cmsid[$x]]->Url;  ?>" title="更多<?php  echo $categorys[$cmsid[$x]]->Name;  ?>内容"><?php  echo $categorys[$cmsid[$x]]->Name;  ?></a></h3>
                <ul>
<?php 
$str='';
$where=array(array('=','cate_ParentID',$cmsid[$x]));        
$array=$zbp->GetCategoryList(null,$where,array('cate_Order'=>'ASC'),null,null);
foreach ($array as $cate){
    $str.='<li><i class="fa fa-plus-square-o"></i><a href="'.$cate->Url.'">'.$cate->Name.'</a></li>';
}
echo $str;
 ?>
                </ul>
                <a href="javascript:;" class="arr"><i class="fa fa-chevron-up"></i></a>
            </div>
            <div class="item">
                <ul class="clearfix">
        <?php  foreach ( GetList($zbp->Config('SiteNav')->SiteNav_cmsanum,$cmsid[$x], null, null, null, null, array("only_ontop"  => true)) as $article) { ?>
            <?php 
            $aurl=SiteNav_xyascii($article->Metas->alink);
            $aico=$article->Metas->aicon;
             ?>
                    <li class="d"><a href="<?php  echo $article->Url;  ?>"<?php if ($article->Metas->alink!="" && $article->Metas->djump!=1) { ?> onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?><?php if ($article->Metas->fcolor!="" || $article->Metas->fweight==1) { ?> style="<?php if ($article->Metas->fweight==1) { ?>font-weight:bold;<?php } ?><?php if ($article->Metas->fcolor!="") { ?>color:<?php  echo $article->Metas->fcolor;  ?>;<?php } ?>"<?php } ?><?php if ($article->Metas->djump==1 || $article->Metas->alink=="") { ?> class="io"<?php } ?> target="_blank"><?php if ($article->Metas->aicon!="") { ?><img src="<?php  echo $article->Metas->aicon;  ?>" alt="<?php  echo $article->Title;  ?>"><?php }else{  ?><?php  echo $article->Title;  ?><?php } ?></a><?php if ($zbp->Config('SiteNav')->SiteNav_cmshover!="0") { ?><div><?php $description = preg_replace('/\s{2,}|　|(\&nbsp\;|\xc2\xa0)+/', '', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),48))); ?><?php  echo $description;  ?></div><?php } ?></li>
        <?php }   ?>
        <?php if ($zbp->Config('SiteNav')->SiteNav_cmsubs=='1') { ?>
            <?php  $cmsubs = array("has_subcate"  => true);  ?>
        <?php }else{  ?>
            <?php  $cmsubs = null;  ?>
        <?php } ?>
        <?php  foreach ( GetList($zbp->Config('SiteNav')->SiteNav_cmsanum,$cmsid[$x], null, null, null, null, $cmsubs) as $article) { ?>
            <?php 
            $aurl=SiteNav_xyascii($article->Metas->alink);
            $aico=$article->Metas->aicon;
             ?>
                <?php if (!$article->IsTop) { ?>
                    <li><a href="<?php  echo $article->Url;  ?>"<?php if ($article->Metas->alink!="" && $article->Metas->djump!=1) { ?> onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?><?php if ($article->Metas->fcolor!="" || $article->Metas->fweight==1) { ?> style="<?php if ($article->Metas->fweight==1) { ?>font-weight:bold;<?php } ?><?php if ($article->Metas->fcolor!="") { ?>color:<?php  echo $article->Metas->fcolor;  ?>;<?php } ?>"<?php } ?><?php if ($article->Metas->djump==1 || $article->Metas->alink=="") { ?> class="io"<?php } ?> target="_blank"><?php if ($article->Metas->aicon!="") { ?><img src="<?php  echo $article->Metas->aicon;  ?>" alt="<?php  echo $article->Title;  ?>"><?php }else{  ?><?php  echo $article->Title;  ?><?php } ?></a><?php if ($zbp->Config('SiteNav')->SiteNav_cmshover!="0") { ?><div><?php $description = preg_replace('/\s{2,}|　|(\&nbsp\;|\xc2\xa0)+/', '', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),48))); ?><?php  echo $description;  ?></div><?php } ?></li>
                <?php } ?>
        <?php }   ?>
                </ul>
            </div>
        </div>
    <?php  }   ?>
    </div>
<?php }else{  ?>
    <div class="list-box nocms">暂无分类列表内容！请在后台主题配置中按需选择分类。<a href="<?php  echo $host;  ?>zb_users/theme/SiteNav/main.php?act=config">进入[主题配置]</a><p>—— <a href="http://www.yiwuku.com" target="_blank">www.yiwuku.com</a> ——</p></div>
<?php } ?>
<?php if ($zbp->Config('SiteNav')->SiteNav_foucset!="4" && $zbp->Config('SiteNav')->SiteNav_rtpset!="3") { ?>
    <div class="top-show wrap">
    <?php if ($zbp->Config('SiteNav')->SiteNav_foucset=='1') { ?>
        <div class="leftp focus-box">
            <div id="myFocus">
                <div class="pic">
                    <ul>
        <?php  $array = explode(',',$zbp->Config('SiteNav')->SiteNav_foucsaid);  ?>
        <?php  foreach ( $array as $focusp) { ?>
            <?php  $article=GetPost((int)$focusp);  ?>
            <?php  $aurl=SiteNav_xyascii($article->Metas->alink);  ?>
                        <li><a href="<?php  echo $article->Url;  ?>" target="blank"<?php if ($article->Metas->alink!="" && $article->Metas->djump!=1) { ?> onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?>><img src="<?php  echo SiteNav_thumb(1,$article);  ?>" alt="<?php  echo $article->Title;  ?>" /></a></li>
        <?php }   ?>
                    </ul>
                </div>
            </div>
        </div>
    <?php }elseif($zbp->Config('SiteNav')->SiteNav_foucset=='2') {  ?>
        <div class="leftp focus-box">
            <div id="myFocus">
                <div class="pic">
                    <ul>
        <?php  foreach ( GetList($zbp->Config('SiteNav')->SiteNav_foucscnum,$zbp->Config('SiteNav')->SiteNav_foucscid) as $article) { ?>
            <?php  $aurl=SiteNav_xyascii($article->Metas->alink);  ?>
                        <li><a href="<?php  echo $article->Url;  ?>" target="blank"<?php if ($article->Metas->alink!="" && $article->Metas->djump!=1) { ?> onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?>><img src="<?php  echo SiteNav_thumb(1,$article);  ?>" alt="<?php  echo $article->Title;  ?>" /></a></li>
        <?php }   ?>
                    </ul>
                </div>
            </div>
        </div>
    <?php }else{  ?>
        <div class="leftp"><?php  echo $zbp->Config('SiteNav')->SiteNav_ifocusad;  ?></div>
    <?php } ?>
	
    <?php if ($zbp->Config('SiteNav')->SiteNav_rtpset=='1') { ?>
        <?php  $array = explode(',',$zbp->Config('SiteNav')->SiteNav_rtpaid);  ?>
        <?php  foreach ( $array as $artp) { ?>
            <?php  $article=GetPost((int)$artp);  ?>
            <?php  $aurl=SiteNav_xyascii($article->Metas->alink);  ?>
        <div class="rtp">
            <a href="<?php  echo $article->Url;  ?>" target="blank" title="<?php  echo $article->Title;  ?>"<?php if ($article->Metas->alink!="" && $article->Metas->djump!=1) { ?> onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?>><img src="<?php  echo SiteNav_thumb(2,$article);  ?>" alt="<?php  echo $article->Title;  ?>"></a>
            <div class="bg"></div><p><?php  echo $article->Title;  ?></p>
        </div>
        <?php }   ?>
    <?php }else{  ?>
        <?php  foreach ( GetList(8, $zbp->Config('SiteNav')->SiteNav_rtpcid, null, null, null, null, array("only_ontop"  => true)) as $article) { ?>
            <?php  $aurl=SiteNav_xyascii($article->Metas->alink);  ?>
        <div class="rtp d">
            <a href="<?php  echo $article->Url;  ?>" target="blank" title="<?php  echo $article->Title;  ?>"<?php if ($article->Metas->alink!="" && $article->Metas->djump!=1) { ?> onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?>><img src="<?php  echo SiteNav_thumb(2,$article);  ?>" alt="<?php  echo $article->Title;  ?>"></a>
            <div class="bg"></div><p><?php  echo $article->Title;  ?></p>
        </div>
        <?php }   ?>
        <?php  foreach ( GetList(10,$zbp->Config('SiteNav')->SiteNav_rtpcid) as $article) { ?>
            <?php  $aurl=SiteNav_xyascii($article->Metas->alink);  ?>
            <?php if (!$article->IsTop) { ?>
        <div class="rtp">
            <a href="<?php  echo $article->Url;  ?>" target="blank" title="<?php  echo $article->Title;  ?>"<?php if ($article->Metas->alink!="" && $article->Metas->djump!=1) { ?> onclick="javascript:SN_Go(String.fromCharCode(<?php  echo $aurl;  ?>))"<?php } ?>><img src="<?php  echo SiteNav_thumb(2,$article);  ?>" alt="<?php  echo $article->Title;  ?>"></a>
            <div class="bg"></div><p><?php  echo $article->Title;  ?></p>
        </div>
            <?php } ?>
        <?php }   ?>
    <?php } ?>
    </div>
<?php } ?>
    <?php if ($zbp->Config('SiteNav')->SiteNav_listbtad!="") { ?>
    <div class="wvshow wrap listbtshow">
        <?php  echo $zbp->Config('SiteNav')->SiteNav_listbtad;  ?>
    </div>
    <?php } ?>