📄 add_feiyong.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("user")="" then
response.write "您无此权限"
response.end
end if
dim user_name,user_number
if request("key")=1 then
user_name=session("user_name")
user_number=session("user_number")
end if
if isempty(request("user_type")) then
user_type=1
else
user_type=request("user_type")
end if
if user_type=1 then
fy_type="学费"
elseif user_type=2 then
fy_type="生活费"
elseif user_type=3 then
fy_type="办证费、其它费用"
end if
set rs=server.createobject("adodb.recordset")
sql="select * from feiyong"
rs.open sql,conn,1,1
NoncePage=0
NumRecord=0
NumPage=0
if Not(rs.bof and rs.eof) then'判别数据表中是否为空记录
NumRecord=rs.recordcount
rs.pagesize=10
NumPage=rs.Pagecount
if request("page")=empty then
NoncePage=1
elseif Cint(request("page"))<1 then
NoncePage=1
else
NoncePage=request("page")
if Cint(request("page"))>Cint(NumPage) then
NoncePage=NumPage
end if
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加学生费用情况</title>
<link rel="stylesheet" href="style.css">
<script language=javascript>
function qurey(tar){
document.frm.action=tar;
document.frm.submit();
}
function aqurey(tar){
document.frm1.action=tar;
document.frm1.submit();
}
</script>
</head>
<body>
<!--#include file="top.asp"-->
<div align="center">
<table width="738" height="35" cellspacing="0" cellpadding="0">
<%if request("key")=1 then%>
<tr><td background="images/top_1.jpg" align="left"> <a href="add_feiyong.asp?user_type=1&key=1">添加学生学习费</a>
| <a href="add_feiyong.asp?user_type=2&key=1">添加学生生活费</a> | <a href="add_feiyong.asp?user_type=3&key=1">添加学生办证、其它费用</a>
</td></tr>
<tr><td align="right"><a href="query.asp?id=5&user_number=<%=user_number%>">返回学生信息查询</a></td></tr>
<%else%>
<tr><td background="images/top_1.jpg" align="left"> <a href="add_feiyong.asp?user_type=1">添加学生学习费</a>
| <a href="add_feiyong.asp?user_type=2">添加学生生活费</a> | <a href="add_feiyong.asp?user_type=3">添加学生办证、其它费用</a>
</td></tr>
<%end if%>
</table>
</div>
<div align="center">
<form method="POST" action="add_feiyong1.asp" name="frm">
<%if request("key")=1 then%>
<input type="hidden" name="key" value="1">
<%end if%>
<table border="1" width="400" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
<tr>
<td colspan="2" align="center">添加学生费用情况</td>
</tr>
<tr>
<td>学号:</td>
<td><input type="text" name="user_number" <%if request("key")=1 then%>value=<%=user_number%> <%end if%>></td>
</tr>
<tr>
<td>姓名:</td>
<td><input type="text" name="user_name" <%if request("key")=1 then%>value=<%=user_name%> <%end if%>>
<input type="button" name="stQuery" value="查询" onclick=qurey("stuQuery.asp?user_type=<%=user_type%>")></td>
</tr>
<tr>
<td>费用类型:</td>
<td><input name="user_type" type="text" value="<%=fy_type%>"> </td>
</tr>
<tr>
<td>交费时间:</td>
<td><%
dim i,num,y,d,m
y=cint(year(date))
d=cint(day(date))
m=cint(month(date))
%>
<select name="year">
<%
for i=0 to 50
num=2000+i
if num=y then
%>
<option value="<%=num%>" selected><%=num%></option>
<%
else
%>
<option value="<%=num%>"><%=num%></option>
<%
end if
next
%>
</select>
年
<select name="month">
<%
for i=1 to 12
num=i
if num=m then
%>
<option value="<%=num%>" selected><%=num%></option>
<%
else
%>
<option value="<%=num%>"><%=num%></option>
<%
end if
next
%>
</select>
月
<select name="day">
<%
for i=1 to 31
num=i
if num=d then
%>
<option value="<%=num%>" selected><%=num%></option>
<%
else
%>
<option value="<%=num%>"><%=num%></option>
<%
end if
next
%>
</select>
日 </td>
</tr>
<tr>
<td>费用金额:</td>
<td><input type="text" name="money"></td>
</tr>
<%if user_type=1 then%>
<tr>
<td>延长(至):</td>
<td colspan="2">
<table width="100%" border="1" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
<tr>
<td width="24%"><input type="radio" name="yanchang" value="yanmonth"></td>
<td width="76%"><input type="text" name="datamonth">
月</td>
</tr>
<tr>
<td width="24%"><input type="radio" name="yanchang" value="yanday"></td>
<td width="76%"><input name="dataday" type="text">
天</td>
</tr>
<tr>
<td width="24%"><input type="radio" name="yanchang" value="yanzhi" checked></td>
<td width="76%"><input name="datazhi1" type="text" size="4" value="<%=year(date)%>">
年
<input type="text" name="datazhi2" size="4" value="<%=month(date)%>">
月
<input name="datazhi3" type="text" size="4" value="<%=day(date)%>">号
</td>
</tr>
</table></td>
</tr>
<%elseif user_type=2 then%>
<tr>
<td>截至:</td>
<td colspan="2">
<table width="100%" border="0" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
<tr>
<td><input name="datazhi1" type="text" size="4" value="<%=year(date)%>">
年
<input type="text" name="datazhi2" size="4" value="<%=month(date)%>">
月
<input name="datazhi3" type="text" size="4" value="<%=day(date)%>">号
</td>
</tr>
</table></td>
</tr>
<%
else
end if
%>
<tr>
<td>备注:</td>
<td height="100"><textarea name="info" cols="30" rows="6"></textarea>
</td>
</tr>
<tr>
<td colspan="2"><div align="center"><input type="submit" name="b1" value="提交"></div></td>
</tr>
</table>
</form>
</div>
<div align="center">
<form method="POST" action="" name="frm1">
<table border="1" width="400" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
<tr>
<td width="33%"align="right">按姓名查询:</td>
<td width="33%"><input type="text" name="user_name1" size="20"></td>
<td width="34%"><input type="button" value="查询" name="s1" onclick=aqurey("feiyongQuery.asp?id=1")></td>
</tr>
<tr>
<td width="33%" align="right">按学号查询:</td>
<td width="33%"><input type="text" name="user_number1" size="20"></td>
<td width="34%"><input type="button" value="查询" name="s2" onclick=aqurey("feiyongQuery.asp?id=2")></td>
</tr>
</table>
</form>
</div>
<div align="center">
<table border="1" width="700" bordercolorlight="#000000" cellspacing="0" cellpadding="4" bordercolordark="#FFFFFF">
<tr>
<td width="50" align="center">学号</td>
<td width="50" align="center">姓名</td>
<td width="70" align="center">费用类型</td>
<td width="70" align="center">交费时间</td>
<td width="50" align="center">费用金额</td>
<td width="90" align="center">延长(至)</td>
<td width="170" align="center">备注</td>
<td width="50" align="center">修改</td>
<td width="50" align="center">删除</td>
</tr>
<%if not rs.eof then
rs.move (Cint(NoncePage)-1)*10,1
for i=1 to rs.pagesize
%>
<tr>
<td width="50" align="center"><%=rs("user_number")%></td>
<td width="50" align="center"><%=rs("user_name")%></td>
<td width="70" align="center"><%=rs("user_type")%></td>
<td width="70" align="center"><%=rs("user_time")%></td>
<td width="50" align="center"><%=rs("money")%></td>
<td width="90" align="center"><%=rs("data")%></td>
<%
info=len(rs("info"))
if info>6 then
info=left(rs("info"),6)
%>
<td width="170" align="center"><%=info%>.. <a href="query_feiyong.asp?id=<%=rs("id")%>">[详情]</a></td>
<%else%>
<td width="170" align="center"><%=rs("info")%></td>
<%end if%>
<td width="50" align="center"><a href="mod_feiyong.asp?id=<%=rs("id")%>">修改</a></td>
<td width="50" align="center"><a href=javascript:if(confirm('确实要删除吗?'))location='del_feiyong.asp?id=<%=rs("id")%>'>删除</a>
</td>
</tr>
<%
rs.movenext
if rs.eof then
exit for
end if
next
else
%>
<tr>
<td colspan="9"><marquee>
暂无奖惩情况添加
</marquee></td>
</tr>
</table>
<%
end if
rs.close
set rs=nothing
%>
<div align="center"> <table border="0">
<input type="hidden" name="page" value="<%=NoncePage%>">
<%
if NoncePage>1 then
response.write "|<a href=add_feiyong.asp?page=1>首 页</a>| |<a href=add_feiyong.asp?page="&NoncePage-1&">上一页</a>| "
else
response.write "|首 页| |上一页| "
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=add_feiyong.asp?page="&NoncePage+1&">下一页</a>| |<a href=add_feiyong.asp?page="&NumPage&">尾 页</a>|"
else
response.write "|下一页| |尾 页|"
end if
%>
页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font>
共<font color="#0033CC"><%=NumRecord%></font>条记录 </table>
</div>
</div>
<!--#include file="down.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -