<?php get_header(); ?>
<?php get_template_part('left','menu');?>
<section>
<div class="container">
<div class="left_summary" id="left_side">
	<div class="showType">
	<?php wp_bac_breadcrumb();?>
	</div>
	<div class="content_out">
	<div class="content"  id="content">
		<div class="clear"></div>										
		<?php if( have_posts() ) : while( have_posts() ) : the_post();?>
		<div class="perContentBox " id="post-153007">
		<div class="contentBg">
		<div class="con_title">
		<span class="conName"><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?><span class="red">&nbsp;&nbsp;&nbsp;<?php echo get_post_meta($post->ID,'_red_title',true);?></span></a></span>
		<div class="conTime"><?php the_time('m-d g:i');?></div>
		<div class="clear"></div>
		</div>
		<div class="showLeft">
			<div class="proRightBox">
				<div class="pro1">
					<div class="like">
						<div class="collect">
						<a href="javascript:void(0);" id="<?php echo the_ID(); ?>" title="收藏本文" class="add_to_fav"><?php echo get_post_fav_count($post->ID);?></a>
						</div>
						<div class="commentCount">
							<?php comments_popup_link( '0', '1', '%'); ?>
						</div>
						<div class="clear"></div>
					</div>
					<div class="pro_img">
						<?php
							if( has_post_thumbnail() ){
								echo get_the_post_thumbnail( $post->ID, array(150, 150), array('alt'=>$post->post_title) );
							}else{
								echo '<img src="'.get_post_img( '', 150, 150 ).'" alt="'.$post->post_title .'" width="150" height="150"/>';
							}
							?>
					</div>
					<div class="zhida" id="buy_url_<?php echo $post->ID;?>">
					<a href="<?php echo home_url('/');?>go/<?php echo $post->ID?>" rel="nofollow" class="border_radius_3" target="_blank">直 达 链 接</a>
					<div style="display:none"></div>
					</div>
				</div>
				<div class="mall"><span class="grey">商城：</span><span class="from_val">
				<?php $terms = get_the_terms( $post->ID, 'mall' );
			if ( $terms && ! is_wp_error( $terms ) ) : 
				$draught_links = array();
				foreach ( $terms as $term ) {
					$draught_links[] = $term->name;
					}
				$on_draught = join( ", ", $draught_links );
				echo $on_draught;
			endif; ?>
				</span></div>
			</div>
			<div class="leftShowInfo">
			<span class="has_from_val classified">
					<span class="grey">分类：</span>
					 <?php the_category('，'); ?>
			</span>
				<span class="featured">推荐人：<?php if(get_post_meta($post->ID,'_post_author',true)){ echo get_post_meta($post->ID,'_post_author',true); }else{ the_author();} ?></span>				<div class="clear"></div>
			</div>
			<div class="conBox excerptBox" id="content_<?php echo $post->ID;?>">
				<?php the_content();?>
				<div class="pro1_con">
					<a class="showDetails" href="#" onclick="return change_show_mode('showDetails', 'content_<?php echo $post->ID;?>');">展开全文</a>
					<a class="closeDetails" href="#" onclick="return change_show_mode('closeDetails', 'content_<?php echo $post->ID;?>');">向上收起</a>
				</div>
			</div>
		</div>
		<div class="clear"></div>
		<div class="Score">
		<div class="post-ratings">
		<span >评价本文 ></span>
		<span class="vote_up" id="<?php echo 'vote_up'.$post->ID;?>"><a href="javascript:void(0);" title="值得" rel="<?php echo 'up_',$post->ID;?>"><span style="width:20px ; margin-left:10px" id="<?php echo 'vup'.$post->ID;?>"><?php echo get_post_rating($post->ID,'up');?></span></a>人认为值得买！</span>
		<span class="vote_down" id="<?php echo 'vote_down'.$post->ID;?>"><a href="javascript:void(0);" title="不值" rel="<?php echo 'down_'.$post->ID;?>"><span style="width:20px ; margin-left:10px" id="<?php echo 'vdown'.$post->ID;?>"><?php echo get_post_rating($post->ID,'down');?></span></a>人认为不值得买！</span>	
		</div>
		<div class="zhuanfa">
		<!-- Baidu Button BEGIN -->
<div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare" data="{'comment':'','desc':' <?php $description = str_replace("\n","",strip_tags($post->post_content)); $description = str_replace("\r","",$description); $description = str_replace("\t","",$description); $description = mb_substr( $description,0,100,'UTF-8'); echo $description;?>','text':'<?php echo $description; ?> ', 'title':'<?php the_title(); ?>', 'url':'<?php the_permalink();?>', 'pic':'<?php
		if( has_post_thumbnail() ){
		echo wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large');;
		}else{
		echo get_post_img( '', 150, 150 );
		} ?> '}" >
    <a class="bds_qzone">QQ </a>
    <a class="bds_tsina">新浪</a>
    <a class="bds_tqq">腾讯</a>
    <a class="bds_renren">人人</a>
    <span class="bds_more">更多</span>
</div>
<!-- Baidu Button END -->
</div>
		</div>
	</div>
</div>
<?php endwhile; endif;?>
<div class="clear"></div>
</div>
<div class="pageBox">
<div class="page">
<?php pagenavi();?></div>
<div class="clear"></div>
</div>
</div>
</div>
<?php get_sidebar();?>
<div class="clear"></div>
</div>
</section>
<?php get_footer();?>