<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "sd_class.asp"-->
<!--#include file = "cookies.asp" -->
<%
Dim T
Sub head
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<TITLE>商奇软件 www.583344.com</TITLE>
<LINK href="images/Admin_css.css" type=text/css rel=stylesheet>
</head>
<body>
<table width="95%" border="0" cellspacing="2" cellpadding="3"  align=center class="admintable" style="margin-bottom:5px;">
    <tr>
      <td height="25" bgcolor="f7f7f7"><a href="?menu=ADadd">添加广告</a>
<a href="?menu=list">广告管理</a>
<a href="?menu=ADclass">分类管理</a>
<a href="?menu=help">广告帮助</a>
<a href="javascript:history.go(-1)">返回上层</a></td>
      <td align="right" bgcolor="f7f7f7">
<form action="?menu=search" method="post">
<input name="sc" type="text" class="s26">
  <select name="scl" class="s26">
  <option value="1">广告标题或备注</option>
  <option value="2">广告内容</option>
  <option value="3">添加时间</option>
  <option value="4">过期时间</option>
</select> <input type="submit" name="提交" class="bnt" value="搜 索">
</form>
</td>
    </tr>
</table>
<%
End Sub
Select case menu
case ""
		T = "广告管理"
		head 
		list
case "ADadd"
		T = "添加广告"
		head 
		Adadd

case "list"
		T = "广告管理"
		head 
		list
case "liste"
		T = "广告管理"
		head 
		liste
case "del"
	Rs.open "select * from sd_foxad where sd_id="&ID,conn,1,3
	Rs.delete
	Rs.update
	Rs.close
	Response.Write "<script>alert('删除成功');document.location.href=""sd_admin_ad.asp"";</script>"
	
case "classdel"
	Rs.open "select * from sd_adclass where sd_id="&ID,conn,1,3
	Rs.delete
	Rs.update
	Rs.close
	Rs.open "select * from sd_adclass where sd_tid="&ID,conn,1,3
	Rs.delete
	Rs.update
	Rs.close
	Rs.open "select * from sd_foxad where sd_class="&ID,conn,1,3
	Rs.delete
	Rs.update
	Rs.close	
	Response.Write "<script>alert('删除成功');document.location.href=""sd_admin_ad.asp?menu=ADclass"";</script>"
	
case "ADadde"
	Rs.open "select * from sd_foxad",conn,1,3
	Rs.addnew
	Rs("sd_title") = title
	Rs("sd_class") = classn
	Rs("sd_lx") = lx
	if lx="2" then
	Rs("sd_content") = content
	else
	Rs("sd_content") = pic
	end if
	Rs("sd_intime") = intime
	Rs("sd_outtime") = outtime
	Rs("sd_width") = width
	Rs("sd_height") = height
	Rs("sd_beiz") = beiz	
	Rs.update
	Rs.close
	Response.Write "<script>alert('添加成功');document.location.href=""sd_admin_ad.asp?menu=list"";</script>"	

case "ADclasse"
	Rs.open "select * from sd_adclass",conn,1,3
	Rs.addnew
	Rs("sd_name") = cname
	Rs("sd_tid") = tid
	Rs.update
	Rs.close
	Response.Write "<script>alert('添加成功');document.location.href=""sd_admin_ad.asp?menu=ADclass"";</script>"	
		
case "ADedite"
	If ID > 0 Then
	Rs.Open "select * from sd_foxad where sd_id="&ID,Conn,1,3
	If Not Rs.eof Then
		Rs("sd_title") = title
	Rs("sd_lx") = lx
	if lx="2" then
	Rs("sd_content") = content
	else
	Rs("sd_content") = pic
	end if
		Rs("sd_class") = classn
		Rs("sd_intime") = intime
		Rs("sd_outtime") = outtime
		Rs("sd_width") = width
		Rs("sd_height") = height
		Rs("sd_beiz") = beiz	
	Rs.update
	Rs.close
	Response.Write "<script>alert('更新成功');document.location.href=""sd_admin_ad.asp"";</script>"
	End If
	End If

case "ADeditet"
	If ID > 0 Then
	Rs.Open "select * from sd_foxadin where sd_id = 2",Conn,1,3
	If Rs.eof Then
	Rs.addnew
		Rs("sd_title") = title
	    Rs("sd_content") = pic
		Rs("sd_intime") = intime
		Rs("sd_outtime") = outtime
		Rs("sd_width") = width
		Rs("sd_height") = height
		Rs("sd_beiz") = beiz
	else
		Rs("sd_title") = title
	    Rs("sd_content") = pic
		Rs("sd_intime") = intime
		Rs("sd_outtime") = outtime
		Rs("sd_width") = width
		Rs("sd_height") = height
		Rs("sd_beiz") = beiz	
	end if	
	Rs.update
	Rs.close
	Response.Write "<script>alert('更新成功');document.location.href=""sd_admin_ad.asp?menu=INaddd"";</script>"
	End If
	
case "ADedit"
		T = "广告编辑"
		head 
		ADedit
case "dy"
		T = "广告预览"
		head
		list
		dy
case "help"
		T = "使用帮助"
		head
		help
case "MA"
		T = "修改密码"
		head
		MA
case "INaddd"
		head
		ADedittt
case "ADclass"
		T = "分类管理"
		head		
		ADclass
		ADclassl
case "ADclassc"
		T = "分类管理"
		head		
		ADclassc
		ADclassl		
case "ADclassce"
	If ID > 0 Then
	Rs.Open "select * from sd_adclass where sd_id="&ID,Conn,1,3
	If Not Rs.eof Then
		Rs("sd_tid") = tid
		Rs("sd_name") = cname
	Rs.update
	Rs.close
	Response.Write "<script>alert('修改成功');document.location.href=""sd_admin_ad.asp?menu=ADclass"";</script>"
	End If
	End If
case "search"
		T = "搜索结果"
		head	
		search
End Select
%><!--#include file="sd_copy.asp"-->
</body>
</html>
<%
Set Rs = Nothing
conn.close:Set conn = Nothing
%>
