⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ad_fl.asp

📁 信息管理系统!很简单的课程设计!类似于城市信息交换的网站!
💻 ASP
字号:
<%'注意:防止多次发送,以及防止非法登录
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if not mid(server_v1,8,len(server_v2))=server_v2 then
Response.Write "<script language=JavaScript>{window.alert('系统错误,拒绝从非本服务器登陆!');window.history.go(-1);}</script>"
response.end
end if

if session("admin_login")<>true then
	response.Write("<html><link href=../style.css rel=stylesheet type=text/css><body><table height=100% width=100% align=center valign=middle><tr><td align=center valign=center><p align=center>您没有登录或者已经超时!!请点击下面的链接,进入登录界面!!</p><p align=center>--&gt;&gt; <a href=../login/login.asp>登录</a> &lt;&lt;--</p></td></tr></table></body></html>")
	response.end
end if
%>

<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/fun.asp"-->
<!--#include file="../../conn/fso.asp"-->

<%
L = "<img src=""../Images/lb/L.gif"" width=""16"" height=""16"">"
T = "<img src=""../Images/lb/T.gif"" width=""16"" height=""16"">"
I = "<img src=""../Images/lb/I.gif"" width=""16"" height=""16"">"
action = trim(request.QueryString("action"))
select case action
	case "add"
		fl_name = trim(request.Form("fl_name"))
		fl_lb = trim(request.Form("fl_lb"))
		select case fl_lb
			case "寻房问屋"
				lbid="1"
			case "跳蚤市场"
				lbid="2"
			case "乐翻天"
				lbid="3"
			case "教育培训"
				lbid="4"
			case "求职招聘"
				lbid="5"
			case "交友约会"
				lbid="6"
			case "综合服务"
				lbid="7"
			case "其他分类"
				lbid="8"
		end select
		if fl_name = "" then
			response.Write("<script>window.alert(""请输入小类名称!!"");history.back();</script>")
			conn.close
			set conn = nothing
			response.End()
		end if
		if fl_lb = "" then
			response.Write("<script>window.alert(""请选择大类名称!!"");history.back();</script>")
			conn.close
			set conn = nothing
			response.End()
		end if
		SQL = "select * from ad_fl where fl_name='"&fl_name&"' and fl_lb='"&fl_lb&"'"
		set rs = server.CreateObject("adodb.recordset")
		rs.open SQL,conn,1,3
		if rs.eof and rs.bof then
			rs.addnew
				rs("fl_name") = fl_name
				rs("fl_lb") = fl_lb
				rs("lbid") = lbid
			rs.update
			rs.close
			set rs = nothing
			call MakeDaXiao()	
		else	
			response.Write("<script>window.alert(""对不起!!该类别名已经被使用了\n\n请重新选择!!"");history.back();</script>")
			rs.close
			set rs = nothing
			conn.close
			set conn = nothing
		end if	
end select

set rs2 = server.CreateObject("adodb.recordset")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet" type="text/css">

<title>广告分类管理</title>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<script language="javascript">

function showlb(num)
{
	var taobj=eval("window.table0"+num)
	var imgobj=eval("window.img0"+num)
	if(taobj.style.display=='block')
	{
		taobj.style.display='none'
		imgobj.src='../Images/lb/Tplus.gif'
	}
	else
	{
		taobj.style.display='block'
		imgobj.src='../Images/lb/Lminus.gif'
	}
}
</script>
<body>

<table width="60%"  border="0" align="center" cellpadding="0" cellspacing="0">
		<tr>
				<td width="2%" bgcolor="#FFFFFF"><img id="img01" src="../Images/lb/Tplus.gif" width="16" height="16" onMouseOver="this.style.cursor='hand'" onMouseOut="this.style.cursor=''" onClick="showlb(1)"></td>
		        <td height="12" colspan="2" bgcolor="#FFFFFF"><strong>寻房问屋</strong></td>
		</tr>
		<tr id="tr1">
				<td colspan="3" bgcolor="#FFFFFF">
				<table width="100%"  border="0" cellspacing="0" cellpadding="0" id="table01" style="display:none;">
                			<%
		SQL = "select * from ad_fl where fl_lb='寻房问屋'"
		rs2.open SQL,conn,1,1
		rscounts = rs2.recordcount
		for i=1 to rscounts
			if rscounts <> 0 then
				if rscounts = i then
					xian = L
				else
					xian = T
				end if
			else
				xian = ""
			end if
		%>
		<tr>
				<td width="2%" bgcolor="#FFFFFF"><img src="../Images/lb/I.gif" width="16" height="16"></td>
				<td width="2%" bgcolor="#FFFFFF"><%=xian%></td>
		        <td width="96%" bgcolor="#FFFFFF"><a href="javascript:" onClick="window.open('edit.asp?fl_id=<%=rs2("fl_id")%>','','width=280,height=155')"><%=rs2("fl_name")%></a></td>
		</tr>
		<%
			rs2.movenext
		next
		rs2.close
		%>
                		</table>
				</td>
		</tr>
		<tr>
				<td bgcolor="#FFFFFF"><img id="img02" src="../Images/lb/Tplus.gif" width="16" height="16" onMouseOver="this.style.cursor='hand'" onMouseOut="this.style.cursor=''" onClick="showlb(2)"></td>
		        <td colspan="2" bgcolor="#FFFFFF"><strong>跳蚤市场</strong></td>
		</tr>
		<tr id="tr2">
				<td colspan="3" bgcolor="#FFFFFF">
						<table width="100%"  border="0" cellspacing="0" cellpadding="0" id="table02" style="display:none;">
                			<%
		SQL = "select * from ad_fl where fl_lb='跳蚤市场'"
		rs2.open SQL,conn,1,1
		rscounts = rs2.recordcount
		for i=1 to rscounts
			if rscounts <> 0 then
				if rscounts = i then
					xian = L
				else
					xian = T
				end if
			else
				xian = ""
			end if
		%>
		<tr id="tr1">
				<td width="2%" bgcolor="#FFFFFF"><img src="../Images/lb/I.gif" width="16" height="16"></td>
				<td width="2%" bgcolor="#FFFFFF"><%=xian%></td>
		        <td width="96%" bgcolor="#FFFFFF"><a href="javascript:" onClick="window.open('edit.asp?fl_id=<%=rs2("fl_id")%>','','width=280,height=155')"><%=rs2("fl_name")%></a></td>
		</tr>
		<%
			rs2.movenext
		next
		rs2.close
		%>
                		</table></td>
		</tr>
		<tr>
				<td bgcolor="#FFFFFF"><img id="img03" src="../Images/lb/Tplus.gif" width="16" height="16" onMouseOver="this.style.cursor='hand'" onMouseOut="this.style.cursor=''" onClick="showlb(3)"></td>
		        <td colspan="2" bgcolor="#FFFFFF"><strong>乐 翻 天</strong></td>
		</tr>
		<tr id="tr3">
				<td colspan="3" bgcolor="#FFFFFF">
				<table width="100%"  border="0" cellspacing="0" cellpadding="0" id="table03" style="display:none;">
                			<%
		SQL = "select * from ad_fl where fl_lb='乐翻天'"
		rs2.open SQL,conn,1,1
		rscounts = rs2.recordcount
		for i=1 to rscounts
			if rscounts <> 0 then
				if rscounts = i then
					xian = L
				else
					xian = T
				end if
			else
				xian = ""
			end if
		%>
		<tr id="tr1">
				<td width="2%" bgcolor="#FFFFFF"><img src="../Images/lb/I.gif" width="16" height="16"></td>
				<td width="2%" bgcolor="#FFFFFF"><%=xian%></td>
		        <td width="96%" bgcolor="#FFFFFF"><a href="javascript:" onClick="window.open('edit.asp?fl_id=<%=rs2("fl_id")%>','','width=280,height=155')"><%=rs2("fl_name")%></a></td>
		</tr>
		<%
			rs2.movenext
		next
		rs2.close
		%>
                		</table>
				</td>
		</tr>
		<tr>
				<td bgcolor="#FFFFFF"><img id="img04" src="../Images/lb/Tplus.gif" width="16" height="16" onMouseOver="this.style.cursor='hand'" onMouseOut="this.style.cursor=''" onClick="showlb(4)"></td>
		        <td colspan="2" bgcolor="#FFFFFF"><strong>教育培训</strong></td>
		</tr>
		<tr id="tr4">
				<td colspan="3" bgcolor="#FFFFFF">
				<table width="100%"  border="0" cellspacing="0" cellpadding="0" id="table04" style="display:none;">
                			<%
		SQL = "select * from ad_fl where fl_lb='教育培训'"
		rs2.open SQL,conn,1,1
		rscounts = rs2.recordcount
		for i=1 to rscounts
			if rscounts <> 0 then
				if rscounts = i then
					xian = L
				else
					xian = T
				end if
			else
				xian = ""
			end if
		%>
		<tr id="tr1">
				<td width="2%" bgcolor="#FFFFFF"><img src="../Images/lb/I.gif" width="16" height="16"></td>
				<td width="2%" bgcolor="#FFFFFF"><%=xian%></td>
		        <td width="96%" bgcolor="#FFFFFF"><a href="javascript:" onClick="window.open('edit.asp?fl_id=<%=rs2("fl_id")%>','','width=280,height=155')"><%=rs2("fl_name")%></a></td>
		</tr>
		<%
			rs2.movenext
		next
		rs2.close
		%>
                		</table>
				</td>
		</tr>
		<tr>
				<td bgcolor="#FFFFFF"><img id="img05" src="../Images/lb/Tplus.gif" width="16" height="16" onMouseOver="this.style.cursor='hand'" onMouseOut="this.style.cursor=''" onClick="showlb(5)"></td>
		        <td colspan="2" bgcolor="#FFFFFF"><strong>求职招聘</strong></td>
		</tr>
		<tr id="tr5">
				<td colspan="3" bgcolor="#FFFFFF">
				<table width="100%"  border="0" cellspacing="0" cellpadding="0"  id="table05" style="display:none;">
                			<%
		SQL = "select * from ad_fl where fl_lb='求职招聘'"
		rs2.open SQL,conn,1,1
		rscounts = rs2.recordcount
		for i=1 to rscounts
			if rscounts <> 0 then
				if rscounts = i then
					xian = L
				else
					xian = T
				end if
			else
				xian = ""
			end if
		%>
		<tr id="tr1">
				<td width="2%" bgcolor="#FFFFFF"><img src="../Images/lb/I.gif" width="16" height="16"></td>
				<td width="2%" bgcolor="#FFFFFF"><%=xian%></td>
		        <td width="96%" bgcolor="#FFFFFF"><a href="javascript:" onClick="window.open('edit.asp?fl_id=<%=rs2("fl_id")%>','','width=280,height=155')"><%=rs2("fl_name")%></a></td>
		</tr>
		<%
			rs2.movenext
		next
		rs2.close
		%>
                		</table>
				</td>
		</tr>
		<tr>
				<td bgcolor="#FFFFFF"><img id="img06" src="../Images/lb/Tplus.gif" width="16" height="16" onMouseOver="this.style.cursor='hand'" onMouseOut="this.style.cursor=''" onClick="showlb(6)"></td>
		        <td colspan="2" bgcolor="#FFFFFF"><strong>交友约会</strong></td>
		</tr>
		<tr id="tr6">
				<td colspan="3" bgcolor="#FFFFFF">
				<table width="100%"  border="0" cellspacing="0" cellpadding="0" id="table06" style="display:none;">
                			<%
		SQL = "select * from ad_fl where fl_lb='交友约会'"
		rs2.open SQL,conn,1,1
		rscounts = rs2.recordcount
		for i=1 to rscounts
			if rscounts <> 0 then
				if rscounts = i then
					xian = L
				else
					xian = T
				end if
			else
				xian = ""
			end if
		%>
		<tr id="tr1">
				<td width="2%" bgcolor="#FFFFFF"><img src="../Images/lb/I.gif" width="16" height="16"></td>
				<td width="2%" bgcolor="#FFFFFF"><%=xian%></td>
		        <td width="96%" bgcolor="#FFFFFF"><a href="javascript:" onClick="window.open('edit.asp?fl_id=<%=rs2("fl_id")%>','','width=280,height=155')"><%=rs2("fl_name")%></a></td>
		</tr>
		<%
			rs2.movenext
		next
		rs2.close
		%>
                		</table>
				</td>
		</tr>
		<tr>
				<td bgcolor="#FFFFFF"><img id="img07" src="../Images/lb/Tplus.gif" width="16" height="16" onMouseOver="this.style.cursor='hand'" onMouseOut="this.style.cursor=''" onClick="showlb(7)"></td>
		        <td colspan="2" bgcolor="#FFFFFF"><strong>综合服务</strong></td>
		</tr>
		<tr id="tr7">
				<td colspan="3" bgcolor="#FFFFFF">
				<table width="100%"  border="0" cellspacing="0" cellpadding="0" id="table07" style="display:none;">
                			<%
		SQL = "select * from ad_fl where fl_lb='综合服务'"
		rs2.open SQL,conn,1,1
		rscounts = rs2.recordcount
		for i=1 to rscounts
			if rscounts <> 0 then
				if rscounts = i then
					xian = L
				else
					xian = T
				end if
			else
				xian = ""
			end if
		%>
		<tr id="tr1">
				<td width="2%" bgcolor="#FFFFFF"><img src="../Images/lb/I.gif" width="16" height="16"></td>
				<td width="2%" bgcolor="#FFFFFF"><%=xian%></td>
		        <td width="96%" bgcolor="#FFFFFF"><a href="javascript:" onClick="window.open('edit.asp?fl_id=<%=rs2("fl_id")%>','','width=280,height=155')"><%=rs2("fl_name")%></a></td>
		</tr>
		<%
			rs2.movenext
		next
		rs2.close
		%>
                		</table>
				</td>
		</tr>
		<tr>
				<td bgcolor="#FFFFFF"><img id="img08" src="../Images/lb/Tplus.gif" width="16" height="16" onMouseOver="this.style.cursor='hand'" onMouseOut="this.style.cursor=''" onClick="showlb(8)"></td>
		        <td colspan="2" bgcolor="#FFFFFF"><strong>其他分类</strong></td>
		</tr>
		<tr id="tr8">
				<td colspan="3" bgcolor="#FFFFFF">
				<table width="100%"  border="0" cellspacing="0" cellpadding="0" id="table08" style="display:none;">
                			<%
		SQL = "select * from ad_fl where fl_lb='其他分类'"
		rs2.open SQL,conn,1,1
		rscounts = rs2.recordcount
		for i=1 to rscounts
			if rscounts <> 0 then
				if rscounts = i then
					xian = L
				else
					xian = T
				end if
			else
				xian = ""
			end if
		%>
		<tr id="tr1">
				<td width="2%" bgcolor="#FFFFFF"></td>
				<td width="2%" bgcolor="#FFFFFF"><%=xian%></td>
		        <td width="96%" bgcolor="#FFFFFF"><a href="javascript:" onClick="window.open('edit.asp?fl_id=<%=rs2("fl_id")%>','','width=280,height=155')"><%=rs2("fl_name")%></a></td>
		</tr>
		<%
			rs2.movenext
		next
		rs2.close
		%>
                		</table>
				</td>
		</tr>
</table>
<p align="center"><span class="style1">注意</span>:展开后,即可对每个小类进行修改</p>
<script language="javascript">
	function check()
	{
		if(document.form1.fl_name.value=='')
		{
			alert("请输入小类名称!!");
			return false;
			document.form1.fl_name.focus();
		}
		if(document.form1.fl_lb.value=='')
		{
			alert("请选择大类名称!!");
			return false;
			document.form1.fl_lb.focus();
		}
	}
</script>
<form name="form1" method="post" action="?action=add" onSubmit="return check()">
		<table width="60%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#336633">
        		<tr bgcolor="#FFFFFF" background="../Images/topbg.gif">
        				<td  height="25" colspan="3" background="../Images/topbg.gif">广告类别管理 &gt;&gt; 添加小类别</td>
   				</tr>
        		<tr  bgcolor="#FFFFFF">
        				<td width="228"  height="25" align="center">小类名称</td>
   				        <td width="234" align="center">大类名称</td>
        		        <td width="130"  align="center">操作</td>
        		</tr>
        		<tr align="center" bgcolor="#FFFFFF">
        				<td height="25"><input name="fl_name" type="text" class="txttable"></td>
        				<td><select name="fl_lb">
        						<option selected>请选择分类</option>
        						<option value="寻房问屋">寻房问屋</option>
        						<option value="跳蚤市场">跳蚤市场</option>
        						<option value="乐翻天">乐翻天</option>
        						<option value="教育培训">教育培训</option>
        						<option value="求职招聘">求职招聘</option>
        						<option value="交友约会">交友约会</option>
        						<option value="综合服务">综合服务</option>
        						<option value="其他分类">其他分类</option>
   						</select></td>
        				<td><input name="Submit" type="submit" class="button01" value="添加" ></td>
   				</tr>
   		</table>
</form>
<p>&nbsp;</p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -