⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 table.asp

📁 这是一个自己研发的薪酬管理系统
💻 ASP
字号:
<!-- #include file="../pub/conn.asp" -->
<!-- #include file="../pub/fun.asp" -->
<!-- #include file="../pub/rsa.asp" -->
<%firsttime=now()%>
<%call checklogin()%>

<%
dim syear(7)
dim smonth(7)
dim salary_info1(100,6)
dim salary_info2(100,6)
dim salary(6,2)
dim salary_time(6)

for i=0 to 6
	smonth(i)=month(now())-i
	syear(i)=year(now())
	if smonth(i)<=0 then
		smonth(i)=smonth(i)+12
		syear(i)=year(now())-1
	end if
next

sql="select * from wh_salaries where salary_date like '%"&syear(0)&"' and salary_month="&smonth(0)
set rs=conn.execute(sql)
if not rs.eof then
	for i=0 to 5
		sql="select * from wh_salaries where salary_date like '%"&syear(i+1)&"%' and salary_month="&smonth(i+1)
		salary_time(i)=syear(i+1)&"年"&smonth(i+1)&"月"
		set rs1 = conn.execute(sql)
		j=0
		do while not rs1.eof
			salary_info1(j,i)=rs1("salary_info1")
			salary_info2(j,i)=rs1("salary_info2")
			j=j+1
			rs1.movenext
		loop
	next
else 
	for i=0 to 5
		sql="select * from wh_salaries where salary_date like '%"&syear(i)&"%' and salary_month="&smonth(i)
		salary_time(i)=syear(i)&"年"&smonth(i)&"月"
		set rs1 = conn.execute(sql)
		j=0
		do while not rs1.eof
			salary_info1(j,i)=rs1("salary_info1")
			salary_info2(j,i)=rs1("salary_info2")
			'response.write(salary_info1(j,i)&"---"&salary_info2(j,i)&"---")
			j=j+1
			rs1.movenext
		loop
		rs1.close()

	next
end if
rs.close()
conn.close

dim plus_split
dim minus_split
dim plus(100)
dim minus(100)

for i=0 to 5
	for j=0 to 99
		if len(salary_info1(j,i))=0 then exit for
		'response.write(salary_info1(j,i)&"---")

		tem_salary_info1=salary_info1(j,i)
		tem_salary_info2=salary_info2(j,i)

		plus_split = split(tem_salary_info1,";")
		'response.write(ubound(plus_split)&"--")
		for k = 0 to ubound(plus_split)
			plus(k)=decryptstr(right(plus_split(k),len(plus_split(k))-instr(plus_split(k),":")))
		next

		minus_split = split(tem_salary_info2,";")
		for m = 0 to ubound(minus_split)
			minus(m)=decryptstr(right(minus_split(m),len(minus_split(m))-instr(minus_split(m),":")))
		next

		plus_total=0
		minus_total=0

		for k = 0 to ubound(plus_split)
			plus_total=round(plus_total+cdbl(plus(k)),2)
		next
		for m = 0 to ubound(minus_split)
			minus_total=round(minus_total+cdbl(minus(m)),2)
		next

		salary(i+1,2)=salary_time(i)
		salary(i+1,1)=salary(i+1,1)+(plus_total-minus_total)

		'response.write(i+1&"--"&salary(i+1,2)&"**"&salary(i+1,1)&"<br>")
		
	next
	'response.write("<p>")
	'response.write(i+1&"--"&salary(i+1,2)&"**"&salary(i+1,1)&"<br>")
next

salary_no=6

%>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<!--[if !mso]>
<style>
v\:*         { behavior: url(#default#VML) }
o\:*         { behavior: url(#default#VML) }
.shape       { behavior: url(#default#VML) }
</style>
<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style>
TD {	FONT-SIZE: 9pt}
</style></head>
<body topmargin=5 leftmargin=0 scroll=AUTO>
近半年公司发放工资总额一览:
<%call table1(salary,5,100,20,30,500,200,"A")
%>
<br>
[<font color=red size=2>页面执行时间:<%=now()-firsttime%></font>]

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -