📄 docs.asp
字号:
<!--#include file="../config.asp"-->
<!--#include file="../inc/check_login.asp"-->
<!--#include file="../inc/functions.asp"-->
<%
Application_ID = 1000100 '本功能编号,含义请查看编码表
if not CheckAuth(Session("Employee_ID"),Application_ID) then '验证权限
Server.Transfer "../err/un_authorized.htm"
response.end
end if
%>
<!--**************身份验证部分****************-->
<%
Customer_ID = request("Customer_ID")
if not IsNot(Customer_ID,"n") then
response.write "客户编号丢失"
response.end
end if
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.open connstr
'取得客户名称
sql = "sp_Customer_Get_Customer_Name " & Customer_ID
set rs = conn.execute(sql)
if not rs.eof then
Customer_Name = rs("Customer_Name")
else
response.write "没有该客户"
response.end
end if
rs.close
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK rel="stylesheet" type="text/css" href="../style.css">
<script language="JavaScript" type="text/javascript" src="../js/functions.js"></script>
<script language="JavaScript" type="text/javascript">
function ConfirmOption(Employee_ID,Employee_Name){
if(<%= Session("Employee_ID") %> == 1 || Employee_ID == <%= Session("Employee_ID") %>){
if(confirm('您确定要修改/删除文档吗?')){
return true;
}else{
return false;
}
}else{
alert('警告!您不是该文档的录入者,请联系 ' + Employee_Name + ' 进行修改/删除。');
return false;
}
}
</script>
</head>
<body>
<table border=0 cellpadding=1 cellspacing=1 width="100%">
<tr>
<td><a href="list.asp">客户管理</a> → <%=Customer_Name%> → <a href="docs_new.asp?Customer_ID=<%= Customer_ID %>" target="foot">添加客户文档</a></td>
<td align="right">◆ <a href="list.asp?UseResult=yes">返回上次客户查询结果</a></td>
</tr>
</table>
<hr size=1>
<table border="0" cellpadding=0 cellspacing=0 bgcolor="#EEEEEE">
<tr>
<td><a href="detail.asp?Customer_ID=<%= Customer_ID %>">客户信息</a> </td>
<td width="1" bgcolor="#FFFFFF"></td>
<td> <a href="buy_rec.asp?Customer_ID=<%= Customer_ID %>">采购记录</a> </td>
<td width="1" bgcolor="#FFFFFF"></td>
<td> <a href="pursue_rec.asp?Customer_ID=<%= Customer_ID %>">跟进记录</a> </td>
<td width="1" bgcolor="#FFFFFF"></td>
<td> <a href="relapse_rec.asp?Customer_ID=<%= Customer_ID %>">回访记录</a> </td>
<td width="1" bgcolor="#FFFFFF"></td>
<td> <a href="demand.asp?Customer_ID=<%= Customer_ID %>">需求表</a> </td>
<td width="1" bgcolor="#FFFFFF"></td>
<td> <a href="contact_person.asp?Customer_ID=<%= Customer_ID %>">联系人</a> </td>
<td width="1" bgcolor="#FFFFFF"></td>
<td bgcolor="#000000"> <font color="#FFFFFF">客户文档</font> </td>
<td width="50" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td colspan="14" bgcolor="#999999" height="1"></td>
</tr>
</table>
<table bgcolor="#FFFFFF" border=0 cellpadding=1 cellspacing=1 width="100%">
<tr bgcolor="#EFEFEF">
<td>附件</td>
<td>文档名称</td>
<td>提供者</td>
<td>录入日期</td>
<td>录入人</td>
<td>操作</td>
</tr>
<%
'取得客户文档
sql = "select Documents.*,Employee.Employee_Name from Documents,Employee where Documents.Customer_ID = " & Customer_ID & " and Documents.Employee_ID = Employee.Employee_ID order by Documents.Document_ID DESC"
'response.write sql
rs.open sql,conn,1
if rs.eof then
response.write "<tr><td colspan=18>暂时没有记录</td></tr></table>"
response.end
end if
PageSize = request.Cookies("PageSize")
if not IsNot(PageSize,"n") then PageSize = DefaultPageSize
rs.pagesize = PageSize
PageCount = rs.PageCount
PageNo = request("PageNo")
if PageNo = "" or CInt(PageNo) < 1 then PageNo = 1
if CInt(PageNo) > PageCount then PageNo = PageCount
rs.absolutepage = PageNo
i = 0
while not rs.eof and i < rs.pagesize
Document_ID = rs("Document_ID")
ID_Pointer = Document_ID
Document_Title = rs("Document_Title")
Customer_Contact_Person_ID = rs("Customer_Contact_Person_ID")
Document_Type = rs("Document_Type")
Document_Content = rs("Document_Content")
Add_Date = rs("Add_Date")
Customer_ID = rs("Customer_ID")
Project_ID = rs("Project_ID")
Employee_ID = rs("Employee_ID")
Employee_Name = rs("Employee_Name")
'取得客户联系人
if IsNot(Customer_Contact_Person_ID,"n") then
sql_contact_person = "select Contact_Person_Name from Customers_Contact_Person where Contact_Person_ID = " & Customer_Contact_Person_ID
set rs_contact_person = conn.execute(sql_contact_person)
if not rs_contact_person.eof then Customer_Contact_Person_Name = rs_contact_person(0)
end if
if i mod 2 = 0 then
response.write "<tr>"
else
response.write "<tr bgcolor=#EFEFEF>"
end if
%>
<% If Trim(Document_Type)<>"" then %>
<td><a href="../upload_documents/attch_<%= Document_ID %>.<%=Document_Type%>" target="_blank"><img src="../images/doc_type/<%=Document_Type%>.gif" border=0 width=16 height=16 alt="下载<%= Document_Type %>文件"></a></td>
<% Else %>
<td>无</td>
<% End If %>
<td><a href="../document/detail.asp?Document_ID=<%= Document_ID %>&Customer_ID=<%= Customer_ID %>" title="查看文档信息" target="foot"><%= Document_Title %></a> </td>
<td><a href="../customer/contact_person_detail.asp?Contact_Person_ID=<%= Customer_Contact_Person_ID %>" target="foot"><%= Customer_Contact_Person_Name %></a></td>
<td><%= FormatDate(Add_Date,1) %> </td>
<td><a href="../employee/detail.asp?Employee_ID=<%= Employee_ID %>" title="查看员工资料" target="foot"><%= Employee_Name %></a> </td>
<td>
<a href="../document/upload.asp?Document_ID=<%= Document_ID %>" target="foot" onClick="return ConfirmOption(<%= Employee_ID %>,'<%= Employee_Name %>');">上传附件</a>/<a href="docs_modi.asp?Document_ID=<%= Document_ID %>" target="foot" onClick="return ConfirmOption(<%= Employee_ID %>,'<%= Employee_Name %>');">修改</a>/<a href="docs_del.asp?Document_ID=<%= Document_ID %>" target="foot" onClick="return ConfirmOption(<%= Employee_ID %>,'<%= Employee_Name %>');">删除</a>
</td>
</tr>
<%
i = i + 1
rs.movenext
wend
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
<tr bgcolor="#EFEFEF">
<td colspan="8">
<a href="docs.asp?PageNo=1&Customer_ID=<%= Customer_ID %>"><font face="Webdings">5</font>第一页</a>
<a href="docs.asp?PageNo=<%= PageNo - 1 %>&Customer_ID=<%= Customer_ID %>"><font face="Webdings">3</font>上一页</a>
<a href="docs.asp?PageNo=<%= PageNo + 1 %>&Customer_ID=<%= Customer_ID %>"><font face="Webdings">4</font>下一页</a>
<a href="docs.asp?PageNo=<%= PageCount %>&Customer_ID=<%= Customer_ID %>"><font face="Webdings">6</font>最后一页</a>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -