<!--#include file="../Inc/conn.asp"-->
<!--#include file="../Inc/fenye.asp"-->
<!--#include file="../newsInc.asp"-->
<%
dim htmlid,id1,id2,a,b
htmlid=Request.ServerVariables("QUERY_STRING") 

id1=replace(htmlid,".html","")
id2=split(id1,"_")
on error resume next
a=LaoYRequest(id2(0))
b=LaoYRequest(id2(1))
id=a
set rs=server.createobject("adodb.recordset")
sql="select * from jle_Article where id="&a
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Call Alert("不正确的ID!",SitePath)
else
If rs("Linkurl")<>"" then
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>转向：<%=rs("title")%></title>
<style>
#ndiv{ 
	width:450px;
	padding:8px;
	margin-top:8px;
	background-color:#FCFFF0;
	border:3px solid #B4EF94;
	height:100px;
	text-align:left;
	font-size:14px;
	line-height:180%;
}
</style>
<meta http-equiv="refresh" content="1;URL=<%=rs("LinkUrl")%>">
</head>
<body>
<div align='center'>
<div id='ndiv'>
正在转向：<a href='<%=rs("LinkUrl")%>'><%=rs("LinkUrl")%></a>，请稍候...
</div>
</div>
</body>
</html>
<%
Response.End
Else

set rsClass=server.createobject("adodb.recordset")
sql = "select * from jle_Class where ID="&rs("ClassID")&""
rsClass.open sql,conn,1,1  
if rsClass.eof and rsClass.bof then
  Call Alert("没有此分类,返回首页!","index.asp")
else
  ClassName=rsClass("ClassName")
  CReadPower=rsClass("ReadPower")
  TopID=rsClass("TopID")
rsClass.close
set rsClass=nothing
end if

If rs("PageNum")=0 then
	If Html=2 then
	Content=ManualPagination2(""&rs("ID")&"",""&UBBCode(rs("Content"))&"")
	else
	Content=ManualPagination3(""&rs("ID")&"",""&UBBCode(rs("Content"))&"")
	end if
else
	If Html=2 then
	Content=AutoPagination2(""&rs("ID")&"",""&UBBCode(rs("Content"))&"",rs("PageNum"))
	else
	Content=AutoPagination3(""&rs("ID")&"",""&UBBCode(rs("Content"))&"",rs("PageNum"))
	end if
End if
%><!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" />
<meta name="keywords" content="<%=Replace(rs("KeyWord"),"|",",")%>" />
<meta name="description" content="<%=left(rs("Artdescription"),100)%>" />
<link href="<%=SitePath%>images/css<%=Css%>.css" ID="skin" type=text/css rel=stylesheet>
<link rel="shortcut icon" href="<%=SitePath%>images/myfav.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=SitePath%>inc/main.asp"></script>
<title><%=rs("Title")%><%=IIF(b>0,"("&b&")","")%>-<%=ClassName%>-<%=sitetitle%>-</title>
</head>
<body<%If ""&IsPing&""=1 then%> onLoad="showre(<%=a%>,1)"<%end if%>>
<div class="mwall">
<%=Head%>
<%=Menu%><div class="mw">
	<div class="dh">
		<%=search%>您现在的位置：<a href="<%=SitePath%>">首页</a> >> <%If TopID>0 then%><a href="<%=IIF(Html=3,"../Class_"&TopID&".html","../newsClass.asp?ID="&TopID&"")%>"><%=Classlist(TopID)%></a> >> <%End if%><a href="<%=IIF(Html=3,"../Class_"&rs("ClassID")&".html","../newsClass.asp?ID="&rs("ClassID")&"")%>"><%=ClassName%></a> >> 内容
    </div>
	<div id="nw_left">
		<div id="web2l">
			<h1><%=rs("Title")%><%=IIF(b>0,"("&b&")","")%></h1>
			<h3>时间：<%=rs("DateAndTime")%><%If IsHits=1 then%> 点击：<span id="count"><img src="<%=SitePath%>images/loading2.gif" /></span><%End if%></h3>
			<div id="content">
            	<%If Iszhaiyao=1 and b<2 then%><div class="zhaiyao"><b>　　核心提示：</b><%=LoseHtml(left(rs("Artdescription"),150))%>...</div><%End if%>
				<%Call ShowAD(1)%>
				<%
				If rs("yn")=2 then 
					If rs("UserName") = LaoYName then
						Response.Write(Content)
					else
						Response.Write("<div style=""margin:40px auto;text-align:center;color:#ff0000;"">会员私有文章，禁止查看!</div>") 
					End if
				end if
				
				if rs("yn")=1 then 
				Response.Write("<div style=""margin:40px auto;text-align:center;color:#ff0000;"">该文章还没有通过审核</div>") 
				end if
				
				if rs("yn")= 0 then 
						If Rs("ReadPower") = "0" then
							Response.Write(Content)
						Else
							If Rs("ReadPower") <> "" then
								If (Not(Instr(","& Rs("ReadPower") &",",",0,") <> 0 Or Rs("ReadPower") = "0")) and rs("UserName") <> LaoYName Then
									If Instr(","& Rs("ReadPower") &",",","& UserInfo(LaoYID,0) &",") > 0 Then
										Response.Write(Content)
									Else
										Response.Write("<div style=""font-size:12px;color:#ff0000;text-align:center;padding:20px;"">对不起,你没有浏览权限,该文章只有<font color=blue>"&ShowlevelOption2(Rs("ReadPower"))&"</font>才能浏览</div>")
									End if
								Else
									Response.Write(Content)
								End if
							Else
								If CReadPower = "0" or CReadPower = "" then
									Response.Write(Content)
								Else
									If (Not(Instr(","& CReadPower &",",",0,") <> 0 Or CReadPower = "0")) and rs("UserName") <> LaoYName Then
										If Instr(","& CReadPower &",",","& UserInfo(LaoYID,0) &",") > 0 Then
											Response.Write(Content)
										Else
											Response.Write("<div style=""font-size:12px;color:#ff0000;text-align:center;padding:20px;"">对不起,你没有浏览权限,该文章只有<font color=blue>"&ShowlevelOption2(CReadPower)&"</font>才能浏览</div>")
										End if
									Else
										Response.Write(Content)
									End if								
								End if
							End if						
						End if
				end if
				%>
			</div>
				<%
				If rs("KeyWord")<>"" then
					If rs("KeyWord")=rs("Title") then
					Else
					Response.Write "<div class=""tags"">Tags:"
					aa = Split(ucase(rs("KeyWord")), "|")
					For i=0 to Ubound(aa)
					Response.Write "<a href="""&SitePath&"Search.asp?KeyWord="&Server.UrlEncode(aa(i))&""">"& aa(i) &"</a>"&  "&nbsp;"
					Next
					Response.Write "</div>"
					End if
				End if
		 		%>
            <div id="copy"><%If IsAuthor =1 then%>作者：<%=rs("author")%><%End if:If rs("UserID")<>0 then Response.Write("　录入：<a href="""&SitePath&"User/ShowUser.asp?UserName="&rs("UserName")&""" title=""点击查看资料""><u>"&rs("UserName")&"</u></a>") end if%>　<%If IsFrom =1 then%>来源：<%=rs("CopyFrom")%><%End if%></div>
            <%If rs("Vote")<>"" then Response.Write(""&ShowVoteList2(rs("Vote"))&"") End if%>
            <%If Iswz=1 then%><script type="text/javascript" src="<%=SitePath%>images/wz.js"></script><%End if%>
			<%Call ShowAD(2)%>
            <%If mood=1 then%><div style="margin:0 auto;width:530px;">
            <script language="javascript">
			var infoid = '<%=a%>';
			</script>
			<script language = "JavaScript" src ="<%=SitePath%>newsInc/mood.asp?ID=<%=ID%>"></script>
            </div><%End if%>
            <div class="sxart">
			<%=thehead%><%=thenext%>
            </div>
		</div>
		<div id="web2l">
			<h6>相关文章</h6>
			<div id="marticle">
				<ul>
					<%=ShowMutualityArticle(a,rs("KeyWord"),20,"·",0)%>
				</ul>
			</div>
            <div id="clear"></div>
		</div>
        <div id="clear"></div>
		<%If IsPing=1 then%>
		<div id="web2l">
			<h6><span style="float:right;font-size:12px;">共有评论 <font color="#ff0000"><%=Mydb("Select Count([ID]) From [jle_Pl] Where yn=1 and ArticleID="&a&"",1)(0)%></font> 条</span>相关评论</h6>
			<div id="list"><img src="<%=SitePath%>images/loading.gif" /></div>
			<div id="MultiPage"></div>
			<div id="clear"></div>
			<h6>发表我的评论</h6>
			<div style="height:205px;">
			<div class="pingp">
			<%
			If PingNum=0 then
				Call ShowAD(5)
			else
            for i = 1 to PingNum%>
                <img src="<%=SitePath%>images/faces/<%=i%>.gif" onclick='insertTags("[laoy:","]","<%=i%>")'/>
            <%
			Next
			End if
			%>
  			</div>
			<div class="artpl">
				<ul>
					<li>大名：<input name="memAuthor" type="text" class="borderall" id="memAuthor" value="<%If IsUser=1 then Response.Write(""&UserName&"") else Response.Write(""&iparray(GetIP)&"") End if%>" Readonly maxlength="8"/>
					</li>
					<li>内容：<textarea name="memContent" cols="30" rows="8" style="width:300px;height:120px;" wrap="virtual" id="memContent" class="borderall"/></textarea></li>
					<li><input name="ArticleID" type="hidden" id="ArticleID" value="<%=ID%>" />
      <input name="button3" type="button"  class="borderall" id = "sendGuest" onClick="AddNew()" value="发 表" /></li>
	  			</ul>
	  		</div>
		</div></div><%end if%>
	</div>
	<div id="nw_right">
		<%Call ShowAD(3)%>
        <div id="web2r">
			<h5>本类热门</h5>
			<ul id="list10">
            	<%Call ShowArticle(""&rs("ClassID")&"",10,5,"·",100,"no","Hits desc,ID desc",0,0)%>
            </ul>
  		</div>
		<div id="web2r">
			<h5>本类推荐</h5>
			<ul id="list10">
            	<%Call ShowArticle(""&rs("ClassID")&"",10,5,"·",100,"IsHot=1","ID desc",0,0)%>
            </ul>
  		</div>
        <div id="web2r">
			<h5>本类固顶</h5>
			<ul id="list10">
            	<%Call ShowArticle(""&rs("ClassID")&"",10,5,"·",100,"IsTop=1","ID desc",0,0)%>
            </ul>
  		</div>
	</div>
</div>
<script type="text/javascript" src="<%=SitePath%>Ajaxpl.asp"></script>
<%End if%>
<%
rs.close
set rs=nothing
end if
	
function thehead 
headrs=server.CreateObject("adodb.recordset") 
sql="select top 1 ID,Title from jle_Article where id<"&id&" and ClassID="&rs("ClassID")&" order by id desc" 
set headrs=conn.execute(sql) 
if headrs.eof then 
response.Write("<li>上一篇：没有了</li>") 
else 
a0=headrs("id") 
a1=headrs("Title")
If html=1 then
response.Write("<li>上一篇：<a href='../newsList.asp?ID="&a0&"'>"&a1&"</a></li>") 
Elseif html=2 then
response.Write("<li>上一篇：<a href='?"&a0&".html'>"&a1&"</a></li>")
Else
response.Write("<li>上一篇：<a href='"&a0&".html'>"&a1&"</a></li>")  
End if
end if
headrs.close
set headrs=nothing
end function

function thenext 
newrs=server.CreateObject("adodb.recordset") 
sql="select top 1 ID,Title from jle_Article where id>"&id&" and ClassID="&rs("ClassID")&" order by id asc" 
set newrs=conn.execute(sql) 
if newrs.eof then 
response.Write("<li>下一篇：没有了</li>")
else 
a0=newrs("id") 
a1=newrs("Title")
If html=1 then
response.Write("<li>下一篇：<a href='../newsList.asp?ID="&a0&"'>"&a1&"</a></li>") 
Elseif html=2 then
response.Write("<li>下一篇：<a href='?"&a0&".html'>"&a1&"</a></li>")
else
response.Write("<li>下一篇：<a href='"&a0&".html'>"&a1&"</a></li>")  
End if
end if
newrs.close
set newrs=nothing
end function
%>
<div style="display:none;" id="_count">
<script type="text/javascript" src="<%=SitePath%>inc/count.asp?id=<%=ID%>"></script>
</div>
<script>$('count').innerHTML=$('_count').innerHTML;</script>
<%=Copy%>
</div>
</body>
</html>