<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<%
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.asp"-->
<%if cid="" or sid="" or pid="" then oa.msgshow("参数错误!")
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")
	cname=dh("classname")
nbanner=dh("class_pic")
	end if
	dh.close
	set dh=nothing%>
<% 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 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
	if dh("class_pic")<>"" then
	nbanner=dh("class_pic")
	end if
	classhow=dh("class_show")
	end if
	dh.close
	set dh=nothing	
	end if
%>
<link rel="stylesheet" type="text/css" href="../images/page.css">
<script type="text/javascript" src="../images/jquery-1.8.3.min.js"></script>
<SCRIPT type=text/javascript src="../images/jquery-1.7.2.js"></SCRIPT>
<script src="../images/jquery.superslide.2.1.1.js" type="text/javascript"></script>
<SCRIPT type=text/javascript src="../images/load.js"></SCRIPT>
<link type="text/css" href="../images/prettyPhoto.css" rel="stylesheet" />
<script type="text/javascript" src="../images/jquery.prettyPhoto.js"></script>
<SCRIPT language=JavaScript type=text/javascript src="../images/sc.js"></SCRIPT>
<link href="../images/pro_dropdown_2.css" rel="stylesheet" type="text/css" />
<link href="../images/nypage.css" rel="stylesheet" type="text/css" />
</head><!--#include file="../head.asp"--><!--#include file="../nbanner.asp"--><div id="hyweb"><div id="body_1"><div id="nypage"><!--#include file="../left.asp"--><div id="contain"><div id="contain-1">
                <div id="contain-1-1">
                    <% dim sid
		  
							if sid<>"" then	 
		  	 response.Write""& oa.getclassname(sid)
		  else
		  response.Write""& oa.getclassname(cid)
		  end if%></div><div id="contain-1-2">当前位置:<a href="<%=webdir%>">网站首页</a>&nbsp;&gt;
               <a href="<%if sid<>"" and lxa="文章形式"  then%><%=webdir%>directory/?<%=cid%>-<%=sid%>.html<%else%><%=webdir%>channel/?<%=cid%>.html<%end if%>"><%response.Write oa.getclassname(Cid)%></a><%if xl<>"" then
		%> &nbsp;&gt;&nbsp;<a href="<%=webdir%>directory/?<%=cid%>-<%=xl%>.html"><%response.Write  oa.getclassname(xl)%></a> <%end if%><%
			 
		  if sid<>"" and sid<>cid   then
		  if xl<>"" then
		  xlm="-"&xl&""
		  end if%>&nbsp;&gt;&nbsp;<a href="<%=webdir%>directory/?<%=cid%>-<%=sid%>.html"><span><%response.Write oa.getclassname(sid)%></span></a>
		<%  else
		 	
		  end if%></div></div><div id="contain-a"><div id="contain-3"><%
			   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"><%=rs("Updatetime")%>&nbsp;&nbsp;&nbsp;&nbsp;来源：<%=rs("text1")%>&nbsp;&nbsp;&nbsp;&nbsp;作者：<%=rs("text2")%>&nbsp;&nbsp;浏览次数：<%=rs("hits")%></div><%end if%>
    
  <div id="nr"><%=rs("content")%></div><%else%><h1 id="title"><%=rs("title")%></h1><div class="lm1 hg1"><div class="lm2">
    <div align="center" class="picd"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="10%"><div align="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#contain><img src=../images/hl.png  border=0/></a>"
	else

	end if
	rn.close%></div></td>
          <td width="80%" align="center"><a href="../<%=rs("DefaultPicUrl")%>" target="_blank" rel="prettyPhoto[]" ><img src="../<%=rs("DefaultPicUrl")%>" width="450" border="0" /></a></td>
          <td width="10%"><div align="left"> <% 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#contain><img src=../images/hr.png border=0/></a>"
	else
	
	end if
	rn.close%></div></td>
        </tr>
      </table>
    </div>
  </div><div class="lm2 hg1"><div id="nr"><h1 class="heib">详细介绍:</h1>
  <%=rs("content")%></div><div align="right" style="height:25px; line-height:25px;">发表日期：<%=rs("Updatetime")%>&nbsp;&nbsp;浏览次数：<%=rs("hits")%></div></div></div><%end if%><%if classhow="列表形式"  or sid=105   then%><div align="left" style="height:25px; line-height:25px;"><strong>上一篇：</strong>
    <% 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>"&rn("title")&"</a>"
	else
	response.Write"没有了！"
	end if
	rn.close%>
    </div>
  <div align="left"  style="height:25px; line-height:25px;"><strong>下一篇：</strong>
      <% 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>"&rn("title")&"</a>"
	else
	response.Write"没有了！"
	end if
	rn.close%>
      </div>
  <%end if%>
            </div>
        </div><div id="nyxg"><div id="nyxg_1"><h2>相关信息</h2></div><div id="nyxg_2"><%if classhow="列表形式" then%><div id="news-3"><ul><%Randomize(Timer())
		set rn=oa.execute("select top 10  title,id,Updatetime,classid from c_Article where  (classid="&sid&" ) and id<>"&pid&" order by Rnd(-(id+"&Int((10000*Rnd)+1)&"))")
		if not rn.eof and not rn.bof then
		do while not rn.eof %> <LI><a href="<%=webdir%>content/?<%=cid%>-<%=rn("classid")%>-<%=rn("id")%>.html" title="<%=rn("title")%>" ><%if len(rn("title"))>25 then%><%=left(rn("title"),25)%>..<%else%><%=rn("title")%><%end if%></A></LI><%rn.movenext
		loop
		else
		response.Write"没有相关新闻"
		end if
		rn.close
		%>
</ul>
      </div><%else%><div id="producta"> <ul><%Randomize(Timer())
	  set rp=server.CreateObject("adodb.recordset")
		rp.open"select top 8 title,Updatetime,classid,id,DefaultPicUrl from c_Article where    DefaultPicUrl<>'' and ( classid="&sid&" ) and id<>"&pid&"   order by Rnd(-(id+"&Int((10000*Rnd)+1)&"))",conn,1,1
		if not rp.eof then
		p=0
	do while not rp.eof
	p=p+1%><LI><a href="<%=webdir%>content/?<%=cid%>-<%=rp("classid")%>-<%=rp("id")%>.html"  title="<%=rp("title")%>"><h1><img src="../<%=rp("DefaultPicUrl")%>" alt="<%=rp("title")%>" border="0"/></h1>
   <p><%=left(rp("title"),14)%></p></A> </LI><%rp.movenext
			 loop %><%else
		response.Write"还没有相关信息!"
		end if
		rp.close
	set	rp=nothing%></ul></div><%end if%></div></div></div></div></div></div>
<!--#include file="../foot.asp"--><script type="text/javascript">
$(document).ready(function(){	
	$("area[rel^='prettyPhoto']").prettyPhoto();
	$(".picd:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true});
})</script>

</html>


