📄 info.asp
字号:
<!--#include file="conn.asp"-->
<LINK
href="images/25175css_pro.css" type=text/css rel=stylesheet>
<form action="delcls.asp?type=1" method=post onsubmit="return Check()">
<table cellspacing=0 cellpadding=2 width="100%"
align=center border=1>
<tbody>
<tr bgcolor="#BBDCF7" >
<td width="4%" height=23 align="center">选择</td>
<td width="4%" height=23 align="center">序号</td>
<td height=23 align="center" width="5%" >代码</td>
<td height=23 align="center" width="12%" >材料名称</td>
<td height=23 align="center" width="12%" >型号规格</td>
<td height=23 align="center" width="4%" >单位</td>
<td height=23 align="center" width="5%" >信息价</td>
<td height=23 align="center" width="4%" >供应价</td>
<td height=23 align="center" width="4%" >到工地价</td>
<td height=23 align="center" width="4%" >C价格</td>
<td height=23 align="center" width="4%" >D价格</td>
<td height=23 align="center" width="4%" >E价格</td>
<td height=23 align="center" width="4%" >F价格</td>
<td height=23 align="center" width="4%" >产地</td>
<td height=23 align="center" width="4%" >等级</td>
<td height=23 align="center" width="5%" >品牌</td>
<td height=23 align="center" width="5%" >厂商</td>
<td height=23 align="center" width="5%" >地区</td>
<td height=23 align="center" width="5%" >供货单位及电话</td>
<td height=23 align="center" width="5%" >备注3</td>
<td height=23 align="center" colspan="2">操作</td>
</tr>
<%
dim pgsize,pgnum,pgcount,datacount,district,intpage,url,sql
set rs=server.createobject("adodb.recordset")
url="info.asp"
pgsize=15
pgnum=1
pgcount=0
datacount=0
district=0
if(request("page")<>"") then
sql=session("sql")
rs.open sql,conn,1,1
datacount=rs.recordcount
rs.pagesize=15
pgcount=rs.Pagecount
pgnum=session("pgnum")
intpage=request("page")
select case intpage
case 1
pgnum=1
case 2
pgnum=pgnum-1
case 3
pgnum=pgnum+1
case 4
pgnum=pgcount
end select
session("pgnum")=pgnum
else
dim classid,sname,data_timeopen,data_timeend
if(request("del")<>empty) then
sql="delete from cl where classid in( select id from class where type=1) "
else
sql="select t1.* from cl as t1,class as t2 where t1.classid=t2.id and t2.type=1"
end if
if request("city1")<>"" then
sql=sql&" and provinceid='"&request("city1")&"'"
end if
if request("city2")<>"" then
sql=sql&" and cityid='"&request("city2")&"'"
end if
if request("city3")<>"" then
sql=sql&" and areaid='"&request("city3")&"'"
end if
if request("xiao")<>"" then
sql=sql&" and classid='"&request("xiao")&"'"
else
if request("zhong")<>"" then
sql=sql&" and ( classid='"&request("zhong")&"' or classid in (select id from class where fid="&request("zhong")&"))"
else
if request("da")<>"" then
sql=sql&" and (classid="&request("da")&" or classid in (select id from class where fid="&request("da")&") or classid in (select id from class where fid in (select id from class where fid="&request("da")&"))) "
end if
end if
end if
if request("title")<>"" then
sql=sql&" and (cl_title like '%"&request("title")&"%' or cl_xh like '%"&request("title")&"%')"
end if
if request("nian")<>"" then
sql=sql&" and datename(yy,addtime) = '"&request("nian")&"'"
end if
if request("yue")<>"" then
dim yue
yue=request("yue")
if yue<10 then
yue="0"&yue
end if
sql=sql&" and datename(mm,addtime) = '"&yue&"'"
end if
if(request("del")<>empty) then
conn.Execute(sql)
response.End()
end if
session("sql")=sql
rs.open sql,conn,1,1
if Not(rs.bof and rs.eof) then
datacount=rs.recordcount
rs.pagesize=15
pgcount=rs.Pagecount
end if
session("datacount")=datacount
session("pgcount")=pgcount
session("pgnum")=pgnum
end if
if not rs.eof then
rs.move (Cint(pgnum)-1)*15,1
dim n
n=1
for i=1 to rs.pagesize
%>
<tr>
<td height=23 align="center" width="4%" ><input type="checkbox" value="<%=rs("id")%>" name="ids"/> </td>
<td height=23 align="center" width="4%" ><%=(pgnum-1)*15+n%></td>
<td height=23 align="center" width="5%" ><%if rs("cl_bh")=empty then response.Write(" ") else response.Write(rs("cl_bh")) end if%></td>
<td height=23 align="center" width="7%" ><%if rs("cl_title")=empty then response.Write(" ") else response.Write(rs("cl_title")) end if%></td>
<td height=23 align="center" width="6%" ><%if rs("cl_xh")=empty then response.Write(" ") else response.Write(rs("cl_xh")) end if%></td>
<td height=23 align="center" width="4%" ><%if rs("cl_dw")=empty then response.Write(" ") else response.Write(rs("cl_dw")) end if%></td>
<td height=23 align="center" width="5%" ><%if rs("cl_zhj")=empty then response.Write(" ") else response.Write(rs("cl_zhj")) end if%></td>
<td height=23 align="center" width="4%" ><%if rs("cl_ajg")=empty then response.Write(" ") else response.Write(rs("cl_ajg")) end if%></td>
<td height=23 align="center" width="4%" ><%if rs("cl_bjg")=empty then response.Write(" ") else response.Write(rs("cl_bjg")) end if%></td>
<td height=23 align="center" width="4%" ><%if rs("cl_cjg")=empty then response.Write(" ") else response.Write(rs("cl_cjg")) end if%></td>
<td height=23 align="center" width="4%" ><%if rs("cl_djg")=empty then response.Write(" ") else response.Write(rs("cl_djg")) end if%></td>
<td height=23 align="center" width="4%" ><%if rs("cl_ejg")=empty then response.Write(" ") else response.Write(rs("cl_ejg")) end if%></td>
<td height=23 align="center" width="4%" ><%if rs("cl_fjg")=empty then response.Write(" ") else response.Write(rs("cl_fjg")) end if%></td>
<td height=23 align="center" width="4%" ><%if rs("cl_cd")=empty then response.Write(" ") else response.Write(rs("cl_cd")) end if%></td>
<td height=23 align="center" width="4%" ><%if rs("cl_dj")=empty then response.Write(" ") else response.Write(rs("cl_dj")) end if%></td>
<td height=23 align="center" width="5%" ><%if rs("cl_pp")=empty then response.Write(" ") else response.Write(rs("cl_pp")) end if%></td>
<td height=23 align="center" width="5%" ><%if rs("cl_yj")=empty then response.Write(" ") else response.Write(rs("cl_yj")) end if%></td>
<td height=23 align="center" width="5%" ><%if rs("cl_bz1")=empty then response.Write(" ") else response.Write(rs("cl_bz1")) end if%></td>
<td height=23 align="center" width="5%" ><%if rs("cl_bz2")=empty then response.Write(" ") else response.Write(rs("cl_bz2")) end if%></td>
<td height=23 align="center" width="5%" ><%if rs("cl_bz3")=empty then response.Write(" ") else response.Write(rs("cl_bz3")) end if%></td>
<td height=23 align="center" width="4%" ><a href="updatecl.asp?id=<%=rs("id")%>&type=1">修改</a></td>
<td height=23 align="center" width="4%" ><a href="delcl.asp?id=<%=rs("id")%>&type=1">删除</a></td>
</tr>
<% rs.movenext
if rs.eof then exit for
n=n+1
next%>
<%else%>
<tr>
<td colspan="22"><table cellspacing=0 cellpadding=2 width="100%"
align=center border=0>
<tbody>
<tr>
<td height=23 align="center" width="100%" >查无此记录</td>
</tr>
</tbody>
</table></td>
</tr>
<%end if
rs.close
set rs=nothing
%>
</tbody>
</table></TD>
</TR>
<TR><TD>
<TABLE cellSpacing=0 cellPadding=2 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD height=23 colspan="9" align="left" width="100%" >
<INPUT type="button" name="select" value="全 选" onclick="selcheck()"> <INPUT type="button" name="select" value="取 消" onclick="clearcheck()">
<input type="submit" value="删除"/>
<center>
共<%=datacount%>条记录,当前<%=pgnum%>/<%=pgcount%>页
<%
if pgnum>1 then
%>
<a href="<%=url%>?page=1">首页</a> <a href="<%=url%>?page=2">上一页</a>
<%end if
if pgnum<pgcount then
%>
<a href="<%=url%>?page=3">下一页</a> <a href="<%=url%>?page=4">尾页</a>
<% end if%> </center></TD>
</TR></TBODY></TABLE>
</form>
<script>
function selcheck()
{
var objs = document.getElementsByTagName("input");
for(var i=0; i<objs.length; i++)
{
if(objs(i).type.toLowerCase() == "checkbox")
objs(i).checked = true;
}
}
function clearcheck() { var objs = document.getElementsByTagName("input"); for(var i=0; i<objs.length; i++) { if(objs(i).type.toLowerCase() == "checkbox" ) objs(i).checked = false; }}
function Check()
{
var inputs = document.all.tags("input");
var selectedLen = 0;
for( var i=0;i < inputs.length; i ++)
{
if(inputs(i).type.toLowerCase() == "checkbox")
{
//alert(inputs[i].type);
if(inputs(i).checked)
{
selectedLen ++;
}
}
}
if( selectedLen == 0 )
{
alert("请先选择您要删除的数据!");
return false;
}
else
{
var flag= confirm("您确定要删除所选择的这"+selectedLen+"条数据吗?");
// return false;
if(flag)
{
return true;
}
else
{
return false;
}
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -