📄 batchsetnewskeywords.asp
字号:
<% Option Explicit %>
<!--#include file="../../../Inc/NosqlHack.asp" -->
<!--#include file="../../../Inc/Const.asp" -->
<!--#include file="../../../Inc/Cls_DB.asp" -->
<!--#include file="../../../Inc/Function.asp" -->
<!--#include file="../Refresh/Function.asp" -->
<!--#include file="../Refresh/RefreshFunction.asp" -->
<!--#include file="../Refresh/Cls_Refresh.asp" -->
<%
Dim DBC,Conn,sRootDir
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
if SysRootDir<>"" then sRootDir="/"+SysRootDir else sRootDir="" end if
%>
<!--#include file="../../../Inc/Session.asp" -->
<!--#include file="../../../Inc/CheckPopedom.asp" -->
<%
'判断权限
if Not JudgePopedomTF(Session("Name"),"P010500") then Call ReturnError1()
'判断权限结束
Dim NewsIDStr,NewsKeywordStr,RstempObj,tempSQL,OldKeyWords,i,NewKeyWords
If Request("Action") = "Submit" then
NewsIDStr = Request("NewsIDStr")
if NewsIDStr <> "" then
NewsIDStr = Replace(NewsIDStr,"***","','")
NewsKeywordStr = Request.Form("KeywordText")
'先读取出原来设置的关键字
tempSql = "Select newsID,KeyWords from fs_News where newsID in ('" & NewsIDStr & "') and PicNewsTF=0"
Set RstempObj = Server.CreateObject(G_FS_RS)
RstempObj.Open tempSql,Conn,1,1
For i = 1 to RstempObj.RecordCount
If RstempObj.Eof then Exit For
OldKeyWords=RstempObj("KeyWords")
If OldKeyWords <> "" And (Not IsNull(OldKeyWords)) Then
NewKeyWords = OldKeyWords&","&NewsKeywordStr
Else
NewKeyWords = NewsKeywordStr
End If
Conn.Execute("Update FS_News set KeyWords='"&NewKeyWords&"' where NewsID = '" & RstempObj("NewsID") & "' " )
RstempObj.MoveNext
Next
RsTempObj.Close
Set RsTempObj = Nothing
end If
'自动生成新闻页面start
'因为修改关键字不需要生成页面,所以屏蔽以下代码,如果需要生成,请去掉注释符
'Dim RsRefreshObj,RefreshNewsNum
'Set RsRefreshObj = Conn.Execute("Select * from FS_News where NewsID in ('" & NewsIDStr & "')")
'do while Not RsRefreshObj.Eof
'RefreshNews RsRefreshObj
'RefreshNewsNum = RefreshNewsNum + 1
'RsRefreshObj.MoveNext
'Loop
'Set RsRefreshObj = Nothing
'自动生成新闻页面start
Set Conn = Nothing
Response.Write("<script>window.close();</script>")
Response.End
End if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>批量修改新关键字</title>
</head>
<link href="../../../CSS/ModeWindow.css" rel="stylesheet">
<script language="JavaScript" src="../../SysJS/PublicJS.js"></script>
<body topmargin="0" leftmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form name="NewsForm" action="" method="post">
<tr>
<td height="26" colspan=2><div align="center"><strong>批量修改新关键字</strong>
<input type="hidden" name="NewsIDStr" value="<% = Request("NewsIDStr") %>">
<input type="hidden" name="Action" value="Submit"></td>
</tr>
<tr>
<td height="30" align=center width=20%>新闻关键字</td>
<td width=80%>
<input name="KeywordText" id="KeywordText" type="text" style="width:62%" value="">
<input type="hidden" name="KeyWords" value="">
<select name="SelKeyWords" style="width:25%" onChange=Dokesite(this.options[this.selectedIndex].value)>
<option value="" selected> </option>
<option value="Clean" style="color:red">清空</option>
<%
Dim KeyWordsObj
set KeyWordsObj = Conn.Execute("select * from FS_Routine where Type=1 order by ID desc")
while not KeyWordsObj.eof
%>
<option value="<%=KeyWordsObj("Name")%>"><%=KeyWordsObj("Name")%></option>
<%
KeyWordsObj.Movenext
Wend
KeyWordsObj.Close
Set KeyWordsObj = Nothing
%>
</select>
</td>
</tr>
<tr>
<td height="46" colspan="2">
<div align="center">
<input name="Submitfgsfd" type="submit" id="Submitfgsfd" value=" 确 定 ">
<input name="Submit2fasd" type="button" id="Submit2fasd" onClick="window.close();" value=" 取 消 ">
</div></td>
</tr>
</form>
</table>
</body>
</html>
<%
Set Conn = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -