<?php
$ceoshop_single_an_zdy = _ceo('ceoshop_single_an_zdy');
$ceoshop_1_zz_sz = _ceo('ceoshop_1_zz_sz');
$meta = get_post_meta( get_the_ID(), 'my_post_options', true );
$post_id=get_the_ID();
?>
<div class="ceo-shop1-zl">
    <div style="overflow: hidden;padding-bottom: 20px;">
        <!-- 左侧 -->
        <div class="bannerL">
            <div class="course-img">
                <img src="<?php echo post_thumbnail_src(); ?>" data-src="<?php echo post_thumbnail_src(); ?>" alt="<?php the_title(); ?>" class="bigImg" style="height:<?php echo _ceo('ceoshop_1_img'); ?>px";>
            </div>

            <!--编号模块-->
            <div class="main_info_top_b">
                <div class="main_info_top_item">
                    <span class="item_titles"><?php echo _ceo('ceoshop_single_gx'); ?></span>
                    <span class="item_content1"><?php the_modified_time('Y年m月d日'); ?></span>
                </div>
                <div class="main_info_top_item2">
                    <span class="item_titles"><?php echo _ceo('ceoshop_single_bh'); ?></span>
                    <span class="item_content2"><?php echo get_the_ID(); ?></span>
                </div>
            </div>
            <!--编号模块-->

            <!--资源模块-->
            <div class="risktips report" style="cursor:pointer;">
                <i class="iconfont icon-sound"></i><span><a href="http://wpa.qq.com/msgrd?v=3&amp;uin=<?php if(_ceo('ceoshop_shangjia_kf'))echo _ceo('ceoshop_shangjia_kf')['ceoshop_single_kf_qq']; ?>&amp;site=qq&amp;menu=yes" target="_blank"><?php echo _ceo('ceoshop_single_ts'); ?></a></span>
            </div>
            <!--举报模块-->
        </div>
        <!-- 中间 -->
        <div class="bannerMid">

            <!--标题模块-->
            <div class="midTitle">
                <h1 title="<?php the_title(); ?>">
                    <?php get_template_part( 'template-parts/single/single', 'biaoqian' ); ?>
	    			<?php the_title(); ?>
    			</h1>
            </div>
            <!--标题模块-->

            <!--信息模块-->
            <div class="ceo-text-small ceo-text-muted ceo-flex ceo-text-truncate ceo-overflow-auto ceoshop-mall-sc">
				<?php if(_ceo('ceoshop_single_rq_zz') == true): ?>
				<div class="avatar ceo-flex ceo-flex-middle ceo-margin-medium-right-ceoshop">
				<span class="ceo-display-block"><i class="iconfont icon-bussiness-man"></i> <?php the_author_posts_link(); ?></span>
				</div>
				<?php endif; ?>
				<?php if(_ceo('ceoshop_single_rq_fabu') == true): ?>
				<span class="ceo-display-inline-block ceo-margin-medium-right-ceoshop ceo-flex ceo-flex-middle"><i class="iconfont icon-rili"></i> <?php the_time('Y-m-d') ?></span>
				<?php endif; ?>
				<?php if(_ceo('ceoshop_single_cat') == true): ?>
				<span class="ceo-display-inline-block ceo-margin-medium-right-ceoshop ceo-flex ceo-flex-middle"><i class="iconfont icon-category"></i> <?php
				$category = get_the_category();
				if($category[0]){
					echo '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>';
				}
				?></span>
				<?php endif; ?>
				<?php if(_ceo('ceoshop_single_sc_num') == true): ?>
				<span class="ceo-display-inline-block ceo-margin-medium-right-ceoshop ceo-flex ceo-flex-middle"><i class="iconfont icon-shoucang"></i> <?php echo count_collection_current_post( $post_id ) ?></span>
				<?php endif; ?>
				<?php if(_ceo('ceoshop_single_ll_liulan') == true): ?>
				<span class="ceo-display-inline-block ceo-margin-medium-right-ceoshop ceo-flex ceo-flex-middle"><i class="iconfont icon-yanjing"></i> <?php post_views('', ''); ?></span>
				<?php endif; ?>

				<?php if(_ceo('ceoshop_single_baidu_sl') == true): ?>
				<span class="ceo-display-inline-block ceo-margin-medium-right-ceoshop ceo-flex ceo-flex-middle"><?php baidu_record(); ?></span>
				<?php endif; ?>

				<?php if(_ceo('ceoshop_single_bj_bianji') == true): ?>
				<span class="ceo-display-inline-block ceo-margin-medium-right ceo-flex ceo-flex-middle"><?php edit_post_link('<i class="iconfont icon-edit"></i> 编辑'); ?></span>
				<?php endif; ?>

			</div>
			<!--信息模块-->

            <!--简介模块-->
            <?php if(_ceo('ceoshop_single_jianjie') == true): ?>
            <div class="main_info_price">
                <div class="main_info_price_r" style="background: url(<?php echo _ceo('ceoshop_single_jianjie_img'); ?>);background-size: 100% 100%;">
                    <b><?php echo _ceo('ceoshop_single_jianjie_title'); ?></b>丨<?php echo _ceo('ceoshop_single_jianjie_title2'); ?>
                    <div class="collection  add_collect" data-id="AFQPYY">
                    <span><a href="<?php echo _ceo('ceoshop_single_jianjie_title_l'); ?>" target="_blank"><i class="iconfont <?php echo _ceo('ceoshop_single_jianjie_title_i'); ?>"></i><?php echo _ceo('ceoshop_single_jianjie_title_y'); ?></a></span>
                    </div>
                </div>
            </div>
            <?php endif; ?>
            <!--简介模块-->

            <!--增值服务-->
            <?php if(_ceo('ceoshop_1_zz') == true): ?>
            <div class="main_info_tb">
                <div class="main_info_tb_items">
                    <i class="iconfont icon-cart-Empty"></i><?php echo _ceo('ceoshop_1_zz_title'); ?>：
                </div>
                <?php
            	if ($ceoshop_1_zz_sz) {
            		foreach ( $ceoshop_1_zz_sz as $key => $value) {
            	?>
                <div class="main_info_tb_item">
                    <span class="left_title"><?php echo $value['title']; ?></span>
                </div>
                <?php } } ?>
            </div>
            <?php endif; ?>
            <!--增值服务-->

            <!--价格模块-->
            <div class="priceBtn">
                <div style="position: relative;">
                    <span class="sellP">
                        <em style="font-size: 13px;">¥</em>
                        <span id="priceinfo"><?php echo $price=get_post_meta(get_the_ID(), 'down_price', true); ?></span>
                        <em style="font-size: 13px;"><?php echo get_option('ice_name_alipay')?get_option('ice_name_alipay'):'C币'; ?> </em>
                        <?php
                        $content='';
                        $memberDown=get_post_meta(get_the_ID(), 'member_down',TRUE);
                        $indexMemberDown = $memberDown;
                        $userType=getUsreMemberType();

                        $erphp_url_front_vip = get_bloginfo('wpurl').'/users?pd=money';
                        if(get_option('erphp_url_front_vip')){
                            $erphp_url_front_vip = get_option('erphp_url_front_vip');
                        }
                        $erphp_url_front_login = wp_login_url();
                        if(get_option('erphp_url_front_login')){
                            $erphp_url_front_login = get_option('erphp_url_front_login');
                        }
                        if(is_user_logged_in()){
                            $erphp_url_front_vip2 = $erphp_url_front_vip;
                        }else{
                            $erphp_url_front_vip2 = $erphp_url_front_login;
                        }

                        if($indexMemberDown > 1){
                            $vipText = '<a href="'.$erphp_url_front_vip.'" target="_blank" class="ceoshop-vip2">升级VIP</a>';
                            if($userType){
                                $vipText = '';
                            }
                            if($indexMemberDown==3 && $down_info==null){
                                $content.='（VIP免费'.$vipText.'）';
                            }elseif ($indexMemberDown==2 && $down_info==null){
                                $content.='（VIP 5折'.$vipText.'）';
                            }elseif ($indexMemberDown==5 && $down_info==null){
                                $content.='（VIP 8折'.$vipText.'）';
                            }elseif ($indexMemberDown==6 && $down_info==null){
                                if($userType < 9){
                                    $vipText = '<a href="'.$erphp_url_front_vip.'" target="_blank" class="ceoshop-vip2"> 升级年费VIP</a>';
                                }
                                $content.='（年费VIP免费'.$vipText.'）';
                            }elseif ($indexMemberDown==7 && $down_info==null){
                                if($userType < 10){
                                    $vipText = '<a href="'.$erphp_url_front_vip.'" target="_blank" class="ceoshop-vip2"> 升级终身VIP</a>';
                                }
                                $content.='（终身VIP免费'.$vipText.'）';
                            }elseif ($indexMemberDown==4){
                                if($userType){
                                    $content.='此资源为VIP专享资源';
                                }
                            }elseif ($indexMemberDown==8){
                                if($userType >= 9){
                                    $content.='此资源为年费VIP专享资源';
                                }
                            }elseif ($indexMemberDown==9){
                                if($userType >= 10){
                                    $content.='此资源为终身VIP专享资源';
                                }
                            }
                        }
                        if($indexMemberDown==4 && $userType==FALSE){
                            $content.='此资源仅限VIP下载<a href="'.$erphp_url_front_vip.'" class="ceoshop-vip"> 升级VIP</a>';
                        }elseif($indexMemberDown==8 && $userType < 9){
                            $content.='此资源仅限年费VIP下载<a href="'.$erphp_url_front_vip.'" class="ceoshop-vip"> 升级VIP</a>';
                        }elseif($indexMemberDown==9 && $userType < 10){
                            $content.='此资源仅限终身VIP下载<a href="'.$erphp_url_front_vip.'" class="ceoshop-vip"> 升级VIP</a>';
                        }

                        echo $content;
                        ?>

                        <em><?php echo _ceo('ceoshop_single_an_bt'); ?></em>
                    </span>
                    <!--点赞收藏按钮-->
                    <?php if(_ceo('ceoshop_3_anniu_dzsc') == true): ?>
                    <div class="ceo-shop1-dzsc">
                        <a href="javascript:;" data-action="topTop" data-id="<?php the_ID(); ?>" class="ceo-display-inline-block btn change-color dotGood <?php echo isset($_COOKIE['dotGood_' . $post->ID]) ? '' : ''; ?>">
                		<i class="iconfont icon-dianzan"></i> 点赞 (<span class="count"><?php echo ($dot_good=get_post_meta($post->ID, 'dotGood', true)) ? $dot_good : '0'; ?></span>)
                    	</a>
                        <?php echo zongcai_post_collection_button( get_the_ID() );?>
                    </div>
                    <?php endif; ?>
                </div>
                <!--价格模块-->

                <!--下载模块-->
                <style>
                    #ceoshop{
                        /*display: none;*/
                    }
                </style>
                <?php
                $erphpdown_content_show_html = erphpdown_content_show('');
                preg_match('#<a class="(.*?)</a>#', $erphpdown_content_show_html, $erphpdown_content_show_arr);
                if ( ! empty($erphpdown_content_show_arr[0])) {
                    $btn_new = $erphpdown_content_show_arr[0];
                    $btn_new = str_replace('class="', 'class="makeFunc ', $btn_new);
                }

                if($btn_new){
                    echo $btn_new;
                }else{
                ?>
                <a class="makeFunc" href="javascript:void(0)" onclick="ceoshop_download('<?php echo $post_id; ?>')">
                    <i class="iconfont icon-download"></i> <?php if(_ceo('ceoshop_single_an'))echo _ceo('ceoshop_single_an')['ceoshop_single_an_xz']; ?>
                </a>
                <?php }?>

                <?php if(get_post_meta( get_the_ID(), 'down_demourl', true )){?>
                <a class="seeDetail" href="<?php echo get_post_meta( get_the_ID(), 'down_demourl', true );?>" target="_blank" rel="noreferrer nofollow" >
                    <i class="iconfont icon-phone"></i> <?php if(_ceo('ceoshop_single_an'))echo _ceo('ceoshop_single_an')['ceoshop_single_an_ys']; ?>
                </a>
                <?php }?>
                <a class="needSay add_collect" href="<?php if(_ceo('ceoshop_single_an'))echo _ceo('ceoshop_single_an')['ceoshop_single_an_hyl']; ?>" target="_blank" >
                    <i class="iconfont icon-vip"></i> <?php if(_ceo('ceoshop_single_an'))echo _ceo('ceoshop_single_an')['ceoshop_single_an_hy']; ?>
                </a>
                <?php
    			if ($ceoshop_single_an_zdy) {
    				foreach ( $ceoshop_single_an_zdy as $key => $value) {
    			?>
				<a class="shopcustom add_collect" href="<?php echo $value['ceoshop_single_an_zdy_lj']; ?>" target="_blank" >
                    <i class="iconfont <?php echo $value['ceoshop_single_an_zdy_tb']; ?>"></i> <?php echo $value['ceoshop_single_an_zdy_bt']; ?>
                </a>
    			<?php } } ?>
                <!--下载模块-->

            </div>
        </div>

        <!-- 右边商家信息 -->
        <?php get_template_part( 'template-parts/single/shop/sidebar/sidebar', 'author' ); ?>
    </div>
</div>
