📄 admin_addst.asp
字号:
<!--#include file="user_err.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<%
b1=request("b1")
if b1="" then
%>
<HTML><HEAD><TITLE>汕头育新学校 - 成绩管理系统管理员页面</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK
href="images/style.css" type=text/css rel=stylesheet>
<STYLE type=text/css>.pinkstar {
COLOR: #ed5460
}
<STYLE type=text/css>BODY {
FONT-SIZE: 12px; COLOR: #000080; LINE-HEIGHT: 12pt
}
INPUT {
FONT-SIZE: 12px; COLOR: #000080
}
SELECT {
FONT-SIZE: 12px; COLOR: #000080
}
TH {
FONT-SIZE: 12px; COLOR: #000080
}
TD {
FONT-SIZE: 12px; COLOR: #000080; LINE-HEIGHT: 12pt
}
A:link {
FONT-SIZE: 12px; COLOR: #0000e0; TEXT-DECORATION: none
}
A:visited {
FONT-SIZE: 12px; COLOR: #0000e0; TEXT-DECORATION: none
}
A:active {
FONT-SIZE: 12px; COLOR: #0000ff; TEXT-DECORATION: none
}
A:hover {
FONT-SIZE: 12px; COLOR: #ff0000; TEXT-DECORATION: underline
}
</STYLE>
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY>
<!--#include file="up.inc"-->
<!--#include file="upadmin.inc"-->
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top width=200>
<DIV align=center><IFRAME id=hotarea border=0
marginWidth=0 frameSpacing=0 marginHeight=0
src="hotsite.htm" frameBorder=0 width=200 scrolling=no
height=250></IFRAME>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=15></TD></TR></TBODY></TABLE></DIV></TD>
<TD width=20> </TD>
<TD vAlign=top width=530>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=tdTit_p>汕头育新学校学生学籍注册</TD></TR>
<TR>
<TD class=tdBor_p>
<DIV align=center>
<TABLE cellSpacing=4 cellPadding=0 width=521 align=center bgColor=#fff7f7
border=0><form action="admin_addst.asp" method="POST">
<TBODY>
<TR>
<TD width=521>
<DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width=400 border=0>
<TBODY>
<TR bgColor=#ffe8e8>
<TD class=p14 colSpan=4 height=23>
<DIV align=center><STRONG>学生信息</STRONG></DIV></TD></TR>
<TR>
<TD class=p12 vAlign=top height=23> 学生学号</TD>
<TD colSpan=3><INPUT class=txBox_p id=s_no
maxLength=30 size=24 name=s_no> <SPAN
class=pinkstar>*</SPAN> <SPAN
class=gray_text>填数字,不能重复,无法修改</SPAN></TD></TR>
<TR>
<TD class=p12 vAlign=top width=60 height=23> 学生姓名</TD>
<TD colSpan=3><INPUT class=txBox_p id=s_name maxLength=30 size=24
name=s_name> <SPAN class=pinkstar>*</SPAN> <SPAN
class=gray_text>必须填写正确,以便学生查分</SPAN></TD></TR>
<TR>
<TD class=p12 vAlign=top height=23> 性 别</TD>
<TD colSpan=3> <input name="s_sex" type="radio" value="男" checked>
男 <input name="s_sex" type="radio" value="女" > 女 <SPAN
class=pinkstar>
*</SPAN></TD></TR>
<TR>
<TD class=p12 vAlign=top height=23> 班 级</TD>
<TD colSpan=3>
<%
sql = "select c_id,c_name from class order by c_id asc"
set rs = conn.execute(sql)
if rs.eof and rs.bof then
response.write "请先添加班级!"
response.end
else
%>
<select class=txBox_p id=s_class maxLength=30 name=s_class>
<option value="">选择班级</option>
<%do while not rs.eof%>
<option value="<%=rs(0)%>"><%=(rs(1))%></option>
<%
rs.movenext
loop
end if
rs.close
set rs = nothing
%>
</select>
<SPAN class=pinkstar>*(请选择学生所在的班级!)</SPAN> </TD></TR>
<TR>
<TD class=p12 vAlign=top height=23> 电话号码</TD>
<TD colSpan=3><INPUT class=txBox_p id=s_phone
maxLength=30 size=24 name=s_phone> </TD></TR>
<TR>
<TD height=10></TD>
<TD colSpan=3></TD></TR>
<TR vAlign=top>
<TD colSpan=4 height=26>
<DIV align=center><INPUT class=Button_p type=submit type=submit value="注 册" name="B1">
<INPUT class=Button_p type=reset value="重 置"> <INPUT type=hidden
name=lm> </DIV></TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></FORM></TABLE>
</DIV></TD></TR>
<TR>
<TD class=tdBott_p>对汕头育新学校有任何意见和问题,<a href="../note.asp">请给我们留言</a>。</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<!--#include file="down.inc"-->
</BODY></HTML>
<%elseif b1="注 册" then
Dim s_name,s_sex,s_class,s_phone,s_no,Ipaddr
s_name=Request.Form("s_name")
s_sex=Request.Form("s_sex")
s_class=Request.Form("s_class")
s_phone=Request.Form("s_phone")
s_no=Request.Form("s_no")
Ipaddr=Request.ServerVariables("REMOTE_ADDR")
Dim Result
Result="错误:"
If s_no="" Then Response.write "<script>alert(""学号没有填写!"");history.back();</script>"
If s_no<>"" And Not IsNumeric(s_no) Then Result=Result&"学号必须是数字!"
If Checks_no(s_no) ="Passed" Then Result=Result&"学号已存在!"
If s_name="" Then Response.write "<script>alert(""学生姓名没有填写!"");history.back();</script>"
If Len(s_name)>4 Then Result=Result&"学生姓名错误!"
If Len(s_name)<2 Then Result=Result&"学生姓名错误!"
If s_class="" Then Response.write "<script>alert(""班级没有填写!"");history.back();</script>"
If s_phone<>"" And Not IsNumeric(s_phone) Then Result=Result&"电话号码必须是数字!"
IF Result="错误:" Then
Dim sql
sql="insert into student(s_name,s_sex,s_class,s_phone,s_no,s_ip,s_now)"
sql=sql&" values('"&s_name&"','"&s_sex&"','"&s_class&"','"&s_phone&"','"&s_no&"','"&Ipaddr&"','"&Now&"')"
Conn.Execute sql
Response.write "<script>alert('注册成功!点确定继续......');location.href('admin_addst.asp');</script>"
Else
Response.write "<script>alert("""&Result&""");history.back();</script>"
end if
conn.close
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -