📄 wm.company_edit.asp
字号:
<!--#include file="WM.Sys_Cook.asp"-->
<%
If CheckAdminFlag("ComEdit") = False Then Call WRMPS.ErrView("·您没有权限进行此操作",0)
Dim ID,N,i,CID,C_ID,ComID
Dim eSql
Dim rFlag,UserName
Dim TestCon,AreaIDName
Dim WM_CommendProduct,WM_Hit,WM_Re,WM_ReSer,WM_RePrice,WM_All,WM_Consume,WM_ThinkGo,WM_IsGo
Dim Company,Address,Phone,Mobile,Tags,Code,Coordinate,Fax,BusinessTime,IsCard,Depot,BusRoute,Marker,Web,Intro,ClassDir
ChannelID = 6
ID = WRMPS.CheckStr(Request("ID"), 0)
Page = WRMPS.CheckStr(Request("page"),1)
CID = WRMPS.CheckStr(Request("CID"), 1)
ComID = WRMPS.CheckStr(Request("ComID"), 1)
Key = WRMPS.CheckStr(Request("Key"), 1)
Call DBConnBegin()
Set Rs = Server.CreateObject("ADODB.RecordSet")
Select Case Request("Action")
Case "EditSave"
UserName = WRMPS.CheckStr(Request.form("UserName"),0)
If UserName = "" Or IsNUll(UserName) Then Call WRMPS.ErrView("·操作错误",0)
AreaID = WRMPS.CheckStr(Request.form("AreaID"),1)
ClassID = WRMPS.CheckStr(Request.form("ClassID"),1)
Company = WRMPS.CheckStr(Request.form("Company"),0)
If WRMPS.CheckStr(Request.form("Company1"),1) > 0 and (Company = "" Or IsNull(Company)) Then Call WRMPS.ErrView("·操作错误",0)
Address = WRMPS.CheckStr(Request.form("Address"),0)
If Address = "" Then Address = Null
Phone = WRMPS.CheckStr(Request.form("Phone"),0)
If Phone = "" Then Phone = Null
Mobile = WRMPS.CheckStr(Request.form("Mobile"),0)
If Mobile = "" Then Mobile = Null
Tags = WRMPS.CheckStr(Request.form("Tags"),0)
If Tags = "" Then Tags = Null
Coordinate = WRMPS.CheckStr(Request.form("Coordinate"),0)
If Coordinate = "" Then Coordinate = Null
Fax = WRMPS.CheckStr(Request.form("Fax"),0)
If Fax = "" Then Fax = Null
BusinessTime = WRMPS.CheckStr(Request.form("BusinessTime"),0)
If BusinessTime = "" Then BusinessTime = Null
IsCard = WRMPS.CheckStr(Request.form("IsCard"),0)
If IsCard = "" Then IsCard = Null
Depot = WRMPS.CheckStr(Request.form("Depot"),0)
If Depot = "" Then Depot = Null
BusRoute = WRMPS.CheckStr(Request.form("BusRoute"),0)
If BusRoute = "" Then BusRoute = Null
Marker = WRMPS.CheckStr(Request.form("Marker"),0)
If Marker = "" Then Marker = Null
Web = WRMPS.CheckStr(Request.form("Web"),0)
If Web = "" Then Web = Null
Intro = WRMPS.CheckStr(Request.form("Intro"),6)
If Len(Intro) > 1000 Then Intro = Left(Intro,998) & "..."
If Intro = "" Then Intro = Null
DB1 = WRMPS.CheckStr(Request("DB1"),0)
If DB1 = "" Then DB1 = Null
DB2 = WRMPS.CheckStr(Request("DB2"),0)
If DB2 = "" Then DB2 = Null
DB3 = WRMPS.CheckStr(Request("DB3"),0)
If DB3 = "" Then DB3 = Null
DB4 = WRMPS.CheckStr(Request("DB4"),0)
If DB4 = "" Then DB4 = Null
DB5 = WRMPS.CheckStr(Request("DB5"),0)
If DB5 = "" Then DB5 = Null
DB6 = WRMPS.CheckStr(Request("DB6"),0)
If DB6 = "" Then DB6 = Null
DB7 = WRMPS.CheckStr(Request("DB7"),0)
If DB7 = "" Then DB7 = Null
DB8 = WRMPS.CheckStr(Request("DB8"),0)
If DB8 = "" Then DB8 = Null
DB9 = WRMPS.CheckStr(Request("DB9"),0)
If DB9 = "" Then DB9 = Null
DB10 = WRMPS.CheckStr(Request("DB10"),0)
If DB10 = "" Then DB10 = Null
DB1T = WRMPS.CheckStr(Request("DB1T"),0)
If DB1T = "" Then DB1T = Null
DB2T = WRMPS.CheckStr(Request("DB2T"),0)
If DB2T = "" Then DB2T = Null
DB3T = WRMPS.CheckStr(Request("DB3T"),0)
If DB3T = "" Then DB3T = Null
DB4T = WRMPS.CheckStr(Request("DB4T"),0)
If DB4T = "" Then DB4T = Null
DB5T = WRMPS.CheckStr(Request("DB5T"),0)
If DB5T = "" Then DB5T = Null
DB6T = WRMPS.CheckStr(Request("DB6T"),0)
If DB6T = "" Then DB6T = Null
DB7T = WRMPS.CheckStr(Request("DB7T"),0)
If DB7T = "" Then DB7T = Null
DB8T = WRMPS.CheckStr(Request("DB8T"),0)
If DB8T = "" Then DB8T = Null
DB9T = WRMPS.CheckStr(Request("DB9T"),0)
If DB9T = "" Then DB9T = Null
DB10T = WRMPS.CheckStr(Request("DB10T"),0)
If DB10T = "" Then DB10T = Null
rFlag = WRDB.GetUserFlag(UserName)
Call WRDB.SaveConsume(0,UserName,0,Int(Split(Split(rFlag,"§")(1),"|")(18)),Int(Split(Split(rFlag,"§")(1),"|")(17)),0,"补充店铺“"&WM_Company&"”通过审核")
If ClassID <> "" Then
Rs.Open "Select WM_ParentDir,WM_Dir From WM_CompanySort Where WM_ID = "&ClassID,Conn,1,1
If Not Rs.Eof Then
ClassDir = Rs(0)&Rs(1)
End If
Rs.Close
End If
If WRMPS.CheckStr(Request.form("Intro1"),1) > 0 Then Conn.Execute("Update WM_Company Set WM_Intro = '"&Intro&"' Where WM_ID="&CID)
Rs.Open"Select WM_AreaID,WM_ClassID,WM_ClassDir,WM_Company,WM_Address,WM_Phone,WM_Mobile,WM_Tags,WM_Coordinate,WM_Fax,WM_BusinessTime,WM_IsCard,WM_Depot,WM_BusRoute,WM_Marker,WM_Web,WM_Intro,WM_DB1,WM_DB2,WM_DB3,WM_DB4,WM_DB5,WM_DB6,WM_DB7,WM_DB8,WM_DB9,WM_DB10,WM_DB1T,WM_DB2T,WM_DB3T,WM_DB4T,WM_DB5T,WM_DB6T,WM_DB7T,WM_DB8T,WM_DB9T,WM_DB10T From WM_Company Where WM_ID = "&CID&"",Conn,1,3
If Not Rs.Eof Then
If AreaID <> "" Then Rs(0) = AreaID
If ClassID <> "" Then Rs(1) = ClassID
If ClassDir <> "" Then Rs(2) = ClassDir
WM_Company = Rs(3)
If WRMPS.CheckStr(Request.form("Company1"),1) > 0 Then Rs(3) = Company
If WRMPS.CheckStr(Request.form("Address1"),1) > 0 Then Rs(4) = Address
If WRMPS.CheckStr(Request.form("Phone1"),1) > 0 Then Rs(5) = Phone
If WRMPS.CheckStr(Request.form("Mobile1"),1) > 0 Then Rs(6) = Mobile
If WRMPS.CheckStr(Request.form("Tags1"),1) > 0 Then Rs(7) = Tags
If WRMPS.CheckStr(Request.form("Coordinate1"),1) > 0 Then Rs(8) = Coordinate
If WRMPS.CheckStr(Request.form("Fax1"),1) > 0 Then Rs(9) = Fax
If WRMPS.CheckStr(Request.form("BusinessTime1"),1) > 0 Then Rs(10) = BusinessTime
If WRMPS.CheckStr(Request.form("IsCard1"),1) > 0 Then Rs(11) = IsCard
If WRMPS.CheckStr(Request.form("Depot1"),1) > 0 Then Rs(12) = Depot
If WRMPS.CheckStr(Request.form("BusRoute1"),1) > 0 Then Rs(13) = BusRoute
If WRMPS.CheckStr(Request.form("Marker1"),1) > 0 Then Rs(14) = Marker
If WRMPS.CheckStr(Request.form("Web1"),1) > 0 Then Rs(15) = Web
If WRMPS.CheckStr(Request.form("DB11"),1) > 0 Then Rs(17) = DB1:Rs(27) = DB1T
If WRMPS.CheckStr(Request.form("DB21"),1) > 0 Then Rs(18) = DB2:Rs(28) = DB2T
If WRMPS.CheckStr(Request.form("DB31"),1) > 0 Then Rs(19) = DB3:Rs(29) = DB3T
If WRMPS.CheckStr(Request.form("DB41"),1) > 0 Then Rs(20) = DB4:Rs(30) = DB4T
If WRMPS.CheckStr(Request.form("DB51"),1) > 0 Then Rs(21) = DB5:Rs(31) = DB5T
If WRMPS.CheckStr(Request.form("DB61"),1) > 0 Then Rs(22) = DB6:Rs(32) = DB6T
If WRMPS.CheckStr(Request.form("DB71"),1) > 0 Then Rs(23) = DB7:Rs(33) = DB7T
If WRMPS.CheckStr(Request.form("DB81"),1) > 0 Then Rs(24) = DB8:Rs(34) = DB8T
If WRMPS.CheckStr(Request.form("DB91"),1) > 0 Then Rs(25) = DB9:Rs(35) = DB9T
If WRMPS.CheckStr(Request.form("DB101"),1) > 0 Then Rs(26) = DB10:Rs(36) = DB10T
Rs.Update
End If
Rs.Close
If Company <> "" Then Conn.Execute("Update WM_CompanyRevert Set WM_Company='"&Company&"' Where WM_ComID="&CID)
If AreaID <> "" Then
Conn.Execute("Update WM_CompanyRevert Set WM_AreaID="&AreaID&" Where WM_ComID="&CID)
Conn.Execute("Update WM_Coupon Set WM_AreaID="&AreaID&" Where WM_ComID="&CID)
End If
Conn.Execute("Update WM_Company Set WM_EditNum = WM_EditNum - 1 Where WM_ID="&CID&" and WM_EditNum > 0")
Conn.Execute("Update WM_CompanyTemp Set WM_Key = 1 Where WM_ID="&ID&"")
If WRMPS.CheckStr(Request.form("Address1"),1) > 0 Then Address = Address Else Address = ""
If WRMPS.CheckStr(Request.form("Phone1"),1) > 0 Then Phone = Phone Else Phone = ""
If WRMPS.CheckStr(Request.form("Mobile1"),1) > 0 Then Mobile = Mobile Else Mobile = ""
If WRMPS.CheckStr(Request.form("Fax1"),1) > 0 Then Fax = Fax Else Fax = ""
Call WRMPS.CreTextToImg(CID,2,Fax,Phone,Mobile,AddRess)
Call WRMPS.ErrView("·店铺更新成功<meta http-equiv='refresh' content='1;URL=?ComID="&ComID&"&CID="&CID&"&Page="&Page&"&Key="&Key&"'>",1)
Case "Del"
ID = Replace(ID," ","")
If ID <> "" Then
ID = Split(ID, ",")
For i = 0 To UBound(ID)
If Int(Split(ID(i),"|")(0)) <> "" Then
Conn.Execute("Delete From WM_CompanyTemp where WM_ID="&Int(Split(ID(i),"|")(0)))
End If
If Int(Split(ID(i),"|")(1)) <> "" Then
Conn.Execute("Update WM_Company Set WM_EditNum = WM_EditNum - 1 Where WM_ID="&Int(Split(ID(i),"|")(1))&" and WM_EditNum > 0")
End If
Next
End If
Call WRMPS.ErrView("·删除成功<meta http-equiv='refresh' content='1;URL=?ComID="&ComID&"&CID="&CID&"&Page="&Page&"&Key="&Key&"'>",1)
Case "Edit"
Dim oAreaIDName,oClassName
SQL = "Select A.WM_AreaID,A.WM_ClassID,B.WM_AreaID,B.WM_ClassID,B.WM_Intro,A.WM_Intro,A.WM_ID,B.WM_Company,A.WM_Company,B.WM_Address,A.WM_Address,B.WM_Phone,A.WM_Phone,B.WM_Mobile,A.WM_Mobile,B.WM_Tags,A.WM_Tags,B.WM_Coordinate,A.WM_Coordinate,B.WM_Fax,A.WM_Fax,B.WM_BusinessTime,A.WM_BusinessTime,B.WM_IsCard,A.WM_IsCard,B.WM_Depot,A.WM_Depot,B.WM_BusRoute,A.WM_BusRoute,B.WM_Marker,A.WM_Marker,B.WM_Web,A.WM_Web,B.WM_DB1,B.WM_DB2,B.WM_DB3,B.WM_DB4,B.WM_DB5,B.WM_DB6,B.WM_DB7,B.WM_DB8,B.WM_DB9,B.WM_DB10,A.WM_DB1,A.WM_DB2,A.WM_DB3,A.WM_DB4,A.WM_DB5,A.WM_DB6,A.WM_DB7,A.WM_DB8,A.WM_DB9,A.WM_DB10,A.WM_DB1T,A.WM_DB2T,A.WM_DB3T,A.WM_DB4T,A.WM_DB5T,A.WM_DB6T,A.WM_DB7T,A.WM_DB8T,A.WM_DB9T,A.WM_DB10T,A.WM_CheckUser from WM_CompanyTemp A Inner Join WM_Company B on A.WM_ComID = B.WM_ID Where A.WM_ID = "&ID
Rs.Open SQL,Conn,1,1
If Not Rs.Eof Then
AreaIDName = WRDB.GetClassName("WM_Area",Rs(0))
ClassName = WRDB.GetClassName("WM_CompanySort",Rs(1))
oAreaIDName = WRDB.GetClassName("WM_Area",Rs(2))
oClassName = WRDB.GetClassName("WM_CompanySort",Rs(3))
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 Class=td1>" & vbCrLf
Content = Content & "<form action='?Action=EditSave&ComID="&ComID&"&Key="&Key&"' name=myform method=POST>" & vbCrLf
Content = Content & "<input type=hidden name=UserName value="&Rs(63)&">" & vbCrLf
Content = Content & "<input type=hidden name=Page value="&Page&">" & vbCrLf
Content = Content & "<input type=hidden name=ID value="&ID&">" & vbCrLf
Content = Content & "<input type=hidden name=CID value="&CID&">" & vbCrLf
Content = Content & "<tr Class=td4><td colspan=4><strong>店铺补充审核</strong></td></tr>" & vbCrLf
Content = Content & "<tr Class=td3 align=center><td width='20%'><strong>项目</strong></td><td width='35%'><strong>原始的数据</strong></td><td width='35%'><strong>补充后的数据</strong></td><td width='10%'><strong>确认更新</strong></td></tr>" & vbCrLf
If oClassName <> ClassName Then
Content = Content & "<tr Class=td2><td><strong>所属分类</strong></td>" & vbCrLf
Content = Content & "<td>"&oClassName&"</td><td>"&ClassName&"</td>" & vbCrLf
Content = Content & "<td align=center><input type=checkbox name=ClassID value='"&Rs(1)&"'></td></tr>" & vbCrLf
End If
If oAreaIDName <> AreaIDName Then
Content = Content & "<tr Class=td2><td><strong>所属地区</strong></td>" & vbCrLf
Content = Content & "<td>"&oAreaIDName&"</td><td>"&AreaIDName&"</td>" & vbCrLf
Content = Content & "<td align=center><input type=checkbox name=AreaID value='"&Rs(0)&"'></td></tr>" & vbCrLf
End If
Dim WM_Company
WM_Company = Rs(7)
Company = Rs(8)
If IsNull(Company) Then Company = ""
If IsNull(WM_Company) Then WM_Company = ""
If WM_Company <> Company Then
Content = Content & "<tr Class=td2><td><strong>店铺名称</strong></td>" & vbCrLf
Content = Content & "<td>"&Rs(7)&"</td><td>"&Rs(8)&"</td>" & vbCrLf
Content = Content & "<td align=center><input type=checkbox name=Company1 value=1><input type=hidden name=Company value='"&Rs(8)&"'></td></tr>" & vbCrLf
End If
Dim WM_Address
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -