<!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)<1 then 
response.Write "<script language=javascript>alert('参数错误!');history.go(-1);</script>"
response.end
end if
cid=value2(0)
sid=value2(1)
if  int(dd)>=2 then
page=value2(2)
end if

'接下来调用数据库，并显示内容，跟动态ASP一样
%>
<!--#include file="../inchuayuwebrlzywzhyweb/web_top_wap.asp"-->
<%if cid="" or sid="" then oa.msgshow("参数错误!")
if sid<>"" then
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 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
childa=dh("child")
	end if
		if dh("child")>0 then
set rs2=server.CreateObject("adodb.recordset")
	rs2.open"select top 1 ClassID from ClassList where ParentID="&dh("ClassID")&" order  by rootid,orderid",conn,1,1
	if not rs2.eof then
	lja=rs2(0)
	end if
	rs2.close
	set rs2=nothing
	if lja<>"" and dh("class_show")="文章形式" then	
  response.Redirect "?"&cid&"-"&lja&".html"
	end if
	end if
	dh.close
	set dh=nothing
	end if
%>

<%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 rel="stylesheet" href="../wapimg/swiper-3.3.1.min.css">
<link href="../wapimg/menu.css" rel="stylesheet" type="text/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>
              <%if xl>0 then
			  response.Write""& oa.getclassname(xl)
			  else
			  if  childa>0 then
			  response.Write""& oa.getclassname(sid)
			  else
			    response.Write""& oa.getclassname(cid)
				end if
				end if%></div><%if  xl>0 or childa>0 then%><div id="lmaa"><h1 class="xjt"><span></span></h1><div class="bdlm"><div id="lb"><ul>
    <%rs.open("select  * from classlist where parentid="&cid&" order by orderid"),conn,1,1
					 if not rs.eof and not rs.bof then			
					 do while not rs.eof 		
					%><li <%if int(sid)=rs("classid") or int(xl)=rs("classid") then%> class="sec"<%end if%>><a href="<%if trim(rs("zdylj"))<>"" then%><%if instr(rs("zdylj"),"http")>0 then%><%=rs("zdylj")%><%else%><%=webdir%><%=rs("zdylj")%><%end if%><%else%>../category/?<%=cid%>-<%=rs("classid")%>.html<%end if%>" title="<%=rs("classname")%>" ><%=rs("classname")%></a></li>
    <%
					  rs.movenext
					  loop
					  else

					  end if 
					  rs.close		
					%><%if lxa<>"文章形式" then%><li><a href="../column/?<%=cid%>.html">返回<%response.Write""& oa.getclassname(cid)%></a></li><%end if%>
    </ul></div></div></div>
              <%else%><div id="contain-1-2"><a href="<%=webdir%>wap/" ><i class="fa fa-home" aria-hidden="true"></i></a></div><%end if%></div><div id="contain-c"><%if child>0 or xl>0 then%><div id="lmda"> <%set rp=server.CreateObject("adodb.recordset")
if childa>0 then
rp.open"select *from  classlist where parentid="&sid&"  order by orderid ",conn,1,1
else
if xl>0 then
rp.open"select *from  classlist where parentid="&xl&"   order by orderid ",conn,1,1
else
rp.open"select *from  classlist where parentid="&cid&"    order by orderid ",conn,1,1
end if
end if
if not rp.eof then%><%do while not rp.eof%><a href="<%if rp("zdylj")<>"" then%><%=webdir%><%=rp("zdylj")%><%else%><%=webdir%>category/?<%=cid%>-<%=rp("classid")%>.html<%end if%>"  class="<%if int(sid)=rp("classid") or int(xl)=rp("classid") then%>sec<%end if%>" <%if instr(rp("zdylj"),"http")>0 then%> target="_blank" <%end if%>><%=rp("classname")%></a><%rp.movenext
  loop
  %>  <%end if
rp.close
set rp=nothing
%></div><%end if%><%if sid<>"" then
				call newslist(sid)
		    else					
				call newslist(Cid)
		    end if%>
 </div></div>
 </div></div></div></div><!--#include file="../end.asp"-->
</body>
</html>



