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

📄 admin_menu.asp

📁 非常一般
💻 ASP
字号:
<%
 action = request("action")
 Ty=request("type")
 Ty1=request("type1")
 if Ty1="" then 
 typ="Type"+Ty
 else 
 typ=Ty1
 end if
%>

<HTML>
<HEAD>
<!--#include file="Admin_top.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width=210 bgColor=#f3f3f3>
      <div align="center">
<!--#include file="Admin_left.asp"-->
      </div>
	</TD>
    <TD width=1 bgColor=#0033CC></TD>
    <TD valign="top">
      <DIV align=center>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD height=1></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD height=1></TD></TR></TBODY></TABLE>
      <TABLE width=98% height=30 border=0 cellPadding=0 cellSpacing=0 bgcolor="#0033CC">
        <TBODY>
        <TR>
          <TD> <strong><font color="#FFFFFF">下拉菜单管理</font></strong></TD>
        </TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD height=1></TD></TR></TBODY></TABLE>
      <TABLE width=98% height=181 border=1 align=center cellPadding=5 cellSpacing=0 bordercolor="#0033CC" 
      bgColor=#cdcdcd>
        <TBODY>
<%
 Select Case Action
  Case 1
%>
        <TR bgColor=#fafafa>
          <TD height=80>
          <div align=center>
            <table border="0" width="100%" id="table4" height="94">
				<tr>
					<td bgcolor="#CDCDCD" align="center" width="26%" height="19">序号</td>
					<td bgcolor="#CDCDCD" align="center" width="54%" height="19">名称</td>
					<td bgcolor="#CDCDCD" align="center" height="19" width="16%">操作</td>
				</tr>
<%
 Set rs = Server.CreateObject("ADODB.RecordSet") 
 Sql = "select * from  "&typ&""
 Rs.Open sql,conn,1,3
 If not rs.eof then
 Count = rs.recordcount
 for i = 1 to Count
%>
				<tr>
					<td width="26%" bgcolor="#F0F0F0" align="center" height="22"><%=Rs("Type_id")%></td>
					<td width="54%" bgcolor="#F0F0F0" align="center" height="22"><b><%=Rs("Type_Value")%></b></td>
					<td bgcolor="#F0F0F0" align="center" height="22" width="16%">
					<a href="Admin_Menu.asp?Action=3&type1=<%=typ%>&id=<%=rs("Type_id")%>">改</a>
					<a href="Admin_Action.asp?Action=4&id=<%=rs("Type_id")%>&type=<%=typ%>">删</a></td>
				</tr>
<%
 rs.movenext
 Next
 Else
%>
				<tr>
					<td bgcolor="#F0F0F0" align="center" colspan="3" height="23">暂无记录</td>
				</tr>
<%
 End If
 Rs.close
 Set rs = nothing
%>
				<tr>
					<td bgcolor="#E3E3E3" align="center" colspan="3" height="20">
					<b>
					<u><a href="Admin_Menu.asp?action=2&type=<%=typ%>">新增下拉菜单</a></u></b> <font color="#800000"><b>
					<a href="Admin_Action.asp?Action=5&type=<%=typ%>">
					<font color="#FF0000">所有数据清空(慎用)</font></a></b></font></td>
				</tr>
			</table>
			</div>
			</TD>
          </TR>
<%
  Case 2
%>
<%
 typ = request("type")
 %>
        <TR bgColor=#fafafa>
          <TD height=80>
          <div align=center>
            <table border="0" width="100%" id="table4" height="63">
				<tr>
					<td bgcolor="#CDCDCD" align="center" width="96%" height="21">
					增加记录</td>
				</tr>
<form method="POST" action="Admin_Action.asp?action=2&type=<%=typ%>" name="Feedback_Add">
				<tr>
					<td bgcolor="#F0F0F0" align="center" height="22">
                      <input type="text" name="Title1" size="20">					
                      <input type="submit" value="提交" name="B1"></td>
				</tr>
</form>
				<tr>
					<td bgcolor="#E3E3E3" align="center" height="22">
					<b>注:最多不能超过10个字</b></td>
				</tr>
			</table>
			</div>
			</TD>
          </TR>
<%
  Case 3
%>
          <TR bgColor=#fafafa>
          <TD height=80>
          <div align=center>
<%
 id = request("id")
 Set rs = Server.CreateObject("ADODB.RecordSet") 
 Sql = "select * from "&typ&" Where Type_id = "&id
 Rs.Open sql,conn,1,3
 If not rs.eof then
   Title_Name = rs("Type_value")
 Else
   response.write"<script language=JavaScript>{window.alert('对不起,您查询的记录不存在');window.location.href='javascript:history.go(-1)'}</script>" 
 End if
 Rs.close
 Set rs = nothing  
%>
            <table border="0" width="100%" id="table4" height="63">
				<tr>
					<td bgcolor="#CDCDCD" align="center" width="96%" height="21">
					修改记录</td>
				</tr>
<form method="POST" action="Admin_Action.asp?action=3&id=<%=id%>&type=<%=typ%>" name="Feedback_Modi">
				<tr>
					<td bgcolor="#F0F0F0" align="center" height="22">
					<input type="text" name="Title" size="20" value="<%=Title_Name%>">
					<input type="submit" value="提交" name="B1"></td>
				</tr>
</form>
				<tr>
					<td bgcolor="#E3E3E3" align="center" height="22">
					<b>注:最多不能超过10个字</b></td>
				</tr>
			</table>
			</div>
			</TD>
          </TR>
<%
 Case else
%>
          <TR bgColor=#fafafa>
          <TD height=80>
          <div align=center>
            错误的参数
			</div>
			</TD>
          </TR>
<%
 End Select
%>
        <TR bgColor=#fafafa>
          <TD bgColor=#f0f0f0 height=24>
          <DIV align=center>&copy;2008-2009 CopyRight <strong>IssTech.Co., Ltd</strong> All Rights Reserved</DIV></TD></TR></TBODY></TABLE><BR></DIV></TD></TR></TBODY></TABLE>
</BODY></HTML>

⌨️ 快捷键说明

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