client.asp
来自「Activity——活动管理模块 Analyse——分析模块 Client—」· ASP 代码 · 共 559 行 · 第 1/2 页
ASP
559 行
<%
'*****************************************************
' Author : Jianfeng Hua
' Date : 2004.8.9
' File : client.asp
' Description : The Client list page
'*****************************************************
%>
<!--#include file="../conn.asp"-->
<!--#include file="../IsUser.asp"-->
<%
set rs=server.createobject("adodb.recordset")
ClientID=request("ClientID")
if ClientID = "" Then '未指明访问客户ID
Sqlstr = "select top 1 * from client where ClientCreatorID=" & User_ID & " order by ClientID"
rs.open Sqlstr,conn,3,2
if rs.bof or rs.eof then
response.write "<script language=javascript>"
response.write"alert('尚未有任何记录!系统将自动创建一个新记录');"
response.write"location.href='NewClient.asp';"
response.write "</script>"
response.end
end if
else '指明访问客户ID
Sqlstr = "select * from client where (ClientCreatorID=" &User_ID& " and ClientID ="&ClientID&") or (ClientID ="&ClientID&" and ClientOpenFlag = 1 )"
rs.open Sqlstr,conn,3,2
if rs.bof or rs.eof then
response.write "<script language=javascript>"
response.write"alert('暂时无记录或该记录未公开!');"
response.write"location.href='/menu.asp';"
response.write "</script>"
response.end
end if
end if
ClientID=rs("ClientID")
ClientName =rs("ClientName")
ClientEmail =rs("ClientEmail")
ClientNation=rs("ClientNation")
ClientPro =rs("ClientProvince")
ClientHpage =rs("ClientHomePage")
ClientNcode =rs("ClientNationCode")
ClientCity =rs("ClientCity")
ClientAcode =rs("ClientAreacode")
ClientPcode =rs("ClientMailcode")
ClientIncome=rs("ClientYearIncome")
ClientEmpNum=rs("ClientEmpNum")
ClientTel =rs("ClientPhoneNum")
ClientFax =rs("ClientFaxNum")
ClientAdd =rs("ClientAddress")
ClientTaxName=rs("ClientTaxName")
ClientTaxNum =rs("ClientTaxCode")
ClientTaxANum=rs("ClientTaxAccNum")
ClientTaxABank=rs("ClientTaxBank")
ClientTaxAAdd=rs("ClientTaxAddress")
ClientTaxATel=rs("ClientTaxPhoneNum")
ClientABank =rs("ClientAccountBank")
ClientANum =rs("ClientAccountNum")
ClientCreatorID=rs("ClientCreatorID")
OpenFlag =rs("ClientOpenFlag")
ClientOperatorID=rs("ClientRevisorID")
ClientCreateDate=rs("ClientCreateDate")
ClientUpdateDate=rs("ClientReviseDate")
rs.close
Sqlstr = "select * from [User] where UserID=" & ClientCreatorID
rs.open Sqlstr,conn,3,2
if not (rs.bof or rs.eof) then
ClientCreatorName = rs("UserName")
ClientCreatorSnum = rs("UserSection")
else
ClientCreatorName = "未知"
ClientCreatorSnum = 0
end if
rs.close
Sqlstr = "select * from Section where SectionID =" & ClientCreatorSnum
rs.open Sqlstr,conn,3,2
if not (rs.bof or rs.eof) then
ClientCreatorSName = rs("SectionName")
else
ClientCreatorSName = "未知"
end if
rs.close
Sqlstr = "select * from [User] where UserID=" & ClientOperatorID
rs.open Sqlstr,conn,3,2
if not (rs.bof or rs.eof) then
ClientOperatorName = rs("UserName")
else
ClientOperatorName = "未知"
end if
rs.close
rspre=0
rsnext=0
rsfisrt=0
rslast=0
if ClientCreatorID = User_ID then '浏览自己客户资料
Sqlstr = "select top 1 ClientID from Client where ClientID<"&ClientID&" and ClientCreatorID="&User_ID&" order by ClientID desc"
rs.open Sqlstr,conn,3,2
if not (rs.bof or rs.eof) then
rspre=1
ClientPreID = rs("ClientID")
end if
rs.close
Sqlstr = "select top 1 ClientID from Client where ClientID>"&ClientID&" and ClientCreatorID="&User_ID&" order by ClientID"
rs.open Sqlstr,conn,3,2
if not (rs.bof or rs.eof) then
rsnext=1
ClientNextID = rs("ClientID")
end if
rs.close
Sqlstr = "select count(ClientID) as Rnum from Client where ClientID<"&ClientID&" and ClientCreatorID="&User_ID
rs.open Sqlstr,conn,3,2
Rnum = rs("Rnum")
rs.close
Sqlstr = "select count(ClientID) as Totalnum , max(ClientID) as LastID , min(ClientID) as FirstID from Client where ClientCreatorID="&User_ID
rs.open Sqlstr,conn,3,2
Totalnum = rs("Totalnum")
FirstID = rs("FirstID")
LastID = rs("LastID")
rs.close
if FirstID<>ClientID then
rsfirst = 1
end if
if LastID<>ClientID then
rslast = 1
end if
else
''浏览别人记录程序
Sqlstr = "select top 1 ClientID from Client where ClientID<"&ClientID&" and ClientCreatorID<>"&User_ID&" and ClientOpenFlag = 1 order by ClientID desc"
rs.open Sqlstr,conn,3,2
if not (rs.bof or rs.eof) then
rspre=1
ClientPreID = rs("ClientID")
end if
rs.close
Sqlstr = "select top 1 ClientID from Client where ClientID>"&ClientID&" and ClientCreatorID<>"&User_ID&" and ClientOpenFlag = 1 order by ClientID"
rs.open Sqlstr,conn,3,2
if not (rs.bof or rs.eof) then
rsnext=1
ClientNextID = rs("ClientID")
end if
rs.close
Sqlstr = "select count(ClientID) as Rnum from Client where ClientID<"&ClientID&" and ClientOpenFlag = 1 and ClientCreatorID<>"&User_ID
rs.open Sqlstr,conn,3,2
Rnum = rs("Rnum")
rs.close
Sqlstr = "select count(ClientID) as Totalnum , max(ClientID) as LastID , min(ClientID) as FirstID from Client where ClientOpenFlag = 1 and ClientCreatorID<>"&User_ID
rs.open Sqlstr,conn,3,2
Totalnum = rs("Totalnum")
FirstID = rs("FirstID")
LastID = rs("LastID")
rs.close
if FirstID<>ClientID then
rsfirst = 1
end if
if LastID<>ClientID then
rslast = 1
end if
end if
set rs=nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>客户详细信息察看</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META http-equiv=Pragma content=no-cache>
<META content="MSHTML 6.00.2715.400" name=GENERATOR>
<style type="text/css">
<!--
.style1 {color: #FF6600}
-->
</style>
</HEAD>
<LINK href="../css.css" rel=stylesheet>
<BODY><BR>
<TABLE width="751" border=0 align=center cellPadding=0 cellSpacing=0>
<!--DWLayoutTable-->
<TBODY>
<FORM name=Searchclient action=list.asp method=post>
<TR>
<TD width="12" height="24" valign="top" ><Span align=center><img src="../images/DispStation_H.gif" width="11" height="24"></span></TD>
<TD width="137" align="center" valign="middle" bgcolor="#566CDB" >客户相关信息察看</TD>
<TD colspan="10" align="right" valign="middle" bgcolor="#DDDDDD" >快速查询:
<select name="S_SearchOption" class="text100" id="S_SearchOption">
<option value="0">客户名称</option>
<%
'生成下拉列表
SqlAttachNameTab = Array("国家/地区","国家区号","省份/直辖市","城市","城市区号","邮编","详细地址","电话","传真","电子邮箱","公司主页","公司年收入","员工人数","开户银行","银行帐号","增值税开票名","增值税号","增值税开户银行","增值税银行帐号","增值税开户地址","增值税开户电话")
for i=1 to 21
%>
<option value="<%=i%>"><%=SqlAttachNameTab(i-1)%></option>
<%
next
%>
</select>
<select name="S_Relation" class="text100" id="S_Relation">
<option value="包含" selected>包含</option>
<option value="不包含">不包含</option>
</select>
<input name="T_SearchText" type="text" id="T_SearchText" size="20" maxlength="50">
<input name="Search" type="submit" class="button_all" id="Search" value="查询"></TD>
</TR>
</form>
<TR>
<TD height="16" colspan="12" valign="top" ><!--DWLayoutEmptyCell--> </TD>
</TR>
<FORM name=saveclient action=saveclient.asp method=post>
<TR>
<TD height="30" colspan="5" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT></FONT><FONT color=#ff6600>客户名称:
<input name="T_ClientName" type="text" id="T_ClientName" size="30" maxlength="50" value="<%=ClientName%>">
<input name="T_ClientNameID" type="hidden" value=<%=ClientID%>>
</FONT></TD>
<TD colspan="7" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT><FONT face=Wingdings ></FONT></FONT><span class="style1">电子邮箱:
<input name="T_ClientEmail" type="text" id="T_ClientEmail" size="30" maxlength="50" value="<%=ClientEmail%>">
</span></TD>
</TR>
<TR>
<TD height="30" colspan="3" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT></FONT><FONT color=#ff6600>国家/地区:
<input name="T_ClientNation" type="text" id="T_ClientNation" size="15" maxlength="30" value="<%=ClientNation%>">
</FONT></TD>
<TD colspan="5" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT></FONT><FONT color=#ff6600>省份/直辖市:
<input name="T_ClientPro" type="text" id="T_ClientPro" size="15" maxlength="30" value="<%=ClientPro%>">
</FONT></TD>
<TD colspan="4" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT><FONT face=Wingdings ></FONT></FONT><span class="style1">公司主页:
<input name="T_ClientHpage" type="text" id="T_ClientHpage" size="30" maxlength="50" value="<%=ClientHpage%>">
</span></TD>
</TR>
<TR>
<TD height="30" colspan="3" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT></FONT><FONT color=#ff6600>国家 区号:
<input name="T_ClientNcode" type="text" id="T_ClientNcode" size="15" maxlength="30" value="<%=ClientNcode%>">
</FONT></TD>
<TD colspan="3" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT></FONT><FONT color=#ff6600>城市</FONT><FONT color=#ff6600>:
<input name="T_ClientCity" type="text" id="T_ClientCity" size="15" maxlength="30" value="<%=ClientCity%>">
</FONT></TD>
<TD colspan="4" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT></FONT><FONT color=#ff6600>区号:
<input name="T_ClientAcode" type="text" id="T_ClientAcode" size="15" maxlength="30" value="<%=ClientAcode%>">
</FONT></TD>
<TD colspan="2" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT></FONT><FONT color=#ff6600>邮编:
<input name="T_ClientPcode" type="text" id="T_ClientPcode" size="15" maxlength="30" value="<%=ClientPcode%>">
</FONT></TD>
</TR>
<TR>
<TD height="30" colspan="3" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT></FONT><FONT color=#ff6600>公司年收入</FONT><FONT color=#ff6600>:
<input name="T_ClientIncome" type="text" id="T_ClientIncome" size="15" maxlength="30" value="<%=ClientIncome%>">
</FONT></TD>
<TD colspan="4" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT></FONT><FONT color=#ff6600>员工人数:
<input name="T_ClientEmpNum" type="text" id="T_ClientCity4" size="15" maxlength="30" value="<%=ClientEmpNum%>">
</FONT></TD>
<TD colspan="4" align="left" valign="middle" ><FONT style="LINE-HEIGHT: 150%"><FONT face=Wingdings
color=#99ccff >v</FONT></FONT><FONT color=#ff6600>电话</FONT><FONT color=#ff6600>:
<input name="T_ClientTel" type="text" id="T_ClientCity5" size="15" maxlength="30" value="<%=ClientTel%>">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?