<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%
IF request.cookies(echsys)("KEY")="" THEN

else
	usernamecookie=CheckStr(request.cookies(echsys)("UserName"))
	passwdcookie=CheckStr(trim(Request.cookies(echsys)("passwd")))
	KEYcookie=CheckStr(trim(request.cookies(echsys)("KEY")))
	if usernamecookie="" or passwdcookie="" then
		response.cookies(echsys)("UserName")=""
		response.cookies(echsys)("KEY")=""
		response.cookies(echsys)("purview")=""
		response.cookies(echsys)("fullname")=""
		response.cookies(echsys)("reglevel")=""
	else
		'判断用户的合法性
		set rs=server.createobject("adodb.recordset")
		sql="select * from "& db_User_Table &" where "& db_User_Name &"='"&usernamecookie&"'"
		rs.open sql,ConnUser,1,1
		if rs.eof and rs.bof then
			response.cookies(echsys)("UserName")=""
			response.cookies(echsys)("KEY")=""
			response.cookies(echsys)("purview")=""
			response.cookies(echsys)("fullname")=""
			response.cookies(echsys)("reglevel")=""
		end if
		IF passwdcookie<>rs(db_User_Password) THEN
			response.cookies(echsys)("UserName")=""
			response.cookies(echsys)("KEY")=""
			response.cookies(echsys)("purview")=""
			response.cookies(echsys)("fullname")=""
			response.cookies(echsys)("reglevel")=""
		END IF
		'下面判断用户级别实际在有用户级别是都应该判断
		if KEYcookie<>rs("OSKEY") then
			response.cookies(echsys)("UserName")=""
			response.cookies(echsys)("KEY")=""
			response.cookies(echsys)("purview")=""
			response.cookies(echsys)("fullname")=""
			response.cookies(echsys)("reglevel")=""
		end if
		rs.close
		set rs=nothing
	END IF
END IF



'该文件需要进行调整和设置
dim E_typename
EC_ArticleID=Request.QueryString("EC_ArticleID")
Page=Request.QueryString("page")

if page="" then
	page=1
	elseif not IsNumeric(page) then
		Show_Err("非法参数！<br><br><a href='javascript:history.back()'>返回</a>")
		response.end
	end if
	page=int(page)
	if EC_ArticleID="" then
		Show_Err("未指定参数！<br><br><a href='javascript:history.back()'>返回</a>")
		response.end
	elseif not IsNumeric(EC_ArticleID) then
		Show_Err("非法参数！<br><br><a href='javascript:history.back()'>返回</a>")
		response.end
	else
		'判断该篇文章是否审核
		set rs=server.createobject("adodb.recordset")
		sql="select * from "& db_wygkcn_Article_Table &" where EC_ArticleID="&EC_ArticleID
		rs.open sql,conn,3,3
		if rs.eof and rs.bof then
			rs.close
			set rs=nothing
			Show_Err("指定的文章不存在！<br><br><a href='javascript:history.back()'>返回</a>")
			response.end
		else
			checked=rs("Checked")
			if checked=1 or Request.cookies(echsys)("key")="super" or Request.cookies(echsys)("key")="typemaster" or Request.cookies(echsys)("key")="bigmaster" or Request.cookies(echsys)("key")="smallmaster" then	'文章已审核并且是相关管理员
				Click=rs("Click")
				if isnull(rs("Click"))  then
					conn.execute("update "& db_wygkcn_Article_Table &" Set Click=1 where EC_ArticleID=" & EC_ArticleID )
				else 
					conn.execute("update "& db_wygkcn_Article_Table &" Set Click=click+1 where EC_ArticleID=" & EC_ArticleID )
				end if
			end if
		
			rs.close
			set rs=nothing
		end if

		set rs=server.CreateObject("ADODB.RecordSet")
		if uselevel=1 then
			if Request.cookies(echsys)("key")="" then
				rs.Source="select * from "& db_wygkcn_Article_Table &" where Checked=1 and newslevel=0 and EC_ArticleID="&EC_ArticleID
			end if
			if Request.cookies(echsys)("key")="selfreg" then
				if Request.cookies(echsys)("reglevel")=3 then
					rs.Source="select * from "& db_wygkcn_Article_Table &" where Checked=1 and newslevel<=3 and EC_ArticleID="&EC_ArticleID
				end if
				if Request.cookies(echsys)("reglevel")=2 then
					rs.Source="select * from "& db_wygkcn_Article_Table &" where Checked=1 and newslevel<=2 and EC_ArticleID="&EC_ArticleID
				end if
				if Request.cookies(echsys)("reglevel")=1 then
					rs.Source="select * from "& db_wygkcn_Article_Table &" where Checked=1 and newslevel<=1 and EC_ArticleID="&EC_ArticleID
				end if
			end if
		end if
			if Request.cookies(echsys)("key")="super" or Request.cookies(echsys)("key")="typemaster" or Request.cookies(echsys)("key")="bigmaster" or Request.cookies(echsys)("key")="smallmaster" or Request.cookies(echsys)("key")="check" then
				rs.Source="select * from "& db_wygkcn_Article_Table &" where EC_ArticleID="&EC_ArticleID
			else
				rs.Source="select * from "& db_wygkcn_Article_Table &" where EC_ArticleID="&EC_ArticleID
			end if
			rs.Open rs.Source,conn,1,1
			E_BigClassID=rs("E_BigClassID")
			E_SmallClassID=rs("E_SmallClassID")
			title=htmlencode4(trim(rs("title")))
			Aindex=htmlencode4(trim(rs("Aindex")))
			G_content=htmlencode4(trim(rs("G_content")))
			title1=htmlencode4(trim(rs("title")))
			about=htmlencode4(trim(rs("about")))
			Author=htmlencode4(trim(rs("Author")))
			editor=htmlencode4(trim(rs("editor")))
			Original=htmlencode4(trim(rs("Original")))
			image=rs("image")
			UpdateTime=trim(rs("UpdateTime"))
			News_Content=rs("Content")
			EC_SpecialID=rs("EC_SpecialID")
			EC_SpecialID2=rs("EC_SpecialID2")
			click=rs("click")
			EnCode=trim(rs("EnCode"))
			E_typeid=rs("E_typeid")
			titletype=rs("titletype")
			titlecolor=rs("titlecolor")
			titleface=rs("titleface")
			editor=rs("editor")
			wzdj=rs("newslevel")
			backtype=rs("backtype")
			backtype1=rs("backtype1")
			rs.Close
			set rs=nothing

			set rs=server.CreateObject("ADODB.RecordSet")
			rs.Source="select * from "& db_wygkcn_Type_Table &" where E_typeid=" & E_typeid
			rs.Open rs.Source,conn,1,1
			E_typename=rs("E_typename")
			rs.Close
			set rs=nothing

			set rs=server.CreateObject("ADODB.RecordSet")
			If(isnull(E_BigClassID)) Then
				E_BigClassName=" "
				E_BigClassID = 0
			Else
				rsSource="select * from "& db_wygkcn_BigClass_Table &" Where E_BigClassID="& E_BigClassID
				rs.Open rsSource,conn,1,3
				If (rs.eof or rs.bof) Then
					E_BigClassName=" "
				else
					E_BigClassName=rs("E_BigClassName")
				End if
				rs.close
				set rs=nothing
			End if
			
			if E_SmallClassID<>"" then
				set rs=server.CreateObject("ADODB.RecordSet")
				rs.Source="select * from "& db_wygkcn_SmallClass_Table &" Where E_SmallClassID=" & E_SmallClassID
				rs.Open rs.Source,conn,1,1
				E_smallclassname=rs("E_smallclassname")
				rs.close
				set rs=nothing
			end if%>
<%
'文章ip限制
	if cINT(backtype1)=1 then
	dim byte2
	byte2=split(newsipType,"|")
	for i=0 to ubound(byte2)
		if Request.serverVariables("REMOTE_ADDR")<>byte2(i) then
		Show_Err("对不起，此篇文章只供内部浏览，请联系管理员！。<br><br><a href='javascript:history.back()'>返回</a>")
		Response.End
		end if
	next
	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" lang="gb2312">
<head>
<title>政务信息公开__<%=eChSys_Com%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="CSS/Wygkcn_Home.css" rel=stylesheet type=text/css>
<LINK href="CSS/Wygkcn_News.css" rel="stylesheet">
<noscript><iframe scr="*"></iframe></noscript>
<script language="JavaScript" type="text/JavaScript">

function img_zoom(e, o)		//图片鼠标滚轮缩放
{
	var zoom = parseInt(o.style.zoom, 10) || 100;
	zoom += event.wheelDelta / 12;
	if (zoom > 0) o.style.zoom = zoom + '%';
		return false;
}
</script>


<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>

<script language="JavaScript" type="text/JavaScript">

var size=14;			//字体大小

function fontZoom(fontsize){	//设置字体
	size=fontsize;
	document.getElementById('fontZoom').style.fontSize=size+'px';
}

function fontMax(){	//字体放大
	size=size+2;
	document.getElementById('fontZoom').style.fontSize=size+'px';
}

function fontMin(){	//字体缩小
	size=size-2;
	if (size < 2 ){
		size = 2
	}
	document.getElementById('fontZoom').style.fontSize=size+'px';
}

</SCRIPT>

<script language="javascript">
<!--
function changedata() {
	if ( document.AddReview.none.checked ) {
		document.AddReview.Author.value = "游客";
	} 
}
function changedata1() {
	if ( document.AddReview.none1.checked ) {
		document.AddReview.email.value = "58728@tqgk.net";
	} 
}

//-->
</script>
<style type="text/css">
<!--
.STYLE1 {color: #FF3333}
-->
</style>
</head>
<%if ScrollClick = "double" then%>
	<SCRIPT language=JavaScript>
	//双击滚屏代码
	var currentpos,timer;
	
	function initialize()
	{
	timer=setInterval("scrollwindow()",50);
	}
	
	function sc(){
	clearInterval(timer);
	}
	
	function scrollwindow()
	{
	currentpos=document.body.scrollTop;
	window.scroll(0,++currentpos);
	if (currentpos != document.body.scrollTop)
		sc();
	}
	document.onmousedown=sc
	document.ondblclick=initialize
	</script>
<%else%>
	<SCRIPT>
	//单击拖动屏幕方式
	var old_y=0;  //记录鼠标按下时的Ｙ轴位置
	var yn=0;  //用于记录鼠标状态
	function moveit()
	{
	if(yn==1 &&  event.button==1)  //如果鼠标左键按下就移动页面
	document.body.scrollTop=(old_y-event.clientY); //移动页面
	}
	function downit()
	{old_y=event.clientY+document.body.scrollTop; //记住鼠标按下时的Ｙ轴位置
	yn=1; //用于记住鼠标已按下
	}
	
	function upit()
	{yn=0;}  //记住鼠标已放开
	
	document.onmouseup=upit; //鼠标放开时执行upit()函数
	document.onmousedown=downit; //鼠标按下时执行downit()函数
	document.onmousemove =moveit; //鼠标移动时执行moveit()函数
	</SCRIPT>
<%end if%>
</head>
<body>
<!--内容部分开始-->
<div id="EC_Content">
<!--#include file="Top.asp"-->
<!--中间内容部分开始-->
<div id=EC_GovPublic_center>
<!--左边部分开始-->
<div class="EC_GovPublic_left float_left">
<!--#include file="wygkcn_left.asp"-->
</div>
<!--左边部分结束-->

<!--右边部分开始-->
<div class="EC_GovPublic_right float_right">

<!--位置导航部分开始-->
<div class="position">
<img src="Images/lm_dot.gif" width="11" height="11">&nbsp;&nbsp;您的位置&nbsp;&nbsp;<span class="daohang"><a class="daohang" href="./" >首页</a>&gt;&gt;<a class="daohang" href="EC_zwgk.asp"><%=E_typename%></a>
<%if E_BigClassID<>"" then%>
&gt;&gt;<%=E_BigClassName%>
<%if E_SmallClassID<>"" then%>
&gt;&gt;<%=E_smallclassname%>
<%end if%>
<%end if%>
<%title1=htmlencode4(title1)%>
</span></div>
<!--位置导航部分结束-->
<div class="ec_govpublic_txt">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                            <tr>
                              <td width="100%" align=center><br>
							 <font color="#000000">
                                  <font color="<%=titlecolor%>" size="+2" face="楷体_GB2312"><strong><%=title1%></strong></font><br><br>
 <%if Aindex<>"" then%>索引号：<%=Aindex%><%end if%>&nbsp;&nbsp;发表日期：<%=UpdateTime%>&nbsp; 浏览<font color=red><%=click%></font> 次 &nbsp;
                                <%if Original<>"" then%>
                                发布机构：<%=Original%>
                                <%end if%>
                                &nbsp;&nbsp;字体：<A class=black href="javascript:fontMax()">大</A>&nbsp;<A class=black href="javascript:fontZoom(14)">中</A>&nbsp;<A class=black href="javascript:fontMin()">小</A>  &nbsp;         
								  
								  <HR align="center" width="98%" noshade style="color:#3c1400; height:1px;">
                              </td>
                            </tr>
                            <%
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from "& db_wygkcn_Article_Table &" where EC_ArticleID=" & EC_ArticleID
rs.Open rs.source,conn,1,1
E_typeid=rs("E_typeid")
Title=trim(rs("Title"))
G_content=trim(rs("G_content"))
image=rs("image")

dim mode
    
set rs11=server.CreateObject("ADODB.RecordSet")
rs11.Source="select * from "& db_wygkcn_Type_Table &" where E_typeid="&E_typeid&" order by E_typeid"
rs11.Open rs11.Source,conn,1,1
mode=rs11("mode")
rs11.close
set rs11=nothing

''添加图片鼠标滚轮缩放效果
if mouse_wheel_zoom="on" then
	News_Content=replace(News_Content,"<IMG","<IMG onmousewheel='return img_zoom(event,this)' onload='javascript:if(this.width>screen.width-333)this.width=screen.width-333'",1,-1,1) 
end if
''图片上传路径还原为 config.asp 中设定的 [FileUploadPath] 值
News_Content=replace(News_Content,"="&chr(34)&"uploadfile/","="&chr(34)&FileUploadPath,1,-1,1)

arr_Content=split(News_Content,"[---分页---]")
MaxPages=ubound(arr_Content)
%>
                            <tr>
                              <td width="100%"  align="center"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed">
                                  <tr>
                                    <td width="100%" align=center></td>
                                  </tr>
                                  <tr>
                                    <TD align="left" vAlign=top class=newstitle id=fontzoom>
									<br>
									&nbsp;&nbsp;
									<%if G_content<>"" then%>
                                    内容概述：<%=G_content%>
									 <HR align="center" width="98%" noshade style="color:#3c1400; height:1px;">
									 <%end if%>
                                        <%if (checked<>1) and ((Request.cookies(echsys)("key")<>"super") and (Request.cookies(echsys)("key")<>"typemaster") and (Request.cookies(echsys)("key")<>"bigmaster") and (Request.cookies(echsys)("key")<>"smallmaster")) then	'文章未审核,并且是非相关管理员
	response.write "<P><CENTER><strong><font color='ff0000' size='+2' face='隶书'>文章还未经过审核<br>请等待或者通知管理员审核才能阅览！</font></strong></CENTER>"
	response.write "<P><CENTER><IMG SRC='" &ReadNews_CopyRight_Logo& "' BORDER='0' ALT=''></CENTER>"
else	'文章已审核
	if checked<>1 then
		response.write "<P><CENTER><strong><font color='ff0000' size='+2' face='隶书'>提醒：该文章还未通过审核</font></strong></CENTER>"
	end if



if uselevel=1 then

	if cINT(wzdj)<1 then
		Response.Write arr_Content(Page-1)%>
                                        <% else %>
                                        <%if Request.cookies(echsys)("key")="super" or Request.cookies(echsys)("key")="typemaster" or Request.cookies(echsys)("key")="bigmaster" or Request.cookies(echsys)("key")="smallmaster" or Request.cookies(echsys)("key")="check" then %>
                                        <%Response.Write arr_Content(Page-1)%>
                                        <% else %>
                                        <%if  Request.cookies(echsys)("key")="" then%>
                                        <br>
                                        <font color="#cc0000"><b>内容简介：</b></font><br>
                                        <br>
                                        <%=CutStr(nohtml(rs("Content")),10)%>... <br>
                                        <br>
                                        <br>
                                        <font color="#cc0000"><b>友情提醒：</b></font><br>
                                        <br>
                                      你还没注册？或者没有登录？或者权限不够？这篇文章要求是本站符合权限要求的注册用户才能阅读！<br>
                                      <br>
                                      <%
				response.write "文章级别："
				response.write cINT(wzdj)
				response.write "级"
				%>
                                      <br>
                                      <%
				response.write "您的权限："
				response.write "未注册"
				%>
                                      <br>
                                      <br>
                                      如果你还没注册，请赶紧点此<a href="#" OnClick="adduser()"  class=bottom><font color="#cc0000">注册</font></a>吧！<br>
                                      <br>
                                      如果你已经注册但还没登录，请赶紧点此<a href="#" OnClick="user_login()"  class=bottom><font color="#cc0000">登录</font></a>吧！<br>
                                      <% else %>
                                      <%if  Request.cookies(echsys)("key")="selfreg" then
					if cINT(Request.cookies(echsys)("reglevel"))>=cINT(wzdj) then%>
                                      <%Response.Write arr_Content(Page-1)%>
                                      <% else %>
                                      <br>
                                      <font color="#cc0000"><b>内容简介：</b></font> <br>
                                      <br>
                                      <%=CutStr(nohtml(rs("Content")),10)%>... <br>
                                      <br>
                                      <br>
                                      <font color="#cc0000"><b>友情提醒：</b></font><br>
                                      <br>
                                      你还没注册？或者没有登录？或者权限不够？这篇文章要求是本站符合权限要求的注册用户才能阅读！<br>
                                      <br>
                                      <%
						response.write "文章级别："
						response.write cINT(wzdj)
						response.write "级"
						%>
                                      <br>
                                      <%
						response.write "您的权限："
						response.write (Request.cookies(echsys)("reglevel"))
						response.write "级"
						%>
                                      <br>
                                      <br>
                                      如果你还没注册，请赶紧点此<a href="#" OnClick="adduser()" class=bottom><font color="#cc0000">注册</font></a>吧！<br>
                                      <br>
                                      如果你已经注册但还没登录，请赶紧点此<a href="#" OnClick="user_login()"  class=bottom><font color="#cc0000">登录</font></a>吧！<br>
                                      <br>
                                      <%end if%>
                                      <%end if%>
                                      <%end if%>
                                      <%end if%>
                                      <%end if%>
                                      <%else%>
                                      <%Response.Write arr_Content(Page-1)%>
                                      <%end if%>
                                      <%end if%>
                                      <br>
                                      <div align="right">
                                        <%
url="wygkcn_ShowArticle.asp?EC_ArticleID="&EC_ArticleID
if MaxPages >0 then
	Response.write "<a class=black href='"& Url &"&page=1' title='第1页'>首页</a> "
	if Page-1 > 0 then
		Prev_Page = Page - 1
		Response.write "<a class=black href='"& Url &"&page="& Prev_Page &"' title='第"& Prev_Page &"页'>上一页</a> "
	end if

	for PageCounter=0 to MaxPages
		PageLink = PageCounter+1
		if PageLink <> Page Then
			Response.write "<a class=black href='"& Url &"&page="& PageLink &"'>["& PageLink &"]</a> "
		else
			Response.Write "<font color='#FF0000'><B>["& PageLink &"]</B></font> "
		end if
		If PageLink = MaxPages+1 Then Exit for
	Next
	if page <= Maxpages then
		bdd_Page = Page + 1
		Response.write "<a class=black href='" & Url & "&page=" & bdd_Page & "' title='第" & bdd_Page & "页'>下一页</A>"
	end if
	Response.write " <A class=black href='" & Url & "&page=" & Maxpages+1 & "' title='第"& Maxpages+1 &"页'>尾页</A>"
end if
%>
                                    </div></td>
                                  </tr>
                              </table></td>
                            </tr>
                            <tr>
                              <td width="100%"  height="25"><div align="center">
                                  <!--#include file=attach.asp -->
                              </div></td>
                            </tr>
                        </table>


</div>
</div>
<!--右边部分结束-->
<div class=clear_float></div><!--清除浮动属性-->

</div>
<!--中间内容部分结束-->
<!--#include file="bottom.asp"-->
</div>
<!--内容部分结束-->
</body>
</html>
<%end if%>
<%
conn.close
set conn=nothing
%> 