{template:header}

<article> 
  <!--lbox begin-->
  <div class="lbox"> 
    <!--banbox begin-->
    <div class="banbox">
      <div class="banner">
        <div id="banner" class="fader">
        {php}$array = explode(',',$zbp->Config('orangecms')->syhdp);{/php} {foreach $array as $key=>$id} {$post=GetPost((int)$id);}
 <li class="slide" ><a href="{$post.Url}" title="{$post.Title}" target="_blank"><img alt="{$post.Title}" src="{orangecms_thumbnail($post)}"></a></li>  
 {/foreach}
          <div class="fader_controls">
            <div class="page prev" data-target="prev"></div>
            <div class="page next" data-target="next"></div>
            <ul class="pager_list">
            </ul>
          </div>
        </div>
      </div>
    </div>
    <!--banbox end-->     
    <div class="clearblank"></div>
    <div class="tab_box whitebg">

      <div class="tab_buttons">
        <ul>
        {php}$slflid=$zbp->Config('orangecms')->sycate;$arrayids = explode(',',$slflid);{/php}
         {$i=1}       
        {foreach $arrayids as $dira}       
	{if $i==1}
<li class="newscurrent">{$zbp->categorys[$dira]->Name}</li>
{else}
<li>{$zbp->categorys[$dira]->Name}</li>
{/if}
{$i=$i+1}
{/foreach}         
        </ul>
      </div>

      <div class="newstab">
      {foreach $arrayids as $dira}      
	        <div class="newsitem">
      {php}$dirsa=(int)$dira;{/php}
      {foreach getlist(6,$dirsa) as $key=>$article}
        {$i=$key}
        {if $i==0}
          <div class="newspic">
            <ul>            
              <li><a href="{$article.Url}" title="{$article.Title}" target="_blank"><img src="{orangecms_thumbnail($article)}"><span>{$article.Title}</span></a></li>  
            </ul>
          </div>          
          <ul class="newslist">
          {else}
  <li><i></i><a href="{$article.Url}" title="{$article.Title}" target="_blank">{trim(SubStrUTF8(TransferHTML($article->Title,'[nohtml]'),50))}</a><p>{if strlen($article.Intro)>0}
				{php}$intro= trim(SubStrUTF8(TransferHTML($article->Intro,'[nohtml]'),100)).'...';{/php}
				{else}
				{php}$intro= trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),90)).'...';{/php}
			{/if}
			{$intro}</p></li>
            {/if}
  {/foreach}
          </ul>
        </div>
{/foreach} 
      </div>


    </div>

    <!--tab_box end-->




    <div class="zhuanti whitebg">
      <h2 class="htitle"><span class="hnav">{orangecms_hottag()}</span>首页推荐</h2>
      <ul>
{php}$array = explode(',',$zbp->Config('orangecms')->sytuijian);{/php} {foreach $array as $key=>$id} {$post=GetPost((int)$id);}
<li> <i class="ztpic"><a href="{$post.Url}" title="{$post.Title}" target="_blank"><img src="{orangecms_thumbnail($post)}"></a></i> 
<b>{trim(SubStrUTF8(TransferHTML($post->Title,'[nohtml]'),28))}</b><span>{if strlen($post.Intro)>0}
				{php}$intro= trim(SubStrUTF8(TransferHTML($post->Intro,'[nohtml]'),100)).'...';{/php}
				{else}
				{php}$intro= trim(SubStrUTF8(TransferHTML($post->Content,'[nohtml]'),90)).'...';{/php}
			{/if}
			{$intro}</span><a href="{$post.Url}" target="_blank" class="readmore">文章阅读</a> </li>
{/foreach}
    </ul>
    </div>
    <div class="ad whitebg"><a href='{$host}' target=_blank><img src='{$host}zb_users/theme/{$theme}/style/images/tupian1.jpg'></a></div>
    <div class="whitebg bloglist">
      <h2 class="htitle">最新博文</h2>
      <ul>
{foreach GetList(10) as $newlist}
        <li>
          <h3 class="blogtitle"><a href="{$newlist.Url}" title="{$newlist.Title}" target="_blank">{$newlist.Title}</a></h3>
           <span class="blogpic imgscale"><i><a href="{$newlist.Category.Url}" target="_blank">{$newlist.Category.Name}</a></i><a href="{$newlist.Url}" title="{$newlist.Title}"><img src="{orangecms_thumbnail($newlist)}" alt="{$newlist.Title}"></a></span>
          <p class="blogtext">{if strlen($newlist.Intro)>0}
				{php}$intro= trim(SubStrUTF8(TransferHTML($newlist->Intro,'[nohtml]'),100)).'...';{/php}
				{else}
				{php}$intro= trim(SubStrUTF8(TransferHTML($newlist->Content,'[nohtml]'),90)).'...';{/php}
			{/if}
			{$intro}</p>
          <p class="bloginfo"><span>DATE:{$newlist.Time('Y-m-d')}</span><span>TAG:{if Count($newlist.Tags)>0}{foreach $newlist.Tags as $tag}<a href="{$tag.Url}" target="_blank" rel="tag">{$tag.Name}</a> {/foreach}{/if}</span></p>
          <a href="{$newlist.Url}" class="viewmore">阅读更多</a> </li>
{/foreach}
      </ul>
      <!--pagelist-->
      <div class="pagelist">{template:pagebar}</div>
      <!--pagelist end--> 
    </div>
    <!--bloglist end--> 
  </div>
  <div class="rbox"> 
  <!--headline begin-->
    <div class="headline">
      <ul>
      {$topArray = GetList(2, null, null, null, null, null, array("only_ontop"  => true));}
      {foreach $topArray as $top}
        <li><a href="{$top.Url}" target="_blank" title="{$top.Title}"><img src="{orangecms_thumbnail($top)}" alt="{$top.Title}"><span>{$top.Title}</span></a></li>
      {/foreach}
     </ul>
    </div>
    <!--headline end-->
    <div class="whitebg notice">
      <h2 class="htitle">文章归档</h2>
      <ul>
{module:archives}
</ul>
    </div>
    <div class="whitebg paihang">
      <h2 class="htitle">最新发布</h2>
      <ul>
{foreach GetList(10) as $newlist}
   <li><i></i><a href="{$newlist.Url}" title="{$newlist.Title}" target="_blank">{$newlist.Title}</a></li>
   {/foreach}   
      </ul>

    </div>
    <div class="whitebg paihang">
      <h2 class="htitle">点击排行</h2>
      <ul>
      {php}
$order = array('log_ViewNums'=>'DESC');
$where = array(array('=','log_Status','0'));
$array = $zbp->GetArticleList(array('*'),$where,$order,array(8),'');
{/php}
{foreach $array as $hotlist}
   <li><i></i><a href="{$hotlist.Url}" title="{$hotlist.Title}" target="_blank">{$hotlist.Title}</a></li>
   {/foreach}   
      </ul>

    </div>
    <div class="whitebg tuijian">
      <h2 class="htitle">置顶推荐</h2>   

      <ul>
{$topArray = GetList(10, null, null, null, null, null, array("only_ontop"  => true));}
{foreach $topArray as $top}
        <li><a href="{$top.Url}" target="_blank" title="{$top.Title}"><i><img src="{orangecms_thumbnail($article)}" alt="{$top.Title}"></i>
          <p>{$top.Title}</p>
          </a></li>{/foreach}
      </ul>

    </div>    
   
    <div class="ad whitebg imgscale">
      <ul><a href='{$host}' target=_blank><img src='{$host}zb_users/theme/{$theme}/style/images/tupian2.jpg'></a></ul>
    </div>      

    <div class="cloud whitebg">
      <h2 class="htitle">标签集</h2>
      <ul>
      {orangecms_cloud()}
            </ul>
    </div>
    <!--<div class="links whitebg">
      <h2 class="htitle">友情链接</h2>
      <ul>
       {module:link}
            </ul>
    </div>-->   

    </div>
</article>
{template:footer}
