📄 admin_editterm.asp
字号:
<!--#include file="Admin_IsLogin.asp" -->
<!--#include file="dataconn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>考试管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" Name=GENERATOR>
<LINK href="../inc/admin_style.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
-->
</style>
<body>
<p> </p>
<table width="90%" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td height="22" valign="top" style="FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=1,startColorStr=#3b839f,endColorStr=#eff4ff)"><span class="style1"> </span><span class="topbg STYLE1"><strong>学期管理</strong></span> --> <span class="STYLE1">学期修改</span> </td>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="600" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="600">
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="198" valign="top">
<%
select case request("action")
case "edit"
call edit()
case "del"
call del()
case "save"
call save()
case "setnow"
call setnow()
end select
sub edit()
set rs=conn.execute("select tid,tname from term where tid="&request("id")&"")
if rs.eof and rs.bof then
Response.Write "<script>alert(""不存在该学期!"");window.location='Javascript:history.back()';</script>"
else
%>
<form name="form1" method="post" action="?action=save&id=<%=request("id")%>">
<br>
<table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr>
<td>学期ID</td>
<td><input name="tid" type="text" disabled="disabled" id="tid" value="<%=rs("tid")%>" size="10"></td>
<td>学期名</td>
<td><input name="tname" type="text" id="tname" value="<%=rs("tname")%>" size="40"></td>
</tr>
<tr>
<td height="60" colspan="4" valign="bottom"><div align="center">
<p>
<input type="submit" name="Submit3" value="确定">
<input type="button" name="Submit4" value="返回" onClick="javascript:history.go(-1)">
</p>
</div></td>
</tr>
</table>
</form>
<%
end if
set rs=nothing
end sub
sub save()
dim tname
tname=replace(trim(request.form("tname")),"'","")
if tname="" or len(tname)>20 then
Response.Write "<script>alert(""学期名不能为空且在20个字符以内!"");window.location='Javascript:history.back()';</script>"
response.end
end if
set rs=conn.execute("select tid from term where tname='"&tname&"' and tid<>"&request("id")&"")
if not(rs.eof and rs.bof) then
Response.Write "<script>alert(""该学期名称已存在!"");window.location='Javascript:history.back()';</script>"
response.end
set rs=nothing
else
conn.execute("update term set tname='"&tname&"' where tid="&request("id")&"")
backurl="?action=edit&id="&request("id")&""
Response.Write "<script>alert(""编辑学期成功!"");window.location='test_term.asp';</script>"
end if
end sub
sub del()
conn.execute("delete from term where tid="&request("id")&"")
Response.Write "<script>alert(""删除学期成功!"");window.location='test_term.asp';</script>"
end sub
sub setnow()
conn.execute("update term set tnow=0")
conn.execute("update term set tnow=1 where tid="&request("id")&"")
response.redirect"test_term.asp"
end sub
%></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -