?? projectcs_editlist.asp
字號(hào):
<!--#include file="../Include/TimeOut.asp"-->
<%modulecode="0504"%>
<!--#include file="../Include/ModuleUserCheck.asp"-->
<!--#include file="../Include/online.asp"-->
<%Response.Expires=0%>
<html>
<head>
<title>項(xiàng)目列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/CssLib/CssLink.css">
</head>
<Script Language=JavaScript>
<!--
function open1(Code)
{
window.open("AllYiJian_ContentDisplay.asp?code="+Code,"項(xiàng)目意見(jiàn)","height=410,width=500,toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no")
}
function open2(Code)
{
window.open("/user/User_MoreDisplay.asp?Code="+Code,"用戶(hù)詳細(xì)資料","height=410,width=500,toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no")
}
//-->
</Script>
<body bgcolor="#FFFFFF" text="#000000" onload="window.top.ProjectMax()">
<%
dim objrec 'recordset對(duì)象
dim strsql 'sql語(yǔ)句
if not Request.QueryString("strsql")="" then
if session("orderType")=" asc" then
orderType=" desc"
session("orderType")=" desc"
else
orderType=" asc"
session("orderType")=" asc"
end if
select case Request.QueryString("strsql")
case "query" '由查詢(xún)轉(zhuǎn)來(lái)
dim NDPC
dim code
dim name
dim role
dim strQueryType
dim strSQLWhere
code=trim(Request.Form("ProjectCode"))
name=trim(Request.Form("ProjectName"))
ProjectType=trim(Request.Form("ProjectType"))
ConProjectCode=trim(Request.Form("ConProjectCode"))
PlanCode=trim(Request.Form("PlanCode"))
Username=trim(Request.Form("Username"))
TechType=trim(Request.Form("TechType"))
ProjectJD=trim(Request.Form("ProjectJD"))
JDZK=trim(Request.Form("JDZK"))
NDPC=trim(Request.Form("NDPC"))
NDPC2=trim(Request.Form("NDPC2"))
KXXBG=trim(Request.Form("KXXBG"))
TJBZ=trim(Request.Form("TJBZ"))
XGBZ=trim(Request.Form("XGBZ"))
Depart=trim(Request.Form("Depart"))
ZhuChiCom=trim(Request.Form("ZhuChiCom"))
ShuoZaiQv=trim(Request.Form("ShuoZaiQv"))
FaRenCode=trim(Request.Form("FaRenCode"))
ComPanyPro=trim(Request.Form("ComPanyPro"))
CompanyType=trim(Request.Form("CompanyType"))
RegType=trim(Request.Form("RegType"))
role=trim(Request.Form("role"))
'復(fù)選框選中時(shí),strQueryType="%"
if Request.Form("checkbox").Count=1 then
strQueryType="%"
else
strQueryType=""
end if
'無(wú)任何where選項(xiàng)時(shí)
strsql="select * from XT_VD_ProjectNameLX where (項(xiàng)目進(jìn)度='初審' or 項(xiàng)目進(jìn)度='立項(xiàng)') and 分配接收處室='"&session("departcode")&"'"
'根據(jù)角色生成where選項(xiàng)
select case role
case 0 '系統(tǒng)維護(hù)員
strSQLWhere=""
case 1 '申報(bào)者
strSQLWhere=" and 項(xiàng)目負(fù)責(zé)人='"&session("usercode")&"'"
case 2 '主管部門(mén)
strSQLWhere=" and left(項(xiàng)目負(fù)責(zé)人,3)='"&left(session("usercode"),3)&"'"
case 3 '項(xiàng)目計(jì)劃員
strSQLWhere=""
case 4 '項(xiàng)目管理員
strSQLWhere=" and 分配接收處室='"&session("Departcode")&"'"
case 5 '項(xiàng)目撥款員
strSQLWhere=" and 合同編碼<>''"
case 6 '部門(mén)領(lǐng)導(dǎo)
strSQLWhere=""
end select
'按查詢(xún)界面各輸入框生成多條件where選項(xiàng)
if not code="" then
strSQLWhere=strSQLWhere+" and 項(xiàng)目編碼 like '"+strQueryType+code+strQueryType+"'"
end if
if not name="" then
strSQLWhere=strSQLWhere+" and 項(xiàng)目名稱(chēng) like '"+strQueryType+name+strQueryType+"'"
end if
if not ProjectType="" then
strSQLWhere=strSQLWhere+" and 項(xiàng)目類(lèi)別 like '"+strQueryType+ProjectType+strQueryType+"'"
end if
if not ConProjectCode="" then
strSQLWhere=strSQLWhere+" and 合并編碼 like '"+strQueryType+ConProjectCode+strQueryType+"'"
end if
if not PlanCode="" then
strSQLWhere=strSQLWhere+" and 計(jì)劃編碼 like '"+strQueryType+PlanCode+strQueryType+"'"
end if
if not Username="" then
strSQLWhere=strSQLWhere+" and 負(fù)責(zé)人姓名 like '"+strQueryType+Username+strQueryType+"'"
end if
if not TechType="" then
strSQLWhere=strSQLWhere+" and 技術(shù)領(lǐng)域 like '"+strQueryType+TechType+strQueryType+"'"
end if
if not ProjectJD="" then
strSQLWhere=strSQLWhere+" and 項(xiàng)目進(jìn)度 like '"+strQueryType+ProjectJD+strQueryType+"'"
end if
if not JDZK="" then
strSQLWhere=strSQLWhere+" and 進(jìn)度狀況 like '"+strQueryType+JDZK+strQueryType+"'"
end if
if not NDPC="" and not NDPC2="" then
strSQLWhere=strSQLWhere+" and (年度批次 between '"+NDPC+"' and '"+NDPC2+"')"
else if not NDPC="" and NDPC2="" then
strSQLWhere=strSQLWhere+" and 年度批次 like '"+NDPC+strQueryType+"'"
else if NDPC="" and not NDPC2="" then
strSQLWhere=strSQLWhere+" and 年度批次 like '"+NDPC2+strQueryType+"'"
end if
end if
end if
if not KXXBG="" then
strSQLWhere=strSQLWhere+" and 可行性報(bào)告 like '"+strQueryType+KXXBG+strQueryType+"'"
end if
if not TJBZ="" then
strSQLWhere=strSQLWhere+" and 推薦標(biāo)志 like '"+strQueryType+TJBZ+strQueryType+"'"
end if
if not XGBZ="" then
strSQLWhere=strSQLWhere+" and 修改標(biāo)志 like '"+strQueryType+XGBZ+strQueryType+"'"
end if
if not Depart="" then
strSQLWhere=strSQLWhere+" and left(項(xiàng)目負(fù)責(zé)人,3) like '"+strQueryType+Depart+strQueryType+"'"
end if
if not ZhuChiCom="" then
strSQLWhere=strSQLWhere+" and 主持單位 like '"+strQueryType+ZhuChiCom+strQueryType+"'"
end if
if not ShuoZaiQv="" then
strSQLWhere=strSQLWhere+" and 所在區(qū) like '"+strQueryType+ShuoZaiQv+strQueryType+"'"
end if
if not FaRenCode="" then
strSQLWhere=strSQLWhere+" and 法人代碼 like '"+strQueryType+FaRenCode+strQueryType+"'"
end if
if not ComPanyPro="" then
strSQLWhere=strSQLWhere+" and 企業(yè)特性 like '"+strQueryType+ComPanyPro+strQueryType+"'"
end if
if not CompanyType="" then
strSQLWhere=strSQLWhere+" and 單位類(lèi)型 like '%"+CompanyType+"%'"
end if
if not RegType="" then
strSQLWhere=strSQLWhere+" and 注冊(cè)類(lèi)型 like '%"+RegType+"%'"
end if
strSQL=strSQL+StrSQLWhere
case else '各頁(yè)間轉(zhuǎn)換
orderby=request.querystring("orderby")
RQSstrsql=Request.QueryString("strsql")
if orderby="" then
strsql=RQSstrsql
else
if instr(RQSstrsql,"order")=0 then
strsql=RQSstrsql+" order by "+orderby+orderType
else
strsql=left(RQSstrsql,instr(RQSstrsql,"order")-1)+" order by "+orderby+orderType
end if
end if
end select
set objres=server.CreateObject ("adodb.recordset")
objres.CursorType =3
objres.CursorLocation =3
objres.LockType =2
objres.Open strsql,strconn
dim pagesum '頁(yè)數(shù)
dim thispagerecords '當(dāng)前頁(yè)記錄條數(shù)
dim recordcode '記錄序號(hào)
dim curpage '當(dāng)前頁(yè)碼
dim pagesize
pagesize=10
pagesum=objres.PageCount
if Request.QueryString("page")=""then curpage=1 else curpage=Request.QueryString("page")
if cint(curpage)> cint(pagesum) then curpage=pagesum '轉(zhuǎn)換成整數(shù)格式時(shí)必須的,大量實(shí)驗(yàn)已經(jīng)證明
end if
%>
<% if not Request.QueryString("strsql")="" then %>
<form name=ConList method="post" action="ProjectCS_EditList.asp?muldel=muldel&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>">
<% else %>
<form name=ConList method="post" action="../Project/ProjectCS_EditList.asp">
<%
end if
%>
<input type="hidden" name="submitType">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="457"><img src="images/editlist_xuqiu.gif" width="227" height="38"></td>
<td width="50">
<div align="center"><a href="../Project/Project_Query.asp?type=CS&query=query"><img src="../public/images/query.gif" width="24" height="18" border="0"><br>
</a> <font color="#003399">查詢(xún)</font></div>
</td>
<td width="50">
<div align="center"><a href="PrintCS_EditList.asp?strsql=<%=server.URLEncode(strsql)%>" target="_blank"><img src="../public/images/print.gif" width="23" height="20" border="0"><br>
<font color="#003399">打印</font></a></div>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bordercolor="#0099FF" align="center" bgcolor="#006699">
<tr bordercolor="#0099FF" bgcolor="#6699CC">
<td width="37" height="20" align="center" bgcolor="#6699CC">
<div align="center"><font color="#FFFFFF">序號(hào)</font></div>
</td>
<td width="50" height="20">
<div align="center"><a href="ProjectCS_EditList.asp?orderby=項(xiàng)目編碼&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>" class="menu">項(xiàng)目編碼</a></div>
</td>
<td width="200" height="20">
<div align="center"><a href="ProjectCS_EditList.asp?orderby=項(xiàng)目名稱(chēng)&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>" class="menu">項(xiàng)目名稱(chēng)</a></div>
</td>
<td width="114" height="20"><a href="ProjectCS_EditList.asp?orderby=項(xiàng)目類(lèi)別名稱(chēng)&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>" class="menu">項(xiàng)目類(lèi)別</a></td>
<td width="118" height="20"><a href="ProjectCS_EditList.asp?orderby=主持單位&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>" class="menu">主持單位</a></td>
<td width="47" height="20" align="center"><a href="ProjectCS_EditList.asp?orderby=項(xiàng)目進(jìn)度&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>" class="menu">項(xiàng)目<br>
進(jìn)度</a></td>
<td width="52" height="20" align="center"><a href="ProjectCS_EditList.asp?orderby=進(jìn)度狀況&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>" class="menu">進(jìn)度<br>
狀況</a></td>
<td width="36" height="20" align="center"><font color="#FFFFFF">審核</font></td>
<td width="35" height="20" align="center"><font color="#FFFFFF">退回</font></td>
<td width="34" height="20" align="center"><font color="#FFFFFF">修改<br>
項(xiàng)目</font></td>
<td width="28" height="20" align="center"><font color="#FFFFFF">查看<br>
意見(jiàn)</font></td>
</tr>
<%
if Request.QueryString("strsql")="" then Response.End
if objres.RecordCount >pagesize*curpage then thispagerecords=pagesize else thispagerecords=objres.RecordCount-pagesize*(curpage-1)
recordcode=10*(curpage-1)
if objres.RecordCount >0 then
objres.MoveFirst
objres.Move((curpage-1)*10)
else
%>
<tr bgcolor="#FFFFFF">
<td colspan="11">對(duì)不起,沒(méi)有符合要求的記錄! </td>
</tr>
<%
Response.End
end if
for i=1 to thispagerecords
recordcode=recordcode+1
%>
<tr bgcolor="#FFFFFF">
<td width="37" align="center">
<% =recordcode%>
</td>
<td width="50" align="center">
<% = objres.Fields("項(xiàng)目編碼").Value %>
</td>
<td width="200"> <a href="../Project/Project_edit1.asp?view=view&edit=edit&code=<% = objres.Fields("項(xiàng)目編碼").Value %>&name=<% = objres.Fields("項(xiàng)目名稱(chēng)").Value %>&type=<%=objres.Fields ("項(xiàng)目類(lèi)別").Value %>&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>" target="_blank" class=blank>
</a><a href="../Project/Project_edit1.asp?view=view&edit=edit&code=<% = objres.Fields("項(xiàng)目編碼").Value %>&name=<% = objres.Fields("項(xiàng)目名稱(chēng)").Value %>&type=<%=objres.Fields ("項(xiàng)目類(lèi)別").Value %>&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>" class=blank>
<% if not isNull(objres.Fields("項(xiàng)目名稱(chēng)LX").Value) then response.write objres.Fields("項(xiàng)目名稱(chēng)LX").Value else response.write objres.Fields("項(xiàng)目名稱(chēng)").Value end if %>
</a><a href="../Project/Project_edit1.asp?view=view&edit=edit&code=<% = objres.Fields("項(xiàng)目編碼").Value %>&name=<% = objres.Fields("項(xiàng)目名稱(chēng)").Value %>&type=<%=objres.Fields ("項(xiàng)目類(lèi)別").Value %>&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>" target="_blank" class=blank>
</a></td>
<td width="114">
<% = objres.Fields("項(xiàng)目類(lèi)別名稱(chēng)").Value %>
</td>
<td width="118">
<a href="javascript:open2('<%=objres("項(xiàng)目負(fù)責(zé)人")%>')" class=blank>
<% if not isNull(objres.Fields("主持單位LX").Value) then response.write objres.Fields("主持單位LX").Value else response.write objres.Fields("主持單位").Value end if %>
</a>
</td>
<td width="47" align="center">
<% = objres.Fields("項(xiàng)目進(jìn)度").Value %>
</td>
<td width="52" align="center">
<% = objres.Fields("進(jìn)度狀況").Value %>
</td>
<td width="36" align="center">
<div align="center"><a href="ProjectSH_edit.asp?Code=<%=objres("項(xiàng)目編碼")%>&strsql=<%=server.URLEncode (strsql)%>&page=<% =curpage%>"><img src="images/TuiJian.gif" width="20" height="20" border="0"></a></div>
</td>
<td width="35" align="center"><a href="ProjectCS_back_edit.asp?code=<%=objres("項(xiàng)目編碼")%>&strsql=<%=server.URLEncode (strsql)%>&page=<% =curpage%>"><img src="images/JS_back.gif" width="18" height="20" border="0"></a></td>
<td width="34" align="center"> <a href="Project_kw_edit.asp?code=<%=objres("項(xiàng)目編碼")%>" target="_blank"><img src="images/change.gif" width="15" height="14" border="0"></a></td>
<td width="28" align="center"> <a href="javascript:open1('<%=objres("項(xiàng)目編碼")%>');"><img src="../public/images/view.gif" width="20" height="17" border="0"></a>
</td>
</tr>
<%
objres.MoveNext
next
%>
<tr bgcolor="#6699CC">
<td colspan="11" height="20">
<div align="right">
<%
if curpage>1 then Response.Write ("<a href="+"ProjectCS_EditList.asp?page=1"+"&strsql="+server.URLEncode(strsql)+"> 首頁(yè)</a>"+" | ") else Response.Write "首頁(yè) | "
if recordcode>pagesize then Response.Write ("<a href="+"ProjectCS_EditList.asp?page="+cstr(curpage-1)+"&strsql="+server.URLEncode(strsql)+"> 上一頁(yè)</a>"+" | ") else Response.Write "上一頁(yè) | "
if recordcode<objres.RecordCount then Response.Write ("<a href="+"ProjectCS_EditList.asp?page="+cstr(curpage+1)+"&strsql="+server.URLEncode(strsql)+"> 下一頁(yè)</a>"+" | ") else Response.Write "下一頁(yè) | "
if recordcode<objres.RecordCount then Response.Write ("<a href="+"ProjectCS_EditList.asp?page="+cstr (pagesum)+"&strsql="+server.URLEncode(strsql)+"> 末頁(yè)</a>"+" ") else Response.Write "末頁(yè) "
%>
第
<% =curpage %>
頁(yè)/共
<% =pagesum %>
頁(yè)/共
<% =objres.RecordCount %>
條記錄 </div>
</td>
</tr>
</table>
</form>
<br>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -