<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<%
	useflag=5
%>
<!--#include file="flag.asp"-->
<!--#include file="../inc/setup.asp"-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href='Include/Admin_Style.CSS' rel='stylesheet' type='text/css'>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head>
<body topmargin="20">
<table width="95%" height="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#63C2FC">
<tr bgcolor="#E1F9FF">
<td>
<%
	logo=Trim(Request.Form("logo"))
	link_logo=Trim(Request.Form("link_logo"))
	webname=Trim(Request.Form("webname"))
	type1=Trim(Request.Form("type1"))
	link_art=Trim(Request.Form("link_art"))
	type2=Trim(Request.Form("type2"))
	TitleFontColor=Trim(Request.Form("TitleFontColor"))
	shunxu=Trim(Request.Form("shunxu"))
	maxfont=Trim(Request.Form("maxfont"))
	if type2="" then type2=0
	if TitleFontColor="" then TitleFontColor="#000000"
	if shunxu="" then shunxu=0
	if maxfont="" then maxfont=0
	action=Trim(Request.QueryString("action"))
	id=Trim(Request.QueryString("id"))
	ttype=Trim(Request.QueryString("ttype"))

Select Case action
	Case "del"
		conn.execute("delete from [ad_link] where id="&id&"")
	response.write "<script language=javascript>alert('删除成功！');window.location.reload('link_all.asp?action="&ttype&"')</script>"
	case"add"
	
		conn.execute("insert into [ad_link](logo,link,name,state,type1,link_art,type2,TitleFontColor,shunxu,maxfont) values('"&logo&"','"&link_logo&"','"&webname&"','1','"&type1&"','"&link_art&"','"&type2&"','"&TitleFontColor&"','"&shunxu&"','"&maxfont&"')")
	response.write "<script language=javascript>alert('添加成功！');window.location.reload('link_all.asp?action="&ttype&"')</script>"
	case"update"		
		conn.execute("update [ad_link] set logo='"&logo&"',link='"&link_logo&"',name='"&webname&"' ,type1='"&type1&"',type2='"&type2&"',link_art='"&link_art&"',TitleFontColor='"&TitleFontColor&"',shunxu='"&shunxu&"',maxfont='"&maxfont&"' where id="&id&"")
	response.write "<script language=javascript>alert('修改成功！');window.location.reload('link_all.asp?action="&ttype&"')</script>"
	case"allow"
		conn.execute("update [ad_link] set state=1 where id="&id&"")
	response.write "<script language=javascript>alert('审核成功！');window.location.reload('link_all.asp?action="&ttype&"')</script>"
	End select
%>
</td>
</tr>
</table>
</body>
</html>