📄 project_diaoc_list.asp
字号:
<!--#include file="../Include/TimeOut.asp"-->
<!--#include file="../Include/online.asp"-->
<html>
<head>
<title>沈阳市科技合作需求表列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/CssLib/CssLink.css">
</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>
<script language="vbscript"runat="server">
function msgzh()
msgzh= MsgBox ("确定要删除这些记录吗?", vbYesNo, "提示信息")
if msgzh=vbyes then
document.ConList.submitType.value="del"
document.ConList.submit()
end if
end function
function check_onclick(i,tpr)
msgsindel= MsgBox ("确定要删除这条记录吗?", vbYesNo, "提示信息")
if msgsindel=vbyes then
if tpr > 1 then
for intcount = 0 to ConList.all("checkCon").length - 1
if intcount=i-1 then ConList.checkCon(intCount).checked=true else ConList.checkCon(intCount).checked=false
next
else
ConList.checkCon.checked = true
end if
document.ConList.submitType.value="del"
document.ConList.submit()
end if
end function
</script>
<body bgcolor="#FFFFFF" text="#000000" onload="window.top.ProjectMax()">
<!--#include file="../Include/AdoConn.asp"-->
<%
dim objrec 'recordset对象
dim strsql 'sql语句
'处理删除项目
if Request("submitType")="del"then
for each item in Request.Form("checkCon")
strsql="delete from DiaoCa where ID="+"'"+code+"'"
conn.Execute strsql,1
next
end if
if Request.QueryString ("strsql")<>"" then
strsql=Request.QueryString ("strsql")
else
'strsql="select * from DiaoCa where OK标志='Y'"
strsql="select * from DiaoCa"
end if
set objres=server.CreateObject ("adodb.recordset")
objres.CursorType =3
objres.CursorLocation =3
objres.LockType =2
objres.Open strsql,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 '转换成整数格式时必须的,大量实验已经证明
%>
<form name=ConList method="post" action="Project_diaoC_List.asp?muldel=muldel&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>">
<input type="hidden" name="submitType">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="460"> </td>
<td width="151" align="center"> <a href="../Project/Project_edit1.asp?new=new&strsql=<%=server.URLEncode (strsql)%>&page=<% =curpage%>"><img src="images/new.gif" width="33" height="16" border="0"><br>
<font color="#003399">填 表</font></a></td>
<td width="49" align="center"> <a href="vbscript:msgzh()"><img src="../public/images/del.gif" width="23" height="20" border="0"><br>
<font color="#003399">删除</font></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bordercolor="#0099FF" align="center" bgcolor="#999999">
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA">
<td width="34" height="20">
<div align="center"><font color="#000000"><a href="#">
<input type="checkbox" name="SelAll" onclick ="SelAll_onclick()"value="checkbox">
</a></font></div>
</td>
<td width="38" height="20" align="center">
<div align="center"><font color="#000000">序号</font></div>
</td>
<td width="139" height="20" align="center">
<div align="center"><font color="#000000">单位名称</font></div>
</td>
<td width="73" height="20" align="center"><font color="#000000">项目负责人</font></td>
<td width="95" height="20" align="center"><font color="#000000">主导产业</font></td>
<td width="77" height="20" align="center"><font color="#000000">联系人</font></td>
<td width="104" height="20" align="center"><font color="#000000">联系电话</font></td>
<td width="100" height="20" align="center"><font color="#000000">电子邮件 </font></td>
<td width="56" height="20" align="center"><font color="#000000">查看全部</font></td>
<%if left(session("usercode"),3)="Kjj" then %>
<td width="52" height="20">
<div align="center"><font color="#000000">删除</font></div>
</td>
<%end if%>
</tr>
<%
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="10">对不起,没有符合要求的记录! </td>
</tr>
<%
Response.End
end if
for i=1 to thispagerecords
recordcode=recordcode+1
%>
<tr bgcolor="#FFFFFF">
<td width="34">
<div align="center">
<input type="checkbox" name="checkCon"onclick="checkCon_onclick()" value=<% =objres.Fields("ID").Value%>>
</div>
</td>
<td width="38" align="center">
<% =recordcode%>
</td>
<td width="139">
<% = objres.Fields("单位名称").Value %>
</td>
<td width="73" align="center">
<% = objres.Fields("项目负责人").Value %>
</td>
<td width="95" align="center">
<% = objres.Fields("主导产业").Value %>
</td>
<td width="77" align="center">
<% = objres.Fields("联系人").Value %>
</td>
<td width="104" align="center">
<% = objres.Fields("联系电话").Value %>
</td>
<td width="100" align="center">
<% = objres.Fields("电子邮件").Value %>
</td>
<td width="56">
<div align="center"> <a href="../Project/Project_diaoC.asp?view=view&code=<% = objres.Fields("ID").Value %>&strsql=<%=server.URLEncode(strsql)%>&page=<%=curpage%>" class=blank target="_blank">
<img src="../User/Images/more.jpg" width="47" height="16" border="0"></a></div>
</td>
<%if left(session("usercode"),3)="Kjj" then %>
<td width="52">
<div align="center">
<a href="vbscript:check_onclick(<%=i%>,<% =thispagerecords%>)">
<img src="../public/images/del1.gif" width="19" height="17" border="0" ></a>
</div>
</td>
<%end if%>
</tr>
<%
objres.MoveNext
next
%>
<tr bgcolor="#EAEAEA">
<td colspan="10" height="20">
<div align="right">
<%
if curpage>1 then Response.Write ("<a href="+"Project_diaoC_List.asp?page=1"+"&strsql="+server.URLEncode(strsql)+"> 首页</a>"+" | ") else Response.Write "首页 | "
if recordcode>pagesize then Response.Write ("<a href="+"Project_diaoC_List.asp?page="+cstr(curpage-1)+"&strsql="+server.URLEncode(strsql)+"> 上一页</a>"+" | ") else Response.Write "上一页 | "
if recordcode<objres.RecordCount then Response.Write ("<a href="+"Project_diaoC_List.asp?page="+cstr(curpage+1)+"&strsql="+server.URLEncode(strsql)+"> 下一页</a>"+" | ") else Response.Write "下一页 | "
if recordcode<objres.RecordCount then Response.Write ("<a href="+"Project_diaoC_List.asp?page="+cstr (pagesum)+"&strsql="+server.URLEncode(strsql)+"> 末页</a>"+" ") else Response.Write "末页 "
%>
第
<% =curpage %>
页/共
<% =pagesum %>
页/共
<% =objres.RecordCount %>
条记录 </div>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -