📄 1.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>
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY text=#000000 vLink=#0033cc aLink=#800080 link=#0033cc bgColor=#ffffff
topMargin=0><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR><form action="1.asp" method="POST"><TD vAlign=center align=middle
bgColor=#ffffff><font color=#ff0000><%=Session("a_no")%></font><INPUT type="hidden" id=a_no maxLength=30 size=1
name=a_no value="<%=Session("a_no")%>"><INPUT type="hidden" id=a_name maxLength=30 size=1
name=a_name value="<%=Session("a_name")%>"><INPUT type="hidden" id=a_years maxLength=30 size=1
name=a_years value="<%=Session("years")%>"><INPUT type="hidden" id=a_stat maxLength=30 size=1
name=a_stat value="<%=Session("stat")%>">
<% classes =Session("classes")
al_stat =Session("stat")
if classes=""and al_stat="" then
response.write "请先选择班级和考试名称!"
else
sql = "select al_id,al_name from alcourse where al_stat = "& al_stat &" order by al_id desc"
end if
set rs = conn.execute(sql)
if rs.eof and rs.bof then
response.write "请先添加课程!"
response.end
else
%> <%do while not rs.eof%><%al_name=rs("al_name")%><%=Listcourse(al_name)%>
<INPUT id=<%=Listcourse2(al_name)%> maxLength=30 size=1
name=<%=Listcourse2(al_name)%>><%
rs.movenext
loop
end if
rs.close
set rs = nothing
%>
<INPUT type=submit type=submit value="注 册" name="B1"></TD>
</TR>
</TBODY>
</TABLE>
</BODY></HTML>
<%elseif b1="注 册" then
Dim a_years,a_stat,a_no,Ipaddr,a_math,a_chinese,a_english
a_no=Request.Form("a_no")
a_name=Request.Form("a_name")
a_years=Request.Form("a_years")
a_stat=Request.Form("a_stat")
a_math=Request.Form("a_math")
a_chinese=Request.Form("a_chinese")
a_english=Request.Form("a_english")
a_math=Request.Form("a_math")
a_chinese=Request.Form("a_chinese")
a_english=Request.Form("a_english")
a_physical=Request.Form("a_physical")
a_chemical=Request.Form("a_chemical")
a_creature=Request.Form("a_creature")
a_historical=Request.Form("a_historical")
a_geography=Request.Form("a_geography")
a_political=Request.Form("a_political")
a_physicaleduc=Request.Form("a_physicaleduc")
a_music=Request.Form("a_music")
a_art=Request.Form("a_art")
a_artist=Request.Form("a_artist")
a_information=Request.Form("a_information")
a_science=Request.Form("a_science")
a_approach=Request.Form("a_approach")
a_practice=Request.Form("a_practice")
a_serve=Request.Form("a_serve")
Ipaddr=Request.ServerVariables("REMOTE_ADDR")
Dim Result
Result="错误:"
If a_no="" Then Response.write "<script>alert(""学生学号没有填写!"");history.back();</script>"
If CheckPassachievement( a_no, a_stat) = "Passed" Then Result=Result&"学生本次成绩已经注册!"
If a_math="" Then
a_math=0
end if
if a_chinese="" then
a_chinese=0
end if
If a_english="" Then
a_english=0
end if
If a_physical="" Then
a_physical=0
end if
if a_chemical="" then
a_chemical=0
end if
If a_creature="" Then
a_creature=0
end if
If a_historical="" Then
a_historical=0
end if
if a_geography="" then
a_geography=0
end if
If a_political="" Then
a_political=0
end if
If a_physicaleduc="" Then
a_physicaleduc=0
end if
if a_music="" then
a_music=0
end if
If a_art="" Then
a_art=0
end if
If a_artist="" Then
a_artist=0
end if
if a_information="" then
a_information=0
end if
If a_science="" Then
a_science=0
end if
If a_approach="" Then
a_approach=0
end if
if a_practice="" then
a_practice=0
end if
If a_serve="" Then
a_serve=0
end if
a_total=0
a_total=a_total+a_math+a_chinese+a_english+a_physical+a_chemical+a_creature+a_historical+a_geography+a_political+a_physicaleduc+a_music+a_art+a_artist+a_information+a_science+a_approach+a_practice+a_serve
If a_total="" Then
a_total=0
end if
IF Result="错误:" Then
Dim sql
sql="insert into achievement(a_years,a_stat,a_math,a_chinese,a_english,a_physical,a_chemical,a_creature,a_historical,a_geography,a_political,a_physicaleduc,a_music,a_art,"
sql=sql&"a_artist,a_information,a_science,a_approach,a_practice,a_serve,a_total,a_no,a_name,a_ip,a_now)"
sql=sql&" values('"&a_years&"','"&a_stat&"','"&a_math&"','"&a_chinese&"','"&a_english&"','"&a_physical&"','"&a_chemical&"','"&a_creature&"','"&a_historical&"','"&a_geography&"'"
sql=sql&",'"&a_political&"','"&a_physicaleduc&"','"&a_music&"','"&a_art&"','"&a_artist&"','"&a_information&"','"&a_science&"','"&a_approach&"','"&a_practice&"','"&a_serve&"','"&a_total&"','"&a_no&"','"&a_name&"','"&Ipaddr&"','"&Now&"')"
Conn.Execute sql
s_id=Session("s_id")
sql="update student set s_yesorno=True where s_id="&s_id
conn.execute sql
Session("a_no") = a_no
Response.write "<script>alert('学号"&a_no&"注册成功!点确定返回!');</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 + -