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

📄 stu_add.asp

📁 学生成长管理系统V2008
💻 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" >&nbsp;</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 + -