?? stu_add.asp
字號:
<!-- #include file="Include/Chk.asp" -->
<!-- #include file="Include/Conn.asp" -->
<!-- #include file="Include/MD5.asp" -->
<%
if Request("Action")=1 then
if Trim(Request("name"))="" then
Response.write "<script language='javascript'>alert('信息填寫不完整!');history.go(-1);</script>"
Response.End()
end if
SQL="Select * from Stu where username='"&Request.Form("username")&"'"
set rs=server.createobject("adodb.recordset")
rs.open SQL,conn,1,3
if not rs.eof then
Response.write "<script language='javascript'>alert('已存在相同登錄名用戶!');history.go(-1);</script>"
Response.End()
end if
rs.AddNew
rs("name")=Trim(Request("name"))
rs("dw")=Trim(Request("dw"))
rs("username")=Trim(Request("username"))
rs("password")=Trim(Request("password"))
rs.Update
rs.Close
Set rs=nothing
Response.Write "<script language='javascript'>alert('添加成功!');document.location.href('Stu_Manage.asp');</script>"
Response.End()
else
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="Images/main.css" rel="stylesheet" type="text/css">
<script src="Images/uc.js"></script>
</head>
<body>
<form action="?Action=1" method="post" name="form1" class="but" id="form1">
<table width="100%" border="0" cellpadding="5" cellspacing="1">
<tr>
<td height="25" colspan="2" bgcolor="#3385D1" class="window-0"> 添加學員</td>
</tr>
<tr>
<td width="100" align="left" valign="middle" bgcolor="#efefef" >姓名:</td>
<td width="700" bgcolor="#efefef"><input name="name" type="text" id="name" size="20" maxlength="20" /></td>
</tr>
<tr>
<td width="100" height="25" align="left" valign="middle" bgcolor="#efefef" >單位:</td>
<td height="25" bgcolor="#efefef"><input name="dw" type="text" id="dw" size="20" maxlength="50" /></td>
</tr>
<tr>
<td width="100" height="25" align="left" valign="middle" bgcolor="#efefef" >用戶名:</td>
<td height="25" bgcolor="#efefef"><input name="username" type="text" id="username" size="20" maxlength="20" /></td>
</tr>
<tr>
<td width="100" height="25" align="left" valign="middle" bgcolor="#efefef" >密碼:</td>
<td height="25" bgcolor="#efefef"><input name="password" type="text" id="password" size="20" maxlength="20" /></td>
</tr>
<tr>
<td width="100" height="25" align="left" valign="middle" bgcolor="#efefef" > </td>
<td height="25" bgcolor="#efefef"><input type="submit" name="Submit" value="提交" /> <input type="button" name="Submit2" value="取消" onClick="history.back();">
(學員可以通過完全匹配以上信息登錄在線測試系統)</td>
</tr>
</table>
</form>
</body>
</html>
<%
end if
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -