⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 review.asp

📁 网人分类信息5.0商业版。非常优秀的分类信息系统。比较少见。
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="../inc/Conn.asp"-->
<!--#include file="../Inc/Cls.Common.asp"-->
<!--#include file="../Inc/Cls.Templates.asp"-->
<!--#include file="Channel_Config.asp"-->
<%
  Dim ID,ThinkGo,IsGo,tThinkGo,tIsGo,i,n,DPID
  Dim ReSer,rePrice,All,Consume,Intro,Product,Code,FiRstRE
  Dim FromUrl,Contact,User,WM_Key,IsToPost,Msg
  Dim ReviewTitle,Midst,MidstC,MidstContent,B_Place,L_Place,B_ParentPath,reUrl
 
  ID=WRMPS.CheckStr(Request("ID"),1)
  DPID=WRMPS.CheckStr(Request("DPID"),1)
  If ID = "" Then Call WRMPS.ErrView("·操作错误<meta http-equiv=refresh content='1;URL=../'>",0)
  Call DBConnBegin() 
  Set Rs=server.createobject("adodb.recordset")
  Select Case Ucase(Request("Action"))
    Case "GO"
      If Not WRUser.ChkLogin Then Call WRMPS.AjaxLogin("",0,"您需要登录后才可以进行此操作!")
	  Rs.Open "Select WM_ThinkGo,WM_IsGo From WM_Company Where WM_ID="&ID,Conn,1,1
	  If Not Rs.Eof Then
	    ThinkGo = Rs(0):tThinkGo=""
		IsGo = Rs(1):tIsGo=""
        Select Case Ucase(Request("W"))
          Case "TGO"
		    If Instr(","&ThinkGo&",",","&MemName&",")=0 Then
			  ThinkGo = MemName&","&ThinkGo
			  Conn.Execute("Update WM_Company Set WM_ThinkGo='"&ThinkGo&"' Where WM_ID="&ID)
			End If
          Case "NTGO"
		    If Instr(","&ThinkGo&",",","&MemName&",")>0 Then
			  For i = 0 To Ubound(Split(ThinkGo,","))
			    If Split(ThinkGo,",")(i) <> "" and IsNUll(Split(ThinkGo,",")(i)) = False and Split(ThinkGo,",")(i) <> MemName Then
				  If tThinkGo = "" Or IsNull(tThinkGo) Then
				    tThinkGo = Split(ThinkGo,",")(i)
				  Else
				    tThinkGo = tThinkGo&","&Split(ThinkGo,",")(i)
				  End If
				End If
			  Next
			  Conn.Execute("Update WM_Company Set WM_ThinkGo='"&tThinkGo&"' Where WM_ID="&ID)
			End If
          Case "IGO"
		    If Instr(","&IsGo&",",","&MemName&",")=0 Then
			  IsGo = MemName&","&IsGo
			  Conn.Execute("Update WM_Company Set WM_IsGo='"&IsGo&"' Where WM_ID="&ID)
			End If
          Case "NIGO"
		    If Instr(","&IsGo&",",","&MemName&",")>0 Then
			  For i = 0 To Ubound(Split(IsGo,","))
			    If Split(IsGo,",")(i) <> "" and IsNUll(Split(IsGo,",")(i)) = False and Split(IsGo,",")(i) <> MemName Then
				  If tIsGo = "" Or IsNull(tIsGo) Then
				    tIsGo = Split(IsGo,",")(i)
				  Else
				    tIsGo = tIsGo&","&Split(IsGo,",")(i)
				  End If
				End If
			  Next
			  Conn.Execute("Update WM_Company Set WM_IsGo='"&tIsGo&"' Where WM_ID="&ID)
			End If
          Case "GOOD"
            If IsEmpty(WRMPS.GetCookies("Vote_Co_"&ID&"_DP_"&DPID)) = False Then Call WRMPS.ErrView("·一条点评只能投一票哦<meta http-equiv=refresh content='1;URL="&WRMPS.GetCompanyUrl(ID)&"'>",0)
			WRMPS.SCookies "Vote_Co_"&ID&"_DP_"&DPID,"True",365
		    If DPID <> "" and IsNUll(DPID) = False Then Conn.Execute("Update WM_CompanyRevert Set WM_Good=WM_Good+1 Where WM_ID="&DPID)
          Case "BAD"
            If IsEmpty(WRMPS.GetCookies("Vote_Co_"&ID&"_DP_"&DPID)) = False Then Call WRMPS.ErrView("·一条点评只能投一票哦<meta http-equiv=refresh content='1;URL="&WRMPS.GetCompanyUrl(ID)&"'>",0)
            WRMPS.SCookies "Vote_Co_"&ID&"_DP_"&DPID,"True",365
		    If DPID <> "" and IsNUll(DPID) = False Then Conn.Execute("Update WM_CompanyRevert Set WM_Bad=WM_Bad+1 Where WM_ID="&DPID)
        End Select
	  End If 
	  Rs.Close
	  Response.Redirect WRMPS.GetCompanyUrl(ID)
	  
    Case "RE" '点评
	  Call WRMPS.CheckSubmit()
      If Not WRUser.ChkLogin Then Call WRMPS.AjaxLogin("",0,"您需要登录后才可以对店铺进行点评!")
      If Int(FlagCom(8)) < 1 Then Call WRMPS.ErrView("·您没有权限使用此功能", 0)
      ReSer = WRMPS.CheckStr(Request.Form("ReSer"),1)
	  RePrice = WRMPS.CheckStr(Request.Form("RePrice"),1)
	  All = WRMPS.CheckStr(Request.Form("All"),1)
	  Consume = WRMPS.CheckStr(Request.Form("Consume"),1)
	  If ReSer < 1 Or RePrice < 1 Or All < 1 Then Call WRMPS.ErrView("·操作错误<meta http-equiv=refresh content='1;URL="&WRMPS.GetCompanyUrl(ID)&"'>",0)
	  If Consume < 0 Then Call WRMPS.ErrView("·操作错误<meta http-equiv=refresh content='1;URL="&WRMPS.GetCompanyUrl(ID)&"'>",0)
	  Intro = WRMPS.CheckStr(Request.Form("Intro"),2)
	  If Len(Intro) > Int(UserFlag(13)) Then Call WRMPS.ErrView("·点评内容不能大于 "&Int(UserFlag(13))&" 字符<meta http-equiv=refresh content='1;URL="&WRMPS.GetCompanyUrl(ID)&"'>",0)
	  Product = WRMPS.CheckStr(Request.Form("Product"),0)
	  If Product = "" Then Product = Null
	  Product = WRMPS.GetReplace(Product,",",",")
	  Code = WRMPS.CheckStr(Request.Form("Code"),0)
	  If WRMPS.CheckCode("Re",1) Then
        If Code <> WRMPS.GetCookies("Code") Then Call WRMPS.ErrView("·您的验证码输入有误<meta http-equiv='refresh' content='1;URL="&WRMPS.GetCompanyUrl(ID)&"'>",0)
      End If
      ReSer = ReSer*20
	  RePrice = RePrice*20
	  All = All*20
	  Set Rs = Conn.Execute("Select WM_Company,WM_FiRstRE,WM_AreaID,WM_ClaimUser,WM_RZBL From WM_Company Where WM_ID="&ID&" and WM_Key = 1")
	  If Not Rs.Eof Then
	    If Rs(4) = 1 and Rs(3) = MemName Then Call WRMPS.ErrView("·您不能点评自己的店铺<meta http-equiv=refresh content='1;URL="&WRMPS.GetCompanyUrl(ID)&"'>",0)
		If Int(FlagCom(11)) > 0 Then Call WRDB.SaveConsume(0,MemName,0,Int(FlagCom(10)),Int(FlagCom(9)),0,"点评店铺“"&Rs(0)&"”成功")
	    Conn.Execute("Insert into WM_CompanyRevert(WM_ComID,WM_Company,WM_Consume,WM_Intro,WM_CommendProduct,WM_ReSer,WM_RePrice,WM_All,WM_ReUser,WM_Time,WM_Good,WM_Bad,WM_AreaID,WM_Key,WM_Commend)values("&ID&",'"&Rs(0)&"',"&Consume&",'"&Intro&"','"&Product&"',"&ReSer&","&RePrice&","&All&",'"&MemName&"',"&ConnTime&",0,0,"&Rs(2)&","&Int(FlagCom(11))&",0)")
		If Int(FlagCom(11)) > 0 Then
		  If Rs(1) = "" Or IsNUll(Rs(1)) Then FiRstRE = ",WM_FiRstRE='"&MemName&"'" Else FiRstRE = ""
		  Conn.Execute("Update WM_Company Set WM_Consume=WM_Consume+"&Consume&",WM_ReSer=WM_ReSer+"&ReSer&",WM_RePrice=WM_RePrice+"&RePrice&",WM_All=WM_All+"&All&",WM_Re=WM_Re+1,WM_LastRE='"&MemName&"'"&FiRstRE&" Where WM_ID="&ID&" and WM_Key = 1")
	      Conn.Execute("Update WM_Config Set WM_CompanyReNum = WM_CompanyReNum + 1")
	      Conn.Execute("Update WM_Member Set WM_CompanyReNum = WM_CompanyReNum + 1 Where WM_ID = "&MemID)
		End If
	  End If
	  Rs.CLose
	  If Product <> "" Then
	    Product = Split(Product,",")
		For i=0 To Ubound(Product)
		  If Product(i) <> "" Then
		    Rs.Open "Select WM_ProductName,WM_CommendNum,WM_ComID from WM_CompanyProduct where WM_ComID = " & ID & " and WM_ProductName='" & Product(i) & "'", Conn, 1, 3
            If Rs.Eof Then
			  Rs.AddNew
			  Rs(0) = Product(i)
			  Rs(1) = 1
			  Rs(2) = ID
			Else
			  Rs(1) = Rs(1) + 1
			End If
            Rs.Update
            Rs.Close
		  End If
		Next
	  End If
	  
	  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(1)) > 0 and Rso(0) <> "" and WR_Mail(5) <> "NO") Or Int(WR_Mail(17)) > 0 Then
            MailBody = WR_Mail(15)
	        MailBody = Replace(MailBody,"{$Title}",Rs(1))
	        MailBody = Replace(MailBody,"{$Url}",WRMPS.GetCompanyUrl(ID))
		    Subject = "您在"&WR_Setting(0)&"登记的店铺已经有人点评了!"
  	        If Int(WR_Company(1)) > 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(11)) > 0 Then
	    Call WRMPS.ErrView("·点评成功<meta http-equiv='refresh' content='1;URL="&WRMPS.GetCompanyUrl(ID)&"'>",1)
	  Else
	    Call WRMPS.ErrView("·点评成功,请等待管理员的审核<meta http-equiv='refresh' content='1;URL="&WRMPS.GetCompanyUrl(ID)&"'>",1)
	  End If
	  
    Case "POSTRE"
	  Call WRMPS.CheckSubmit()
      If Revert < 1 Or Int(FlagCom(12)) < 1 Then Call WRMPS.ErrView("·评论功能已经关闭",0)
	  FromUrl = WRMPS.CheckStr(Request.Form("FromUrl"),0)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -