<fh-function>
$config=json_decode(file_get_contents("conn/config.json"));

$page=$_GET["page"];
$tag=t($_GET["tag"]);

$order="order by N_top desc,N_order,N_id desc";

$url=gethttp().$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
function url($url,$key,$value){
  $url=str_replace("&".$key."=".str_replace("%3A",":",urlencode($value)),"",$url);
  return $url;
}

if($tag==""){
  $taginfo="";
}else{
  $taginfo=" and CONCAT(\" \",N_tag,\" \") like '% ".$tag." %'";
}

$M_id=intval($_GET["M_id"]);
if($page==""){
  $page=1;
}

if($M_id!=0){
  $M_info=" and N_mid=$M_id".$taginfo;
}else{
  $M_info=" and N_sh=1".$taginfo;
}

$sql="select * from sl_nsort where S_id=".$id;
  $result = mysqli_query($conn, $sql);
  $row = mysqli_fetch_assoc($result);
  if (mysqli_num_rows($result) > 0) {
    $S_sub=$row["S_sub"];
  }

if($id==0){
  $sql="select count(N_id) as N_count from sl_news where N_del=0 ".$M_ninfo."  $M_info order by N_top desc,N_order,N_id desc";
}else{
  if($S_sub==0){
    $sql="select count(N_id) as N_count from sl_news,sl_nsort where S_del=0 $M_info and N_del=0 ".$M_ninfo."  and N_sort=S_id and S_sub=".$id." order by N_top desc,N_order,N_id desc";
  }else{
    $sql="select count(N_id) as N_count from sl_news,sl_nsort where S_del=0 $M_info and N_del=0 ".$M_ninfo."  and N_sort=S_id and S_id=".$id." order by N_top desc,N_order,N_id desc";
  }
}

$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);
$N_count=$row["N_count"];

$page_num=intval($N_count/16)+1;
if($N_count%16 ==0){
  $page_num=$page_num-1;
}

</fh-function>
<!DOCTYPE HTML>
<html style="font-size: 37.5px;"><head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
		<meta name="screen-orientation" content="portrait">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<meta name="full-screen" content="yes">
		<meta name="x5-fullscreen" content="true">
		<title>[S_title] - [fh_title]</title>
		<link href="media/[fh_ico]" rel="shortcut icon" />
		<meta name="description" content="[S_content]" />
		<meta name="keywords" content="[S_keywords]" />

		<link rel="stylesheet" href="template/t17/assets/mobile3/styles/styles.css?1650623478">
		<link rel="stylesheet" href="template/t17/assets/styles/fonts/css/fontawesome-all.min.css">
		<link rel="stylesheet" href="//at.alicdn.com/t/font_3024711_clzl8xlbzpf.css">
		<link rel="stylesheet" href="template/t17/assets/styles/swiper.min.css">
		<script src="https://hm.baidu.com/hm.js?9a5d293f34391af2df99d6d9237c0996"></script><script type="text/javascript" src="template/t17/assets/scripts/jquery.min.js"></script>
		<script type="text/javascript" src="template/t17/assets/scripts/swiper.min.js"></script>
		<script type="text/javascript" src="template/t17/assets/scripts/layer.js"></script><link rel="stylesheet" href="template/t17/assets/scripts/theme/default/layer.css?v=3.3.0" id="layuicss-layer">
		<script type="text/javascript" src="template/t17/assets/scripts/bjplus.js"></script>
		<script type="text/javascript" src="template/t17/assets/scripts/tmodjs.js"></script>
		<style>
        .active,.actives,.orange,.myfont {
            color: #fe8103!important;	
        }
		.actives:after,.navtabs .active:after,.bottombox .tabbox span.acts:after,.navlist .active:after,.navTab div.active:after,.tabBox span.active:after {
            background-color: #fe8103!important;
        }
		.bg-color,.yaoqingka,.on {
            background-color: #fe8103!important;
			color: #ffffff !important;
        }
		.border-color {
            border: .02rem solid #fe8103!important;
            color: #fe8103!important;
        }
        </style>
		<script>
			(function(doc, win) {
				var docEl = doc.documentElement,
					resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
					recalc = function() {
						var clientWidth = docEl.clientWidth;
						if (!clientWidth) return;
						if (clientWidth >= 750) {
							docEl.style.fontSize = '75px';
						} else {
							docEl.style.fontSize = 75 * (clientWidth / 750) + 'px';
						}
					};
				if (!doc.addEventListener) return;
				win.addEventListener(resizeEvt, recalc, false);
				doc.addEventListener('DOMContentLoaded', recalc, false);
			})(document, window);
			//false
	        document.oncontextmenu=new Function("event.returnValue=false");  
	        document.onselectstart=new Function("event.returnValue=false"); 
		</script>
	</head>
	<body><style>
.items a:visited {color:#2196F3;}
.items a:link {color: #333;font-weight: 800;}
</style>

<div id="apps" class="scroll-box">
	<div class="wrap">		
		<div class="commonheader">
			<div class="tops">
				<div class="left">
					<img src="template/t17/assets/img/home.png" onclick="location.href='./'">
					<span>[S_title]</span>
				</div>
				<div class="right">
					<span onclick="window.history.back(-1);">返回</span> <span>|</span>
					<span class="share">分享</span> <span>|</span>
					<span onclick="location.href='member'">我的</span>
				</div>
			</div>
		</div>
		<div id="categoryList">		
		   		
						<div class="goodClass1">
				<div class="purples2" id="container">


<fh-function>
if($id==0){
  $sql="select * from sl_news,sl_nsort where S_del=0 and N_del=0 ".$pa.$M_ninfo."  and N_sort=S_id ".shuxing("N_shuxing")." $M_info $order limit ".(($page-1)*16).",16";
}else{
  if($S_sub==0){
    $sql="select * from sl_news,sl_nsort where S_del=0 ".shuxing("N_shuxing")." $M_info and N_del=0 ".$pa.$M_ninfo."  and N_sort=S_id and S_sub=".$id." $order limit ".(($page-1)*16).",16";
  }else{
    $sql="select * from sl_news,sl_nsort where S_del=0 ".shuxing("N_shuxing")." $M_info and N_del=0 ".$pa.$M_ninfo."  and N_sort=S_id and S_id=".$id." $order limit ".(($page-1)*16).",16";
  }
}
                s[[
  if(strpos($row["N_content"],"[fh_free]")!==false || p($row["N_price"])==0){
    $intro=mb_substr(strip_tags(splitx($row["N_content"],"[fh_free]",0)),0,200,"utf-8");
  }else{
    $intro="内容加密";
  }

if($row['N_mid']==0){
  $author_pic=pic($C["C_ico"]);
}else{
  $author_pic=pic(getrs("select * from sl_member where M_id=".$row['N_mid'],"M_head"));
}

$sub_title=getrs("select * from sl_nsort where S_id=".$row["S_sub"]);





	        $api=$api."<div class=\"items\" onclick=\"location.href='?type=newsinfo&id=".$row["N_id"]."'\">
			<div class=\"item_l\">
				<img src=\"".pic($row["N_pic"])."\">
			</div>
			<div class=\"item_R\">
				<p class=\"title\">".$row["N_title"]."</p>
				<p>".$row["N_title"]."</p>
				<div class=\"bot\">
					<div class=\"bot_name\">时间： ".date("Y-m-d",strtotime($row["N_date"]))."</div>
					<div class=\"bot_name\">浏览： ".$row["N_view"]."</div>
					<div class=\"bot_thumn\">价格： ￥".p($row["N_price"])."</div>
				</div>
			</div>
		</div>";

]]

        </fh-function>

		</div>
			</div>
			<div id="pager"></div>
					</div>


		<div class="footerinfo">
	<p>本站资料来自公域网络收集整理，如内容侵犯请联系客服删除！</p>
	<p>[fh_copyright][fh_beian][fh_code]</p>
</div>

			

		
	</div>
</div>		

<script id="tpl_empty" type="text/html">
    <div class="infoimg">
	    <img src="template/t17/assets/img/nodata.png">
	</div>
</script>
<link href="css/Pager.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.pager.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
    $("#pager").pager({ pagenumber: <fh-function> $api=$api.$page;</fh-function>, pagecount: <fh-function> $api=$api.$page_num;</fh-function>, buttonClickCallback: PageClick });
});

PageClick = function(pageclickednumber) {
  window.location="<fh-function>$api=$api.url($url,"page",$_GET["page"]);</fh-function>&page="+pageclickednumber;
}
</script>

<script language="javascript">
    var page = 1;
    var scrolled = false;
	var current_type = "4033";
    function bindScroller(type){
        var loaded = false;
        var stop = true; 
        $(window).scroll(function () {
            if (loaded) {
                return;
            }
            totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());
            if ($(document).height() <= totalheight) {
                if (stop == true) {
                    stop = false; scrolled = true;
                    $('#container').append('<div id="credit_loading">数据加载中...</div>');
					page++;
                    core_json("/index.php?mod=mobile&act=category&do=article&op=category&m=eshop&beid=10", {id:type,page:page}, function (morejson) {
                        stop = true;
                        $('#credit_loading').remove();
                        $("#container").append(tpl('tpl_log', morejson.result));
                        if (morejson.result.list.length < morejson.result.pagesize) {
                            $("#container").append('<div id="credit_loading">暂时没有更多了</div>');
							loaded = true;
                            $(window).scroll = null;
                            return;
                        }
                    }, true);
                }
            }
        });
    }
    function getLog(type) {
        core_json("/index.php?mod=mobile&act=category&do=article&op=category&m=eshop&beid=10", {id:type,page: page}, function (json) {
            if (json.result.list.length <= 0) {
                $('#container').html(tpl('tpl_empty'));
                return;
            }
            $('#container').html(tpl('tpl_log', json.result));
            bindScroller(type);
        }, true);
    }
	$('.tabBox span').unbind('click').click(function () {
		var $currItem = $(this),
	    index = $currItem.index();
	    $currItem.addClass('active').siblings().removeClass('active');	
        page = 1; 
		status = $(this).data('status')
        getLog(status);
    });	
    getLog(current_type);
</script>
<script src="template/t17/assets//scripts/clipboard.min.js"></script>			
<div class="seek shares">
	<div class="advice">
		<img class="close" src="template/t17/assets/img/close.png">
		<div class="phone simg">
		    <img src="template/t17/assets/img/hb.png"><p>生成海报</p>
		</div>
		<div class="phone copy_url">
		    <img src="template/t17/assets/img/lj.png"><p>生成链接</p>
		</div>
			</div>
</div>


<div class="seek copy_urls">
	<div class="url_content">
		<div class="content-title">添加二维码或链接至宣传渠道</div>
	    <div class="content-sub-title active">方法一：长按二维码保存</div>
		<div class="qr">
			<img id="qr" src="../conn/qrcode.php?url=<fh-function>$api=$api.urlencode(geturl());</fh-function>">
		</div>
		<div class="qr-desc"></div>
		<div class="content-sub-title active">方法二：点击复制链接 </div>
		<div class="url-wrap"><fh-function>$api=$api.geturl();</fh-function></div>
		
		<input type="hidden" name="url" value="" />
		<div class="qr-bottom">
			<div class="qr-bottom-button qr-bottom-button-cancel border-color close">关闭</div>
			<div id="fzlj" data-clipboard-text="<fh-function>$api=$api.geturl();</fh-function>" class="qr-bottom-button qr-bottom-button-copy bg-color">复制链接</div>
		</div>
	</div>
</div>

<div class="seek">
	<div class="smallcurpon1">
	    <p class="title">长按海报“发送给朋友”或“保存到手机”后分享</p>
	    <div class="swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide"><img src="template/t17/assets/img/hb.png"></div>
            </div>
        </div> 
		<img class="close" src="template/t17/assets/img/closes.png">		
	</div>
</div>

<div id="shipping">
    <div class="swiper-container" id="rotate-swiper">
        <div class="swiper-wrapper" id="poster">
            <div class="swiper-slide rotate-slide">
	            <div class="block">
                    <img src="/assets/img/scz.gif">
					<div class="footer">分享海报正在生成中...</div>
                </div>
            </div>
        </div>
        <div class="swiper-pagination" id="rotate-pagination"></div>
		<div class="swiper-button-next"></div>
        <div class="swiper-button-prev"></div>
    </div>	
    <div class="close-btn close"><img src="template/t17/assets/img/closes.png"></div>
</div>
				
<div class="seek wx_shares">
    <img class="close" src="template/t17/assets/img/wx_shares.png" style="width: 100%;"> 
</div>
	

<script id="tpl_emptys" type="text/html">
    <div class="swiper-slide rotate-slide">
	    <div class="block">
            <img src="/assets/img/nohb.jpg">
			<div class="footer active">暂时没有可生成的海报</div>
        </div>
    </div>
</script>
<script language="javascript">
    $('.share').click(function () {
		//$(".shares").show();
		$(".copy_urls").show();
	});	
    $('.wx_share').click(function () {
		$(".wx_shares").show();
		$(".shares").hide();
	});	
    $('.copy_url').click(function () {
		core_json("/index.php?mod=mobile&act=utility&do=share&op=qrurl&beid=10", {type:"3",id:"4033",empty:""}, function (json) {
		    if(json.status==1){
				$("#qr").attr("src", json.result.qrimg);
	        }
			if(json.status==0){
				layer.msg('抱歉，出错了');	
	        }
	    },true);
		$(".copy_urls").show();
		$(".shares").hide();
	});
    $('.shorturl').click(function () {
		var url = $('input[name="url"]').val();
		core_json("/index.php?mod=mobile&act=utility&do=share&op=shorturl&beid=10", {type:'3',id:'4033',url:url}, function (json) {
		    if(json.status==1){
				$('.url-wrap').html(json.result.surl);
				$("#qr").attr("src", json.result.qrimg);
				$("#fzlj").attr("data-clipboard-text",json.result.surl);
				layer.msg('操作成功');
	        }
			if(json.status==0){
				layer.msg('抱歉，出错了');	
	        }
	    },true);
	});
    $('.openlink').click(function () {
		var url = $("#fzlj").data('clipboard-text');
		core_json("/index.php?mod=mobile&act=utility&do=share&op=openlink&beid=10", {url:url}, function (json) {
		    if(json.status==1){
				$('.url-wrap').html(json.result.surl);
				$("#fzlj").attr("data-clipboard-text",json.result.surl);
				$('input[name="url"]').val(json.result.surl);
				layer.msg('操作成功');
	        }
			if(json.status==0){
				layer.msg('抱歉，出错了');	
	        }
	    },true);
	});	
    var btn = document.getElementById('fzlj');
    var clipboard = new Clipboard(btn);
    clipboard.on('success', function(e) {
		layer.msg('链接复制成功');
		$(".seek").hide();
    });
	$('.simg').click(function () {
	    core_json("/index.php?mod=mobile&act=utility&do=share&op=two&beid=10", {type:'3',id:'4033'}, function (sjson) {
		    if(sjson.status==1){
				$('#poster').html(tpl('tpl_poster',sjson.result));	
                var swiper = new Swiper('#rotate-swiper', {
    	            pagination: {
    		            el: '#rotate-pagination',
						type: 'fraction',
    	            },
                    navigation: {
                        nextEl: '.swiper-button-next',
                        prevEl: '.swiper-button-prev',
                    },
    	            runCallbacksOnInit: true,
    	            watchSlidesProgress: true,
    	            on: {
    		            progress: function() {
    			            for (var i = 1; i < this.slides.length; i++) {
    				            if (this.slides[i].progress <= 0) {
    					            this.slides.eq(i).find(".block").transition(0).transform("rotateZ(" + 13 * Math.abs(this.slides[i].progress) + "deg) translate3d(0, 0, 0)")
    				            }
    			            }
    		            },
    		            setTransition: function(transition) {
    			            for (var i = 1; i < this.slides.length; i++) {
    				            if (this.slides[i].progress <= 0) {
    					            rot = 13 * Math.abs(this.slides[i].progress);
    					            this.slides.eq(i).find(".block").transition(transition).transform("rotateZ(" + rot + "deg) translate3d(0, 0, 0)")
    				            }
    			            }
    		            },

    	            },
                });	
	        }
			if(sjson.status==0){
				$('#poster').html(tpl('tpl_emptys',sjson.result));	
                var swiper = new Swiper('#rotate-swiper', {
                    navigation: {
                        nextEl: '.swiper-button-next',
                        prevEl: '.swiper-button-prev',
                    },
    	            runCallbacksOnInit: true,
    	            watchSlidesProgress: true,
    	            on: {
    		            progress: function() {
    			            for (var i = 1; i < this.slides.length; i++) {
    				            if (this.slides[i].progress <= 0) {
    					            this.slides.eq(i).find(".block").transition(0).transform("rotateZ(" + 13 * Math.abs(this.slides[i].progress) + "deg) translate3d(0, 0, 0)")
    				            }
    			            }
    		            },
    		            setTransition: function(transition) {
    			            for (var i = 1; i < this.slides.length; i++) {
    				            if (this.slides[i].progress <= 0) {
    					            rot = 13 * Math.abs(this.slides[i].progress);
    					            this.slides.eq(i).find(".block").transition(transition).transform("rotateZ(" + rot + "deg) translate3d(0, 0, 0)")
    				            }
    			            }
    		            },

    	            },
                });	
	        }
	    },true);
		$("#shipping").css("visibility","visible");
		$(".shares").hide();
	});
	$('.close-btn').click(function () {
		$("#shipping").css("visibility","hidden");
	});	
</script>


<div class="outin">
	<div class="back_phone">
		<span class="myfont my-zhuye" onclick="location.href='./'"></span>
	</div>
	<div class="back_phone kefu">
		<span class="myfont my-kefu"></span>
	</div>
</div>

<div class="seek kefus">
    <div class="customercurpon bg-color">
	    <p class="tubiaos"><span class="myfont my-kefu2"></span></p>
		<div class="bgs">
		    <p class="person">[fh_title]</p> 
		    <p class="person2 active">注意：添加客服微信时请备注系统绑定的手机号</p> 
		    <p class="canvas" style="border: .1rem solid #fe8103!important;"><img src="media/[fh_qrcode]"></p>
		    <p class="person3">请长按微信二维码联系客服</p> 
		</div>
		<img class="close" src="template/t17/assets/img/closes.png">
	</div>
</div>

<div class="seek follows">
    <div class="smallcurpon bg-color">
	    <p class="tubiaos"><span class="myfont my-wxlogo"></span></p>
		<div class="bgs">
		    <p class="person">[fh_title]</p> 
		    <p class="canvas" style="border: .1rem solid #fe8103!important;"><img src="media/[fh_qrcode]"></p>
		    <p class="person3">请长按微信二维码关注公众号</p> 
		</div>
		<img class="close" src="template/t17/assets/img/closes.png">
	</div>
</div>

<script language="javascript">
    $('.kefu').click(function () {
	   $(".kefus").show();
	});
    $('.follow').click(function () {
		$(".follows").show();
	});
    $('.close').click(function () {
		$(".seek").hide();
		$(".collect-page").hide();
	});
</script>	
<div style="display: none;"></div>
<div style="display: none;">

</div>

</body></html>