?? money.asp
字號:
<%
if session("yida_username")="" then
%>
<script language="javascript">
top.location.href="../index.asp"
</script>
<%
response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->
<html>
<head>
<title><%=dianming%> - 帳務查詢</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
background-color:#FFFFFF;
}
</style>
<script language=javascript>
function preview() {
bdhtml=window.document.body.innerHTML;
sprnstr="<!--startprint-->";
eprnstr="<!--endprint-->";
prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
window.document.body.innerHTML=prnhtml;
window.print();
window.document.body.innerHTML=bdhtml;
}
</script>
</HEAD>
<BODY>
<script>
function CheckAll(form) {
for (var i=0;i<form.elements.length;i++) {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked;
}
}
</script>
<%
if fla71="0" and session("shiwei_id")<>"1" then
%>
<br><center><img src="../images/note.gif" align="absmiddle"> <font color="#FF0000">你不具備此權限,請與管理員聯系!</font></center>
<%
response.end
end if
'取得當前頁碼
currentpage=request("page")
'response.write currentpage
'response.end
if currentpage<1 or currentpage="" then
currentpage="1"
end if
'取得搜索關鍵字
nowstartdate=request("startdate")
if nowstartdate="" then
nowstartdate=date()-day(date()-1)
end if
nowenddate=request("enddate")
if nowenddate="" then
nowenddate=date()
end if
nowtype=request("type")
nowbank=request("bank")
nowbigclass=request("bigclass")
nowsmallclass=request("smallclass")
if nowbigclass="" then nowsmallclass=""
nowkeyword=request("keyword")
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<form name="form2">
<tr>
<td width="50" height="50"> <img src="../images/print.jpg" align="absmiddle" style="cursor:hand;" onClick="preview();"></td>
<td width="*" align="right">
<select name="type" onChange="form2.submit()">
<option value="">所有類型</option>
<option value="0"<%if nowtype="0" then%> selected="selected"<%end if%>>收入</option>
<option value="1"<%if nowtype="1" then%> selected="selected"<%end if%>>支出</option>
</select>
<%
sql="select * from bank order by id desc"
set rs_bank=conn.execute(sql)
%>
<select name="bank" onChange="form2.submit()">
<option value="">所有銀行</option>
<%
do while rs_bank.eof=false
%>
<option value="<%=rs_bank("id")%>"<%if trim(cstr(rs_bank("id")))=nowbank then%> selected="selected"<%end if%>><%=rs_bank("bank")%></option>
<%
rs_bank.movenext
loop
%>
</select>
<%
if nowtype="" then
sql="select * from money_bigclass order by type,id"
else
sql="select * from money_bigclass where type="&nowtype&" order by id"
end if
set rs_bigclass=conn.execute(sql)
%>
<select name="bigclass" onChange="form2.submit()">
<option value="">所有大類</option>
<%
do while rs_bigclass.eof=false
%>
<option value="<%=rs_bigclass("id")%>"<%if trim(cstr(rs_bigclass("id")))=nowbigclass then%> selected="selected"<%end if%>><%=rs_bigclass("bigclass")%></option>
<%
rs_bigclass.movenext
loop
%>
</select>
<%
if nowbigclass="" then
nowbigclass2=0
else
nowbigclass2=nowbigclass
end if
sql="select * from money_smallclass where id_bigclass="&nowbigclass2&" order by id"
set rs_smallclass=conn.execute(sql)
%>
<select name="smallclass" onChange="form2.submit()">
<option value="">所有小類</option>
<%
do while rs_smallclass.eof=false
%>
<option value="<%=rs_smallclass("id")%>"<%if trim(cstr(rs_smallclass("id")))=nowsmallclass then%> selected="selected"<%end if%>><%=rs_smallclass("smallclass")%></option>
<%
rs_smallclass.movenext
loop
%>
</select>
<br>
開始日期:
<input name="startdate" value="<%=nowstartdate%>" readonly style="width:100px">
<img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form2&field=startdate&oldDate='+startdate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');">
結束日期:
<input name="enddate" value="<%=nowenddate%>" readonly style="width:100px">
<img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form2&field=enddate&oldDate='+enddate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=740');">
<input name="keyword" value="<%=nowkeyword%>" style="width:100px">
<input type="submit" value=" 查詢 " class="button">
</td>
</tr>
</form>
</table>
<%
sql="select * from shiwei_money where 1=1"
if session("shiwei_id")<>1 and lookbuysell="yes" and fla89="0" then
sql=sql&" and id_login="&session("shiwei_id")
end if
if nowtype<>"" then
sql=sql&" and type="&nowtype
end if
if nowbank<>"" then
sql=sql&" and id_bank="&nowbank
end if
if nowbigclass<>"" then
sql=sql&" and id_bigclass="&nowbigclass
end if
if nowsmallclass<>"" then
sql=sql&" and id_smallclass="&nowsmallclass
end if
if nowstartdate<>"" then
sql=sql&" and selldate-#"&nowstartdate&"#>=0"
end if
if nowenddate<>"" then
sql=sql&" and selldate-#"&nowenddate&"#<=0"
end if
if nowkeyword<>"" then
sql=sql&" and (beizhu like '%"&nowkeyword&"%' or id_login in (select id from login where username like '%"&nowkeyword&"%'))"
end if
if request("order1")<>"" then
sql=sql&" order by type "&request("order1")
elseif request("order2")<>"" then
sql=sql&" order by id_bigclass "&request("order2")
elseif request("order3")<>"" then
sql=sql&" order by id_smallclass "&request("order3")
elseif request("order4")<>"" then
sql=sql&" order by login "&request("order4")
elseif request("order5")<>"" then
sql=sql&" order by selldate "&request("order5")
elseif request("order6")<>"" then
sql=sql&" order by type,price "&request("order6")
elseif request("order7")<>"" then
sql=sql&" order by type desc,price "&request("order7")
elseif request("order8")<>"" then
sql=sql&" order by id_bank "&request("order8")
else
sql=sql&" order by id desc"
end if
set count_buy = server.createobject("ADODB.RecordSet")
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -