<!--#include file="conn.asp"-->
<%
if Request("a_id")<>"" then
	a_id=Request("a_id")
	chkid(a_id)
	set rs=server.createobject("adodb.recordset")
	sql="select a_name,a_keyword,a_title,a_d,a_sort,a_nsort from WrzcNethtml_article where id="&a_id&""
	rs.open sql,conn,1,1
	if not rs.eof then
	a_name=rs("a_name")
	a_keyword=rs("a_keyword")
	a_title=rs("a_title")
	a_d=rs("a_d")
	newssort_id=Rs("a_sort")
	newsnsort_id=Rs("a_nsort")
	end if
	rs.close
	set rs=nothing
	
	set rs=conn.execute("select * from WrzcNethtml_newsnsort where nsort_id="&newsnsort_id&"")
	if not rs.eof then
	nsort_name=rs("nsort_name")
	end if
	rs.close
	set rs=nothing
	
	set rs=conn.execute("select * from WrzcNethtml_newssort where sort_id="&newssort_id&"")
	if not rs.eof then
	sort_name=rs("sort_name")
	end if
	rs.close
	set rs=nothing
	
	if seo_a1=1 then
		seo_title=a_title
	else
		seo_title=seo_a2
		if seo_title<>"" then
			seo_title=replace(replace(replace(replace(replace(seo_title,"*A",a_name),"*S",sort_name),"*N",nsort_name),"*Z",sitename),"*C",company)
		end if
	end if

	if seo_a3=1 then
		seo_keyword=a_keyword
	else
		seo_keyword=seo_a4
		if seo_keyword<>"" then
			seo_keyword=replace(replace(replace(replace(replace(seo_keyword,"*A",a_name),"*S",sort_name),"*N",nsort_name),"*Z",sitename),"*C",company)
		end if
	end if

	if seo_a5=1 then
		seo_d=a_d
	else
		seo_d=seo_a6
		if seo_d<>"" then
			seo_d=replace(replace(replace(replace(replace(seo_d,"*A",a_name),"*S",sort_name),"*N",nsort_name),"*Z",sitename),"*C",company)
		end if
	end if

elseif request("newsnsort_id")<>"" then
	newsnsort_id=Request("newsnsort_id")
	showp=showp&"&newsnsort_id="&newsnsort_id
	chkid(newsnsort_id)
	set rs=conn.execute("select * from WrzcNethtml_newsnsort where nsort_id="&newsnsort_id&"")
	if not rs.eof then
	nsort_name=rs("nsort_name")
	newssort_id=Rs("sort_id")
	nsort_keyword=rs("nsort_keyword")
	nsort_title=rs("nsort_title")
	nsort_d=rs("nsort_d")
	end if
	rs.close
	set rs=nothing
	set rs=conn.execute("select * from WrzcNethtml_newssort where sort_id="&newssort_id&"")
	if not rs.eof then
	sort_name=rs("sort_name")
	end if
	rs.close
	set rs=nothing
	
	if seo_ansort1=1 then
		seo_title=nsort_title
	else
		seo_title=seo_ansort2
		if seo_title<>"" then
			seo_title=replace(replace(replace(replace(seo_title,"*N",nsort_name),"*S",sort_name),"*Z",sitename),"*C",company)
		end if
	end if
	
	if seo_ansort3=1 then
		seo_keyword=nsort_keyword
	else
		seo_keyword=seo_ansort4
		if seo_keyword<>"" then
			seo_keyword=replace(replace(replace(replace(seo_keyword,"*N",nsort_name),"*S",sort_name),"*Z",sitename),"*C",company)
		end if
	end if
	
	if seo_ansort5=1 then
		seo_d=nsort_d
	else
		seo_d=seo_ansort6
		if seo_d<>"" then
			seo_d=replace(replace(replace(replace(seo_d,"*N",nsort_name),"*S",sort_name),"*Z",sitename),"*C",company)
		end if
	end if

elseif Request("newssort_id")<>"" then
	newssort_id=Request("newssort_id")
	showp=showp&"&newssort_id="&newssort_id
	chkid(newssort_id)
	set rs=conn.execute("select * from WrzcNethtml_newssort where sort_id="&newssort_id&"")
	if not rs.eof then
	sort_name=rs("sort_name")
	sort_keyword=rs("sort_keyword")
	sort_title=rs("sort_title")
	sort_d=rs("sort_d")
	end if
	rs.close
	set rs=nothing
	
	if seo_asort1=1 then
		seo_title=sort_title
	else
		seo_title=seo_asort2
		if seo_title<>"" then
			seo_title=replace(replace(replace(seo_title,"*S",sort_name),"*Z",sitename),"*C",company)
		end if
	end if
	
	if seo_asort3=1 then
		seo_keyword=sort_keyword
	else
		seo_keyword=seo_asort4
		if seo_keyword<>"" then
			seo_keyword=replace(replace(replace(seo_keyword,"*S",sort_name),"*Z",sitename),"*C",company)
		end if
	end if
	
	if seo_asort5=1 then
		seo_d=sort_d
	else
		seo_d=seo_asort6
		if seo_d<>"" then
			seo_d=replace(replace(replace(seo_d,"*S",sort_name),"*Z",sitename),"*C",company)
		end if
	end if
end if

page=request("page")
page=getpage(page)
%>

<!--#include file="WrzcNethtml_top.asp"-->
<div align="center">
<table cellpadding="0" cellspacing="0" class="all_t1">
<tr><td class="all_l_td" valign="top" height=300>

<table cellSpacing="0" cellPadding="0" border="0" class="news_la">
<tr><td class="news_la1"><span class="news_laf">News & Events</span></td></tr>
<tr><td class="news_la2" align=center>

<table border="0" cellpadding="0" cellspacing="0" width="95%" id="table1">
<form method="POST" action="../article.asp">
<tr><td height="30">
<input type="text" name="a_name" size="12" class=input value="<%=request("a_name")%>">
	<input type="submit" value="Search" name="B1"></td></tr>
</form>
<tr><td height="23"><b><a href="../article/All-1.html">All</a></b></td></tr>
<tr><td height="2" background="../Img/dot_menu.gif"></td></tr>
<%set rs=server.CreateObject("adodb.recordset")
sql="select sort_id,sort_name from WrzcNethtml_newssort order by sort_xu desc,sort_id desc" 
rs.open sql,conn,1,1
do while not rs.eof
inaid=rs("sort_id")%>
<tr><td height="23"><b><a href="../article/sort<%=rs("sort_id")%>-1.html" title="<%=rs("sort_name")%>"><%=rs("sort_name")%></a></b></td></tr>
<tr><td height="2" background="../Img/dot_menu.gif"></td></tr>
<%set rs8=server.CreateObject("adodb.recordset")
rs8.open "select nsort_id,nsort_name from WrzcNethtml_newsnsort where sort_id="&inaid&" order by nsort_xu desc,nsort_id desc" ,conn,1,1
do while not rs8.eof and not rs8.bof%>
<tr><td height="23">&nbsp;<img border="0" src="../img/newsq.gif" width="6" height="6"> <a title="<%=rs8("nsort_name")%>" href="../article/nsort<%=rs8("nsort_id")%>-1.html"><%=rs8("nsort_name")%></a></td></tr>
<tr><td height="2" background="../Img/dot_menu.gif"></td></tr>
<%rs8.movenext
loop
rs8.close
set rs8=nothing%>
<%rs.movenext
loop
rs.close
set rs=nothing%>
</table>
</td></tr>
<tr><td class="news_la3"></td></tr></table>
</td>
<td valign="top" class="all_c_td">
<%if request("a_id")<>"" then 
id=Request.QueryString("a_id")
chkid(id)
set rs=server.createobject("adodb.recordset")
sql="select * from WrzcNethtml_article where id="&id&""
rs.open sql,conn,1,1  
if not rs.eof then%>	
<table width="99%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0"> 
<tr><td class="sort">&nbsp;<IMG src="../Skin/<%=WrzcNethtml_skin%>/home.gif" border=0 align="absmiddle">  
	<a href="../index.html">Home</a> >>&nbsp;<a href="../article/All-1.html">News & Events</a> >>&nbsp;<%=rs("a_name")%></td></tr>
<tr><td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td height="30" align="center"  class="vtitle" valign="bottom"><%=rs("a_name")%></td></tr>
<tr><td><hr size="1"></td></tr>
<tr><td height="20" align="right"><p style="margin-right: 20px"><font color="#808080">Author:<%=rs("a_author")%>&nbsp;&nbsp;From:<%=rs("a_from")%>&nbsp;&nbsp;Date:<%=rs("a_date")%></font></td></tr>
	<tr><td height="100"><p style="line-height: 150%; margin-left: 10; margin-right: 10"><%=repcon(rs("a_content"))%></td></tr></table>
  </td></tr>
</table>
<%end if
rs.close
set rs=nothing
else

if request("a_name")<>"" then
a_name=DelStr(Request("a_name"))
showp=showp&"&a_name="&a_name
end if
set rs=server.createobject("adodb.recordset")
if a_name<>"" then
sql="select id,a_name,a_date from WrzcNethtml_article where a_name like '%"&a_name&"%' order by id desc"
elseif newsnsort_id<>"" then
filename="nsort"&newsnsort_id
sql="select id,a_name,a_date from WrzcNethtml_article where a_nsort="&newsnsort_id&" order by id desc"
elseif newssort_id<>"" then
filename="sort"&newssort_id
sql="select id,a_name,a_date from WrzcNethtml_article where a_sort="&newssort_id&" order by id desc"
else
filename="all"
sql="select id,a_name,a_date from WrzcNethtml_article order by id desc"
end if
rs.open sql,conn,1,1%>
<table width="99%" cellpadding="0" cellspacing="0"> 
<tr><td class="sort">&nbsp;<IMG src="../Skin/<%=WrzcNethtml_skin%>/home.gif" border=0 align="absmiddle">  
	<a href="../index.html">Home</a> >>&nbsp;<%if nsort_name<>"" then%><%=nsort_name%><%elseif sort_name<>"" then%><%=sort_name%><%else%>News & Events<%end if%></td></tr>
  <tr><td valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<%if rs.eof then%><tr><td><p style="line-height: 150%; margin-left: 10; margin-right: 10">No Date</td></tr>
<%else
rs.pagesize=20
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
rs.cachesize=rs.pagesize
i=0
do while not rs.eof and (i<rs.pagesize)
i=i+1
news_name=replace(rs("a_name"),a_name,"<font color=#FF0000><b>"&a_name&"</b></font>")
%>
<tr><td height="26"><p style="line-height: 150%; margin-left: 10; margin-right: 10"><img border="0" src="../img/newsq.gif"> <a title="<%=rs("a_name")%>" href="../article/Article-<%=rs("id")%>.html" target=_blank><%=news_name%></a> <font color="#808080">[<%=rs("a_date")%>]</font></td></tr>
<tr><td height="2" background="../Img/dot_menu.gif"></td></tr>
<%rs.movenext
loop
End If
rs.close
set rs=nothing%></table></td></tr></table><%end if%>

<%if id="" then%><table cellspacing="0" cellpadding="0" width="99%">
<tr><td id="page">
<%
if page<=pagecc then
spage=1
else
spage=page-pagecc
end if
if page>=totalpage-pagecc then
lpage=totalpage
else
lpage=page+pagecc
end if
%>
Page:<%=page%>/Total:<%=totalpage%><br>
<a href="<%=filename%>-1.html" class="page_h"></a>
<%if page-1>0 then%><a href="<%=filename%>-<%=page-1%>.html" class="page_p"></a><%else%><span class="page_p0"></span><%end if%>
<%for i=spage to lpage
if i=page then%><span class="page_a0"><%=i%></span>
<%else%><a href="<%=filename%>-<%=i%>.html" class="page_a"><%=i%></a><%end if
next%>
<%if page+1<=totalpage then%> <a href="<%=filename%>-<%=page+1%>.html" class="page_n"></a><%else%><span class="page_n0"></span><%end if%>
<a href="<%=filename%>-<%=totalpage%>.html" class="page_l"></a>
</td></tr></table>
<%end if%>

</td></tr></table></div>
<%
function AddToDic(reg,key,Index,str,dic)
	pattern="<[^>]*"&key&"[^>]*>|<a[^>]*>[^<]*"&key&"[^<]*<\/a>"
	reg.Pattern=pattern
	set matches=reg.Execute(str)
	for each m in matches
		dic.Add "key"&Index,m.value    
		str=replace(str,m.value,"$key"&Index&"$")
		Index=Index+1
	next
	set matches=nothing
end function
function RepCon(str)
	TempStr=str
	set dic=server.CreateObject("scripting.dictionary")
	Index=0
	set reg=new RegExp
	reg.Global=true
	reg.IgnoreCase=true
	set rss=conn.Execute("select * from WrzcNethtml_rep")
	do while not rss.eof
		ky=trim(rss("rep_name"))
		AddToDic reg,ky,Index,TempStr,dic
		TempStr=replace(TempStr,ky,"<a href='"&rss("rep_url")&"'>"&ky&"</a>")
		AddToDic reg,ky,Index,TempStr,dic
	rss.movenext
	loop
	rss.close
	set rss=nothing
	set reg=nothing
	for i=0 to Index-1 
	TempStr=replace(TempStr,"$key"&i&"$",dic.Item("key"&i))
	next
	set dic=nothing
	RepCon=TempStr
end function
%><!--#include file="WrzcNethtml_copy.asp"-->