<!--#include file="config.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="../Css/style.css" type="text/css">
<style type="text/css">
<!--
.style1 {color: #666666}
-->
</style>
<script language="vbscript" runat="server">
'''电话号码转换
function change(callid)
if mid(callid,1,2) = "13" then
change = callid
elseif mid(callid,1,3) = "013" then
change = callid
elseif len(callid) >= 11 then
change = mid(callid,len(callid)-6,7)
else
change = callid
end if
end function
''''''''''''''''''''''''''''''''''''''''''''''''
Function DataToRsStatic(Conn,strSql)
Dim RsStatic
On Error Resume NexT
Set DataToRsStatic = Nothing
If Conn Is Nothing Then
Exit Function
End If
Set RsStatic = CreateObject("ADODB.RecordSet")
RsStatic.CursorLocation = 3
RsStatic.Open strSql,Conn,3,3
If Err.Number <> 0 Then
Exit Function
End If
set DataToRsStatic = RsStatic
End Function
</script>
<script language="javascript" type="text/JavaScript">
function openwin(){
var wcurl = "../wwww/particular.asp?CustomerSID=" + <% =CustomerSID %>;
window.open (wcurl);
}
</script>
</head>
<body>
<b><font face="Wingdings" style="FONT-SIZE: 12pt; WIDTH: 20px; COLOR: #666666">)</font>客户资料</b><br>
<%
''''''''''''''''''''''''''''''''''''''''''''
Const NumPerPage = 1
'''''''''''''''''''''''''''''''''''''''''''''
Dim CurPage
If Request.QueryString("CurPage") = "" then
CurPage = 1 'We're on the first page
Else
CurPage = Request.QueryString("CurPage")
End If
''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''
dim CallerID
CallerID = request.QueryString("m_CallerID")
CallerID = change(CallerID)
response.Write(CallerID)
Dim conn
Set Conn = CreateObject("ADODB.Connection")
conn.open "DRIVER={SQL Server};SERVER=192.168.0.100;DATABASE=ZhongRuan;UID=sa;PWD=didwell"
strSql = "SELECT * FROM T_Customerinfo where Chandset1 = '" & CallerID & "' or Chandset2 = '" & CallerID & "' or Ctel like '%" & CallerID & "'"
set rstData = DataToRsStatic(conn, strSql)
rstData.CacheSize = NumPerPage
if rstData.eof or rstData.bof then
response.Write("<br>没有该客户资料<br>")
else
rstData.CacheSize = NumPerPage
rstData.MoveFirst
rstData.PageSize = NumPerPage
Dim TotalPages
TotalPages = rstData.PageCount
rstData.AbsolutePage = CurPage
Dim count
dim CustomerSID
Count = 0
Do While Not rstData.EOF And Count < rstData.PageSize
%>
<table table cellspacing=1 cellpadding=0 border=0 width="52%" bgcolor="#c3bfb3">
<tr>
<td width="192" bgcolor="#CCCCCC" class="td-detail"><div align="left">注册帐号</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Cnickname") %></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"> <div align="left">会员姓名</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Cname")%></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"> <div align="left">性别 </div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Csex")%></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"> <div align="left">家庭住址</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Caddress")%></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"> <div align="left">手机1</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Chandset1")%></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"> <div align="left">手机2</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Chandset2") %></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"><div align="left">固定电话区号</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Ctelfirst") %></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"> <div align="left">固定电话号码</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Ctel") %></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"><div align="left">是否黑名</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Cblack")%></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"> <div align="left">会员状态</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Cstatus") %></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"><div align="left">消费积分</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Cconsumescore") %></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"> <div align="left">会员积分</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Cscore") %></div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC" class="td-detail"><div align="left">会员级别</div></td>
<td width="203" bgcolor="#FFFFFF"><div align="center"><%= rstData("Clevel") %></div></td>
</tr>
</table>
<%
Count = Count + 1
CustomerSID = rstData("CustomerSID")
rstData.MoveNext
Loop
Response.Write("<br><br><br>第 " & CurPage & " 条记录,共 " & TotalPages & "条记录<P>")
'显示 Next / Prev 按钮
if CurPage > 1 then
Response.Write("<INPUT TYPE=BUTTON VALUE=上一条 ONCLICK=""document.location.href='ddd.asp?m_CallerID=" & CallerID & "&curpage=" & curpage - 1 & "';"">")
End If
if CInt(CurPage) <> CInt(TotalPages) then
Response.Write("<INPUT TYPE=BUTTON VALUE=下一条 ONCLICK=""document.location.href='ddd.asp?m_CallerID=" & CallerID & "&curpage=" & curpage + 1 & "';"">")
End If
response.Write("<INPUT TYPE=BUTTON VALUE=详细 onClick=""JavaScript:openwin();"">")
rstData.Close
Set rstData = nothing
conn.close
Set conn=Nothing
end if
%>
</body>
</html>
这是我全部的代码