📄 review.asp
字号:
If FromUrl <> "" Then FromUrl = WRMPS.GetCompanyUrl(ID) Else FromUrl = WR_Setting(3)&ChannelDir&"/Review.asp?ID="&ID
Content = WRMPS.CheckStr(Request.Form("Content"),2)
If Content = "" Or Len(Content) > Int(UserFlag(13)) Then Call WRMPS.ErrView("·请输入不超过 "&Int(UserFlag(13))&" 字符的评论内容<meta http-equiv='refresh' content='1;URL="&FromUrl&"'>",0)
Contact = WRMPS.CheckStr(Request.Form("Contact"),0)
If Contact = "" Then Contact = NULL
If Len(Contact) > 50 Then Call WRMPS.ErrView("·联系方式不能超过50字符<meta http-equiv='refresh' content='1;URL="&FromUrl&"'>",0)
If WRMPS.CheckCode("Re",1) Then
If WRMPS.CheckStr(Request.Form("Code"),0) = "" Then Call WRMPS.ErrView("·请输入验证码<meta http-equiv='refresh' content='1;URL="&FromUrl&"'>",0)
If WRMPS.CheckStr(Request.Form("Code"),0) <> WRMPS.GetCookies("Code") Then Call WRMPS.ErrView("·您的验证码输入有误<meta http-equiv='refresh' content='1;URL="&FromUrl&"'>",0)
End If
If WRUser.ChkLogin Then User = MemName Else User = NULL
IsToPost = WRMPS.CheckStr(Request.Form("IsToPost"),1)
If IsToPost = "" Then IsToPost = 0
Set Rs = Conn.Execute("Select WM_RZBL From WM_Company Where WM_ID="&ID&"")
If Not Rs.Eof Then
If Rs(0) < 1 Then IsToPost = 0
End If
Rs.Close
If Int(FlagCom(15)) > 0 Then
If User <> "" and IsNull(User) = False Then Call WRDB.SaveConsume(0,User,0,Int(FlagCom(14)),Int(FlagCom(13)),0,"店铺留言成功")
End If
Rs.open "Select WM_ChannelID,WM_ParentID,WM_Content,WM_DateTime,WM_User,WM_Key,WM_Contact,WM_IsToPost From WM_CompanyRe",conn,1,3
Rs.AddNew
Rs(0) = ChannelID
Rs(1) = ID
Rs(2) = Content
Rs(3) = Now()
Rs(4) = User
Rs(5) = Int(FlagCom(15))
Rs(6) = Contact
Rs(7) = IsToPost
Rs.Update
Rs.Close
WRMPS.DelCookies "Code"
If Int(FlagCom(15)) > 0 Then Conn.Execute("Update WM_Company Set WM_GB=WM_GB+1 where WM_ID="&ID)
Set Rs = Conn.Execute("Select WM_ClaimUser,WM_Company From WM_Company Where WM_ID="&ID&" and WM_RZBL > 0")
If Not Rs.Eof Then
Set Rso = Conn.Execute("Select WM_Email From WM_Member Where WM_UserName = '"&Rs(0)&"'")
If Not Rso.Eof Then
If (Int(WR_Company(2)) > 0 and Rso(0) <> "" and WR_Mail(5) <> "NO") Or Int(WR_Mail(17)) > 0 Then
MailBody = WR_Mail(16)
MailBody = Replace(MailBody,"{$Title}",Rs(1))
MailBody = Replace(MailBody,"{$Url}",WRMPS.GetCompanyUrl(ID))
Subject = "您在"&WR_Setting(0)&"登记的店铺已经有人留言了!"
If Int(WR_Company(2)) > 0 and Rso(0) <> "" and WR_Mail(5) <> "NO" Then Call WRMPS.SendMail(WRTemp.SiteLabel(MailBody&vbCrLf&vbCrLf&WR_Mail(4)),WRTemp.SiteLabel(WR_Setting(0)),WRTemp.SiteLabel(Subject),Rso(0))
If Int(WR_Mail(17)) > 0 Then
Call WRDB.SendMessage(Rs(0),Null,"您登记的店铺“"&Rs(1)&"”已经有人留言了!",WRTemp.SiteLabel(MailBody))
End If
End If
End If
Rso.Close
End If
Rs.Close
If Int(FlagCom(15)) < 1 Then Msg = ",请等待管理员的审核"
Call WRMPS.ErrView("·留言成功"&Msg&"<br><meta http-equiv='refresh' content='1;URL="&FromUrl&"'>",1)
Case Else
Call WRMPS.FsoBegin()
Content = WRTemp.SiteTemplates(1,0,58,ChannelID)
Call WRMPS.FsoEnd()
Set Rs = Conn.Execute("Select WM_Company,WM_ClassID,WM_CheckTime,WM_ClassDir,WM_AreaID From WM_Company Where WM_Key = 1 and WM_ID="&ID&"")
If Rs.Eof Then
Call WRMPS.ErrView("·内容不存在",0)
Else
ReUrl = WRMPS.GetCompanyUrl(ID)
Content = WRMPS.GetReplace(Content,"{$Url}",reUrl)
Set Rst = Conn.Execute("Select WM_ID,WM_Name,WM_ParentPath,WM_ParentDir,WM_Dir from WM_CompanySort Where WM_ID="&Rs(1)&"")
If Not Rst.Eof Then
B_Place = ",<a href="&WRMPS.GetClassUrl(0,1,1,ChannelDir&Rst(3)&Rst(4),Rst(0))&">"&Rst(1)&"</a>,评论:"&Rs(0)
ClassName = Rst(1)
ClassID = Rst(0)
If Rst(2) <> "0" Then
B_ParentPath = Right(Rst(2),Len(Rst(2))-2)
B_ParentPath = Split(B_ParentPath,",")
L_Place = ""
For i=0 to UBound(B_ParentPath)
Set Rso = Conn.Execute("Select WM_ID,WM_Name,WM_ParentDir,WM_Dir From WM_CompanySort Where WM_ID="&Int(B_ParentPath(i))&"")
L_Place = L_Place & ",<a href="&WRMPS.GetClassUrl(0,1,1,ChannelDir&Rso(2)&Rso(3),Rso(0))&">"&Rso(1)&"</a>"
Rso.Close
Next
End If
Else
Rst.Close
Call WRMPS.ErrView("·栏目不存在",0)
End If
Rst.Close
SitePath = WRMPS.GetSitePath(0,",<a href="&WR_Setting(3)&ChannelDir&"/>"&ChannelName&"</a>"&L_Place&B_Place)
ReviewTitle = Rs(0)
End If
Rs.Close
Page = WRMPS.CheckStr(Request("Page"),1)
If Page = "" Then Page = 1
If Instr(Content,"{$CycBegin}") > 0 Then
Dim ShowNum
ShowNum = WRMPS.HCode(2,Content,"{\$CycBegin}【","】")
MidstContent = WRMPS.HCode(2,Content,"{\$CycBegin}【"&ShowNum&"】","{\$CycEnd}")
Set ClsPageList = New Cls_PageView
ClsPageList.strTableName = "WM_CompanyRe"
ClsPageList.strPageUrl = ""
ClsPageList.strFieldsList = "WM_Content,WM_User,WM_DateTime,WM_Contact"
ClsPageList.strCondiction = "WM_ParentID="&ID&" and WM_ChannelID="&ChannelID&" and WM_IsToPost = 0 and WM_Key=1"
ClsPageList.strOrderList = "WM_ID Desc"
ClsPageList.strPrimaryKey = "WM_ID"
ClsPageList.intPageSize = ShowNum
ClsPageList.intPageNow = Page
ClsPageList.strCookiesName = "RecordCount"
ClsPageList.strPageVar = "Page"
ClsPageList.intRefresh = 1
ClsPageList.objConn = Conn
ClsPageList.InitClass
arrPage = ClsPageList.arrPage
strPageList = ClsPageList.strPageList
Set ClsPageList = nothing
If IsArray(arrPage) Then
For i = 0 to UBound(arrPage, 2)
User = WRUser.DispUser(0,arrPage(1,i))
Midst = WRMPS.GetReplace(MidstContent,"{$ReviewNumber}",i)
Midst = WRMPS.GetReplace(Midst,"{$ReviewUser}",User)
Midst = WRMPS.GetReplace(Midst,"{$ReviewContent}",arrPage(0,i))
Midst = WRMPS.GetReplace(Midst,"{$ReviewContact}",arrPage(3,i))
Midst = WRMPS.GetReplace(Midst,"{$ReviewTime}",arrPage(2,i))
MidstC = MidstC & Midst
Next
End If
Content = WRMPS.HCode(1,Content,"{\$CycBegin}","{\$CycEnd}") & MidstC & WRMPS.HCode(3,Content,"{\$CycBegin}","{\$CycEnd}")
End If
Content = WRMPS.GetReplace(Content,"{$NextPage}",strPageList)
If Instr(Content,"{$IDCode}") > 0 Then
If WRMPS.CheckCode("Re",1) Then
Content = WRMPS.GetReplace(Content,"{$IDCode}","")
Else
Content = WRMPS.GetReplace(Content,"{$IDCode}"," style=""display:none""")
End If
End If
Content = WRMPS.GetReplace(Content,"{$ReviewID}",ID)
Content = WRMPS.GetReplace(Content,"{$ReviewTitle}",reviewTitle)
Content = WRTemp.SiteClass(Content)
Content = WRTemp.SiteChannel(Content)
Content = WRTemp.SiteLabel(Content)
End Select
Set Rso = Nothing
Set Rs = Nothing
Call ClassEnd()
Call DBConnEnd()
Response.write Content
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -