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

📄 wm.company_other.asp

📁 网人分类信息5.0商业版。非常优秀的分类信息系统。比较少见。
💻 ASP
字号:
<!--#include file="WM.Sys_Cook.asp"-->
<%
Select Case WRMPS.CheckStr(Request("Action"), 0)
  Case "DelAll","PhotoKey","PhotoPic","Photo"
    If CheckAdminFlag("ComPic") = False Then Call WRMPS.ErrView("·您没有权限进行此操作",0)
  Case Else
    If CheckAdminFlag("ComErr") = False Then Call WRMPS.ErrView("·您没有权限进行此操作",0)
End Select

Call WM_Content
Sub WM_Content()
  Dim Reh,i,ID,AID,aAid,rFlag,KeySql,SPicPath,UserName,WM_Company
  Dim Table,Word,Table1
  Table1 = WRMPS.CheckStr(Request("Table1"), 1)
  If Table1 = "" Then Table1 = 0
  Table = WRMPS.CheckStr(Request("Table"), 0)
  Word = WRMPS.CheckStr(Request("Word"), 0)
  AID = WRMPS.CheckStr(Request("AID"), 1)
  Key = WRMPS.CheckStr(Request("Key"), 1)
  If Key = "" Then Key = 1
  KeySql = " Where A.WM_Key="&Key
  Page = WRMPS.CheckStr(Request("page"),1)
  Call DBConnBegin()
  Set Rs=server.createobject("adodb.recordset")
  Select Case WRMPS.CheckStr(Request("Action"), 0)
    Case "DelAll"
      Reh = WRMPS.CheckStr(Request("Reh"), 0)
      Page = WRMPS.CheckStr(Request("Page"), 1)
      ID = WRMPS.CheckStr(Replace(Request("ID"), " ", ""), 0)
      If ID <> "" Then
          ID = Split(ID, ",")
          Call WRMPS.FsoBegin()
		  For i = 0 To UBound(ID)
		    Set Rs = Conn.Execute("Select WM_ComID,WM_Path,WM_Key,WM_Type From WM_CompanyPhoto where WM_ID=" & Int(ID(i)))
		    If Not Rs.Eof Then
              If Rs(2) > 0 and Rs(3) < 1 Then Conn.Execute ("Update WM_Company Set WM_PhotoNum = WM_PhotoNum-1 where WM_ID=" & Rs(0) & " and WM_PhotoNum > 0")
		      Call WRMPS.FsoDel("File",WRMPS.CheckStr(Rs(1),5))
              Conn.Execute ("Delete From WM_CompanyPhoto where WM_ID=" & ID(i) & "")
			End If
			Rs.Close
          Next
		  Call WRMPS.FsoEnd()
      End If
      Response.Redirect "?Action=Photo&Key="&Key&"&Page=" & Page & "&Table=" & Table & "&Word=" & Word&"&AID="&AID

    Case "PhotoKey"
      ID = WRMPS.CheckStr(Request("ID"), 1)
	  Set Rs = Conn.Execute("Select WM_Type,WM_Path,WM_ComID,WM_User From WM_CompanyPhoto where WM_ID=" & ID)
	  If Not Rs.Eof Then
        UserName = Rs(3)
	    rFlag = WRDB.GetUserFlag(UserName)
	    Call WRDB.SaveConsume(0,UserName,0,Int(Split(Split(rFlag,"§")(1),"|")(29)),Int(Split(Split(rFlag,"§")(1),"|")(28)),0,"店铺图片通过审核")
		SPicPath = Rs(1)
		SPicPath = WRMPS.CheckStr(Replace(SPicPath,split(SPicPath,"/")(UBound(split(SPicPath,"/"))),"S/"&split(SPicPath,"/")(UBound(split(SPicPath,"/")))),5)
        Call WRMPS.FsoBegin()
		If WRMPS.FsoIsTrue("File",SPicPath) = False Then SPicPath = Rs(1)
        Call WRMPS.FsoEnd()
        If Rs(0) < 1 Then
		  Conn.Execute("Update WM_Company Set WM_PhotoNum=WM_PhotoNum+1 Where WM_ID="&Rs(2)&"")
		  Conn.Execute("Update WM_Company Set WM_LastPhoto='"&SPicPath&"' Where WM_ID="&Rs(2)&" and (WM_LastPhoto Is Null or WM_LastPhoto = '')")
		End If
	    Conn.Execute ("Update WM_CompanyPhoto Set WM_Key = 1 where WM_ID=" & ID)
	  End If
	  Rs.CLose
	  Response.Redirect "?Action=Photo&Key="&Key&"&Page=" & Page & "&Table=" & Table & "&Word=" & Word&"&AID="&AID

    Case "PhotoPic"
      ID = WRMPS.CheckStr(Request("ID"), 1)
 	  Set Rs = Conn.Execute("Select WM_Type,WM_Path,WM_ComID From WM_CompanyPhoto where WM_ID=" & ID)
		If Not Rs.Eof Then
          If Rs(0) < 1 Then
		    SPicPath = WRMPS.CheckStr(Replace(Rs(1),split(Rs(1),"/")(UBound(split(Rs(1),"/"))),"S/"&split(Rs(1),"/")(UBound(split(Rs(1),"/")))),5)
            Call WRMPS.FsoBegin()
		    If WRMPS.FsoIsTrue("File",SPicPath) = False Then SPicPath = Rs(1)
            Call WRMPS.FsoEnd()
		    Conn.Execute("Update WM_Company Set WM_LastPhoto='"&SPicPath&"' Where WM_ID="&Rs(2))
		  End If
		End If
	  Rs.Close
	  Response.Redirect "?Action=Photo&Key="&Key&"&Page=" & Page & "&Table=" & Table & "&Word=" & Word&"&AID="&AID
	
    Case "Photo"
       Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1><tr class=td2>" & vbCrLf
	   Content = Content & "<form name=form1 method=get><td width='5%'>"
	   Content = Content & "<input type=hidden name=Action value=Photo><select name=Table1 align=absmiddle onChange='javascript:submit()'>"
       Content = Content & "<option value=-1 " & WRMPS.GetCheckVer(-1, Int(Table1), 0) & ">类型</option>"
       Content = Content & "<option value=0 " & WRMPS.GetCheckVer(0, Int(Table1), 0) & ">图片</option>"
	   Content = Content & "<option value=1 " & WRMPS.GetCheckVer(1, Int(Table1), 0) & ">视频</option>"
       Content = Content & "</select> "
       Content = Content & "</td></form>"
	   Content = Content & "<form name=form1 method=get><td width='5%'>"
	   Content = Content & "<input type=hidden name=Action value=Photo><select name=Key align=absmiddle onChange='javascript:submit()'>"
       Content = Content & "<option value=1 " & WRMPS.GetCheckVer(1, Int(Key), 0) & ">已审</option>"
       Content = Content & "<option value=0 " & WRMPS.GetCheckVer(0, Int(Key), 0) & ">待审</option>"
       Content = Content & "</select> "
       Content = Content & "</td></form>"
       Content = Content & "<form name=form1 method=post><td width='90%'>&nbsp;"
       Content = Content & "<input type=hidden name=Action value=Photo><input name='Word' type='text' style='width:180' maxlength='50' value='" & WRMPS.CheckStr(Word, 0) & "'> "
       Content = Content & "<select name=Table align=absmiddle>"
	   Content = Content & "<option value=WM_PhotoName " & WRMPS.GetCheckVer("WM_PhotoName", Table, 0) & ">图片名称</option>"
       Content = Content & "<option value=WM_User " & WRMPS.GetCheckVer("WM_User", Table, 0) & ">上传人</option>"
       Content = Content & "<option value=WM_ComID " & WRMPS.GetCheckVer("WM_ComID", Table, 0) & ">店铺ID</option>"
       Content = Content & "</select> <input type=submit name='Submit' value=' 查询 ' >"
       Content = Content & "</td></form>"
       Content = Content & "</tr></Table>" & vbCrLf

       Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
       Content = Content & "<form method='post' Action='?Action=DelAll&Key="&Key&"&AID="&AID&"&Table=" & Table & "&Word=" & Word&"'>" & vbCrLf
       Content = Content & "<tr Class=td4><td colspan='6'><b>图片管理</b></td></tr>" & vbCrLf
       Content = Content & "<tr Align=center Class=td3><td width='4%'></td>" & vbCrLf
       Content = Content & "<td width'10%'>上传人</td>" & vbCrLf
       Content = Content & "<td width=*>图片名称</td>" & vbCrLf
       Content = Content & "<td width='15%'>上传时间</td>" & vbCrLf
       Content = Content & "<td width='10%'>设置</td>" & vbCrLf
       Content = Content & "<td width='15%'>操作</td></tr>" & vbCrLf
	   
	   If AID <> "" Then aAid = " and A.WM_ComID="&AID Else aAid = ""
       SQL = KeySql&aAid
	   If Int(Table1) <> -1 Then
	     SQL = SQL & " and WM_Type = "&Table1
	   End If
       If Word <> "" Then
	     If Table <> "WM_PhotoName" Then
		   SQL = SQL & " and " & Table & " = '" & Word & "'"
		 Else
		   SQL = SQL & " and " & Table & " like'%"&Word&"%'"
		 End If
	   End If
       SQL = WRMPS.GetReplace(Ucase(SQL),"A.","")
	   If Left(SQL,6) = " WHERE" Then SQL = Right(SQL,len(SQL)-6)

       Set ClsPageList = New Cls_PageView  
       ClsPageList.strTableName = "WM_CompanyPhoto"  
       ClsPageList.strPageUrl = ""  
       ClsPageList.strFieldsList = "WM_ID,WM_PhotoName,WM_User,WM_Time,WM_ComID,WM_Path,WM_Type,WM_Key"  
       ClsPageList.strCondiction = SQL
       ClsPageList.strOrderList = "WM_ID desc"  
       ClsPageList.strPrimaryKey = "WM_ID"  
       ClsPageList.intPageSize = 20
       ClsPageList.intPageNow = Page
       ClsPageList.strCookiesName = "RecordCount"  
       ClsPageList.strPageVar = "Page"  
       ClsPageList.intRefresh = 1
	   ClsPageList.inAdmin = 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)  
         Content = Content & "<tr Class=td2 align='center'>" & vbCrLf
         Content = Content & "<td><input type='checkbox' name='ID' value=" & arrPage(0,i) & " style='border:0'></td>" & vbCrLf
         Content = Content & "<td>"
		 Content = Content & WRUser.DispUser(0,arrPage(2,i))
		 Content = Content & "</td>" & vbCrLf
         Content = Content & "<td align=left>"
         Content = Content & arrPage(1,i)
         Content = Content & "<br><a href='?Action=Photo&Key="&Key&"&AID="&arrPage(4,i)&"' Class=Gray>查看此店铺所有图片</a>|<a href="&WRMPS.GetCompanyUrl(arrPage(4,i))&" class=Gray target=_blank>查看此店铺</a></td>" & vbCrLf
         Content = Content & "<td>" & arrPage(3,i) & "</td><td>" & vbCrLf
		 If arrPage(7,i) = 1 and arrPage(6,i) = 0 Then Content = Content & "<a href=?Action=PhotoPic&Key="&Key&"&AID="&AID&"&ID=" & arrPage(0,i) & "&Page=" & Page & "&Table=" & Table & "&Word=" & Word&">设为店铺图片</a>"
         Content = Content & "</td><td>" & vbCrLf
		 If arrPage(7,i) = 0 Then Content = Content & "<a href=?Action=PhotoKey&Key="&Key&"&AID="&AID&"&ID=" & arrPage(0,i) & "&Page=" & Page & "&Table=" & Table & "&Word=" & Word&">审核</a> | "
		 Content = Content & "<a href='"&WRMPS.CheckStr(arrPage(5,i),5)&"' target=_blank>查看</a>"
		 Content = Content & " | <a href=?Action=DelAll&Key="&Key&"&AID="&AID&"&ID=" & arrPage(0,i) & "&Page=" & Page & "&Table=" & Table & "&Word=" & Word&" onclick=""return confirm('确定删除?');"">删除</a></td>" & vbCrLf
		 Next  
       End If  
       Content = Content & "<tr class=td3><td colspan=3><input name='chkall' type='checkbox' id='chkall' value='select' onclick=""CheckAll(this.form)"" style='border:0'>全选 <input name='Page' type='hidden' value='" & Page & "'><input type=submit name='submit' value='批量删除' ></td><td align=right colspan=3>" & strPageList & "</td></tr></form>" & vbCrLf
       Content = Content & "</table>" & vbCrLf

    Case "DelErr"
      Reh = WRMPS.CheckStr(Request("Reh"), 0)
      Page = WRMPS.CheckStr(Request("Page"), 1)
      ID = WRMPS.CheckStr(Replace(Request("ID"), " ", ""), 0)
      If ID <> "" Then
          ID = Split(ID, ",")
          Call WRMPS.FsoBegin()
		  For i = 0 To UBound(ID)
            Conn.Execute ("Delete From WM_CompanyFeedback where WM_ID=" & ID(i) & "")
          Next
		  Call WRMPS.FsoEnd()
      End If
      Response.Redirect "?Action=Err&Key="&Key&"&Page=" & Page & "&AID="&AID

    Case "ErrKey"
      ID = WRMPS.CheckStr(Request("ID"), 1)
	  Conn.Execute ("Update WM_CompanyFeedback Set WM_Key = 1 where WM_ID=" & ID)
	  Response.Redirect "?Action=Err&Key="&Key&"&Page=" & Page & "&AID="&AID

    Case "Err"
       Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
       Content = Content & "<form method='post' Action='?Action=DelErr&Key="&Key&"&AID="&AID&"'>" & vbCrLf
       Content = Content & "<tr Class=td4><td colspan='6'><b>纠错管理</b></td></tr>" & vbCrLf
       Content = Content & "<tr Align=center Class=td3><td width='4%'></td>" & vbCrLf
       Content = Content & "<td width'10%'>提交人</td>" & vbCrLf
       Content = Content & "<td width=*>错误类型</td>" & vbCrLf
       Content = Content & "<td width='18%'>提交人邮箱</td>" & vbCrLf
       Content = Content & "<td width='15%'>时间</td>" & vbCrLf
       Content = Content & "<td width='12%'>操作</td></tr>" & vbCrLf
	   If AID <> "" Then aAid = " and A.WM_ComID="&AID Else aAid = ""
	   Rs.Open "Select A.WM_ID,A.WM_Err,A.WM_Content,A.WM_Email,A.WM_Time,A.WM_ComID,A.WM_User,A.WM_Key,B.WM_Company From WM_CompanyFeedback A Inner Join WM_Company B on A.WM_ComID = B.WM_ID" & KeySql & aAid & " Order by A.WM_ID Desc", Conn, 1, 1
       If Rs.EOF Then
         Content = Content & "<tr class=td2><td align=center colspan=6>没有内容</td></tr></table>" & vbCrLf
       Else
         ListNum = 16
         '分页的实现
         Rs.PageSize = ListNum
         Page = WRMPS.CheckStr(Request("Page"), 1)
         If Page = "" Or Page < 1 Then Page = 1
         Rs.AbsolutePage = Page
         i = 0
         Do While Not Rs.EOF And i < ListNum
         Content = Content & "<tr Class=td2 align='center'>" & vbCrLf
         Content = Content & "<td><input type='checkbox' name='ID' value=" & Rs(0) & " style='border:0'></td>" & vbCrLf
         Content = Content & "<td>"& WRUser.DispUser(0,Rs(6))& "</td>" & vbCrLf
         Content = Content & "<td align=left>"&Rs(1)&"<br><a href='?Action=Err&Key="&Key&"&AID="&Rs(5)&"' Class=Gray>查看此店铺所有纠错</a>|<a href="&WRMPS.GetCompanyUrl(Rs(5))&" class=Gray target=_blank>"&WRMPS.GotTopic(Rs(8),40,1)&"</a></td>" & vbCrLf
         Content = Content & "<td><a onClick=""openWithIframe('在线发信','../SendMail.asp?Email="&rs(3)&"',550,320);"" style='cursor:pointer'>" & Rs(3) & "</a></td><td>"& Rs(4)& "</td>" & vbCrLf
         Content = Content & "<td>" & vbCrLf
         Content = Content & "<a href=# onclick='javascript:if(Show"&Rs(0)&".style.display==""none""){Show"&Rs(0)&".style.display=""""}else{Show"&Rs(0)&".style.display=""none""}'>查看</a> "
         If Rs(7) = 0 Then Content = Content & "<a href=?Action=ErrKey&Key="&Key&"&AID="&AID&"&ID=" & Rs(0) & "&Page=" & Page & ">处理</a> "
		 Content = Content & "<a href=?Action=DelErr&Key="&Key&"&AID="&AID&"&ID=" & Rs(0) & "&Page=" & Page & " onclick=""return confirm('确定删除?');"">删除</a></td></tr>" & vbCrLf
         Content = Content & "<tr Class=td1 style='display:none' id=Show"&Rs(0)&"><td colspan=6>" & Rs(2) & "</td></tr>" & vbCrLf
         Rs.MoveNext
         i = i + 1
         Loop
         URLParameter = "Action=Err&Key="&Key
         Content = Content & "<tr class=td3><td colspan=4><input name='chkall' type='checkbox' id='chkall' value='select' onclick=""CheckAll(this.form)"" style='border:0'>全选 <input name='Page' type='hidden' value='" & Page & "'><input type=submit name='submit' value='批量删除' ></td><td align=right colspan=2>" & GetAdminPageList(URLParameter, ListNum, Rs.RecordCount, Page) & "&nbsp;</td></tr></form>" & vbCrLf
         Content = Content & "</table>" & vbCrLf
       End If
  End Select
  
  Set Rs = Nothing
  Call ClassEnd()
  Call DBConnEnd()
  Response.Write Content
  Call GetBottom()

End Sub


%>

⌨️ 快捷键说明

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