<%
if request.cookies("www3gushopcom")("admin")="" then response.write "<meta http-equiv='refresh' content='0;URL=../admin.asp'>"
%>
<!--#include file="../include/conn.asp"-->
<%
sub checkmanage(str)
Set mrs = conn.Execute("select * from manage where username='"&request.cookies("www3gushopcom")("admin")&"'")
if not (mrs.bof and mrs.eof) then
manage=mrs("manage")
if instr(manage,str)<=0 then
response.write "<script language='javascript'>"
response.write "alert('警告：您没有此项操作的权限！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
else
session("www3gushopcom_admin_login")=0
end if
else 
response.write "<script language='javascript'>"
response.write "alert('没有登陆，不能执行此操作！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
end if
set mrs=nothing
end sub
%>
<%call checkmanage("08")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<BODY bgcolor="#D9EAFC">
<%



	if request("name_key")<>"" then addsql=addsql+" and (NewsTitle like '%"&request("name_key")&"%')"
	
	if request("ShowType")="1" then addsql=addsql+" "
	if request("ShowType")="2" then addsql=addsql+" and Online=true"
	if request("ShowType")="3" then addsql=addsql+" and Online=false"
	if request("ShowType")="4" then addsql=addsql+" and uup=1"

if addsql="" then
response.cookies("www3gushopcom")("sql")=""
Response.Redirect("news.asp")
else

sql="select * from news where NewsTitle<>'' " + addsql
response.cookies("www3gushopcom")("sql")=sql
Response.Redirect("news.asp")
end if

%>
</body>
</html>
