📄 out.asp
字号:
<!--#include file="Inc/const.asp"-->
<!--#include file="cookies.asp"-->
<%
response.expires = 0
response.expiresabsolute = now() - 1
response.addHeader "pragma","no-cache"
response.addHeader "cache-control","private"
Response.cachecontrol = "no-cache"
%><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equtv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equtv="pragma" CONTENT="no-cache">
<meta http-equtv="Cache-Control" CONTENT="no-cache, must-revalidate">
<meta http-equtv="expires" CONTENT="0">
<title>雷诺家庭财务管理系统HomeIO2.0</title>
<link href="images/Admin_css.css" type=text/css rel=stylesheet>
<script src="js/admin.js"></script>
<script language="javascript" type="text/javascript" src="js/calendar.js"></script>
<script language="javascript" type="text/javascript" src="js/Check.js"></script>
</head>
<body>
<script language=javascript>
function checkform(){}
function popnew(url,title,width,height){
var w = 1024;
var h = 768;
if (document.all || document.layers){
w = screen.availWidth;
h = screen.availHeight;
}
var leftPos = (w/2-width/2);
var topPos = (h/2.3-height/2.3);
window.open(url,title,"width="+width+",height="+height+",top="+topPos+",left="+leftPos+",scrollbars=no,resizable=no,status=no")}
</script>
<table width="95%" border="0" cellspacing="2" cellpadding="3" align=center class="admintable" style="margin-bottom:5px;">
<tr><form name="form1" method="get" action="out.asp">
<td height="25" bgcolor="f7f7f7">快速查找:
<SELECT onChange="javascript:window.open(this.options[this.selectedIndex].value,'main')" size="1" name="s">
<OPTION value="" selected>-=请选择=-</OPTION>
<OPTION value="?s=all">所有记录</OPTION>
<OPTION value="?s=y">有(衣)服鞋帽的支出记录</OPTION>
<OPTION value="?s=s">有(食)品的支出记录</OPTION>
<OPTION value="?s=z">有(住)房租的支出记录</OPTION>
<OPTION value="?s=x">有(行)车旅费的支出记录</OPTION>
</SELECT> </td>
<td align="center" bgcolor="f7f7f7">
<input name="keyword" type="text" id="keyword" value="<%=request("keyword")%>">
<input type="submit" name="Submit2" value="备注搜索">
<input onClick="window.location.href='?hits=1'" type='button' class="sub" name='Submit2' value='按支出高低排序' />
</form></td>
<td align="right" bgcolor="f7f7f7">按家庭成员显示:
<select name="o_name" id="o_name" onChange="javascript:window.open(this.options[this.selectedIndex].value,'main')">
<%
Set rs = db("SELECT * FROM [{pre}name]",2)
While (NOT rs.EOF)
Response.Write("<option value=" & """?o_name=" & Server.URLEncode(rs("n_name")) & """" & "")
If request("o_name")=rs("n_name") then
Response.Write(" selected" )
End If
Response.Write(">" & rs("n_name") & "")
Response.Write("</option>" )
rs.MoveNext()
Wend
rs.Close()
%>
</select></td>
</tr>
</table>
<table width="95%" border="0" cellspacing="2" cellpadding="3" align=center class="admintable" style="margin-bottom:5px;">
<tr><form name="form2" method="get" action="out.asp">
<td height="25" bgcolor="f7f7f7">按成员的年度/月度统计:
<select name="o_name1" id="o_name1">
<OPTION value="" selected>-=请选择成员=-</OPTION>
<%
Set rs = db("SELECT * FROM [{pre}name]",2)
While (NOT rs.EOF)
Response.Write("<option value=" & rs("n_name") & "")
Response.Write(">" & rs("n_name") & "")
Response.Write("</option>" )
rs.MoveNext()
Wend
rs.Close()
%>
</select>
<SELECT size="1" name="y">
<OPTION value="" selected>-=请选择年度=-</OPTION>
<%
Dim ii
For ii=1990 To 2050
%>
<option value="<%=ii%>"><%=ii%>年</option>
<%next%>
</SELECT>
<SELECT size="1" name="m">
<OPTION value="" selected>-=请选择月度=-</OPTION>
<%
For ii=1 To 12
%>
<option value="<%=ii%>"><%=ii%>月</option>
<%next%>
</SELECT>
<input type="submit" value="统计"/></td>
</form>
<td align="center" bgcolor="f7f7f7">
<span class="note">年度必选,月度可选,成员可选。</span>
</td>
</tr>
</table>
<%
Dim page,i
if request("action") = "add" then
call add()
elseif request("action")="edit" then
call edit()
elseif request("action")="savenew" then
call savenew()
elseif request("action")="savedit" then
call savedit()
elseif request("action")="del" then
call del()
elseif request("action")="delAll" then
call delAll()
else
call List()
end if
sub List()
%>
<form name="myform" method="POST" action="out.asp?action=delAll">
<table width="95%" border="0" align=center cellpadding="3" cellspacing="1" bgcolor="#F2F9E8" class="admintable">
<tr>
<td colspan="14" align=left class="admintitle">家庭支出列表 [<a href="?action=add">添加</a>]</td></tr>
<tr bgcolor="#f1f3f5" style="font-weight:bold;">
<td height="30" align="center" class="ButtonList"> </td>
<td align="center" class="ButtonList">成员名称</td>
<td align="center" class="ButtonList">记录时间</td>
<td align="center" class="ButtonList">衣/鞋/帽</td>
<td align="center" class="ButtonList">主副食品</td>
<td align="center" class="ButtonList">房租房贷</td>
<td align="center" class="ButtonList">路费旅游</td>
<td align="center" class="ButtonList">水电话网</td>
<td align="center" class="ButtonList">车贷商贷</td>
<td align="center" class="ButtonList">日用化妆</td>
<td align="center" class="ButtonList">其他支出</td>
<td align="center" class="ButtonList">本次小计</td>
<td align="center" class="ButtonList">备注</td>
<td align="center" class="ButtonList">操作</td>
</tr>
<%
Dim Hits,s,y,m,o_name,o_name1,keyword,mysql
dim count_y,count_s,count_z,count_x,count_sdhw,count_dk,count_ry,count_qt,count_sj
count_y=0
count_s=0
count_z=0
count_x=0
count_sdhw=0
count_dk=0
count_ry=0
count_qt=0
count_sj=0
Hits=request("hits")
s=Request("s")
y=Request("y")
m=Request("m")
o_name=request("o_name")
o_name1=request("o_name1")
keyword=request("keyword")
mysql="select * from [{pre}out]"
if s="y" then
mysql=mysql&" Where o_y<>''"
elseif s="s" then
mysql=mysql&" Where o_s<>0"
elseif s="z" then
mysql=mysql&" Where o_z<>0"
elseif s="x" then
mysql=mysql&" Where o_x<>0"
elseif o_name<>"" then
mysql=mysql&" Where o_name='"&o_name&"'"
elseif keyword<>"" then
mysql=mysql&" Where o_bz like '%"&keyword&"%'"
End if
if y<>"" and m<>"" then
mysql=mysql&" Where year(o_date)="&y&" and month(o_date)="&m&" "
elseif y<>"" then
mysql=mysql&" Where year(o_date)="&y&" "
end if
if o_name1<>"" then
mysql=mysql&" and o_name='"&o_name1&"'"
end if
mysql=mysql&" order by "
If Hits=1 then
mysql=mysql&"o_sj desc"
Else
mysql=mysql&"o_date desc"
End if
set rs=db(mysql,2)
if Not rs.eof then
%>
<%
page=request.querystring("page") 'page值为接受值
rs.PageSize = 50 '每页显示记录数
if Not IsEmpty(page) then '如果page已经初始化...
if Not IsNumeric(page) then '判断page值是否为数字
page=1
else
page = cint(page) '接收page并化为数字型赋给page变量
end if
if page > rs.recordcount then '如果接收的页数大于总页数
rs.AbsolutePage = rs.recordcount '设置当前显示页等于最后页
elseif page <= 0 then '如果page小于等于0
rs.AbsolutePage = 1 '设置当前显示页等于第一页
else
rs.AbsolutePage = page '如果大于零,显示当前页等于接收的页数
end if
else
rs.AbsolutePage=1
end if
page = rs.AbsolutePage
%>
<% For i = 1 to rs.PageSize '利用for next 循环依次读出当前页的记录
if rs.EOF then
Exit For
end If
%>
<!--循环-->
<tr bgcolor="#ffffff" onMouseOver="this.style.backgroundColor='#EAFCD5';" onMouseOut="this.style.backgroundColor='';this.style.color=''">
<td height="25" align="CENTER"><input type="checkbox" value="<%=rs("o_id")%>" name="id" onClick="unselectall(this.form)" style="border:0;"></td>
<td height="25"><a href="?o_name=<%=rs("o_name")%>"><%=rs("o_name")%></a></td>
<td height="25" align="center"><%=rs("o_date")%></td>
<td height="25" align="center"><%=rs("o_y")%></td>
<td height="25" align="center"><%=rs("o_s")%></td>
<td height="25" align="center"><%=rs("o_z")%></td>
<td height="25" align="center"><%=rs("o_x")%></td>
<td height="25" align="center"><%=rs("o_sdhw")%></td>
<td height="25" align="center"><%=rs("o_dk")%></td>
<td height="25" align="center"><%=rs("o_ry")%></td>
<td height="25" align="center"><%=rs("o_qt")%></td>
<td height="25" align="center"><%=rs("o_sj")%></td>
<td height="25" align="center"><%=rs("o_bz")%></td>
<td align="center"><a href="?action=edit&id=<%=rs("o_id")%>&page=<%=page%>">编辑</a>|<a href="?action=del&id=<%=rs("o_id")%>&page=<%=page%>">删除</a></td>
</tr>
<%
count_y=count_y+rs("o_y")
count_s=count_s+rs("o_s")
count_z=count_z+rs("o_z")
count_x=count_x+rs("o_x")
count_sdhw=count_sdhw+rs("o_sdhw")
count_dk=count_dk+rs("o_dk")
count_ry=count_ry+rs("o_ry")
count_qt=count_qt+rs("o_qt")
count_sj=count_sj+rs("o_sj")
rs.movenext
next
%>
<tr style="font-weight:bold;">
<td height="30" align="center" bgcolor="#CAF2FF" colspan=2>合计</td>
<td align="center" bgcolor="#CAF2FF"></td>
<td align="center" bgcolor="#CAF2FF"><%=count_y%></td>
<td align="center" bgcolor="#CAF2FF"><%=count_s%></td>
<td align="center" bgcolor="#CAF2FF"><%=count_z%></td>
<td align="center" bgcolor="#CAF2FF"><%=count_x%></td>
<td align="center" bgcolor="#CAF2FF"><%=count_sdhw%></td>
<td align="center" bgcolor="#CAF2FF"><%=count_dk%></td>
<td align="center" bgcolor="#CAF2FF"><%=count_ry%></td>
<td align="center" bgcolor="#CAF2FF"><%=count_qt%></td>
<td align="center" bgcolor="#CAF2FF"><%=count_sj%></td>
<td align="center" bgcolor="#CAF2FF"></td>
<td align="center" bgcolor="#CAF2FF"></td>
</tr>
<tr>
<td align="center" bgcolor="f7f7f7"><input name="Action" type="hidden" value="Del"><input name="chkAll" type="checkbox" id="chkAll" onClick=CheckAll(this.form) value="checkbox" style="border:0"></td>
<td colspan="15" bgcolor="f7f7f7"><font color=red>移动到:</font>
<select id="o_name" name="o_name">
<%
Dim rst
Set rst = db("SELECT * FROM [{pre}name]",2)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -