<?php get_header(); ?>
<span id="btn_page_prev"><?php next_post_link( '%link', '<span id="fanye">〈</span>' ); ?></span>
<span id="btn_page_next"><?php previous_post_link( '%link', '<span id="fanye">〉</span>' ); ?></span>   
<?php
     $categorys = get_the_category(); 
	 $cat_id = $categorys[0]->category_parent;//获取当前跟分类id
	 $nameparent = '';
	if($cat_id!=0){
		 $parent_id = $categorys[0]->category_parent;
		 $category_parinfo = get_category($cat_id);
		 $nameparent = $category_parinfo->slug; 
		}
    if($categorys[0]->slug!='photos' && $nameparent != 'photos' && $categorys[0]->slug!='videos' && $nameparent != 'videos'):
?>
<div id="content">
<div class="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<br>
<div class="left">
<div class="newtitle">
<div class="post_date">
<span class="date_d"><?php echo date('m',get_the_time('U'));?>·<?php the_time('d') ?></span>
</div>
<div class="line"></div>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="详细阅读 <?php the_title_attribute(); ?>"><?php the_title(); ?></a><span class="new"><?php include('includes/new.php'); ?></span></h2>
<div class="infotop1">
<span class="info-tag-icon"><?php the_tags('标签：', ', ', ''); ?></span>
<span class="info-category-icon"><?php the_category(', ') ?></span>
<span class="info-url-icon">
<?php 
     $f = get_post_meta($post->ID, 'f', true);
     if(!empty($f)){
        echo '来自:'."<a href='$furl' target='blank' rel='nofllow'>$f</a>";
                      }
?></span>
<a style="cursor:pointer" onclick="var url=encodeURIComponent(encodeURIComponent(location.href));var title=encodeURIComponent(encodeURIComponent(document.title));hr='http://dig.chouti.com/digg.action?newsURL='+url+'&title='+title;window.open(hr);"></a>
</div>
</div>
<div class="post-title-single">
</div>
<div class="articles">
<style>
.post-top-ad{
	margin-top:30px;
	}
</style>
<!--滚动条 的滑动分享代码跟着滑动-->
<script type="text/javascript"  src="<?php bloginfo('template_directory'); ?>/js/scrollnav.js"></script> 
<div class="post-top-ad">


 <!------------------【普通文章内容页】正文上方广告-------------------->

<script type="text/javascript">
/*【普通文章页】--上--336*280*/
var cpro_id = "u1314655";
</script>
<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>

 <!------------------【普通文章内容页】正文上方广告-------------------->



</div>
<div id="share_toolbar_wrapper" style="position: static; top: 191px; z-index: 9999;">		
            <div id="share_toolbar">			
            <div title="喜欢就赞一下喽~" id="stb_article_view" class="stb_group">
            <span id="stb_article_view_icon">
<a version="1.0" class="qzOpenerDiv" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_likeurl" target="_blank">赞</a><script  src="http://qzonestyle.gtimg.cn/qzone/app/qzlike/qzopensl.js#jsdate=20111107&style=3&showcount=1&width=130&height=30" charset="utf-8" defer="defer" ></script>
</span>
            <span id="stb_view_count"> <?php if(function_exists(the_views)) { the_views('', true);}?>  </div>			
            <div class="stb_divide"></div>				
            <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare stb_share_buttons stb_group" data="{&#39;url&#39;:&#39;<?php get_bloginfo('url')?>&#39;}">			       
             <a class="bds_tsina" id="stb_btn_weibo" href="javascript:void(0);" title="分享到新浪微博"></a>			        
             <a class="bds_tqq" post_url="" id="stb_btn_tqq" href="javascript:void(0);" title="分享到腾讯微博"></a>			        
             <a class="bds_qzone" id="stb_btn_qzone" href="javascript:void(0);" title="分享到QQ空间"></a>			        
             <a class="bds_renren" id="stb_btn_renren_small" href="javascript:void(0);" title="分享到人人网"></a>			        
             <span class="bds_more" id="stb_btn_more"><span id="stb_sbtn_more_icon"></span></span>			        
             <a class="shareCount" href="javascript:void(0);" title="累计分享20次">20</a>				
             </div>			
             <div class="stb_divide"></div>			
             <div class="stb_share_buttons stb_group">
             <script>
               $(function(){
				     $('.stb_share_buttons a[rel=prev]').attr('id','stb_btn_next');
					 $('#stb_btn_next').attr('title',$('#stb_btn_next').html());
					 $('.stb_share_buttons a[rel=next]').attr('id','stb_btn_prev'); 
					 $('#stb_btn_prev').attr('title',$('#stb_btn_prev').html());
				   })
               </script>		
               <?php  
				  $categories = get_the_category();         
				  $categoryIDS = array();          
				  foreach ($categories as $category) {              
				  array_push($categoryIDS, $category->term_id);         
				  }          
				  $categoryIDS = implode(",", $categoryIDS); 
		       ?>	
              <?php if (get_next_post($categoryIDS)) { next_post_link('%link','%title',true);} else { echo '<a id="stb_btn_prev" href="javascript:alert(\'前面已经木有啦...\');" title="上一篇：木有了 ">上一篇：木有了</a>';} ?>	
             <?php if (get_previous_post($categoryIDS)) { previous_post_link('%link','%title',true);} else { echo '<a id="stb_btn_next"  href="javascript:alert(\'下面已经木有啦...\');"  title="下一篇：木有了 ">下一篇：木有了</a>';} ?>  	
             </div>			
             <div class="stb_group_right">		 	
                 <div class="bdlikebutton" style="margin-top: 3px; margin-right:3px;"></div>	
             </div>		
             </div>
             </div> 
             <script id="bdlike_shell"></script>
             <script type="text/javascript"  src="<?php bloginfo('template_directory'); ?>/js/like_shell.js"></script>
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=6533465" src="<?php bloginfo('template_directory'); ?>/js/bds_s_v2.js"></script>
        <div class="context"> 
    
        <script>
         $(function(){
			 $('.feed-tip').before('<div class="wumibutton"><div id="wumiiLikeRecBtnDiv" class="wumii"></div><a href="http://www.nocower.com/theme" style="border:0;"><img src="http://www.nocower.com/images/wm.png" width="1" height="1" alt="Nocower-Pro，清新简约的主题，来自无所畏，向前闯，让勇气充满自己！" style="border:0;padding:0;margin:0;" /></a></div>');
			 })
        </script>
        <?php if (get_option('swt_adb') == 'Display') { ?><div style="float:right;border:1px #ccc solid;padding:2px;overflow:hidden;margin:12px 0 1px 2px;"><?php echo stripslashes(get_option('swt_adbcode')); ?></div><?php { echo ''; } ?><?php } else { } ?><?php the_content('Read more...'); ?></div> 
 
        <?php if (get_option('swt_adc') == 'Display') { ?><p style="text-align:center;"><?php echo stripslashes(get_option('swt_adccode')); ?></p><?php { echo ''; } ?><?php } else { } ?>
</div>
</div>



<div class="articles">
<div class="post-author"><div class="avatar"><?php echo get_avatar( get_the_author_email(), '70' ); ?></div>
<div class="post-author-desc">
<a class="post-author-name" target="_blank" title="去看看他/她的专栏" href="#"><span><?php  echo the_author_meta( 'nickname' ); ?></span></a><br>
<div class="post-author-description"><?php  echo the_author_meta( 'description' ); ?></div>
<div class="post-author-links"><a  target="_blank" href="#">查看Ta的专栏</a><?php if (get_the_author_meta('weibo_sina')!=""){ ?><?php echo "<a href='" . get_the_author_meta('weibo_sina') . "' target='_blank'> | 新浪微博</a>"; ?><?php } ?><?php if (get_the_author_meta('weibo_tx')!=""){ ?><?php echo "<a href='" . get_the_author_meta('weibo_tx') . "' target='_blank'> | 腾讯微博</a>"; ?><?php } ?><?php if (get_the_author_meta('renren')!=""){ ?><?php echo "<a href='" . get_the_author_meta('renren') . "' target='_blank'> | 人人</a>"; ?><?php } ?></div>
<div class="clear" style="clear both"></div>
<div class="post-author-title">关于本文小编</div>
</div>
</div>
</div>
<div class="articles">
<div id="singlead">
<div class="adleft">
<div class="ad-l">

 <!------------------【普通文章内容页】正文下方-左-广告-------------------->


<script type="text/javascript">
     document.write('<a style="display:none!important" id="tanx-a-mm_41374337_3506389_11484242"></a>');
     tanx_s = document.createElement("script");
     tanx_s.type = "text/javascript";
     tanx_s.charset = "gbk";
     tanx_s.id = "tanx-s-mm_41374337_3506389_11484242";
     tanx_s.async = true;
     tanx_s.src = "http://p.tanx.com/ex?i=mm_41374337_3506389_11484242";
     tanx_h = document.getElementsByTagName("head")[0];
     if(tanx_h)tanx_h.insertBefore(tanx_s,tanx_h.firstChild);
</script>


 <!------------------【普通文章内容页】正文下方-左-广告-------------------->



</div>
</div>
<div class="adright">
<div class="ad-r">


 <!------------------【普通文章内容页】正文下方-右-广告-------------------->

<script type="text/javascript">
/*【普通文章页】--下右--300*250*/
var cpro_id = "u1314657";
</script>
<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>


 <!------------------【普通文章内容页】正文下方-右-广告-------------------->


</div>
</div>
</div>
</div>
<div class="articles">
<div class="section_title">
<span>相关文章</span>
</div>
</div>
<div class="articles">
<div id="wumiiDisplayDiv" class="wumiidisplay">
</div>
</div>
<div class="articles">
<div class="section_title">
<span>为您推荐</span>
</div>
</div>
<style>
.related-post{
	width:auto;
	}
</style>
<div class="articles">
<?php include('includes/related.php'); ?>
<div class="nf-ad" style="border: 1px solid #CCC;">



 <!------------------【为您推荐右侧】主题链接-广告-------------------->

<script type="text/javascript">
/*【为您推荐右侧】*/
var cpro_id = "u1329670";
</script>
<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>


 <!------------------【为您推荐右侧】主题链接-广告-------------------->



</div>
<div class="clear"></div>
</div>
<div class="articles">
<div class="section_title">
<span>各种观点</span>
</div>
</div>
<div class="articles">
<?php comments_template(); ?>
</div>
<?php endwhile; else: ?>
<?php endif; ?>
</div> 
<?php get_sidebar(); ?>
<?php 
else:
if($categorys[0]->slug=='photos' || $nameparent == 'photos'):
include('single_photos.php');
else:
if($categorys[0]->slug=='videos' || $nameparent == 'videos'):
include('single_videos.php');
endif;
endif;
endif;
?>
<?php get_footer(); ?>