📄 wm.sys_tag.asp
字号:
<!--#include file="WM.Sys_Cook.asp"-->
<%
If CheckAdminFlag("Tags") = False Then Call WRMPS.ErrView("·您没有权限进行此操作",0)
Call WM_Content
Sub WM_Content()
Dim i,n,ID,ModType,TagName,Commend,Through,Key,Hit
ModType = WRMPS.CheckStr(Request("Type"), 1)
Page = WRMPS.CheckStr(Request("Page"), 1)
Select Case ModType
Case 1
TagName = "文章"
Case 2
TagName = "信息"
Case 3
TagName = "店铺"
Case 3
TagName = "优惠券"
End Select
Call DBConnBegin()
Set Rs = server.createobject("adodb.recordset")
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
Content = Content & "<tr class=td2><td><a href=WM.Sys_Tag.asp>所有关键词</a> | <a href=?Type=1>文章模块</a> | <a href=?Type=2>分类信息</a> | <a href=?Type=3>店铺模块</a> | <a href=?Type=4>优惠券模块</a></td></tr>" & vbCrLf
Content = Content & "</table>" & vbCrLf
Select Case WRMPS.CheckStr(Request("Action"), 0)
Case "DelAll"
If ModType <> "" Then SQL = " Where WM_Type="&ModType Else SQL = ""
Conn.Execute ("Delete from WM_Search"&SQL)
Call WRMPS.ErrView("·"&TagName&"关键词清空成功<meta http-equiv=refresh content='1;URL=?Type="&ModType&"'>", 0)
Case "Del"
ID = WRMPS.CheckStr(Request("WM_ID"), 1)
Conn.Execute ("delete from WM_Search where WM_ID=" & ID & "")
Call WRMPS.ErrView("·"&TagName&"删除成功<meta http-equiv=refresh content='1;URL=?Type="&ModType&"&Page=" & Page & "'>", 0)
Case "Commend"
Commend = WRMPS.CheckStr(Request("Commend"), 1)
If Commend = 0 Then Commend = 1 Else Commend = 0
ID = WRMPS.CheckStr(Request("WM_ID"), 1)
Conn.Execute ("Update WM_Search Set WM_Commend="&Commend&" where WM_ID=" & ID & "")
Call WRMPS.ErrView("·设置成功<meta http-equiv=refresh content='1;URL=?Type="&ModType&"&Page=" & Page & "'>", 0)
Case "Through"
Through = WRMPS.CheckStr(Request("Through"), 1)
If Through = 0 Then Through = 1 Else Through = 0
ID = WRMPS.CheckStr(Request("WM_ID"), 1)
Conn.Execute ("Update WM_Search Set WM_Through="&Through&" where WM_ID=" & ID & "")
Call WRMPS.ErrView("·设置成功<meta http-equiv=refresh content='1;URL=?Type="&ModType&"&Page=" & Page & "'>", 0)
Case "Save"
ID = WRMPS.CheckStr(Request("ID"), 0)
ID = Replace(ID," ","")
If ID <> "" Then
ID = Split(ID,",")
For i=0 To UBound(ID)
Select Case Request("Work")
Case "Key"
Conn.Execute ("Update WM_Search Set WM_Through=1 where WM_ID=" & Int(ID(i))& "")
Case "NoKey"
Conn.Execute ("Update WM_Search Set WM_Through=0 where WM_ID=" & Int(ID(i))& "")
Case "Tui"
Conn.Execute ("Update WM_Search Set WM_Commend=1 where WM_ID=" & Int(ID(i))& "")
Case "NoTui"
Conn.Execute ("Update WM_Search Set WM_Commend=0 where WM_ID=" & Int(ID(i))& "")
Case "Del"
Conn.Execute ("Delete from WM_Search where WM_ID=" & Int(ID(i)) & "")
Case "Save"
Key = ""
Key = WRMPS.CheckStr(Request("edit"&Int(ID(i))), 0)
Hit = WRMPS.CheckStr(Request("N"&Int(ID(i))), 1)
If Hit = "" Then Hit = 1
If Key <> "" Then Conn.Execute ("Update WM_Search Set WM_Key='"&Key&"',WM_Hit="&Hit&" where WM_ID=" & Int(ID(i))& "")
End Select
Next
End If
Call WRMPS.ErrView("·批量操作成功<meta http-equiv=refresh content='1;URL=?Type="&ModType&"&Page=" & Page & "'>", 0)
Case Else
If ModType <> "" Then SQL = "WM_Type="&ModType Else SQL = ""
Set ClsPageList = New Cls_PageView
ClsPageList.strTableName = "WM_Search"
ClsPageList.strPageUrl = ""
ClsPageList.strFieldsList = "WM_ID,WM_Key,WM_Hit,WM_LastTime,WM_Commend,WM_Through"
ClsPageList.strCondiction = SQL
ClsPageList.strOrderList = "WM_LastTime desc"
ClsPageList.strPrimaryKey = "WM_ID"
ClsPageList.intPageSize = 40
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
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
Content = Content & "<form action='?Action=Save&Page="&Page&"&Type="&ModType&"' name=myform method=POST>" & vbCrLf
Content = Content & "<tr class=td4 align=center>"
Content = Content & "<td width='4%'></td><td width='13%'>关键词</td><td width='5%'>使用</td><td width='15%'>最后查询</td><td width='13%'>操作</td>"
Content = Content & "<td width='4%'></td><td width='13%'>关键词</td><td width='5%'>使用</td><td width='15%'>最后查询</td><td width='13%'>操作</td>"
Content = Content & "</tr>" & vbCrLf
Content = Content & "<tr class=td2 align=center>" & vbCrLf
If IsArray(arrPage) Then
For i = 0 to UBound(arrPage, 2)
n=i+1
Content = Content & "<td><input type=checkbox name=ID value="&arrPage(0,i)&"></td>"
Content = Content & "<td><span id=edit"&arrPage(0,i)&">" & arrPage(1,i) & "</span></td>"
Content = Content & "<td align=center><span id=N"&arrPage(0,i)&">" & arrPage(2,i) & "</span></td>"
Content = Content & "<td align=center>" & arrPage(3,i) & "</td>"
Content = Content & "<td align=center>"
Content = Content & "<a href=# onclick='TagEdit(""edit"&arrPage(0,i)&""",""N"&arrPage(0,i)&""");'>修改</a>"
Content = Content & " <a href='?Action=Through&WM_ID=" & arrPage(0,i) & "&Through=" & arrPage(5,i) & "&Page=" & Page & "&Type="&ModType&"'>"
If arrPage(5,i) = 0 Then Content = Content & "<span class=Font2>未审</span>" Else Content = Content & "审核"
Content = Content & "</a> <a href='?Action=Commend&WM_ID=" & arrPage(0,i) & "&Commend=" & arrPage(4,i) & "&Page=" & Page & "&Type="&ModType&"'>"
If arrPage(4,i) = 1 Then Content = Content & "<span class=Font2>推荐</span>" Else Content = Content & "推荐"
Content = Content & "</a> <a href='?Action=Del&WM_ID=" & arrPage(0,i) & "&Page=" & Page & "&Type="&ModType&"' onclick=""return confirm('确定删除?');"">删除</a></td>"
If n Mod 2 = 0 And n Mod 40 <> 0 Then Content = Content & "</tr>" & vbCrLf & "<tr class=td2 align=center>" & vbCrLf
Next
End If
Content = Content & "</tr>" & vbCrLf
Content = Content & "</table>" & vbCrLf
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1><tr class=td4><td width='40%'>"
Content = Content & "<input name='chkall' type='checkbox' id='chkall' value='select' onclick=""CheckAll(this.form)"" style='border:0'>全选 <select name='Work'>"
Content = Content & "<option value='Save'>批量保存</option>"
Content = Content & "<option value='Key'>审核</option><option value='NoKey'>取消审核</option>"
Content = Content & "<option value='Tui'>推荐</option><option value='NoTui'>取消推荐</option>"
Content = Content & "<option value='Del'>删除</option></select>"
Content = Content & "<input type=submit name='submit' value='批量操作' onclick=""Loading.style.display='';Loading.style.bottom=100;"">"
Content = Content & "</td><td width='20%' align=center><div class=Page style='width:110px;text-align:center'><a href=?Action=DelAll&Type="&ModType&"><strong>清空所有"&TagName&"关键词</strong></a></div></td>" & vbCrLf
Content = Content & "<td align=right width='40%'>"&strPageList&"</td></tr></Form>"
Content = Content & "<tr><td class=td2 colspan=3><strong> 注:</strong>所有关键词必须审核后才会在前台显示</td></tr>" & vbCrLf
Content = Content & "</table>"
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 + -