📄 cus_formlist.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<!--#include file="../../inc/navigate.asp"-->
<%
dim sPageNavigate '分页表格
dim iRecordCount,iMaxPageCount,iPageCount,iCurrentPageIndex,i,sTMP '分页
iMaxPageCount=20 '一页多少行记录
Submit=trim(request.Form("Submit"))
blogid=replace(trim(request.Form("blogid"))," ","")
if Submit="删除信息" then
if ChkAdmin("oa_delht")=False then
call message("您没有删除合同的权限","back")
call endexit()
end if
if blogid="" then
call message("请至少选择一项删除","back")
call EndExit()
end if
bid=split(blogid,",")
for i=0 to ubound(bid)
delsql="delete from oa_cus_ht where id="&bid(i)&""
conn.execute(delsql)
next
call message("删除成功","cus_ht.asp?cusid="&cusid&"")
call EndExit()
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>联系人信息</title>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {color: #FFFFFF}
-->
</style>
<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>
</head>
<body>
<form name="form1" method="post" action="cus_formlist.asp">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
<tr align="right" bgcolor="#CC0000">
<td height="25" colspan="6" align="left"><input name="Submit" type="submit" class="bon" id="Submit" value="删除信息">
<input name="cusid" type="hidden" id="cusid" value="<%=cusid%>">
<input name="Submit2" type="button" class="bon" onClick="window.location.href='cus_addform.asp'" value="添加跟单">
</td>
</tr>
<tr align="right" bgcolor="#F9F9F9">
<td height="20" colspan="6" align="left">
<select name="projectid" id="projectid" onchange="FP_jumpMenu(this,'window',false)">
<option value="">请选择项目</option>
<option value="cus_formlist.asp?projectid=">所有项目</option>
<%
sql="select id, title,cusid from oa_cus_project where companyid="&session("companyid")
set rs=conn.execute(sql)
do while not rs.eof
cusid=rs(2)
%>
<option value="cus_formlist.asp?projectid=<%=rs("id")%>"><%=rs("title")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
<input name="Submit22" type="button" class="tabel1" value="按项目查看"></td>
</tr>
<tr align="center" bgcolor="#CC6600">
<td width="4%" height="25"><input name="checkbox" type=checkbox onclick=sel('blogid')></td>
<td width="23%" height="25"><span class="style1"><strong>项目名称</strong></span></td>
<td width="11%" height="25"><span class="style1"><strong>跟单日期 </strong></span></td>
<td width="9%" height="25"><span class="style1"><strong> 联系人</strong></span></td>
<td width="43%" height="25"><span class="style1"><strong> 跟单内容</strong></span></td>
<td width="10%" height="25"><span class="style1"><strong> 跟单人</strong></span></td>
</tr>
<%
projectid=request("projectid")
if projectid<>"" then
sql="select a.id,title,gdtime,a.uname,gdfs,a.content,gname,projectid from oa_cus_form as a inner join oa_cus_project as b on a.projectid=b.id where a.uid="&session("adminid")&" and projectid="&projectid&""
else
sql="select a.id,title,gdtime,a.uname,gdfs,a.content,gname,projectid from oa_cus_form as a inner join oa_cus_project as b on a.projectid=b.id where a.uid="&session("adminid")&""
end if
sql=sql& " order by a.id desc"
Call GetCurrentPageIndex() '取得当前页码
set my_rs=server.CreateObject("adodb.recordset")
my_rs.open Sql,conn,1,3
my_rs.PageSize=iMaxPageCount
my_rs.CacheSize =iMaxPageCount
if my_rs.recordCount <> 0 then my_rs.Absolutepage=iCurrentPageIndex
iRecordCount=my_rs.RecordCount '所有查询出来的记录数
iPageCount=my_rs.PageCount '最终多少页
if iCurrentPageIndex>iPageCount then iCurrentPageIndex=iPageCount '控制当前页不得超出范围
sPageNavigate=GetNavigate("custemlist.asp?cus_name="&cus_name&"",iRecordCount,iMaxPageCount,iCurrentPageIndex,true,true,"项") '取得分页表格
if Not my_rs.Eof then
For i = 1 to iMaxPageCount '利用for next 循环依次读出当前页的记录
if my_rs.EOF then Exit For
bgColor="#F8F8F8"
if i mod 2=0 then bgColor="#DFEFFF"
%>
<tr bgcolor="<%=bgColor%>">
<td height="25" align="center"><input type="checkbox" name="blogid" value="<%=my_rs(0)%>"></td>
<td height="25" align="center"><a href="view_project.asp?id=<%=my_rs("projectid")%>"><%=trim(my_rs(1))%></a></td>
<td height="25" align="center"><%=trim(my_rs(2))%></td>
<td height="25" align="center"><%=trim(my_rs(3))%></td>
<td height="25" align="center"><%=trim(my_rs(5))%></td>
<td height="25" align="center"><%=trim(my_rs(6))%></td>
</tr>
<%
my_rs.MoveNext()
Next
End if
my_rs.close
set my_rs=nothing
%>
<tr align="center" bgcolor="#F2F2F2">
<td height="25" colspan="6"><%=sPageNavigate%></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -