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

📄 admintime.asp

📁 进入后台
💻 ASP
字号:
<!--#include file="config.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Sitename%>后台管理</title>
<LINK href="../css.css" type=text/css rel=stylesheet>
</head>
<body>
<table width="778" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td> <%dim username,sql,type2,ad
ad=request.querystring("ad")
type2=request.queryString("type2")
use=request.querystring("use")
	
Select Case type2
	Case "add":
		Call add
		Case "del":
		Call del
	Case Else:
		 call show
End Select
sub show
%> <table width="100%"  cellspacing="0">

                            <tr>
                              <td>

                              <table width="100%" border=1  align="center" cellpadding="2" cellspacing=0  
            bordercolorlight=#c0c0c0 bordercolordark=#ffffff>
                                <form name="form2" method="post" action="?type2=add">
                                  <tr bgcolor="#EEEEEE">
                                    <td height="22" colspan="2">添加入学时间</td>
                                  </tr>
                                  <tr>
                                  <td width="14%" height="22">添加入学时间:</td>
                                  <td width="86%" height="22"><input name="bytype" type="text" id="bytype"></td>
                                </tr>
                                <tr>
                                  <td height="22">&nbsp;</td>
                                  <td height="22"> 
                                    <input type="submit" name="Submit" value="提交">  
                                    <input type="reset" name="Submit" value="重置"></td>
                                </tr></form>
                              </table></td>
                            </tr>
                            <tr>
                              <td height="25">毕业时间列表:</td>
                            </tr>
<%sql="select * from bydate order by bydate"
	rs.open sql,conn,1,1
do while not rs.eof%>
                            <tr>
                              <td><table width="100%" border=1  align="center" cellpadding="2" cellspacing=0  
            bordercolorlight=#c0c0c0 bordercolordark=#ffffff>
                                <tr>
                                  <td width="16%">ID:<%=rs("id")%></td>
                                  <td width="70%">时间:<%=rs("bydate")%></td>
                                  <td width="14%" align="center"><a href="?type2=del&ad=<%=rs("id")%>" onClick="return confirm('真的要删除?')">删除</a></td>
                                </tr>
                              </table></td>
                            </tr>
				<%
				rs.movenext
      loop
	  rs.close
set rs=nothing%>
                          </table>
 <%
end sub
sub add
dim bytype
bytype=request.form("bytype")
if bytype="" then ShowError("毕业时间不可以为空")
	rs.open "select * from bydate where 1=2",conn,1,3
	rs.addnew()
		rs("bydate")=bytype
	rs.update
	rs.close
set rs=nothing
response.redirect "admintime.asp"
end sub

sub del
Set rs = Server.CreateObject("ADODB.Recordset")
sql="delete from bydate where id="&ad&""
rs.open sql,conn,1,3
Response.Redirect "admintime.asp"
end sub%></td>
  </tr>
</table></BODY></HTML>

⌨️ 快捷键说明

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