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

📄 admin_columnbath.asp

📁 改进及新特性: 1、调整模版编辑时的流程及提示语言 2、新增sitemaps生成功能 3、优化评论页面的显示格式 BUG修正: 1、getarticlelist标签对于现有参数提示错误
💻 ASP
字号:
<!--#Include File="../conn.asp" -->
<!--#Include File="comm/inc.asp" -->
<%
'====================================================================
'= Team Elite - Elite Article System
'= Copyright (c) 2005 Eason Chan All Rights Reserved.
'=-------------------------------------------------------------------
'= 文件名称:/Manager/Admin_ColumnBath.asp
'= 摘    要:后台-文章批量管理文件
'=-------------------------------------------------------------------
'= 最后更新:eason007
'= 最后日期:2005-07-24
'====================================================================

Call EA_Manager.Chk_IsMaster

Call EA_Manager.Admin_Nav

If Not EA_Manager.Chk_Power(Admin_Power,"13") Then 
	ErrMsg=str_Comm_NotAccess
	Call EA_Manager.Error(1)
End If

Dim Atcion
Atcion=Request.QueryString ("atcion")

Select Case LCase(Atcion)
Case "move"
	Call Move
Case "bathmove"
	Call BathMove
Case "delall"
	Call del
Case "bathdel"
	Call BathDel
End Select
Call EA_Pub.Close_Obj
Set EA_Pub=Nothing
	
Sub Move
Dim Level,Temp,i
%>
<table width="100%"  cellpadding="0" cellspacing="0" align="center" class=TableBorder>
	<tr height="22" valign="middle"> 
		<td width="50%" class=forumRow align="left">&nbsp;<B><a href="javascript:switch_helpcontent()" title="<%=str_Comm_HelpAlt%>"><%=str_OperationNotice%></a></B></td>
		<td width="50%" class=forumRow align="right">·<a href=# onclick=history.go(-1)><b><%=str_Comm_Back%></b></a>&nbsp;<a href=# onclick=history.go(1)><b><%=str_Comm_Next%></b></a>·&nbsp;</td>
	</tr>
	<tr style="display:none" id="info_content">
		<td colspan="2" bgcolor="ffffff" height="25">
			<table width="99%" align=center>
				<tr>
					<td><%=str_Bath_Move_Help%></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<br>
<script src="../js/jsdate.js"></script>
<table width="95%" cellpadding="1" cellspacing="1" align="center" style="border: 1 solid #808080">
<form action="?atcion=bathmove" method=post id=form1 name=form1>
	<tr height=22>
		<th><%=str_Bath_BathMove%></th>
	</tr>
	<tr valign="middle"> 
		<td height="22" bgcolor="ffffff" align="left">&nbsp;<%=str_Bath_From%>&nbsp;<select name=sour>
        <%
        Temp=EA_DBO.Get_Column_List()
        If IsArray(Temp) Then 
			For i=0 To UBound(Temp,2)
				Level=(Len(Temp(2,i))/4-1)*2
				Response.Write "<option value="""&Temp(0,i)&""">"
				If Len(Temp(2,i))>4 Then Response.Write "├"
				Response.Write String(Level,"-")
				Response.Write Temp(1,i)&"</option>"
			Next
		End If
		%>
        </select>&nbsp;<%=str_Bath_To%>&nbsp;<select name=dest>
        <%
		Temp=EA_DBO.Get_Column_List()
        If IsArray(Temp) Then 
			For i=0 To UBound(Temp,2)
				Level=(Len(Temp(2,i))/4-1)*2
				Response.Write "<option value="""&Temp(0,i)&""">"
				If Len(Temp(2,i))>4 Then Response.Write "├"
				Response.Write String(Level,"-")
				Response.Write Temp(1,i)&"</option>"
			Next
		End If
		%></select></td>
    </tr>
    <tr height=22>
		<td bgcolor="ffffff">&nbsp;&nbsp;<%=str_Bath_Condition%>:<input type="radio" name="where" value="0" checked>&nbsp;<%=str_Bath_All%><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="radio" name="where" value="1">&nbsp;<%=str_Bath_ByDate%>:<input type="text" name="date" size="10" readonly>&nbsp;<a href="#SelectDate" onclick="SD(this,'document.all.date')"><img border="0" src="images/date_picker.gif" width="30" height="19"></a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="radio" name="where" value="2">&nbsp;<%=str_Bath_ByKeyword%>:<input type="text" name="keyword">&nbsp;&nbsp;<%=str_Bath_In%>:<select name=field><option value=0><%=str_Content_Title%></option><option value=1><%=str_Content_Keyword%></option><option value=2><%=str_Content_Author%></option><option value=3><%=str_Content_Summary%></option><option value=4><%=str_Content_Source%></option><option value=5><%=str_Content_Content%></option></select></td>
	</tr>
	<tr height=22>
		<td bgcolor="efefef">&nbsp;&nbsp;<input type="submit" name="Submit" value="<%=str_Comm_Submit_Button%>"></td>
	</tr>
</form>
</table>
<%Set Rs=Nothing
End Sub

Sub Del
Dim Level,Temp,i
%>
<table width="100%"  cellpadding="0" cellspacing="0" align="center" class=TableBorder>
	<tr height="22" valign="middle"> 
		<td width="50%" class=forumRow align="left">&nbsp;<B><a href="javascript:switch_helpcontent()" title="<%=str_Comm_HelpAlt%>"><%=str_OperationNotice%></a></B></td>
		<td width="50%" class=forumRow align="right">·<a href=# onclick=history.go(-1)><b><%=str_Comm_Back%></b></a>&nbsp;<a href=# onclick=history.go(1)><b><%=str_Comm_Next%></b></a>·&nbsp;</td>
	</tr>
	<tr style="display:none" id="info_content">
		<td colspan="2" bgcolor="ffffff" height="25">
			<table width="99%" align=center>
				<tr>
					<td><%=str_Bath_Del_Help%></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<br>
<script src="../js/jsdate.js"></script>
<table width="95%" cellpadding="1" cellspacing="1" align="center" style="border: 1 solid #808080">
<form action="?atcion=bathdel" method=post id=form1 name=form1>
	<tr height=22>
		<th><%=str_Bath_BathDel%></th>
	</tr>
	<tr valign="middle"> 
		<td height="22" bgcolor="ffffff" align="left">&nbsp;&nbsp;<%=str_Bath_DestColumn%>:<select name=sour>
        <%
		Temp=EA_DBO.Get_Column_List()
        If IsArray(Temp) Then 
			For i=0 To UBound(Temp,2)
				Level=(Len(Temp(2,i))/4-1)*2
				Response.Write "<option value="""&Temp(0,i)&""">"
				If Len(Temp(2,i))>4 Then Response.Write "├"
				Response.Write String(Level,"-")
				Response.Write Temp(1,i)&"</option>"
			Next
		End If
		%>
        </select></td>
    </tr>
    <tr height=22 bgcolor="ffffff">
		<td>&nbsp;&nbsp;<%=str_Bath_Condition%>:<input type="radio" name="where" value="0" checked>&nbsp;<%=str_Bath_All%><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="radio" name="where" value="1">&nbsp;<%=str_Bath_ByDate%>:<input type="text" name="date" size="10" readonly>&nbsp;<a href="#SelectDate" onclick="SD(this,'document.all.date')"><img border="0" src="images/date_picker.gif" width="30" height="19"></a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="radio" name="where" value="2">&nbsp;<%=str_Bath_ByKeyword%>:<input type="text" name="keyword">&nbsp;&nbsp;<%=str_Bath_In%>:<select name=field><option value=0><%=str_Content_Title%></option><option value=1><%=str_Content_Keyword%></option><option value=2><%=str_Content_Author%></option><option value=3><%=str_Content_Summary%></option><option value=4><%=str_Content_Source%></option><option value=5><%=str_Content_Content%></option></select></td>
	</tr>
    <tr height=22 bgcolor="ffffff">
		<td>&nbsp;&nbsp;<%=str_Bath_Option%>:<input type="radio" name="back" value="0" checked>&nbsp;<%=str_Bath_RecycleBin%><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="radio" name="back" value="1">&nbsp;<%=str_Bath_NoRecycleBin%></td>
	</tr>
	<tr height=22 bgcolor="efefef">
		<td>&nbsp;&nbsp;<input type="submit" name="Submit" value="<%=str_Comm_Submit_Button%>"></td>
	</tr>
</form>
</table>
<%
End Sub

Sub BathMove
	Call EA_Pub.Chk_Post
	
	Dim Where,Sour,Dest,Count
	Dim DestColumn_Name,DestColumn_Code
	Dim Temp
	
	Count=0
	Where=EA_Pub.SafeRequest(2,"where",0,-1,0)
	Sour=EA_Pub.SafeRequest(2,"sour",0,0,0)
	Dest=EA_Pub.SafeRequest(2,"dest",0,0,0)
	
	If Sour<>0 And Dest<>0 Then
		Temp=EA_DBO.Get_Column_Info(Dest)
		If IsArray(Temp) Then 
			DestColumn_Name=Temp(0,0)
			DestColumn_Code=Temp(1,0)
			
			Select Case Where
			Case 0
				Sql="Select Count([Id]) From [NB_Content] Where ColumnId="&Sour
				Count=Conn.Execute(SQL)(0)
					
				Sql="UpDate [NB_Column] Set CountNum=0 Where [Id]="&Sour
				Conn.Execute(SQL)
				
				Sql="UpDate [NB_Column] Set CountNum=CountNum+"&Count&" Where [Id]="&Dest
				Conn.Execute(SQL)
				
				Sql="UpDate [NB_Content] Set ColumnId="&Dest&",ColumnName='"&DestColumn_Name&"',ColumnCode='"&DestColumn_Code&"' Where ColumnId="&Sour
				Conn.Execute(SQL)
			Case 1
				Dim Time
				Time=EA_Pub.SafeRequest(2,"date",2,"1900",0)
				
				Sql="Select Count([Id]) From [NB_Content] Where DateDiff('d',AddDate,'"&Time&"')=0 And ColumnId="&Sour
				Count=Conn.Execute(SQL)(0)
				
				Sql="UpDate [NB_Column] Set CountNum=CountNum-"&Count&" Where [Id]="&Sour
				Conn.Execute(SQL)
				
				Sql="UpDate [NB_Column] Set CountNum=CountNum+"&Count&" Where [Id]="&Dest
				Conn.Execute(SQL)
				
				Sql="UpDate [NB_Content] Set ColumnId="&Dest&",ColumnName='"&DestColumn_Name&"',ColumnCode='"&DestColumn_Code&"' Where DateDiff('d',AddDate,'"&Time&"')=0 And ColumnId="&Sour
				Conn.Execute(SQL)
			Case 2
				Dim KeyWord,Field,WSQL
				KeyWord=EA_Pub.SafeRequest(2,"keyword",1,"",0)
				Field=EA_Pub.SafeRequest(2,"field",0,-1,0)
				
				If Field<>-1 Then
					Select Case Field
					Case 0
						WSQL=" Where ColumnId="&Sour&" And InStr(1,Title,'"&KeyWord&"')>0"
					Case 1
						WSQL=" Where ColumnId="&Sour&" And InStr(1,Keyword,'"&KeyWord&"')>0"
					Case 2
						WSQL=" Where ColumnId="&Sour&" And InStr(1,Author,'"&KeyWord&"')>0"
					Case 3
						WSQL=" Where ColumnId="&Sour&" And InStr(1,Summary,'"&KeyWord&"')>0"
					Case 4
						WSQL=" Where ColumnId="&Sour&" And InStr(1,Source,'"&KeyWord&"')>0"
					Case 5
						WSQL=" Where ColumnId="&Sour&" And InStr(1,Content,'"&KeyWord&"')>0"
					End Select
				
					Sql="Select Count([Id]) From [NB_Content]"&WSQL
					'Response.Write sql
					Count=Conn.Execute(SQL)(0)
					
					Sql="UpDate [NB_Column] Set CountNum=CountNum-"&Count&" Where [Id]="&Sour
					Conn.Execute(SQL)
				
					Sql="UpDate [NB_Column] Set CountNum=CountNum+"&Count&" Where [Id]="&Dest
					Conn.Execute(SQL)
				
					Sql="UpDate [NB_Content] Set ColumnId="&Dest&",ColumnName='"&DestColumn_Name&"',ColumnCode='"&DestColumn_Code&"' "&WSQL
					'Response.Write sql
					Conn.Execute(SQL)
				End If
			End Select
		End If
	End If
	
	ErrMsg="转移成功,建议更新栏目统计数据!"
	ErrMsg=ErrMsg&"<li><font color=green>共转移了 "&Count&" 篇文章<font>"
	Call EA_Manager.Error(0)
End Sub

Sub BathDel
	Call EA_Pub.Chk_Post
	
	Dim Where,Sour,Count,WSQL,Back
	Dim DestColumn_Name,DestColumn_Code
	
	Count=0
	Where=EA_Pub.SafeRequest(2,"where",0,-1,0)
	Sour=EA_Pub.SafeRequest(2,"sour",0,0,0)
	Back=EA_Pub.SafeRequest(2,"back",0,0,0)
	
	If Sour<>0 Then
		Select Case Where
		Case 0
			WSQL=" Where [ColumnId]="&Sour
			
			Sql="Select Count([Id]) From [NB_Content]"&WSQL
			Count=Conn.Execute(SQL)(0)
				
			Sql="UpDate [NB_Column] Set CountNum=0 Where [Id]="&Sour
			Conn.Execute(SQL)
		Case 1
			Dim Time
			Time=EA_Pub.SafeRequest(2,"date",2,"1900",0)
			
			WSQL=" where datediff(d,adddate,'"&Time&"')=0 And ColumnId="&Sour
				
			Sql="Select Count([Id]) From [NB_Content]"&WSQL
			Count=Conn.Execute(SQL)(0)
				
			Sql="UpDate [NB_Column] Set CountNum=CountNum-"&Count&" Where [Id]="&Sour
			Conn.Execute(SQL)
		Case 2
			Dim KeyWord,Field
			KeyWord=EA_Pub.SafeRequest(2,"keyword",1,"",0)
			Field=EA_Pub.SafeRequest(2,"field",0,-1,0)
			
			If Field<>-1 Then
				Select Case Field
				Case 0
					WSQL=" Where ColumnId="&Sour&" And InStr(1,Title,'"&KeyWord&"')>0"
				Case 1
					WSQL=" Where ColumnId="&Sour&" And InStr(1,Keyword,'"&KeyWord&"')>0"
				Case 2
					WSQL=" Where ColumnId="&Sour&" And InStr(1,Author,'"&KeyWord&"')>0"
				Case 3
					WSQL=" Where ColumnId="&Sour&" And InStr(1,Summary,'"&KeyWord&"')>0"
				Case 4
					WSQL=" Where ColumnId="&Sour&" And InStr(1,Source,'"&KeyWord&"')>0"
				Case 5
					WSQL=" Where ColumnId="&Sour&" And InStr(1,Content,'"&KeyWord&"')>0"
				End Select
			
				Sql="Select Count([Id]) From [NB_Content]"&WSQL
				Count=Conn.Execute(SQL)(0)
				
				Sql="UpDate [NB_Column] Set CountNum=CountNum-"&Count&" Where [Id]="&Sour
				Conn.Execute(SQL)
			End If
		End Select
		
		Sql="UpDate [NB_System] Set TopicNum=TopicNum-"&Count
		Conn.Execute(SQL)
		
		If Back=0 Then 
			Sql="UpDate [NB_Content] Set IsDel=1"&WSQL
		Else
			Sql="Delete From [NB_Content]"&WSQL
		End If
		Conn.Execute(SQL)
		
	End If
	
	ErrMsg="删除成功,建议更新栏目统计数据!"
	ErrMsg=ErrMsg&"<li><font color=green>共删除了 "&Count&" 篇文章</font>"
	Call EA_Manager.Error(0)
End Sub
%>

⌨️ 快捷键说明

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