?? projectexpert_editlist.asp
字號:
<!--#include file="../Include/TimeOut.asp"-->
<%modulecode="0405"%>
<!--#include file="../Include/ModuleUserCheck.asp"-->
<!--#include file="../Include/online.asp"-->
<html>
<head>
<title>專家列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>
TD {FONT-SIZE: 9pt}
A:link
{
COLOR: #000000;
FONT-FAMILY: 宋體;
FONT-SIZE: 9pt
}
A:visited
{
COLOR: #000000;
FONT-FAMILY: 宋體;
FONT-SIZE: 9pt
}
A:active
{
COLOR: #000000;
FONT-FAMILY: 宋體;
FONT-SIZE: 9pt
}
A:hover
{
COLOR: blue;
FONT-FAMILY: 宋體;
FONT-SIZE: 9pt
}
</style>
</head>
<Script Language=JavaScript>
<!--
function SelAll_onclick(){
if(ConList.SelAll.checked){
SetAll();
}
else{
UnSetAll();
}
}
function SetAll(){
var intCount;
if(ConList.all("checkCon").length > 1){
for(intCount = 0; intCount < ConList.all("checkCon").length; intCount++){
ConList.checkCon(intCount).checked = true;
}
}
else{
ConList.checkCon.checked = true;
}
}
function UnSetAll(){
var intCount;
if(ConList.all("checkCon").length > 1){
for(intCount = 0; intCount < ConList.all("checkCon").length; intCount++){
ConList.checkCon(intCount).checked = false;
}
}
else{
ConList.checkCon.checked = false;
}
}
function checkCon_onclick(){
var intCount;
ConList.SelAll.checked = true;
if(ConList.all("checkCon").length > 1){
for(intCount = 0; intCount < ConList.all("checkCon").length; intCount++){
if(ConList.checkCon(intCount).checked == false){
ConList.SelAll.checked = false;
}
}
}
else{
if(ConList.checkCon.checked == false){
ConList.SelAll.checked = false;
}
}
}
//-->
</Script>
<body bgcolor="#FFFFFF" text="#000000">
<%
dim objrec 'recordset對象
dim strsql 'sql語句
if not Request.QueryString("strsql")="" then
select case Request.QueryString("strsql")
case "query" '由查詢轉來
dim code
dim name
dim LeiBie,XueLi,Major,ZhiCheng
dim strQueryType
dim strSQLWhere
code=trim(Request.Form("ExpertCode"))
name=trim(Request.Form("ExpertName"))
Leibie=trim(Request.Form("LeiBie"))
Sex=trim(Request.Form("Sex"))
XueWei=trim(Request.Form("XueWei"))
Major=trim(Request.Form("Major"))
ZhiCheng=trim(Request.Form("ZhiCheng"))
'生成查詢語句
'復選框選中時,strQueryType="%"
if Request.Form("checkbox").Count=1 then
strQueryType="%"
else
strQueryType=""
end if
'無任何where選項時
strsql="select * from XT_VC_Expert where 1=1"
'按查詢界面各輸入框生成多條件where選項
if not code="" then
strSQLWhere=strSQLWhere+" and 專家編碼 like '"+strQueryType+code+strQueryType+"'"
end if
if not name="" then
strSQLWhere=strSQLWhere+" and 專家姓名 like '"+strQueryType+name+strQueryType+"'"
end if
if not LeiBie="" then
strSQLWhere=strSQLWhere+" and 專家類別 like '"+strQueryType+LeiBie+strQueryType+"'"
end if
if not Sex="" then
strSQLWhere=strSQLWhere+" and 性別 like '"+strQueryType+Sex+strQueryType+"'"
end if
if not XuiWei="" then
strSQLWhere=strSQLWhere+" and 學位 like '"+strQueryType+XueWei+strQueryType+"'"
end if
if not Major="" then
strSQLWhere=strSQLWhere+" and 現從事專業 like '"+strQueryType+Major+strQueryType+"'"
end if
if not ZhiCheng="" then
strSQLWhere=strSQLWhere+" and 專業技術職稱 like '"+strQueryType+ZhiCheng+strQueryType+"'"
end if
strSQL=strSQL+StrSQLWhere
case else '各頁間轉換
strsql=Request.QueryString("strsql")
end select
set objres=server.CreateObject ("adodb.recordset")
objres.CursorType =3
objres.CursorLocation =3
objres.LockType =2
objres.Open strsql,strconn
ExpertCode=objres.Fields("專家編碼").Value
strsqlXM="select 項目編碼 from XT_TD_ProjectExpertYJ where 專家編碼='"&ExpertCode&"'"
set objresXM=server.CreateObject ("adodb.recordset")
objresXM.Open strsqlXM,strconn
dim pagesum '頁數
dim thispagerecords '當前頁記錄條數
dim recordcode '記錄序號
dim curpage '當前頁碼
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 '轉換成整數格式時必須的,大量實驗已經證明
end if
%>
<% if not Request.QueryString("strsql")="" then %>
<form name=ConList method="post" action="Expert_EditList.asp?muldel=muldel&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>">
<% else %>
<form name=ConList method="post" action="../user/Expert_EditList.asp">
<%
end if
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="713" height="38" valign="top"><img src="../User/Images/title_Expert.gif" width="227" height="38"></td>
<td width="66" valign="middle">
<div align="center"><a href="projectExpert_Query.asp?query=query"><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">
<td width="4%" height="20" bgcolor="#6699CC">
<div align="center"><a href="#">
<input type="checkbox" name="SelAll" onclick ="SelAll_onclick()"value="checkbox">
</a></div>
</td>
<td width="6%" align="center" bgcolor="#6699CC">
<div align="center">序號</div>
</td>
<td width="10%" bgcolor="#6699CC">
<div align="center">專家編碼</div>
</td>
<td width="10%" bgcolor="#6699CC">
<div align="center">專家姓名</div>
</td>
<td width="13%" bgcolor="#6699CC">專家類別</td>
<td width="5%" bgcolor="#6699CC">性別</td>
<td width="12%" valign="middle" bgcolor="#6699CC">學位</td>
<td valign="middle" width="15%" bgcolor="#6699CC">現從事專業</td>
<td valign="middle" width="5%" bgcolor="#6699CC">職稱</td>
<td valign="middle" width="12%" bgcolor="#6699CC">工作單位</td>
<td valign="middle" width="8%" bgcolor="#6699CC">
<div align="center">評審項目</div>
</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>
<td colspan="11" height="12" bgcolor="#FFFFFF"> 對不起,沒有符合要求的記錄! </td>
</tr>
<%
Response.End
end if
for i=1 to thispagerecords
recordcode=recordcode+1
%>
<tr>
<td width="30" height="26" bgcolor="#FFFFFF">
<div align="center">
<input type="checkbox" name="checkCon"onclick="checkCon_onclick()" value=<% =objres.Fields("專家編碼").Value %>>
</div>
</td>
<td width="44" align="center" bgcolor="#FFFFFF">
<% =recordcode%>
</td>
<td width="70" bgcolor="#FFFFFF">
<% = objres.Fields("專家編碼").Value %>
</td>
<td width="79" bgcolor="#FFFFFF"><a href=<%="../user/Expert_MoreDisplay.asp?ExpertName="&objres("專家姓名")%> target="_blank">
<% = objres.Fields("專家姓名").Value %>
</A>
</td>
<td width="96" bgcolor="#FFFFFF">
<% = objres.Fields("專家類別").Value %>
</td>
<td width="36" bgcolor="#FFFFFF">
<% = objres.Fields("性別").Value %>
</td>
<td valign="middle" bgcolor="#FFFFFF" align="center">
<% = objres.Fields("學位").Value %>
</td>
<td valign="middle" bgcolor="#FFFFFF" align="center">
<% = objres.Fields("專業名稱").Value %>
</td>
<td valign="middle" bgcolor="#FFFFFF" align="center">
<% = objres.Fields("專業技術職稱").Value %>
</td>
<td valign="middle" bgcolor="#FFFFFF" align="center">
<% = objres.Fields("工作單位名稱").Value %>
</td>
<td valign="top" bgcolor="#FFFFFF">
<div align="center"><a href="projectExpert_edit.asp?Code=<%=objres("專家編碼")%>&Name=<%=objres("專家姓名")%>"><img src="images/Expert.gif" width="20" height="23" border="0"></a></div>
</td>
</tr>
<%
objres.MoveNext
next
%>
<tr>
<td colspan="11" height="20" bgcolor="#6699CC">
<div align="right">
<%
if curpage>1 then Response.Write ("<a href="+"projectExpert_EditList.asp?page=1"+"&strsql="+server.URLEncode(strsql)+"> 首頁</a>"+" | ") else Response.Write "首頁 | "
if recordcode>pagesize then Response.Write ("<a href="+"projectExpert_EditList.asp?page="+cstr(curpage-1)+"&strsql="+server.URLEncode(strsql)+"> 上一頁</a>"+" | ") else Response.Write "上一頁 | "
if recordcode<objres.RecordCount then Response.Write ("<a href="+"projectExpert_EditList.asp?page="+cstr(curpage+1)+"&strsql="+server.URLEncode(strsql)+"> 下一頁</a>"+" | ") else Response.Write "下一頁 | "
if recordcode<objres.RecordCount then Response.Write ("<a href="+"projectExpert_EditList.asp?page="+cstr (pagesum)+"&strsql="+server.URLEncode(strsql)+"> 末頁</a>"+" ") else Response.Write "末頁 "
%>
到第
<input type="text" style="background-color=#DFF8FF;height=15pt" name="toPage" size="4" maxlength="4">
頁
<input type="button" style="background-color=#DFF8FF;color=#000000;height=15pt" name="Submit1" value="go" onClick="window.location.href='ProjectExpert_EditList.asp?strsql=<%=server.URLEncode(strsql)%>&page='+toPage.value">
第
<% =curpage %>
頁/共
<% =pagesum %>
頁/共
<% =objres.RecordCount %>
條記錄 </div>
</td>
</tr>
</table>
</form>
<br>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -