复制代码 代码如下:
<%@ codepage=65001%>
<%
option explicit
%>
<% Response.Charset="utf-8"%>
<% Session.CodePage=65001 %>
<!-- #include file="AccHelper.asp" -->
<!-- #include file="Common.asp"-->
<!-- #include file="DAL_Guest.asp" -->
<!-- #include file="MOD_Guest.asp" -->
<!-- #include file="BLL_Guest.asp" -->
<%
Dim mybll
Dim myList
Set mybll = new BLL_Guest
Select Case Request("tCMD")
Case "SAVE"
mybll.Insert()
Case "DEL"
mybll.Delete()
End Select
myList = mybll.FindByPage()
%>
<h2>客户留言</h2>
<p>
<form name="subForm" id="subForm">
<textarea id="con" name="con" cols="56" rows="6" wrap="VIRTUAL"></textarea>
<input type="button" name="submit" value="提交留言" onclick="$('guest/index.asp?tCMD=SAVE&content='+escape(this.form.con.value))" />
</form>
</p>
<%=myList%>
BLL_Guest.asp
<%
'/// <summary>
'/// 摘要说明。
'/// </summary>
Class BLL_Guest
Private mycom,mymod,mydal
Private LI,UL
Private DEL
'获取信息
Public Sub GetGuest()
mydal.GetGuest(Id)
End Sub
'新增信息
Public Sub Insert()
mymod.Content = Request("content")
mymod.re = Request("Re")
mymod.Addtime = Now()
mymod.Ip = request.servervariables("HTTP_X_FORWARDED_FOR")
If len(mymod.Ip)<=0 Then mymod.Ip = request.servervariables("REMOTE_ADDR")
Call mydal.Insert(mymod)
End Sub
'更新信息
Public Sub Update()
Call mydal.Update(mymod)
End Sub
'删除信息
Public Sub Delete()
mydal.Delete(Request("Id"))
End Sub
'查找信息
Public Function FindByPage()
Dim PageSize,CurrentPage,WhereValue,OrderValue,RecordCount
Dim objRS
Dim tmp1,tmp2,tmp3,parms,i
Dim tCMD
tCMD = Request("tCMD")
PageSize = "8"
CurrentPage = Request("PageNo")
If Len(CurrentPage)<=0 Then
CurrentPage=1
End If
WhereValue = ""
OrderValue = "Id"
Set objRS = mydal.FindByPage(PageSize,CurrentPage-1,WhereValue,OrderValue)
i = 1
RecordCount = mydal.Count(WhereValue)
Do While Not objRS.EOF
If tCMD="DEL" Then
DEL = "<a href=""?tCMD=DEL&Id="&objRS("Id")&""">删除</a>"
Else
DEL = ""
End If
parms=Array(i,objRS("content"),objRS("ip"),objRS("addtime"),DEL)
tmp1 = tmp1 & mycom.Format(LI,parms)
objRs.Movenext
i = i + 1
Loop
tmp3 = mycom.Page(PageSize,CurrentPage,RecordCount,"guest/index.asp?tCMD=LIST")
parms=Array(tmp1,tmp3)
tmp2 = tmp2 & mycom.Format(UL,parms)
FindByPage = tmp2
End Function
Private Sub Class_Initialize()
LI = "<li><span>{0}</span> <span>{1}</span><br /><span>作者:{2}</span> <span>{3}</span> <span>{4}</span></li>" & vbCrLf
UL = "<UL>{0}<li>{1}</li></UL>"
DEL = ""
Set mycom = new Common
set mymod = new MOD_Guest
set mydal = new DAL_Guest
End Sub
Private Sub Class_Terminate()
Set mycom = Nothing
Set mymod = Nothing
set mydal = Nothing
End Sub
End Class
%>
DAL_Guest.asp
<%
'/// <summary>
'/// 摘要说明。
'/// </summary>
Class DAL_Guest
Private SQL_01
Private SQL_02
Private SQL_03
Private SQL_04
Private SQL_05
Private SQL_06
Private SQL_07
Private mycom,myacc,mymod
'/// <summary>
'/// 获得信息
'/// </summary>
'/// <param name="Id">判断字段</param>
'/// <returns>信息体</returns>
Public Function GetGuest(Id)
Dim parms,SQL,objRS
parms = Array(Id)
SQL = mycom.Format(SQL_01,parms)
Set objRS = myacc.ExecuteReader(myacc.CONN_STRING,SQL)
If Not objRS.EOF then
Call mymod.SetVar(objRs("Id"),objRs("Content"),objRs("Re"),objRs("Addtime"),objRs("Ip"))
Set GetGuest = mymod
Else
GetGuest = Null
End If
End Function
'/// <summary>
'/// 插入信息
'/// </summary>
'/// <param name="">信息体</param>
Public Sub Insert(vmod)
Dim parms,SQL
parms = Array(vmod.Content,vmod.Re,vmod.Addtime,vmod.Ip)
SQL = mycom.Format(SQL_02,parms)
Call myacc.ExecuteReader(myacc.CONN_STRING,SQL)
End Sub
'/// <summary>
'/// 更新信息
'/// </summary>
'/// <param name="">信息体</param>
Public Sub Update(vmod)
Dim parms,SQL
parms = Array(vmod.Id,vmod.Content,vmod.Re,vmod.Addtime,vmod.Ip)
SQL = mycom.Format(SQL_03,parms)
Call myacc.ExecuteReader(myacc.CONN_STRING,SQL)
End Sub
'/// <summary>
'/// 删除信息
'/// </summary>
'/// <param name="">信息体</param>
Public Sub Delete(Id)
Dim parms,SQL
parms = Array(Id)
SQL = mycom.Format(SQL_04,parms)
Call myacc.ExecuteNonQuery(myacc.CONN_STRING,SQL)
End Sub
'/// <summary>
'/// 统计信息
'/// </summary>
'/// <param name="">信息体</param>
Public Function Count(WhereValue)
Dim parms,SQL,objRS
parms = Array(WhereValue)
SQL = mycom.Format(SQL_07,parms)
Set objRS = myacc.Recordset(myacc.CONN_STRING,SQL)
Count = objRS.RecordCount
End Function
'/// <summary>
'/// 根据条件列出所有信息(带有分页)
'/// </summary>
'/// <param name="PageSize">每页记录数</param>
'/// <param name="CurrentPage">页码</param>
'/// <param name="WhereValue">判断值</param>
'/// <param name="OrderValue">排序</param>
'/// <returns>返回objRS</returns>
Public Function FindByPage(PageSize,CurrentPage,WhereValue,OrderValue)
Dim parms,SQL,objRS
Dim s1
If CurrentPage="0" Then
s1 = PageSize & "|" + OrderValue & "|" & WhereValue
parms = Split(s1,"|")
SQL = mycom.Format(SQL_05,parms)
Else
s1 = PageSize & "|" & OrderValue & "|" + WhereValue & "|" & CurrentPage*PageSize
parms = Split(s1,"|")
SQL = mycom.Format(SQL_06,parms)
End If
Set objRS = myacc.ExecuteReader(myacc.CONN_STRING,SQL)
Set FindByPage = objRS
End Function
Private Sub Class_Initialize()
SQL_01 = "Select * From [Guest] Where Id = {0}"
SQL_02 = "Insert into [Guest] ([Content],[Re],[Addtime],[Ip]) values('{0}','{1}','{2}','{3}')"
SQL_03 = "Update [Guest] Set [Content]='{1}',[Re]='{2}',[Addtime]='{3}',[Ip]='{4}' Where Id = {0}"
SQL_04 = "Delete From [Guest] Where Id In ({0})"
SQL_05 = "Select Top {0} * From [Guest] Where Content Like '%{2}%' Order By {1} Desc,Id Desc"
SQL_06 = "Select Top {0} * From [Guest] Where Content Like '%{2}%' And Id Not IN(Select Top {3} Id From [Guest] Where Content Like '%{2}%' Order By {1} Desc,Id Desc) Order By {1} Desc,Id Desc"
SQL_07 = "Select * From [Guest] Where Content Like '%{0}%' "
Set mycom = new Common
Set myacc = new AccHelper
Set mymod = new MOD_Guest
End Sub
Private Sub Class_Terminate()
Set mycom = Nothing
Set myacc = Nothing
Set mymod = Nothing
End Sub
End Class
%>
MOD_Guest.asp
<%
'/// <summary>
'/// 摘要说明。
'/// </summary>
Class MOD_Guest
Public Id
Public Content
Public Re
Public Addtime
Public Ip
Public Sub SetVar(vId,vContent,vRe,vAddtime,vIp)
Id=vId
Content=vContent
Re=vContent
Addtime=vAddtime
Ip=vIp
End Sub
End Class
%>
Common.asp
<%
'/// <summary>
'/// 摘要说明
'/// </summary>
Class Common
'/// <summary>
'/// 获得信息
'/// </summary>
'/// <param name="Id">需要内容</param>
'/// <param name="Id">替换关键字</param>
'/// <returns>格式化后内容</returns>
Public Function Format(str,arr)
Dim r,i
r = str
For i = 0 To UBound(arr)
r = Replace(r,"{"&i&"}",arr(i))
Next
Format = r
End Function
Public Function Page(PageSize,CurrentPage,RecordCount,PageUrl)
const C_RECORDCOUNT = "合计<STRONG><FONT color=""red"">{0}</FONT></STRONG>篇 |"
const C_FIRSTPAGE1 = " <a href=""#"" onclick=""$('{0}&PageNo={1}')"">首页</a>"
const C_FIRSTPAGE2 = " 首页"
const C_PREVPAGE1 = " <a href=""#"" onclick=""$('{0}&PageNo={1}')"">上一页</a>"
const C_PREVPAGE2 = " 上一页"
const C_NEXTPAGE1 = " <a href=""#"" onclick=""$('{0}&PageNo={1}')"">下一页</a>"
const C_NEXTPAGE2 = " 下一页"
const C_LASTPAGE1 = " <a href=""#"" onclick=""$('{0}&PageNo={1}')"">尾页</a>"
const C_LASTPAGE2 = " 尾页"
const C_CURRENTPAGE = " 页次:<STRONG><FONT color=""red"">{0}</FONT>/{1}</STRONG>页"
const C_PAGESIZE = " <STRONG>{0}</STRONG>篇/页 "
const C_GOTOPAGE = " 跳转:<input type=""text"" name=""goto"" value=""{1}"" onchange=""$('{0}&PageNo='+this.value)"" style=""width:20px;border:1px""/> "
Dim PageCount,pages
Dim lRecordCount,lFirstpage,lPrevpage,lNextpage,lLastpage,lCurrentpage,lPagesize,lGotopage
Dim p,parms
If RecordCount Mod PageSize <> 0 Then
pages = 1
else
pages = 0
End If
PageCount=CInt(RecordCount/PageSize + pages)
parms=Array(RecordCount)
lRecordCount = Format(C_RECORDCOUNT,parms)
if CInt(CurrentPage)>1 Then
parms=Array(Pageurl,1)
lFirstpage = Format(C_FIRSTPAGE1,parms)
parms=Array(Pageurl,CInt(CurrentPage)-1)
lPrevpage = Format(C_PREVPAGE1,parms)
Else
lFirstpage=C_FIRSTPAGE2
lPrevpage=C_PREVPAGE2
End If
if CInt(CurrentPage)<PageCount Then
parms=Array(Pageurl,CInt(CurrentPage)+1)
lNextpage = Format(C_NEXTPAGE1,parms)
parms=Array(Pageurl,CInt(CurrentPage)+1)
lLastpage = Format(C_LASTPAGE1,parms)
Else
lNextpage=C_NEXTPAGE2
lLastpage=C_LASTPAGE2
End If
parms=Array(CurrentPage,PageCount)
lCurrentpage = Format(C_CURRENTPAGE,parms)
parms=Array(PageSize)
lPagesize = Format(C_PAGESIZE,parms)
parms=Array(Pageurl,CurrentPage)
lGotopage = Format(C_GOTOPAGE,parms)
p=lRecordCount&lFirstpage&lPrevpage&lNextpage&lLastpage&lCurrentpage&lPagesize&lGotopage
Page = p
End Function
End Class
%>
AccHelper.asp
<%
'/// <summary>
'/// AccHelper 的摘要说明。
'/// </summary>
Class AccHelper
Public CONN_STRING
'/// <summary>
'/// 执行ExecuteNonQuery
'/// </summary>
'/// <param name="connString">连接字符</param>
'/// <param name="cmdText">sql命令</param>
Public Function ExecuteNonQuery(connString,cmdText)
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open connString
objConn.Execute(cmdText)
End Function
'/// <summary>
'/// 执行ExecuteReader
'/// </summary>
'/// <param name="connString">连接字符</param>
'/// <param name="cmdText">sql命令</param>
'/// <returns>RS</returns>
Public Function ExecuteReader(connString,cmdText)
Dim objConn,objRS
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open connString
Set objRS = objConn.Execute(cmdText)
Set ExecuteReader = objRS
End Function
'/// <summary>
'/// 执行Recordset
'/// </summary>
'/// <param name="connString">连接字符</param>
'/// <param name="cmdText">sql命令</param>
'/// <returns>RS</returns>
Public Function Recordset(connString,cmdText)
Dim objConn,objRS
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open connString
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.Open cmdText,objConn,1,3
Set Recordset = objRS
End Function
Private Sub Class_Initialize()
CONN_STRING = "provider = microsoft.jet.oledb.4.0;data source=" & Server.Mappath("db.mdb")
End Sub
End Class
%>
<%@ codepage=65001%>
<%
option explicit
%>
<% Response.Charset="utf-8"%>
<% Session.CodePage=65001 %>
<!-- #include file="AccHelper.asp" -->
<!-- #include file="Common.asp"-->
<!-- #include file="DAL_Guest.asp" -->
<!-- #include file="MOD_Guest.asp" -->
<!-- #include file="BLL_Guest.asp" -->
<%
Dim mybll
Dim myList
Set mybll = new BLL_Guest
Select Case Request("tCMD")
Case "SAVE"
mybll.Insert()
Case "DEL"
mybll.Delete()
End Select
myList = mybll.FindByPage()
%>
<h2>客户留言</h2>
<p>
<form name="subForm" id="subForm">
<textarea id="con" name="con" cols="56" rows="6" wrap="VIRTUAL"></textarea>
<input type="button" name="submit" value="提交留言" onclick="$('guest/index.asp?tCMD=SAVE&content='+escape(this.form.con.value))" />
</form>
</p>
<%=myList%>
BLL_Guest.asp
<%
'/// <summary>
'/// 摘要说明。
'/// </summary>
Class BLL_Guest
Private mycom,mymod,mydal
Private LI,UL
Private DEL
'获取信息
Public Sub GetGuest()
mydal.GetGuest(Id)
End Sub
'新增信息
Public Sub Insert()
mymod.Content = Request("content")
mymod.re = Request("Re")
mymod.Addtime = Now()
mymod.Ip = request.servervariables("HTTP_X_FORWARDED_FOR")
If len(mymod.Ip)<=0 Then mymod.Ip = request.servervariables("REMOTE_ADDR")
Call mydal.Insert(mymod)
End Sub
'更新信息
Public Sub Update()
Call mydal.Update(mymod)
End Sub
'删除信息
Public Sub Delete()
mydal.Delete(Request("Id"))
End Sub
'查找信息
Public Function FindByPage()
Dim PageSize,CurrentPage,WhereValue,OrderValue,RecordCount
Dim objRS
Dim tmp1,tmp2,tmp3,parms,i
Dim tCMD
tCMD = Request("tCMD")
PageSize = "8"
CurrentPage = Request("PageNo")
If Len(CurrentPage)<=0 Then
CurrentPage=1
End If
WhereValue = ""
OrderValue = "Id"
Set objRS = mydal.FindByPage(PageSize,CurrentPage-1,WhereValue,OrderValue)
i = 1
RecordCount = mydal.Count(WhereValue)
Do While Not objRS.EOF
If tCMD="DEL" Then
DEL = "<a href=""?tCMD=DEL&Id="&objRS("Id")&""">删除</a>"
Else
DEL = ""
End If
parms=Array(i,objRS("content"),objRS("ip"),objRS("addtime"),DEL)
tmp1 = tmp1 & mycom.Format(LI,parms)
objRs.Movenext
i = i + 1
Loop
tmp3 = mycom.Page(PageSize,CurrentPage,RecordCount,"guest/index.asp?tCMD=LIST")
parms=Array(tmp1,tmp3)
tmp2 = tmp2 & mycom.Format(UL,parms)
FindByPage = tmp2
End Function
Private Sub Class_Initialize()
LI = "<li><span>{0}</span> <span>{1}</span><br /><span>作者:{2}</span> <span>{3}</span> <span>{4}</span></li>" & vbCrLf
UL = "<UL>{0}<li>{1}</li></UL>"
DEL = ""
Set mycom = new Common
set mymod = new MOD_Guest
set mydal = new DAL_Guest
End Sub
Private Sub Class_Terminate()
Set mycom = Nothing
Set mymod = Nothing
set mydal = Nothing
End Sub
End Class
%>
DAL_Guest.asp
<%
'/// <summary>
'/// 摘要说明。
'/// </summary>
Class DAL_Guest
Private SQL_01
Private SQL_02
Private SQL_03
Private SQL_04
Private SQL_05
Private SQL_06
Private SQL_07
Private mycom,myacc,mymod
'/// <summary>
'/// 获得信息
'/// </summary>
'/// <param name="Id">判断字段</param>
'/// <returns>信息体</returns>
Public Function GetGuest(Id)
Dim parms,SQL,objRS
parms = Array(Id)
SQL = mycom.Format(SQL_01,parms)
Set objRS = myacc.ExecuteReader(myacc.CONN_STRING,SQL)
If Not objRS.EOF then
Call mymod.SetVar(objRs("Id"),objRs("Content"),objRs("Re"),objRs("Addtime"),objRs("Ip"))
Set GetGuest = mymod
Else
GetGuest = Null
End If
End Function
'/// <summary>
'/// 插入信息
'/// </summary>
'/// <param name="">信息体</param>
Public Sub Insert(vmod)
Dim parms,SQL
parms = Array(vmod.Content,vmod.Re,vmod.Addtime,vmod.Ip)
SQL = mycom.Format(SQL_02,parms)
Call myacc.ExecuteReader(myacc.CONN_STRING,SQL)
End Sub
'/// <summary>
'/// 更新信息
'/// </summary>
'/// <param name="">信息体</param>
Public Sub Update(vmod)
Dim parms,SQL
parms = Array(vmod.Id,vmod.Content,vmod.Re,vmod.Addtime,vmod.Ip)
SQL = mycom.Format(SQL_03,parms)
Call myacc.ExecuteReader(myacc.CONN_STRING,SQL)
End Sub
'/// <summary>
'/// 删除信息
'/// </summary>
'/// <param name="">信息体</param>
Public Sub Delete(Id)
Dim parms,SQL
parms = Array(Id)
SQL = mycom.Format(SQL_04,parms)
Call myacc.ExecuteNonQuery(myacc.CONN_STRING,SQL)
End Sub
'/// <summary>
'/// 统计信息
'/// </summary>
'/// <param name="">信息体</param>
Public Function Count(WhereValue)
Dim parms,SQL,objRS
parms = Array(WhereValue)
SQL = mycom.Format(SQL_07,parms)
Set objRS = myacc.Recordset(myacc.CONN_STRING,SQL)
Count = objRS.RecordCount
End Function
'/// <summary>
'/// 根据条件列出所有信息(带有分页)
'/// </summary>
'/// <param name="PageSize">每页记录数</param>
'/// <param name="CurrentPage">页码</param>
'/// <param name="WhereValue">判断值</param>
'/// <param name="OrderValue">排序</param>
'/// <returns>返回objRS</returns>
Public Function FindByPage(PageSize,CurrentPage,WhereValue,OrderValue)
Dim parms,SQL,objRS
Dim s1
If CurrentPage="0" Then
s1 = PageSize & "|" + OrderValue & "|" & WhereValue
parms = Split(s1,"|")
SQL = mycom.Format(SQL_05,parms)
Else
s1 = PageSize & "|" & OrderValue & "|" + WhereValue & "|" & CurrentPage*PageSize
parms = Split(s1,"|")
SQL = mycom.Format(SQL_06,parms)
End If
Set objRS = myacc.ExecuteReader(myacc.CONN_STRING,SQL)
Set FindByPage = objRS
End Function
Private Sub Class_Initialize()
SQL_01 = "Select * From [Guest] Where Id = {0}"
SQL_02 = "Insert into [Guest] ([Content],[Re],[Addtime],[Ip]) values('{0}','{1}','{2}','{3}')"
SQL_03 = "Update [Guest] Set [Content]='{1}',[Re]='{2}',[Addtime]='{3}',[Ip]='{4}' Where Id = {0}"
SQL_04 = "Delete From [Guest] Where Id In ({0})"
SQL_05 = "Select Top {0} * From [Guest] Where Content Like '%{2}%' Order By {1} Desc,Id Desc"
SQL_06 = "Select Top {0} * From [Guest] Where Content Like '%{2}%' And Id Not IN(Select Top {3} Id From [Guest] Where Content Like '%{2}%' Order By {1} Desc,Id Desc) Order By {1} Desc,Id Desc"
SQL_07 = "Select * From [Guest] Where Content Like '%{0}%' "
Set mycom = new Common
Set myacc = new AccHelper
Set mymod = new MOD_Guest
End Sub
Private Sub Class_Terminate()
Set mycom = Nothing
Set myacc = Nothing
Set mymod = Nothing
End Sub
End Class
%>
MOD_Guest.asp
<%
'/// <summary>
'/// 摘要说明。
'/// </summary>
Class MOD_Guest
Public Id
Public Content
Public Re
Public Addtime
Public Ip
Public Sub SetVar(vId,vContent,vRe,vAddtime,vIp)
Id=vId
Content=vContent
Re=vContent
Addtime=vAddtime
Ip=vIp
End Sub
End Class
%>
Common.asp
<%
'/// <summary>
'/// 摘要说明
'/// </summary>
Class Common
'/// <summary>
'/// 获得信息
'/// </summary>
'/// <param name="Id">需要内容</param>
'/// <param name="Id">替换关键字</param>
'/// <returns>格式化后内容</returns>
Public Function Format(str,arr)
Dim r,i
r = str
For i = 0 To UBound(arr)
r = Replace(r,"{"&i&"}",arr(i))
Next
Format = r
End Function
Public Function Page(PageSize,CurrentPage,RecordCount,PageUrl)
const C_RECORDCOUNT = "合计<STRONG><FONT color=""red"">{0}</FONT></STRONG>篇 |"
const C_FIRSTPAGE1 = " <a href=""#"" onclick=""$('{0}&PageNo={1}')"">首页</a>"
const C_FIRSTPAGE2 = " 首页"
const C_PREVPAGE1 = " <a href=""#"" onclick=""$('{0}&PageNo={1}')"">上一页</a>"
const C_PREVPAGE2 = " 上一页"
const C_NEXTPAGE1 = " <a href=""#"" onclick=""$('{0}&PageNo={1}')"">下一页</a>"
const C_NEXTPAGE2 = " 下一页"
const C_LASTPAGE1 = " <a href=""#"" onclick=""$('{0}&PageNo={1}')"">尾页</a>"
const C_LASTPAGE2 = " 尾页"
const C_CURRENTPAGE = " 页次:<STRONG><FONT color=""red"">{0}</FONT>/{1}</STRONG>页"
const C_PAGESIZE = " <STRONG>{0}</STRONG>篇/页 "
const C_GOTOPAGE = " 跳转:<input type=""text"" name=""goto"" value=""{1}"" onchange=""$('{0}&PageNo='+this.value)"" style=""width:20px;border:1px""/> "
Dim PageCount,pages
Dim lRecordCount,lFirstpage,lPrevpage,lNextpage,lLastpage,lCurrentpage,lPagesize,lGotopage
Dim p,parms
If RecordCount Mod PageSize <> 0 Then
pages = 1
else
pages = 0
End If
PageCount=CInt(RecordCount/PageSize + pages)
parms=Array(RecordCount)
lRecordCount = Format(C_RECORDCOUNT,parms)
if CInt(CurrentPage)>1 Then
parms=Array(Pageurl,1)
lFirstpage = Format(C_FIRSTPAGE1,parms)
parms=Array(Pageurl,CInt(CurrentPage)-1)
lPrevpage = Format(C_PREVPAGE1,parms)
Else
lFirstpage=C_FIRSTPAGE2
lPrevpage=C_PREVPAGE2
End If
if CInt(CurrentPage)<PageCount Then
parms=Array(Pageurl,CInt(CurrentPage)+1)
lNextpage = Format(C_NEXTPAGE1,parms)
parms=Array(Pageurl,CInt(CurrentPage)+1)
lLastpage = Format(C_LASTPAGE1,parms)
Else
lNextpage=C_NEXTPAGE2
lLastpage=C_LASTPAGE2
End If
parms=Array(CurrentPage,PageCount)
lCurrentpage = Format(C_CURRENTPAGE,parms)
parms=Array(PageSize)
lPagesize = Format(C_PAGESIZE,parms)
parms=Array(Pageurl,CurrentPage)
lGotopage = Format(C_GOTOPAGE,parms)
p=lRecordCount&lFirstpage&lPrevpage&lNextpage&lLastpage&lCurrentpage&lPagesize&lGotopage
Page = p
End Function
End Class
%>
AccHelper.asp
<%
'/// <summary>
'/// AccHelper 的摘要说明。
'/// </summary>
Class AccHelper
Public CONN_STRING
'/// <summary>
'/// 执行ExecuteNonQuery
'/// </summary>
'/// <param name="connString">连接字符</param>
'/// <param name="cmdText">sql命令</param>
Public Function ExecuteNonQuery(connString,cmdText)
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open connString
objConn.Execute(cmdText)
End Function
'/// <summary>
'/// 执行ExecuteReader
'/// </summary>
'/// <param name="connString">连接字符</param>
'/// <param name="cmdText">sql命令</param>
'/// <returns>RS</returns>
Public Function ExecuteReader(connString,cmdText)
Dim objConn,objRS
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open connString
Set objRS = objConn.Execute(cmdText)
Set ExecuteReader = objRS
End Function
'/// <summary>
'/// 执行Recordset
'/// </summary>
'/// <param name="connString">连接字符</param>
'/// <param name="cmdText">sql命令</param>
'/// <returns>RS</returns>
Public Function Recordset(connString,cmdText)
Dim objConn,objRS
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open connString
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.Open cmdText,objConn,1,3
Set Recordset = objRS
End Function
Private Sub Class_Initialize()
CONN_STRING = "provider = microsoft.jet.oledb.4.0;data source=" & Server.Mappath("db.mdb")
End Sub
End Class
%>
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。
更新日志
2024年11月24日
2024年11月24日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]