📄 user_article.asp
字号:
Content = Content & "><td><strong>内容分页方式</strong><br><font class=font3>手动分页符标记为<br><font class=Font2>[NextPage]</font><br>注意大小写</font></td>" & vbCrLf
Content = Content & "<td><select name='WM_PageNext'><option value='0'" & WRMPS.GetCheckVer(0, Rs("WM_PageNext"), 0) & ">不分页</option><option value='1'" & WRMPS.GetCheckVer(1, Rs("WM_PageNext"), 0) & ">自动分页</option><option value='2'" & WRMPS.GetCheckVer(2, Rs("WM_PageNext"), 0) & ">手动分页</option></select><br>" & vbCrLf
Content = Content & "自动分页时的每页大约字符数(包含HTML标记):<input name='WM_MaxCharPerPage' type='text' id='Url' style='width:50px' maxlength='5' value='" & Rs("WM_MaxCharPerPage") & "'></td></tr>" & vbCrLf
Content = Content & "<tr class=td3><td></td><td><input type='submit' name=btnSubmit value=' 提 交 ' onclick=""Loading.style.display='';""></td></tr>" & vbCrLf
Content = Content & "</form></table><script>document.myform.WM_Title.focus()</script>" & vbCrLf
End If
Rs.Close
Content = Content & PageButtom()
Case "Del"
Page = WRMPS.CheckStr(Request("Page"), 1)
ID = WRMPS.CheckStr(Request("ClassID"), 1)
Reh = WRMPS.CheckStr(Request("Reh"), 0)
WM_ID = Replace(WM_ID, " ", "")
If WM_ID <> "" Then
WM_ID = Split(WM_ID, ",")
For i = 0 To UBound(WM_ID)
Set Rs = Conn.Execute("Select WM_Editor From WM_Article Where WM_ID = " & Int(WM_ID(i)) & " and WM_PostType = 1 and WM_Editor='"&MemName&"'")
If Not Rs.Eof Then
Set ClsCre = New Cls_Create
Call ClsCre.CreArticle("DEL",WM_ID(i),1)
Set ClsCre = Nothing
Conn.Execute ("delete from WM_Article where WM_ID=" & WM_ID(i) & " and WM_Editor='"&MemName&"'")
Conn.Execute ("delete from WM_ArticleRevert where WM_ParentID=" & WM_ID(i) & "")
Conn.Execute ("Update WM_Config Set WM_ArticleNum = WM_ArticleNum - 1 Where WM_ArticleNum > 0")
Conn.Execute ("Update WM_Member Set WM_ArticleNum = WM_ArticleNum - 1 Where WM_ID = "&MemID&" and WM_ArticleNum > 0")
Call WRMPS.SCache("ArticleNum",WRMPS.GetCache("ArticleNum") - 1)
End If
Rs.Close
Next
End If
If Reh <> "" Then
Call WRMPS.ErrView("·文章删除成功<meta http-equiv=refresh content='1;URL=?Action=" & Reh & "&ChannelID=" & ChannelID & "&SearchKey="&SearchKey&"&ClassID=" & ID & "&Page=" & Page & "&sID=" & sID & "'>",1)
Else
Call WRMPS.ErrView("·文章删除成功<meta http-equiv=refresh content='1;URL=?ChannelID=" & ChannelID & "&SearchKey="&SearchKey&"&ClassID=" & ID & "&Page=" & Page & "&sID=" & sID & "'>",1)
End If
Case Else
ID = WRMPS.CheckStr(Request("ClassID"), 1)
Page = WRMPS.CheckStr(Request("Page"), 1)
If sID <> "" Then
sID = Replace(Replace(sID, " ", ""), " ", "")
Select Case Split(sID,",")(1)
Case 1
If IsNumeric(Split(sID,",")(0)) Then
s_ID = " and A.WM_ID =" & Split(sID,",")(0)
Else
Call WRMPS.ErrView("·搜索出错:ID必须为数字",0)
End If
Case 2
s_ID = " and A.WM_Title like'%" & Split(sID,",")(0) &"%'"
End Select
sID = Split(sID,",")(0)
Else
s_ID = ""
End If
Content = Content & PageTop()
Content = Content & UserPath(",<a href=User_Article.asp?ChannelID=" & ChannelID & ">文章管理</a>")
Content = Content & "<table width='100%' cellpadding=0 cellspacing=1 class=td1><tr class=td2>" & vbCrLf
Content = Content & "<form name='form1' action='?ClassID=" & WRMPS.CheckStr(Request("ClassID"), 1) & "&ChannelID=" & ChannelID & "&WM_ID=" & WM_ID & "' method='post'><td width='13%'>" & vbCrLf
Content = Content & "<select name=SearchKey onChange='javascript:submit()'>" & vbCrLf
Content = Content & "<option value=0"&WRMPS.GetCheckVer(0,Int(SearchKey),0)&">==类型==</option>" & vbCrLf
Content = Content & "<option value=1"&WRMPS.GetCheckVer(1,Int(SearchKey),0)&">已审核且推荐</option>" & vbCrLf
Content = Content & "<option value=2"&WRMPS.GetCheckVer(2,Int(SearchKey),0)&">已审核且热门</option>" & vbCrLf
Content = Content & "<option value=3"&WRMPS.GetCheckVer(3,Int(SearchKey),0)&">所有已审核</option>" & vbCrLf
Content = Content & "<option value=4"&WRMPS.GetCheckVer(4,Int(SearchKey),0)&">待审核</option>" & vbCrLf
Content = Content & "</select></td></form>" & vbCrLf
Content = Content & "<form name='from1' method='post' Action='?ClassID=" & WRMPS.CheckStr(Request("ClassID"), 1) & "&ChannelID=" & ChannelID & "&WM_ID=" & WM_ID & "&SearchKey="&SearchKey&"'>" & vbCrLf
Content = Content & "<td width='87%'><input type='text' size=20 name=sID value='" & sID & "'><select name=sID><option value=1>按ID</option><option value=2>按标题</option></select> <input type='submit' name='submit' value='查找'></td>" & vbCrLf
Content = Content & "</form>" & vbCrLf
Content = Content & "</tr></table>" & vbCrLf
Content = Content & "<table width='100%' cellpadding=0 cellspacing=1 class=td1>" & vbCrLf
Content = Content & "<tr><td colspan=8 class=td4>文章管理</td></tr>" & vbCrLf
Content = Content & "<form name='from1' method='post' Action='?ClassID=" & ID & "&ChannelID=" & ChannelID & "&Page=" & Page & "&sID=" & sID & "'>" & vbCrLf
Content = Content & "<tr class=td3 align=center>" & vbCrLf
Content = Content & "<td width='3%'></td>" & vbCrLf
Content = Content & "<td width='4%'>ID</td>" & vbCrLf
Content = Content & "<td width=*>文章标题</td>" & vbCrLf
Content = Content & "<td width='4%'>点击</td>" & vbCrLf
Content = Content & "<td width='4%'>回复</td>" & vbCrLf
Content = Content & "<td width='4%'>审核</td>" & vbCrLf
Content = Content & "<td width='13%'>文章属性</td>" & vbCrLf
Content = Content & "<td width='10%'>操作</td>" & vbCrLf
Content = Content & "</tr>" & vbCrLf
Select Case SearchKey
Case 1
sKey = " and A.WM_Passed=1 and A.WM_Commend=1"
Case 2
sKey = " and A.WM_Passed=1 and A.WM_Hot=1"
Case 3
sKey = " and A.WM_Passed=1"
Case 4
sKey = " and A.WM_Passed=0"
Case Else
sKey = ""
End Select
If ID <> "" Then ClassID = " And A.WM_ClassID = " & ID Else ClassID = ""
Rs.Open "Select A.WM_TitleFont,A.WM_ID,A.WM_TitlePrefixion,A.WM_AddTime,A.WM_ChannelDir,A.WM_ClassDir,A.WM_ChannelID,A.WM_TitleColor,A.WM_Title,A.WM_PostType,A.WM_Editor,A.WM_Hit,A.WM_LinkUrl,A.WM_TitleReview,A.WM_DefaultPicUrl,A.WM_Hot,A.WM_Commend,B.WM_Name,A.WM_ClassID,A.WM_Re,A.WM_Passed from WM_Article A Inner Join WM_ArticleSort B on A.WM_ClassID = B.WM_ID Where A.WM_PostType=1 and A.WM_IsDeleted=0 and A.WM_ChannelID = " & ChannelID & ClassID & s_ID & sKey & " and A.WM_Editor='"&MemName&"' Order By A.WM_ID Desc", Conn, 1, 1
If Rs.EOF Then
Content = Content & "<tr class=td2><td align=center colspan=8>没有内容</td></tr></table>" & vbCrLf
Else
'分页的实现
ListNum = 18
Rs.PageSize = ListNum
If Page = "" Then Page = 1
If Page < 1 Then Page = 1
Rs.AbsolutePage = Page
i = 0
If Page = "" Then N = 0 Else N = ListNum * (Page - 1)
Do While Not Rs.EOF And i < ListNum
N = N + 1
WM_ClassName = "<font Class=Font3>[<a href=?ClassID=" & Rs(18) & "&ChannelID=" & ChannelID & "&SearchKey="&SearchKey&" Class=Gray>" & Rs(17) & "</a>]</font>"
If Rs(0) = 1 Then
WM_TitleFont = "<b>"
WM_TitleFontType = "</b>"
ElseIf Rs(0) = 2 Then
WM_TitleFont = "<i>"
WM_TitleFontType = "</i>"
ElseIf Rs(0) = 3 Then
WM_TitleFont = "<i><b>"
WM_TitleFontType = "</b></i>"
Else
WM_TitleFont = ""
WM_TitleFontType = ""
End If
Content = Content & "<tr class=td2 align=center>" & vbCrLf
Content = Content & "<td><input type='checkbox' name='WM_ID' value=" & Rs(1) & " style='border:0'></td>" & vbCrLf
Content = Content & "<td>" & Rs(1) & "</td>" & vbCrLf
Content = Content & "<td align=left>" & WM_ClassName & "<font Class=Font3>" & Rs(2) & "</font> <a href="&WRMPS.GetShowUrl(1,1,0,Rs(1),Rs(3),Rs(4)&Rs(5),Rs(6))&" target=_blank><font color=" & Rs(7) & ">" & WM_TitleFont & Rs(8) & WM_TitleFontType & "</font></a></td>" & vbCrLf
Content = Content & "<td>" & Rs(11) & "</td>" & vbCrLf
Content = Content & "<td><a href=User_ArticleRe.asp?ChannelID="&ChannelID&"&AID="&Rs(1)&">" & Rs(19) & "</a></td>" & vbCrLf
Content = Content & "<td>"
If rs(20)=1 then Content = Content & "√" else Content = Content & "<b><font color=#FF0000>×</font></b>"
Content = Content & "</td>" & vbCrLf
Content = Content & "<td>"
If Rs(12) <> "" Then Content = Content & "转" Else Content = Content & " "
If Rs(13) > 0 Then Content = Content & " 评" Else Content = Content & " "
If Rs(14) <> "" Then Content = Content & " 图" Else Content = Content & " "
If Rs(15) > 0 Then Content = Content & " 热" Else Content = Content & " "
If Rs(16) > 0 Then Content = Content & " 荐" Else Content = Content & " "
Content = Content & "</td>" & vbCrLf
Content = Content & "<td>"
Content = Content & "<a href=?Action=Edit&ChannelID=" & ChannelID & "&SearchKey="&SearchKey&"&WM_ID=" & Rs(1) & "&ClassID=" & ID & "&Page=" & Page & ">修改</a> <a href=?Action=Del&ChannelID=" & ChannelID & "&SearchKey="&SearchKey&"&WM_ID=" & Rs(1) & "&ClassID=" & ID & "&Page=" & Page & " onclick=""return confirm('确定删除?');Loading.style.display='';"">删除</a>"
Content = Content & "</td></tr>" & vbCrLf
Rs.MoveNext
i = i + 1
Loop
Content = Content & "</table>" & vbCrLf
Content = Content & "<table width='100%' cellpadding=0 cellspacing=1 class=td1><tr><td>" & vbCrLf
Content = Content & "<table width='100%' cellpadding=0 cellspacing=0 class=td5><tr><td height=30>" & vbCrLf
Content = Content & "<input name='chkall' type='checkbox' id='chkall' value='select' onclick=""CheckAll(this.form)"" style='border:0'>全选 <input type=hidden name=Action value=Del>" & vbCrLf
Content = Content & " <input type='submit' name='submit' value='删除' onclick=""Loading.style.display='';""> "
Content = Content & "</td>" & vbCrLf
Content = Content & "<td align=right>" & vbCrLf
URLParameter = "ClassID=" & ID & "&ChannelID=" & ChannelID & "&sID=" & sID&"&SearchKey="&SearchKey
Content = Content & WRMPS.GetPageList(URLParameter, ListNum, Rs.RecordCount, Page) ' 插入分页
Content = Content & "</td></tr></table></td></tr>" & vbCrLf
Content = Content & "<tr><td class=td2><strong> 文章属性中各项的含义:</strong><br>"
Content = Content & " 转--此文章为转向连接<br>"
Content = Content & " 评--在文章列表处显示评论字样<br>"
Content = Content & " 图--首页图片文章<br>"
Content = Content & " 热--热门文章<br>"
Content = Content & " 荐--推荐文章<br>"
Content = Content & "</td></tr>" & vbCrLf
Content = Content & "</form></table>" & vbCrLf
End If
Rs.Close
Content = Content & PageButtom()
End Select
Set Rs = Nothing
Set Rso = Nothing
Set Rst = Nothing
Call DBConnEnd()
Response.Write Content
Call WRMPS.Loading("")
Call ClassEnd()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -