📄 tubiao.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="headfiles/Connection.inc"-->
<%
'统计性别
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Sex_name='男'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
man=man+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Sex_name='女'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
woman=woman+1
rstongji.MoveNext()
wend
total=man+woman
'统计政治面貌
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Political_Name='党员'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
dangy=dangy+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Political_Name='团员'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
tuany=tuany+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Political_Name='群众'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
qunz=qunz+1
rstongji.MoveNext()
wend
'统计民族
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Nation_Name='汉族'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
hz=hz+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Nation_Name='满族'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
mz=mz+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Nation_Name='蒙古族'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
mgz=mgz+1
rstongji.MoveNext()
wend
'统计婚姻情况
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Married_Name='未婚'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
wh=wh+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Married_Name='离异'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
ly=ly+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Married_Name='已婚'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
yh=yh+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji where Married_Name='再婚'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
zh=zh+1
rstongji.MoveNext()
wend
'部门人员统计
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji1 where Depart_Name='行政部'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
xzb=xzb+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji1 where Depart_Name='财务部'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
cwb=cwb+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji1 where Depart_Name='软件开发部'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
rjkfb=rjkfb+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji1 where Depart_Name='市场部'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
scb=scb+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji1 where Depart_Name='客户服务部'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
khfwb=khfwb+1
rstongji.MoveNext()
wend
'人员学历统计
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji1 where EduDegree_Name='博士'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
bs=bs+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji1 where EduDegree_Name='大学本科'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
dxbk=dxbk+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji1 where EduDegree_Name='硕士'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
ss=ss+1
rstongji.MoveNext()
wend
set rstongji=server.CreateObject("ADODB.RECORDSET")
strSql="select * from tongji1 where EduDegree_Name='专科'"
rstongji.open strSql,Conn,3,1
while not rstongji.BOF and not rstongji.EOF
zk=zk+1
rstongji.MoveNext()
wend
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {font-family: "宋体", "幼圆"}
.style3 {font-family: "宋体", "幼圆"; font-size: 12px; }
-->
</style>
</head>
<body>
<table width="800" border="1" align="center" background="images/bg.gif">
<tr class="title1">
<th width="66" height="23" ><span class="style3">总人数</span></th>
<th width="74" ><span class="style3"><%=total%>个</th>
<th width="91" > </th>
<th width="541" scope="col"><div align="left"><img src="images/8.jpg" width="99%" height="20"><img src="images/7.jpg" width="1" height="20"></div></th>
</tr>
<tr class="title1">
<th colspan="4" ><span class="style1">性别比例</span></th>
</tr>
<tr class="title1">
<th ><span class="style3">男性</span></th>
<th width="74" ><span class="style3"><%=man%>个</th>
<th width="91" ><span class="style3">占<%=round(man/total*100,2)%>%</th>
<th width="541" scope="col"><div align="left"><img src="images/3.jpg" width="<%=round(man/total*100,2)%>%" height="20"><img src="images/7.jpg" width="1" height="20"></div></th>
</tr>
<tr class="style3">
<th ><span class="style3">女性</span></th>
<th ><span class="style3"><%=woman%>个</th>
<th ><span class="style3">占<%=round(woman/total*100,2)%>%</th>
<td><div align="left"><img src="images/10.jpg" width="<%=round(woman/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr>
<tr class="title1">
<th colspan="4" ><span class="style1">政治面貌</span></th>
</tr>
<tr class="title1">
<th ><span class="style3">党员</span></th>
<th ><span class="style3"><%=dangy%>个</th>
<th ><span class="style3">占<%=round(dangy/total*100,2)%>%</th>
<td><div align="left"><img src="images/12.jpg" width="<%=round(dangy/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr>
<tr class="title1">
<th ><span class="style3">团员</span></th>
<th ><span class="style3"><%=tuany%>个</th>
<th ><span class="style3">占<%=round(tuany/total*100,2)%>%</th>
<td><div align="left"><img src="images/6.jpg" width="<%=round(tuany/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr>
<tr class="title1">
<th ><span class="style3">群众</span></th>
<th ><span class="style3"><%=qunz%>个</th>
<th ><span class="style3">占<%=round(qunz/total*100,2)%>%</th>
<td><div align="left"><img src="images/2.jpg" width="<%=round(qunz/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr>
<tr class="title1">
<th colspan="4" >民族</th>
</tr>
<tr class="title1">
<th ><span class="style3">汉族</th>
<th ><span class="style3"><%=hz%>个</th>
<th ><span class="style3">占<%=round(hz/total*100,2)%>%</th>
<td><div align="left"><img src="images/4.jpg" width="<%=round(hz/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr>
<tr class="title1">
<th ><span class="style3">满族</th>
<th ><span class="style3"><%=mz%>个</th>
<th ><span class="style3">占<%=round(mz/total*100,2)%>%</th>
<td><div align="left"><img src="images/8.jpg" width="<%=round(mz/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr>
<tr class="title1">
<th ><span class="style3">蒙古族</th>
<th ><span class="style3"><%=mgz%>个</th>
<th ><span class="style3">占<%=round(mgz/total*100,2)%>%</th>
<td><div align="left"><img src="images/10.jpg" width="<%=round(mgz/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr>
<tr class="title1">
<th colspan="4" >婚姻状况</th>
</tr> <tr class="title1">
<th ><span class="style3">未婚</th>
<th ><span class="style3"><%=wh%>个</th>
<th ><span class="style3">占<%=round(wh/total*100,2)%>%</th>
<td><div align="left"><img src="images/1.jpg" width="<%=round(wh/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr> <tr class="title1">
<th ><span class="style3">已婚</th>
<th ><span class="style3"><%=yh%>个</th>
<th ><span class="style3">占<%=round(yh/total*100,2)%>%</th>
<td><div align="left"><img src="images/4.jpg" width="<%=round(yh/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr><tr class="title1">
<th ><span class="style3">离异</th>
<th ><span class="style3"><%=ly%>个</th>
<th ><span class="style3">占<%=round(ly/total*100,2)%>%</th>
<td><div align="left"><img src="images/7.jpg" width="<%=round(ly/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr><tr class="title1">
<th ><span class="style3">再婚</th>
<th ><span class="style3"><%=zh%>个</th>
<th ><span class="style3">占<%=round(zh/total*100,2)%>%</th>
<td><div align="left"><img src="images/12.jpg" width="<%=round(zh/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr>
<tr class="title1">
<th colspan="4" >部门人员</th>
</tr> <tr class="title1">
<th ><span class="style3">行政部</th>
<th ><span class="style3"><%=xzb%>个</th>
<th ><span class="style3">占<%=round(xzb/total*100,2)%>%</th>
<td><div align="left"><img src="images/2.jpg" width="<%=round(xzb/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr> <tr class="title1">
<th ><span class="style3">财务部</th>
<th ><span class="style3"><%=cwb%>个</th>
<th ><span class="style3">占<%=round(cwb/total*100,2)%>%</th>
<td><div align="left"><img src="images/4.jpg" width="<%=round(cwb/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr><tr class="title1">
<th ><span class="style3">软件开发部</th>
<th ><span class="style3"><%=rjkfb%>个</th>
<th ><span class="style3">占<%=round(rjkfb/total*100,2)%>%</th>
<td><div align="left"><img src="images/7.jpg" width="<%=round(rjkfb/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr><tr class="title1">
<th ><span class="style3">市场部</th>
<th ><span class="style3"><%=scb%>个</th>
<th ><span class="style3">占<%=round(scb/total*100,2)%>%</th>
<td><div align="left"><img src="images/8.jpg" width="<%=round(scb/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr><tr class="title1">
<th ><span class="style3">客户服务部</th>
<th ><span class="style3"><%=khfwb%>个</th>
<th ><span class="style3">占<%=round(khfwb/total*100,2)%>%</th>
<td><div align="left"><img src="images/11.jpg" width="<%=round(khfwb/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr>
<tr class="title1">
<th colspan="4" >学历水平</th>
</tr> <tr>
<th ><span class="style3">博士</th>
<th ><span class="style3"><%=bs%>个</th>
<th ><span class="style3">占<%=round(bs/total*100,2)%>%</th>
<td><div align="left"><img src="images/5.jpg" width="<%=round(bs/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr> <tr class="title1">
<th ><span class="style3">硕士</th>
<th ><span class="style3"><%=ss%>个</th>
<th ><span class="style3">占<%=round(ss/total*100,2)%>%</th>
<td><div align="left"><img src="images/12.jpg" width="<%=round(ss/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr><tr class="title1">
<th ><span class="style3">大学本科</th>
<th ><span class="style3"><%=dxbk%>个</th>
<th ><span class="style3">占<%=round(dxbk/total*100,2)%>%</th>
<td><div align="left"><img src="images/9.jpg" width="<%=round(dxbk/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr><tr class="title1">
<th ><span class="style3">专科</th>
<th ><span class="style3"><%=zk%>个</th>
<th ><span class="style3">占<%=round(zk/total*100,2)%>%</th>
<td><div align="left"><img src="images/8.jpg" width="<%=round(zk/total*100,2)%>%" height="20"><img src="../../查询参考/jg/images/kuang.jpg" width="1" height="20"></div></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -