<!doctype html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black">
<%
value1=replace(Request.ServerVariables("QUERY_STRING"),".html","-") '获得?后面的参数
value2=split(value1,"-")           '对参数进行过滤，从而获得id1和id2的值
dd=ubound(value2)
if int(dd)<2 then 
response.Write "<script language=javascript>alert('参数错误!');history.go(-1);</script>"
response.end
end if
cid=value2(0)
sid=value2(1)
pid=value2(2)
'接下来调用数据库，并显示内容，跟动态ASP一样
%>
<!--#include file="../inchuayuwebrlzywzhyweb/web_top_wap.asp"-->
<%if cid="" or sid="" or pid="" then oa.msgshow("参数错误!")
set dh=server.CreateObject("adodb.recordset")
	dh.open"select  *from ClassList where classid="&sid&" and Depth=2 order  by rootid,orderid",conn,1,1
	if not dh.eof then
	xl=dh("ParentID")
	end if
	dh.close
	set dh=nothing
	set rh=server.CreateObject("adodb.recordset")
rh.open"select * from c_article where id="&Pid,conn,1,3
rh("hits")=rh("hits")+1
rh.update
rh.close
set rh=nothing%>
<%set dh=server.CreateObject("adodb.recordset")
	dh.open"select  *from ClassList where classid="&sid&" order  by rootid,orderid",conn,1,1
	if not dh.eof then
	classhow=dh("class_show")
	end if
	dh.close
	set dh=nothing%>
 <%set dh=server.CreateObject("adodb.recordset")
	dh.open"select  *from ClassList where classid="&cid&" order  by rootid,orderid",conn,1,1
	if not dh.eof then
	lxa=dh("class_show")
	child=dh("child")
	end if
	dh.close
	set dh=nothing
	%>
<link rel="stylesheet" type="text/css" href="../wapimg/common.css">
<link href="../wapimg/txt.css" rel="stylesheet" type="text/css">
<link href="../wapimg/nypage.css" rel="stylesheet" type="text/css">
<link href="../wapimg/menu.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../wapimg/swiper-3.3.1.min.css">
<SCRIPT type=text/javascript src="../wapimg/jquery-1.9.1.min.js"></SCRIPT>
</head>
<body ><!--#include file="../top.asp"--><div id="hyweb"><div id="body"><div id="nypage"><div id="contain"><div id="contain-1"><div id="contain-1-1"><i class="fa fa-chevron-circle-right" aria-hidden="true"></i>
              <%response.Write""& oa.getclassname(sid)%></div><div id="contain-1-2"><a href="../<%if sid<>"" and cid<>sid then%>category/?<%=cid%>-<%=sid%>.html<%else%>column/?<%=cid%>.html<%end if%>"><i class="fa fa-undo" aria-hidden="true"></i></a></div></div><div id="contain-c"><div id="contain-nr"><%
			   set rs=oa.execute("select * from c_article where id="&Pid)
			  if rs.eof then oa.msgshow("非法操作！")%><%if (classhow="列表形式" or classhow="文章形式"   )  then%>
<h1 id="title"><%=rs("title")%></h1>
<%if  classhow<>"文章形式" then%><div id="ly">&nbsp;&nbsp;来源：<%=rs("text1")%>&nbsp;&nbsp;
作者：<%=rs("text2")%></div><%end if%>
  
  <div id="nr"><%=FixImg(rs("content"))%>
  </div><div align="right" style=" line-height:25px;">发表日期：<%=rs("Updatetime")%>&nbsp;&nbsp;浏览次数：<%=rs("hits")%></div></div><%else%><h1 id="title"><%=rs("title")%></h1><div class="lm1 hg1"><div class="lm2">
    <div align="center"><a href="../<%=rs("DefaultPicUrl")%>" target="_blank"><img src="../<%=rs("DefaultPicUrl")%>" style=" max-width:80%;" border="0" /></a></div>
  </div><div class="lm2 hg1"><h1 class="red"><span>详细介绍</span></h1><div id="nr"> 
<%=FixImg(rs("content"))%></div><div align="right" style=" line-height:25px;">发表日期：<%=rs("Updatetime")%>&nbsp;&nbsp;浏览次数：<%=rs("hits")%></div></div></div><%end if%><div id="pagelist"><div class="right"> <% set rn=oa.execute("select * from c_article where id>"&Pid&" and classid="&sid&" order by id ASC")
	if not rn.eof then
	response.write "<a href=?"&cid&"-"&sid&"-"&rn("id")&".html>上一个</a>"
	else
	response.Write"<a>第一个</a>"
	end if
	rn.close%>  <% set rn=oa.execute("select * from c_article where id<"&Pid&" and classid="&sid&" order by id desc")
	if not rn.eof then
	response.write "<a href=?"&cid&"-"&sid&"-"&rn("id")&".html>下一个</a>"
	else
	response.Write"<a>最后</a>"
	end if
	rn.close%> <a href="../<%if sid<>"" and cid<>sid then%>category/?<%=cid%>-<%=sid%>.html<%else%>column/?<%=cid%>.html<%end if%>">返回列表</a></div><div></div>
 </div>
              </div></div>
 </div></div></div></div><!--#include file="../end.asp"--><%Function FixImg(sString) 

    Dim sReallyDo, regEx, iReallyDo 
    Dim oMatches, cMatch 
    Dim tStartTime, tEndTime 
    If IsNull(sString) Then 
        FixImg = "" 
        Exit Function 
    End If 
    sReallyDo = sString 
    On Error Resume Next 
    sReallyDo = Replace(sReallyDo, vbCr, " ") 
    sReallyDo = Replace(sReallyDo, vbLf, " ") 
    sReallyDo = Replace(sReallyDo, vbTab, " ") 
    sReallyDo = Replace(sReallyDo, "<img ", vbCrLf & "<img ", 1, -1, 1) 
    sReallyDo = Replace(sReallyDo, "/>", " />", 1, -1, 1) 
    sReallyDo = ReplaceAll(sReallyDo, "= ", "=", True) 
    sReallyDo = ReplaceAll(sReallyDo, "> ", ">", True) 
    sReallyDo = Replace(sReallyDo, "><", ">" & vbCrLf & "<") 
    sReallyDo = Trim(sReallyDo) 
    On Error GoTo 0 
    Set regEx = New RegExp 
    regEx.IgnoreCase = True 
    regEx.Global = True 
    regEx.Pattern = "<img.*?\ssrc=([^\""\’\s][^\""\’\s>]*).*?>" 
    sReallyDo = regEx.Replace(sReallyDo, "<img src=""$1"" />") 
    regEx.Pattern = "<img.*?\ssrc=([\""\’])([^\""\’]+?)\1.*?>" 
    sReallyDo = regEx.Replace(sReallyDo, "<img src=""$2"" />") 
    FixImg = sReallyDo 
End Function %>
</body>
</html>



