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

📄 projectstat3_list.asp

📁 ASP程序实现的科技期刊系统
💻 ASP
字号:
<!--#include file="../Include/AdoConn.asp"-->
<!--#include file="../Include/online.asp"-->
<%
dim WhereProjectJD
'根据查询界面,生成where选项。
select case trim(Request.Form ("ProjectJD"))
case ""
	WhereProjectJD=" and 项目进度<>'申报'"
case "申报"
	WhereProjectJD=" and (项目进度='推荐' or 项目进度='接收')"
case "初审"
	WhereProjectJD=" and 项目进度='初审'"
case "专家论证"
	WhereProjectJD=" and 项目进度='初审'"
case "立项"
	WhereProjectJD=" and 项目进度='立项'"
end select

	'创建一记录集
	set objres=server.CreateObject ("adodb.recordset")
	objres.CursorType =3
	objres.CursorLocation =3
	objres.LockType =2
	role=trim(Request.Form("role"))
	'根据角色生成where选项
	select case role
		case 0 '系统维护员
		strSQLWhere=""
		case 1 '申报者
		strSQLWhere=" and 项目负责人='"&session("usercode")&"'"
		case 2 '主管部门
		strSQLWhere=" and left(项目负责人,3)='"&left(session("usercode"),3)&"'"
		case 3 '项目计划员
		strSQLWhere=""
		case 4 '项目管理员
		strSQLWhere=" and 分配接收处室='"&session("Departcode")&"'"
		case 5 '项目拨款员
		strSQLWhere=" and 合同编码<>''"
		case 6 '部门领导
		strSQLWhere=""
	end select
	
	dim ProjectType'所有项目类别
	ProjectType=array("11","12","21","22","23","31","32","33","34","41","42","43","44","45","46","47","48","总计")

	'根据form选择的表生成列标题,及sql语句
	dim rol'企业部分所有列标题,用于数据库查询
	rol=array("国有企业","集体企业","股份合作单位","联营企业","有限责任公司","股份有限公司","私营企业","港、澳、台商投资企业","外商投资企业","其他企业")
	redim stat(ubound(ProjectType),14)'统计值
	'初始化
	for i=0 to ubound(stat,1)
		for j=0 to ubound(stat,2)
			stat(i,j)=0
		next
	next	
	
	'打开记录集
	dim strsql
	strsql="select 项目类别,单位类型,注册类型 from xt_vd_ProjectStat where 1=1 "&strSQLWhere&whereProjectJD&" order by 项目类别"
	objres.Open strsql,strconn
	
	
if not objres.EOF then
	for r=1 to objres.RecordCount
		for i=0 to ubound(ProjectType)-1'每条记录与行标题比较,减一为去掉总计行
			if objres(0)=ProjectType(i) then'确定哪行
				select case objres(1)
					case "1"'企业
						for j=0 to ubound(rol)'
						if instr(objres(2),rol(j))<>0 then '确定哪列
							stat(i,j+1)=stat(i,j+1)+1'单元格加1,j+1为加上合计列
							stat(i,0)=stat(i,0)+1'合计加1
							stat(ubound(stat,1),j+1)=stat(ubound(stat,1),j+1)+1'纵向合计加1
							Stat(ubound(Stat,1),0)=Stat(ubound(Stat,1),0)+1'总计加1
						end if
						next								
					case "2"'高等院校
						stat(i,11)=stat(i,11)+1'单元格加1
						stat(i,0)=stat(i,0)+1'合计加1
						stat(ubound(stat,1),11)=stat(ubound(stat,1),11)+1'纵向合计加1
						Stat(ubound(Stat,1),0)=Stat(ubound(Stat,1),0)+1'总计加1
					case "3"
						stat(i,12)=stat(i,12)+1'单元格加1
						stat(i,0)=stat(i,0)+1'合计加1
						stat(ubound(stat,1),12)=stat(ubound(stat,1),12)+1'纵向合计加1
						Stat(ubound(Stat,1),0)=Stat(ubound(Stat,1),0)+1'总计加1
					case "4"
						stat(i,13)=stat(i,13)+1'单元格加1
						stat(i,0)=stat(i,0)+1'合计加1
						stat(ubound(stat,1),13)=stat(ubound(stat,1),13)+1'纵向合计加1
						Stat(ubound(Stat,1),0)=Stat(ubound(Stat,1),0)+1'总计加1
					case "5"
						stat(i,14)=stat(i,14)+1'单元格加1
						stat(i,0)=stat(i,0)+1'合计加1
						stat(ubound(stat,1),14)=stat(ubound(stat,1),14)+1'纵向合计加1
						Stat(ubound(Stat,1),0)=Stat(ubound(Stat,1),0)+1'总计加1
					end select
			end if
		next
	objres.MoveNext
	next
end if
objres.Close

%>
<html>
<head>
<title>项目列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/CssLib/CssLink.css">

</head>
<body bgcolor="#FFFFFF" text="#000000" onload="window.top.ProjectMax()">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      
    <td width="457" align="center"><img src="images/STAT3.gif" width="378" height="25" align="middle"></td>
      <td width="50"> 
        
      <div align="center"><a href="../Project/ProjectStat_Query.asp"><img src="../public/images/query.gif" width="24" height="18" border="0"></a><a href="../Project/ProjectStat_Query.asp><img src="../public/images/query.gif" width="24" height="18" border="0"><br>
        </a> <font color="#003399">查询</font></div>
      </td>
    </tr>
  </table>


  
<table width="100%" border="0" cellspacing="1" cellpadding="0" bordercolor="#0099FF" align="center" bgcolor="#006699">
  <tr bordercolor="#0099FF" align="center"> 
    <td rowspan="2" height="41" bgcolor="#6699CC" width="58"><font color="#FFFFFF"> 
      计划类别</font></td>
    <td rowspan="2" height="41" bgcolor="#6699CC" width="70"><font color="#FFFFFF">计划层次</font></td>
    <td  height="41" bgcolor="#6699CC" rowspan="2" width="42"><font color="#FFFFFF">合计</font></td>
    <td  height="20" bgcolor="#6699CC" colspan="10"><font color="#FFFFFF">企 业</font></td>
    <td  height="41" bgcolor="#6699CC" rowspan="2" width="40"><font color="#FFFFFF">高等<br>
      院校</font></td>
    <td  height="41" bgcolor="#6699CC" rowspan="2" width="40"><font color="#FFFFFF">科研<br>
      院所</font></td>
    <td  height="41" bgcolor="#6699CC" rowspan="2" width="40"><font color="#FFFFFF">政府<br>
      机关</font></td>
    <td  height="41" bgcolor="#6699CC" rowspan="2" width="40"><font color="#FFFFFF">其他</font></td>
  </tr>
  <tr bordercolor="#0099FF" align="center"> 
    <td  height="20" bgcolor="#6699CC" width="40"><font color="#FFFFFF">国有<br>
      企业</font></td>
    <td  height="20" bgcolor="#6699CC" width="40"><font color="#FFFFFF">集体<br>
      企业</font></td>
    <td  height="20" bgcolor="#6699CC" width="40"><font color="#FFFFFF">股份合<br>
      作企业</font></td>
    <td  height="20" bgcolor="#6699CC" width="40"><font color="#FFFFFF">联营<br>
      企业</font></td>
    <td  height="20" bgcolor="#6699CC" width="40"><font color="#FFFFFF">有限责<br>
      任公司</font></td>
    <td  height="20" bgcolor="#6699CC" width="40"><font color="#FFFFFF"> 股份有<br>
      限公司</font></td>
    <td  height="20" bgcolor="#6699CC" width="40"><font color="#FFFFFF">私营<br>
      企业</font></td>
    <td  height="20" bgcolor="#6699CC" width="40"><font color="#FFFFFF">港、澳、台商投资</font></td>
    <td  height="20" bgcolor="#6699CC" width="40"><font color="#FFFFFF">外商<br>
      投资</font></td>
    <td  height="20" bgcolor="#6699CC" width="40"><font color="#FFFFFF">其他<br>
      企业</font></td>
  </tr>
  <tr bordercolor="#0099FF" align="center"> 
    <td colspan="2" bgcolor="#FFFFFF"> 
      <table width="100%" border="0" cellspacing="1" cellpadding="0" bordercolor="#0099FF" align="center" bgcolor="#006699">
        <tr bordercolor="#0099FF" align="center"> 
          <td rowspan="2" height="16" width="55" bgcolor="#FFFFFF">应用开发</td>
          <td width="70" height="16" bgcolor="#FFFFFF">重点</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">启动</td>
        </tr>
        <tr bordercolor="#0099FF" align="center"> 
          <td rowspan="3" height="16" width="55" bgcolor="#FFFFFF">科技攻关</td>
          <td width="70" height="16" bgcolor="#FFFFFF">重大 </td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">重点</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">一般</td>
        </tr>
        <tr bordercolor="#0099FF" align="center"> 
          <td rowspan="4" height="16" width="55" bgcolor="#FFFFFF">产业化</td>
          <td width="70" height="16" bgcolor="#FFFFFF">重大</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">重点</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">一般</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">专利</td>
        </tr>
        <tr bordercolor="#0099FF" align="center"> 
          <td rowspan="8" height="16" width="55" bgcolor="#FFFFFF">创新条件与<br>
            环境建设</td>
          <td width="70" height="16" bgcolor="#FFFFFF">中介服务</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">国际合作</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">工程中心</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">重点实验室</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">企业孵化器</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">软科学</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">科学普及</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td width="70" height="16">其他</td>
        </tr>
        <tr bordercolor="#0099FF" align="center"> 
          <td width="55" height="16" bgcolor="#FFFFFF">&nbsp;</td>
          <td width="70" height="16" bgcolor="#FFFFFF">总计</td>
        </tr>
      </table>
    </td>
    <td height="304" bgcolor="#FFFFFF" colspan="15"> 
      <table width="100%" border="0" cellspacing="1" cellpadding="0" bordercolor="#0099FF" align="center" bgcolor="#006699">
        <%for i=0 to ubound(stat,1) %>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <%for j=0 to ubound(stat,2)%>
          <td width="40" height="16"> 
            <%if Stat(i,j)<>0 then response.write Stat(i,j) end if%>
          </td>
          <%next%>
        </tr>
        <%next%>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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