<!--#include file="config.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<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>
</head>
<body>
<%
''''''''''''''''''''''''''''''''''''''''''''
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)
Dim conn
Set Conn = CreateObject("ADODB.Connection")
conn.open "DRIVER={SQL Server};SERVER=192.168.0.100;DATABASE=Zsa;UID=sa;PWD=dss"
strSql = "SELECT * FROM T_Customerinfo where Chandset1 = '" & CallerID & "' or Chandset2 = '" & CallerID & "' or Ctel like '" & CallerID & "'"
set rstData = DataToRsStatic(conn, strSql)
'rstData.CacheSize = NumPerPage
rstData.MoveFirst
rstData.PageSize = NumPerPage
Dim TotalPages
TotalPages = rstData.PageCount
rstData.AbsolutePage = CurPage
Dim count
Count = 0
Do While Not rstData.EOF And Count < rstData.PageSize
response.write("注册帐号:"& rstData("Cnickname"))
response.write("<br>会员姓名:"& rstData("Cname"))
response.write("<br>性别:"& rstData("Csex"))
response.write("<br>家庭住址:"& rstData("Caddress"))
response.Write("<br>手机1:"& rstData("Chandset1"))
response.Write("<br>手机2:"& rstData("Chandset2"))
response.Write("<br>固定电话区号:"& rstData("Ctelfirst"))
response.Write("<br>固定电话号码:"& rstData("Ctel"))
response.Write("<br>是否黑名:"& rstData("Cblack"))
response.Write("<br>会员状态:"& rstData("Cstatus"))
response.Write("<br>消费积分:"& rstData("Cconsumescore"))
response.Write("<br>会员积分:"& rstData("Cscore"))
response.Write("<br>会员级别"& rstData("Clevel"))
Count = Count + 1
rstData.MoveNext
Loop
Response.Write("<br>第 " & CurPage & " 页,共 " & TotalPages & "页<P>")
rstData.Close
Set rstData = nothing
conn.close
Set conn=Nothing
'显示 Next / Prev 按钮
if CurPage > 1 then
Response.Write("<INPUT TYPE=BUTTON VALUE=PREV 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=NEXT ONCLICK=""document.location.href='ddd.asp?m_CallerID=" & CallerID & "curpage=" & curpage + 1 & "';"">")
End If
%>
</body>
</html>
[此贴子已经被作者于2005-10-20 13:18:40编辑过]