📄 user_article.asp
字号:
<!--#include file="Cook.asp"-->
<%
If Int(FlagArticle(0)) < 1 Then Call WRMPS.ErrView("·您没有权限使用此功能", 0)
Dim i,N,ci
Dim WM_ID, sID, s_ID, Reh,SearchKey,sKey
Dim WM_ClassID, WM_TitlePrefixion, WM_Title, WM_TitleColor, WM_TitleFont, WM_TitleIntact, WM_TitleReview, WM_Keyword, WM_Author, WM_CopyFrom, WM_LinkUrl, WM_Synopsis, WM_Content, WM_DefaultPicUrl, WM_PageNext, WM_MaxCharPerPage, WM_Hot, WM_Commend, WM_Grade, WM_Hit, WM_AddTime, WM_Editor, WM_Passed, WM_IsDeleted, WM_DefaultShow, WM_KWord
Dim WM_ClassName, WM_TitleFontType, IDList,WM_ClassDir
Dim MaxCharPerPage,PageNext
Dim cMaxCharPerPage,cContentPage,cContent
Dim PrevDir,PrevID,PrevAddTime
Dim NextDir,NextID,NextAddTime
Dim WM_ChannelDir
ChannelID = WRMPS.CheckStr(Request("ChannelID"), 1)
If ChannelID = "" Then Call WRMPS.ErrView("·操作错误", 0)
WM_ID = WRMPS.CheckStr(Replace(Request("WM_ID"), " ", ""), 0)
sID = WRMPS.CheckStr(Request("sID"), 0)
SearchKey = WRMPS.CheckStr(Request("SearchKey"), 1)
Set Rs = server.createobject("adodb.recordset")
Set Rso = server.createobject("adodb.recordset")
Set Rst = server.createobject("adodb.recordset")
Select Case WRMPS.CheckStr(Request("Action"), 0)
Case "NewsSave"
WM_ClassID = WRMPS.CheckStr(Request.Form("WM_ClassID"), 1)
If WM_ClassID = "" Or WM_ClassID = 0 Then Call WRMPS.ErrView("·您选择文章分类", 0)
WM_TitlePrefixion = WRMPS.CheckStr(Request.Form("WM_TitlePrefixion"), 0)
If WM_TitlePrefixion = "" Then WM_TitlePrefixion = Null
WM_Title = WRMPS.CheckStr(Request.Form("WM_Title"), 0)
If WM_Title = "" Then Call WRMPS.ErrView("·您输入文章标题", 0)
WM_TitleColor = WRMPS.CheckStr(Request.Form("WM_TitleColor"), 0)
If WM_TitleColor = "" Then WM_TitleColor = Null
WM_TitleFont = 0
WM_TitleIntact = WRMPS.CheckStr(Request.Form("WM_TitleIntact"), 0)
If WM_TitleIntact = "" Then WM_TitleIntact = Null
WM_TitleReview = Request.Form("WM_TitleReview")
If WM_TitleReview = "" Then WM_TitleReview = 0
WM_TitleReview = WRMPS.CheckStr(WM_TitleReview, 1)
WM_Keyword = WRMPS.CheckStr(Request.Form("WM_Keyword"), 0)
If Left(WM_Keyword,1) = "," Then WM_Keyword = Right(WM_Keyword,Len(WM_Keyword)-1)
If Right(WM_Keyword,1) = "," Then WM_Keyword = Left(WM_Keyword,Len(WM_Keyword)-1)
WM_Author = WRMPS.CheckStr(Request.Form("WM_Author"), 0)
WM_CopyFrom = WRMPS.CheckStr(Request.Form("WM_CopyFrom"), 0)
If Request.Form("WM_UseLinkUrl") = 1 Then
WM_LinkUrl = WRMPS.CheckStr(Request.Form("WM_LinkUrl"), 0)
If WM_LinkUrl = "" Then Call WRMPS.ErrView("·你使用了文章转向功能,请填写转向地址", 0)
WM_Content = Null
WM_PageNext = Null
WM_MaxCharPerPage = Null
Else
For i = 1 To Request.Form("WM_Content").Count
WM_Content = WM_Content & Request.Form("WM_Content")(i)
Next
WM_Content = WRMPS.CheckStr(WM_Content, 4)
If WM_Content = "" Then Call WRMPS.ErrView("·请输入文章内容", 0)
WM_PageNext = WRMPS.CheckStr(Request.Form("WM_PageNext"), 1)
If WM_PageNext = "" Then WM_PageNext = 2
WM_MaxCharPerPage = Request.Form("WM_MaxCharPerPage")
If WM_MaxCharPerPage = "" Or IsNumeric(WM_MaxCharPerPage) = False Then WM_MaxCharPerPage = 5000
WM_LinkUrl = Null
End If
WM_Synopsis = WRMPS.CheckStr(Request.Form("WM_Synopsis"), 2)
If WM_Synopsis = "" Then WM_Synopsis = Null
WM_DefaultPicUrl = WRMPS.CheckStr(WRMPS.CheckStr(Request.Form("Pic"), 0), 4)
WM_DefaultShow = Request.Form("WM_DefaultShow")
If WM_DefaultShow = 1 And WM_DefaultPicUrl <> "" Then WM_DefaultShow = 1 Else WM_DefaultShow = 0
WM_DefaultShow = WRMPS.CheckStr(WM_DefaultShow, 1)
If WM_DefaultPicUrl = "" Then WM_DefaultPicUrl = Null
WM_Hot = Request.Form("WM_Hot")
If WM_Hot = "" Then WM_Hot = 0
WM_Hot = WRMPS.CheckStr(WM_Hot, 1)
WM_Commend = Request.Form("WM_Commend")
If WM_Commend = "" Then WM_Commend = 0
WM_Commend = WRMPS.CheckStr(WM_Commend, 1)
WM_Hit = Request.Form("WM_Hit")
If WM_Hit = "" Or IsNumeric(WM_Hit) = False Then WM_Hit = 0
WM_Hit = WRMPS.CheckStr(WM_Hit, 1)
WM_AddTime = Request.Form("WM_AddTime")
If IsDate(WM_AddTime) = False Or WM_AddTime = "" Then WM_AddTime = Now()
WM_Editor = MemName
WM_Passed = Int(FlagArticle(3))
WM_IsDeleted = 0
WRMPS.SCookies "A_Keyword",WM_Keyword,0
WRMPS.SCookies "A_Author",WM_Author,0
WRMPS.SCookies "A_CopyFrom",WM_CopyFrom,0
If WM_Keyword = "" Then WM_Keyword = Null
If WM_Author = "" Then WM_Author = "佚名"
If WM_CopyFrom = "" Then WM_CopyFrom = "本站原创"
If Int(FlagArticle(3)) > 1 Then Call WRDB.SaveConsume(0,MemName,0,Int(FlagArticle(2)),Int(FlagArticle(1)),0,"文章“"&WM_Title&"”发布成功")
Rs.Open "Select WM_ParentDir,WM_Dir,WM_ChannelDir From WM_ArticleSort Where WM_ID = " & WM_ClassID & " and WM_ChannelID = " & ChannelID & "", Conn, 1, 1
If Not Rs.EOF Then
WM_ClassDir = Rs(0) & Rs(1) & "/"
WM_ChannelDir = Rs(2)
End If
Rs.Close
Rs.Open "Select WM_ClassID,WM_TitlePrefixion,WM_Title,WM_TitleColor,WM_TitleFont,WM_TitleIntact,WM_TitleReview,WM_Keyword,WM_Author,WM_CopyFrom,WM_LinkUrl,WM_Content,WM_PageNext,WM_MaxCharPerPage,WM_Synopsis,WM_DefaultPicUrl,WM_DefaultShow,WM_Hot,WM_Commend,WM_Grade,WM_Hit,WM_Re,WM_AddTime,WM_Editor,WM_PostType,WM_Passed,WM_IsDeleted,WM_ClassDir,WM_ChannelID,WM_ChannelDir,WM_Charge,WM_RepeatCharge,WM_Collection from WM_Article Where WM_ID=1", Conn, 1, 3
Rs.AddNew
Rs(0) = WM_ClassID
Rs(1) = WM_TitlePrefixion
Rs(2) = WM_Title
Rs(3) = WM_TitleColor
Rs(4) = WM_TitleFont
Rs(5) = WM_TitleIntact
Rs(6) = WM_TitleReview
Rs(7) = WM_Keyword
Rs(8) = WM_Author
Rs(9) = WM_CopyFrom
Rs(10) = WM_LinkUrl
Rs(11) = WM_Content
Rs(12) = WM_PageNext
Rs(13) = WM_MaxCharPerPage
Rs(14) = WM_Synopsis
Rs(15) = WM_DefaultPicUrl
Rs(16) = WM_DefaultShow
Rs(17) = WM_Hot
Rs(18) = WM_Commend
Rs(19) = 3
Rs(20) = WM_Hit
Rs(21) = 0
Rs(22) = WM_AddTime
Rs(23) = WM_Editor
Rs(24) = 1
Rs(25) = WM_Passed
Rs(26) = WM_IsDeleted
Rs(27) = WM_ClassDir
Rs(28) = ChannelID
Rs(29) = WM_ChannelDir
Rs(30) = 0
Rs(31) = 0
Rs(32) = 0
Rs.Update
Rs.Close
If Int(FlagArticle(0)) > 0 Then
Set Rs = Conn.Execute("Select max(WM_ID) from WM_Article")
If Not Rs.EOF Then
ID = Rs(0)
End If
Rs.Close
Set Rs = NoThing
Set ClsCre = New Cls_Create
Call ClsCre.CreArticle("CRE",ID,Int(FlagArticle(0)))
Set ClsCre = Nothing
Conn.Execute("Update WM_Config Set WM_ArticleNum = WM_ArticleNum + 1")
Conn.Execute("Update WM_Member Set WM_ArticleNum = WM_ArticleNum + 1 Where WM_ID = "&MemID)
Call WRMPS.SCache("ArticleNum",WRMPS.GetCache("ArticleNum") + 1)
Call WRMPS.ErrView("·新增文章成功<meta http-equiv=refresh content='1;URL=User_Article.asp?ChannelID=" & ChannelID & "'>",1)
Else
Call WRMPS.ErrView("·新增文章成功,请等待管理员的审核<meta http-equiv=refresh content='1;URL=User_Article.asp?ChannelID=" & ChannelID & "'>",1)
End If
Case "EditSave"
WM_ClassID = WRMPS.CheckStr(Request.Form("WM_ClassID"), 1)
If WM_ClassID = "" Or WM_ClassID = 0 Then Call WRMPS.ErrView("·您选择文章分类", 0)
WM_TitlePrefixion = WRMPS.CheckStr(Request.Form("WM_TitlePrefixion"), 0)
If WM_TitlePrefixion = "" Then WM_TitlePrefixion = Null
WM_Title = WRMPS.CheckStr(Request.Form("WM_Title"), 0)
If WM_Title = "" Then Call WRMPS.ErrView("·您输入文章标题", 0)
WM_TitleColor = WRMPS.CheckStr(Request.Form("WM_TitleColor"), 0)
If WM_TitleColor = "" Then WM_TitleColor = Null
WM_TitleFont = 0
WM_TitleIntact = WRMPS.CheckStr(Request.Form("WM_TitleIntact"), 0)
If WM_TitleIntact = "" Then WM_TitleIntact = Null
WM_TitleReview = Request.Form("WM_TitleReview")
If WM_TitleReview = "" Then WM_TitleReview = 0
WM_TitleReview = WRMPS.CheckStr(WM_TitleReview, 1)
WM_Keyword = WRMPS.CheckStr(Request.Form("WM_Keyword"), 0)
If Left(WM_Keyword,1) = "," Then WM_Keyword = Right(WM_Keyword,Len(WM_Keyword)-1)
If Right(WM_Keyword,1) = "," Then WM_Keyword = Left(WM_Keyword,Len(WM_Keyword)-1)
WM_Author = WRMPS.CheckStr(Request.Form("WM_Author"), 0)
WM_CopyFrom = WRMPS.CheckStr(Request.Form("WM_CopyFrom"), 0)
If Request.Form("WM_UseLinkUrl") = 1 Then
WM_LinkUrl = WRMPS.CheckStr(Request.Form("WM_LinkUrl"), 0)
If WM_LinkUrl = "" Then Call WRMPS.ErrView("·你使用了文章转向功能,请填写转向地址", 0)
WM_Content = Null
WM_PageNext = Null
WM_MaxCharPerPage = Null
Else
For i = 1 To Request.Form("WM_Content").Count
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -