⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_art.asp

📁 本系统是一套开源WEB的网站管理系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="admin_conn.asp"-->
<!--#include file="../include/admin_setting.asp"-->
<!--#include file="admin_function.asp"-->
<%
'==============================================================
'程序名称:茂盛网站管理系统(Maoin CSM)
'当前版本:Maosin CMS Version 1.1   Powered by maosin.com
'程序作者:阿茂(李胜茂)
'网站地址:www.maosin.com   www.maosin.net
'      QQ:57861417  
'电子邮箱:maosin@163.com  maosin@maosin.com
'--------------------------------------------------------------
'Copyright (C) 2006 maosin.com All Rights Reserved.
'免费版本请在程序首页保留(Powered by:Maosin CMS)版权链接信息;
'您可以对此版本进行修改,美化,但请保留此ASP文件内的版权信息;
'茂盛设计网保留此软件的法律追究权利
'==============================================================
Call admin_top()
Call navMenu()
dim catname:catname="文章"
Select Case LCase(Request.QueryString("action"))
	Case LCase("maosin_adminClassList")
		if getPopedom("artClassAdmin")=false then
			popedomMsg
		else
			Call adminClass("ms_art_cat","ms_art_class","catName","catID")
		end if
	Case LCase("maosin_appchildclass")
		if getPopedom("artClassAdmin")=false then
			popedomMsg
		else
			Call addChildClass("ms_art_cat","ms_art_class","catName","catID")
		end if	 	
	Case LCase("maosin_mdfChild")
		if getPopedom("artClassAdmin")=false then
			popedomMsg
		else
			Call modifyChildClass("ms_art_cat","ms_art_class","catName","catID")
		end if	 
	Case LCase("maosin_delchild")
		if getPopedom("artClassAdmin")=false then
			popedomMsg
		else
			Call deleteChild("ms_art_class","ms_art")
		end if	 
	Case LCase("maosin_appbigclass")
		if getPopedom("artClassAdmin")=false then
			popedomMsg
		else
			Call addBigClass("ms_art_cat","catName")
		end if	 
	Case LCase("maosin_mdfbigclass")
		if getPopedom("artClassAdmin")=false then
			popedomMsg
		else
			Call modifyBigclass("ms_art_cat","catName","catID")
		end if	 
	Case LCase("maosin_delbigclass")
		if getPopedom("artClassAdmin")=false then
			popedomMsg
		else
			Call deleteBigClass("ms_art_cat","ms_art","catID")
		end if	 
	Case LCase("maosin_appbigclass")
		Call addBigClass()
	Case LCase("maosin_apparticle")
		Call addarticle()
	Case LCase("maosin_editarticle")
		Call editArticle()
	Case LCase("maosin_delarticle")
		Call deleteArticle()
	Case LCase("maosin_saveArticle")
		Call saveArticle()
	Case LCase("allpl")
		if getPopedom("artPlAdmin")=false then
			popedomMsg
		else
			url="admin_art.asp?action=allpl&"
			Call adminpl("ms_art_pl",true)
		end if	 
	Case LCase("adminpl")
		if getPopedom("artPlAdmin")=false then
			popedomMsg
		else
			url="admin_art.asp?action=adminpl&"
			Call adminpl("ms_art_pl",false)
		end if	 
	Case LCase("maosin_delpl")
		if getPopedom("artPlAdmin")=false then
			popedomMsg
		else
			Call deletepl("ms_art_pl")
		end if
	Case LCase("accessories")
		if getPopedom("artFileAdmin")=false then
			popedomMsg
		else
			Call accessories("../upfile/article/")
		end if
	Case Lcase("delfile")
		if getPopedom("artFileAdmin")=false then
			popedomMsg
		else
			Call deletefile("../upfile/article/")
		end if
	Case Else
		Call adminArticleList()
End Select
Call admin_foot()
Sub navMenu()%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="text table_border mainTable">
  <tr><td colspan="2" class="td_titleT">文章管理</td></tr>
  <tr><td width="95" height="30" class="td_bgcolor">管理快捷导航:</td><td class="td_bgcolor">
  <a href="admin_art.asp?action=maosin_adminclasslist">分类管理</a>&nbsp;|&nbsp;
  <a href="admin_art.asp?action=maosin_appbigclass">添加分类</a>&nbsp;|&nbsp;
  <a href="admin_art.asp">文章管理</a>&nbsp;|&nbsp;
  <a href="admin_art.asp?action=maosin_apparticle">添加文章</a>&nbsp;|&nbsp;
  <a href="admin_art.asp?action=allpl">评论管理</a>&nbsp;|&nbsp;
  <a href="admin_art.asp?action=accessories">文章附件管理</a>
  </td></tr>
</table>
<%table(5)%>
<%End Sub
Sub adminArticleList()
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="searchNav">
<form cation="?action=adminArticlelist" name="seform" method="post">
  <tr><td class="Navtitle text">
  &nbsp;关键字:<input type="text" name="keyword">&nbsp;&nbsp;
  <select name="seMode">
  	<option value="title">按文章标题</option>
	<option value="content">按文章内容</option>
  </select>
  <input type="submit" name="search" value="搜索文章">
   &nbsp;&nbsp;跳转到
  <select name="class" onChange='window.location=this.options[this.selectedIndex].value'>
  <option value="">****选择分类****</option>
  <option value="admin_art.asp" style="font-weight:bold;">查看全部文章</option>
  <option value="admin_art.asp?pass=true" style="color:#ff0000;">已通过审核文章</option>
  <option value="admin_art.asp?pass=false" style="color:#ff0000;">没通过审核文章</option>
	<%sql="select * from ms_art_cat"
		 Set rs1=Server.CreateObject("ADODB.RecordSet")
		 rs1.Open sql,connstr,1,1
		 If Not rs1.Bof And Not rs1.Eof Then
		 Do While Not rs1.Eof
			 sql="select * from ms_art_class where catID="&rs1("catID")
			 Set rs2=Server.CreateObject("ADODB.RecordSet")
			 rs2.Open sql,connstr,1,1
			 If Not rs2.Eof And Not rs2.Bof Then%>
			 		<option value="?catID=<%=rs1("catID")%>">----<%=rs1("catName")%>----</option>
				<%Do While Not rs2.Eof%>
					<option value="?catID=<%=rs1("catID")%>&classID=<%=rs2("classID")%>"><%=rs2("class")%></option>
					<%rs2.MoveNext
				Loop
			 	rs2.close
				Set rs2=Nothing
			 Else%>
					<option>请添加子分类</option>
					<%rs2.close
				Set rs2=Nothing
			 End If
		rs1.MoveNext
		Loop
		rs1.close
		Set rs1=Nothing
		Else%>
		<option>----请添加大分类----</option>
		<%rs1.close
		Set rs1=Nothing
		End If%>
  </select>
  </td></tr>
</form>
</table>
<%table(5)
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="text table_border mainTable">
  <tr valign="middle">
<%
dim pass
pass=Request("pass")
if Request("keyword")<>"" then
	keyword=Request.form("keyword")
end if
if Request("seMode")<>"" then
	seMode="art_"&Request("seMode")
end if
if Request("catID")<>"" then
	catID=Request("catID")
end if
if Request("classID")<>"" then
	classID=Request("classID")
end if
if (keyword<>"") and (seMode<>"") then
	sql="select * from ms_art,ms_art_class where ms_art.classID=ms_art_class.classID and "&seMode&" like '%"&keyword&"%'"&" order by id desc"
	url="?seMode="&seMode&"&keyword="&keyword&"&"
elseif (catID<>"") and (classID="") then
	sql="select * from ms_art,ms_art_class where ms_art.classID=ms_art_class.classID and ms_art_class.catID="&catID&" order by id desc"
	url="?catID="&catID&"&"
elseif (catID<>"") and (classID<>"") then
	sql="select * from ms_art,ms_art_class where ms_art.classID=ms_art_class.classID and ms_art_class.catID="&catID&" and ms_art_class.classID="&classID&" order by id desc"
	url="?catID="&catID&"&classID="&classID&"&"
elseif pass="true" then
	sql="select * from ms_art,ms_art_class where ms_art.classID=ms_art_class.classID and pass=true order by id desc"
	url="admin_art.asp?pass=true&"
elseif pass="false" then
	sql="select * from ms_art,ms_art_class where ms_art.classID=ms_art_class.classID and pass=false order by id desc"
	url="admin_art.asp?pass=false&"
else
	sql="select * from ms_art,ms_art_class where ms_art.classID=ms_art_class.classID order by id desc"
	url="admin_art.asp?"
end if
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,connstr,1,1
%>
  <td height="32" colspan="4" class="td_titleT">文章管理 | 共有<font color="#ff0000"><%=rs.RecordCount%></font>条文章</td>
  </tr><tr class="td_topT">
    <td width="40" height="24" align="center" valign="middle">ID</td>
    <td width="620" align="center" valign="middle">文章标题</td>
    <td width="120" align="center" valign="middle">操作</td>
  </tr>
<%
if not rs.bof and not rs.eof then
nextpage=pagetitle(rs,20,url,"篇文章")
lineNo=1
Do While Not rs.Eof And lineNo<=rs.pagesize%>
  <tr class="td_bgcolor"  onmouseover="mouseOver(this)" onmouseout="mouseOut(this)">
    <td height="25" align="center" valign="middle"><%=rs("id")%></td>
	<td valign="middle"><font color="#3399ff">[<%=rs("class")%>]</font> <a href="../showart.asp?id=<%=rs("id")%>" target="_blank" title="点击查看&#10;发布:<%=rs("art_authors")%>&#10;点击:<%=rs("art_clicks")%>&#10;发布时间:<%=rs("art_date")%>"><font color="<%=rs("titlecolor")%>"><%=rs("art_title")%></font></a> <%if rs("art_good")=true then:response.Write("[<font color=""#ff0000"">推荐</font>]"):else:end if:if cint(rs("picart"))=1 then:response.write("<img src=""images/tuwen.gif"" align=""absmiddle"" title=""图文"">"):end if%></td>
    <td align="center" valign="middle">
	<a href="?action=maosin_editarticle&id=<%=rs("id")%>">编辑</a> 
	<a href="#" onClick="javascript:{if(confirm('您确定要删除此项目吗?')){window.location.href='?action=maosin_delarticle&id=<%=rs("id")%>';}return false;}">删除</a> 
	<a href="?action=adminpl&id=<%=rs("id")%>&title=<%=rs("art_title")%>">评论(<font color="#ff0000"><%=conn.execute("select count(*) from ms_art_pl where id="&rs("id"))(0)%></font>)</a></td></tr>
<%
  lineNo=lineNo+1
  rs.MoveNext
Loop%>
<tr><td colspan="5" class="td_titleB">
<%response.write(nextpage)%>
</td></tr>
<%else%>
<tr><td align="center" valign="middle" class="td_bgcolor" height="40" colspan="5">当前没有文章</td></tr>
<%end if%>
</table>
<%rs.close
set rs=nothing
End Sub
Sub saveArticle()
dim operate,id,title,titlecolor,authors,from,imgurl,artclass,keyword,content,showpage,popedom,jifen,money,isgood,istop,allowpl,picart,pass,sendOutPoint,postMember
operate=lcase(request.querystring("operate"))
if operate="maosin_mdf" then

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -