📄 add_jiangcheng1.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("user")="" then
response.write "您无此权限"
response.end
end if
dim user_name,yuanying,user_xuefen,zk
zk=request("zk")
user_name=trim(request("user_name"))
yuanying=trim(request.form("yuanying"))
user_xuefen=trim(request.form("user_xuefen"))
user_number=trim(request("user_number"))
y=request("year")
m=request("month")
d=request("day")
jcdata=y&"-"&m&"-"&d
if user_number="" then
response.write "user_number不能为空"
response.end
end if
if user_name="" then
response.write "user_name不能为空"
response.end
end if
set trs=server.createobject("adodb.recordset")
tsql="select * from st_info where user_number='"&user_number&"'"
trs.open tsql,conn,1,3
if trs.eof then
response.Write("此学生还未录入进系统,请录入该学生信息后再添加该学生费用信息!")
elseif not trs.eof then
if yuanying="" then
response.write "yuanying不能为空"
response.end
end if
if user_xuefen="" then
response.write "user_xuefen不能为空"
response.end
end if
if isnumeric(user_xuefen)=false then
response.write "“学分”栏请输入数字"
response.end
end if
if zk=0 then
user_xuefen=0-user_xuefen
end if
set rs=server.createobject("adodb.recordset")
sql="select * from jiangcheng "
rs.open sql,conn,1,3
rs.addnew
rs("user_number")=trs("user_number")
rs("user_name")=user_name
rs("yuanying")=yuanying
rs("user_xuefen")=user_xuefen
rs("time")=jcdata
rs("zk")=zk
rs.update
rs.close
set rs=nothing
if isnull(trs("xuefen")) then
trs("xuefen")=user_xuefen
else
xuefen=trs("xuefen")
trs("xuefen")=xuefen+user_xuefen
end if
trs.update
if isempty(request("key")) then
response.redirect "add_jiangcheng.asp"
else
response.Redirect("add_jiangcheng.asp?key=1")
end if
end if
trs.close
set trs=nothing
response.end
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -