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

📄 news_manage.asp

📁 后台目录:qwbAdmin/Login.asp 登陆用户名:admin 登陆密码:admin
💻 ASP
📖 第 1 页 / 共 5 页
字号:
			set conn=nothing:set user_conn=nothing
			Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		End if
		
		If str_set_type = "newsid" then
			if Trim(C_Set_NewsIDarrey)="" then
				strShowErr = "<li>请选择要设置的"& Fs_news.allInfotitle &"ID!</li>"
				set conn=nothing:set user_conn=nothing
				Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
				Response.end
			End if
			Set_News_Sql = " And ID In(" & C_Set_NewsIDarrey & ")"
		ElseIf str_set_type = "classid" then
			if Trim(str_s_classIDarray)="" then
				strShowErr = "<li>请选择要设定栏目下的"& Fs_news.allInfotitle &"!</li>"
				set conn=nothing:set user_conn=nothing
				Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
				Response.end
			End if
			Set_News_Sql = " and ClassID In('" & Replace(str_s_classIDarray,",","','") & "')"
		End IF
		Select Case Trim(Request.Form("Set_Act"))
			Case "Property"
				str_NewsProperty_Rec = Trim(Request.Form("NewsProperty_Rec"))
				str_NewsProperty_mar = Trim(Request.Form("NewsProperty_mar"))
				str_NewsProperty_rev = Trim(Request.Form("NewsProperty_rev"))
				str_NewsProperty_constr =  Trim(Request.Form("NewsProperty_constr"))
				str_NewsProperty_tt =   Trim(Request.Form("NewsProperty_tt"))
				str_NewsProperty_hots=   Trim(Request.Form("NewsProperty_hots"))
				str_NewsProperty_jc=   Trim(Request.Form("NewsProperty_jc"))
				str_NewsProperty_unr = Trim(Request.Form("NewsProperty_unr"))
				str_NewsProperty_ann = Trim(Request.Form("NewsProperty_ann"))
				str_NewsProperty_filt = Trim(Request.Form("NewsProperty_filt"))
				str_NewsProperty_Remote = Trim(Request.Form("NewsProperty_Remote"))
				if str_NewsProperty_Rec <>"" then:str_NewsProperty_Rec_1 = 1:else:str_NewsProperty_Rec_1 = 0:End if
				if str_NewsProperty_mar <>"" then:str_NewsProperty_mar_1 = 1:else:str_NewsProperty_mar_1 = 0:End if
				if str_NewsProperty_rev <>"" then:str_NewsProperty_rev_1 = 1:else:str_NewsProperty_rev_1 = 0:End if
				if str_NewsProperty_constr <>"" then:str_NewsProperty_constr_1 = 1:else:str_NewsProperty_constr_1 = 0:End if
				if str_NewsProperty_tt <>"" then:str_NewsProperty_tt_1 = 1:else:str_NewsProperty_tt_1 = 0:End if
				if str_NewsProperty_hots <>"" then:str_NewsProperty_hots_1 = 1:else:str_NewsProperty_hots_1 = 0:End if
				if str_NewsProperty_jc <>"" then:str_NewsProperty_jc_1 = 1:else:str_NewsProperty_jc_1 = 0:End if
				if str_NewsProperty_unr <>"" then:str_NewsProperty_unr_1 = 1:else:str_NewsProperty_unr_1 = 0:End if
				if str_NewsProperty_ann <>"" then:str_NewsProperty_ann_1 = 1:else:str_NewsProperty_ann_1 = 0:End if
				if str_NewsProperty_filt <>"" then:str_NewsProperty_filt_1 = 1:else:str_NewsProperty_filt_1 = 0:End if
				if str_NewsProperty_Remote <>"" then:str_NewsProperty_Remote_1 = 1:else:str_NewsProperty_Remote_1 = 0:End if
				Property_Str = str_NewsProperty_Rec_1&","&str_NewsProperty_mar_1&","&str_NewsProperty_rev_1&","&str_NewsProperty_constr_1&","&str_NewsProperty_Remote_1&","&str_NewsProperty_tt_1&","&str_NewsProperty_hots_1&","&str_NewsProperty_jc_1&","&str_NewsProperty_unr_1&","&str_NewsProperty_ann_1&","&str_NewsProperty_filt_1
				Conn.ExeCute("Update FS_NS_News Set NewsProperty = '" & Replace(Property_Str,"'","") & "' where isRecyle=0" & Set_News_Sql & "")
			Case "TempLets"
				IF Replace(Trim(Request.Form("Templet")),"'","") <> "" Then
					Conn.ExeCute("Update FS_NS_News Set Templet = '" & Replace(Trim(Request.Form("Templet")),"'","") & "' where isRecyle=0" & Set_News_Sql & "")
				End IF	
			Case "NewsPop"
				Conn.ExeCute("Update FS_NS_News Set PopID = " & Replace(Trim(Request.Form("PopID")),"'","") & " where isRecyle=0" & Set_News_Sql & "")
			Case "ShowReview"
				if Request.Form("isShowReview")<>"" then
					isShowReviewTF = 1
				Else
					isShowReviewTF = 0
				End if
				Conn.ExeCute("Update FS_NS_News Set isShowReview = " & isShowReviewTF & " where isRecyle=0" & Set_News_Sql & "")
			Case "KeyWords"
				Conn.ExeCute("Update FS_NS_News Set Keywords = '" & Replace(Replace(Trim(Request.Form("KeywordText")),"'","")," ","") & "' where isRecyle=0" & Set_News_Sql & "")
			Case "Hits"
				If Trim(Request.Form("hits")) <> "" And IsNumeric(Trim(Request.Form("hits"))) Then
					IF Clng(Trim(Request.Form("hits")))	> 0 Then
						Conn.ExeCute("Update FS_NS_News Set hits = " & Clng(Trim(Request.Form("hits"))) & " where isRecyle=0" & Set_News_Sql & "")
					End IF
				End IF
			Case "EditDate"
				If Trim(Request.Form("addtime")) <> "" And IsDate(Trim(Request.Form("addtime"))) Then
					IF G_IS_SQL_DB = 1 Then
						Conn.ExeCute("Update FS_NS_News Set addtime = '" & Trim(Request.Form("addtime")) & "' where isRecyle=0" & Set_News_Sql & "")
					Else
						Conn.ExeCute("Update FS_NS_News Set addtime = #" & Trim(Request.Form("addtime")) & "# where isRecyle=0" & Set_News_Sql & "")
					End IF
				End IF
			Case "ExName"					
				Conn.ExeCute("Update FS_NS_News Set FileExtName = '" & Trim(Request.Form("FileExtName")) & "' where isRecyle=0" & Set_News_Sql & "")
			Case Else
				str_NewsProperty_Rec = Trim(Request.Form("NewsProperty_Rec"))
				str_NewsProperty_mar = Trim(Request.Form("NewsProperty_mar"))
				str_NewsProperty_rev = Trim(Request.Form("NewsProperty_rev"))
				str_NewsProperty_constr =  Trim(Request.Form("NewsProperty_constr"))
				str_NewsProperty_tt =   Trim(Request.Form("NewsProperty_tt"))
				str_NewsProperty_hots=   Trim(Request.Form("NewsProperty_hots"))
				str_NewsProperty_jc=   Trim(Request.Form("NewsProperty_jc"))
				str_NewsProperty_unr = Trim(Request.Form("NewsProperty_unr"))
				str_NewsProperty_ann = Trim(Request.Form("NewsProperty_ann"))
				str_NewsProperty_filt = Trim(Request.Form("NewsProperty_filt"))
				str_NewsProperty_Remote = Trim(Request.Form("NewsProperty_Remote"))
				if str_NewsProperty_Rec <>"" then:str_NewsProperty_Rec_1 = 1:else:str_NewsProperty_Rec_1 = 0:End if
				if str_NewsProperty_mar <>"" then:str_NewsProperty_mar_1 = 1:else:str_NewsProperty_mar_1 = 0:End if
				if str_NewsProperty_rev <>"" then:str_NewsProperty_rev_1 = 1:else:str_NewsProperty_rev_1 = 0:End if
				if str_NewsProperty_constr <>"" then:str_NewsProperty_constr_1 = 1:else:str_NewsProperty_constr_1 = 0:End if
				if str_NewsProperty_tt <>"" then:str_NewsProperty_tt_1 = 1:else:str_NewsProperty_tt_1 = 0:End if
				if str_NewsProperty_hots <>"" then:str_NewsProperty_hots_1 = 1:else:str_NewsProperty_hots_1 = 0:End if
				if str_NewsProperty_jc <>"" then:str_NewsProperty_jc_1 = 1:else:str_NewsProperty_jc_1 = 0:End if
				if str_NewsProperty_unr <>"" then:str_NewsProperty_unr_1 = 1:else:str_NewsProperty_unr_1 = 0:End if
				if str_NewsProperty_ann <>"" then:str_NewsProperty_ann_1 = 1:else:str_NewsProperty_ann_1 = 0:End if
				if str_NewsProperty_filt <>"" then:str_NewsProperty_filt_1 = 1:else:str_NewsProperty_filt_1 = 0:End if
				if str_NewsProperty_Remote <>"" then:str_NewsProperty_Remote_1 = 1:else:str_NewsProperty_Remote_1 = 0:End if
				Property_Str = str_NewsProperty_Rec_1&","&str_NewsProperty_mar_1&","&str_NewsProperty_rev_1&","&str_NewsProperty_constr_1&","&str_NewsProperty_Remote_1&","&str_NewsProperty_tt_1&","&str_NewsProperty_hots_1&","&str_NewsProperty_jc_1&","&str_NewsProperty_unr_1&","&str_NewsProperty_ann_1&","&str_NewsProperty_filt_1
				if Request.Form("isShowReview")<>"" then
					isShowReviewTF = 1
				Else
					isShowReviewTF = 0
				End if	
				If Trim(Request.Form("hits")) = "" Or Not IsNumeric(Trim(Request.Form("hits")))	Then
					News_Hits_num = ""
				Else
					IF Clng(Trim(Request.Form("hits")))	<= 0 Then
						News_Hits_num = ""
					Else
						News_Hits_num = ",hits = " & Clng(Trim(Request.Form("hits"))) & ""
					End IF
				End IF
				If Trim(Request.Form("addtime")) <> "" And IsDate(Trim(Request.Form("addtime"))) Then
					IF G_IS_SQL_DB = 1 Then
						Edit_News_time_Str = ",addtime = '" & Trim(Request.Form("addtime")) & "'"
					Else
						Edit_News_time_Str = ",addtime = #" & Trim(Request.Form("addtime")) & "#"
					End IF
				Else
					Edit_News_time_Str = ""
				End IF
				Conn.ExeCute("Update FS_NS_News Set NewsProperty = '" & Replace(Property_Str,"'","") & "',Templet = '" & Replace(Trim(Request.Form("Templet")),"'","") & "',PopID = " & Replace(Trim(Request.Form("PopID")),"'","") & ",isShowReview = " & isShowReviewTF & ",Keywords = '" & Replace(Replace(Trim(Request.Form("KeywordText")),"'","")," ","") & "'" & News_Hits_num & ",FileExtName = '" & Trim(Request.Form("FileExtName")) & "'" & Edit_News_time_Str & " Where isRecyle=0" & Set_News_Sql & "")				
		End Select
		strShowErr = "<li>批量设置成功</li><li>需要重新生成才生效!</li>"
		set conn=nothing:set user_conn=nothing
		Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
		Response.end
	End if
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻管理___Powered by foosun Inc.</title>
<link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript" src="../../FS_Inc/PublicJS.js"></script>
<script language="JavaScript" src="../../FS_Inc/coolWindowsCalendar.js"></script>
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  <tr class="hback">
    <td colspan="3" class="xingmu"><a href="#" onMouseOver="this.T_BGCOLOR='#404040';this.T_FONTCOLOR='#FFFFFF';return escape('<div align=\'center\'>FoosunCMS4.0<br> Code by 谢赖堂 <BR>Copyright (c) 2006 Foosun Inc</div>')" class="sd"><strong>新闻管理</strong></a><a href="../../help?Lable=NS_News_Manage" target="_blank" style="cursor:help;'" class="sd"><img src="../Images/_help.gif" border="0"></a>
      <%
	if str_ClassID<>"" then
		news_SQL = "Select Orderid,id,ClassID,ClassName,ClassEName,IsUrl,AddNewsType from FS_NS_NewsClass where Parentid  = '"& str_ClassID &"' and ReycleTF=0 Order by Orderid desc,ID desc"
	Else
		news_SQL = "Select Orderid,id,ClassID,ClassName,ClassEName,IsUrl,AddNewsType from FS_NS_NewsClass where Parentid  = '0'  and ReycleTF=0  Order by Orderid desc,ID desc"
	End if
	Set obj_news_rs = server.CreateObject(G_FS_RS)
	obj_news_rs.Open news_SQL,Conn,1,3
	if fs_news.addNewsType = 1 then str_addType_1 ="News_add.asp":else:str_addType_1 ="News_add_Conc.asp":end if
	%>
    </td>
  </tr>
  <tr>
    <form name="form1" method="post" action="">
      <td width="48%" height="18" class="hback"><div align="left"><a href="News_Manage.asp">首页</a>┆
          <%Response.Write"<a href="""& str_addType_1 &"?ClassID="& Request.QueryString("ClassID")&""">添加"& Fs_news.allInfotitle &"</a>|"%>
          <a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>">所有
          <% =  Fs_news.allInfotitle %>
          </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&isCheck=1&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>&SpecialEName=<%=str_SpecialEName%>">已审核</a>┆ <a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&isCheck=0&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">未审核</a>┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=Constr&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">投稿</a>
          <%if Request.QueryString("NewsTyp")="Constr" then%>
          ┆<a href="Constr_stat.asp">稿件统计</a>
          <%end if%>
        </div></td>
      <td width="43%" class="hback"><div align="center"><a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=recTF">推荐 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=isTop&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">置顶 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=hot&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">热点 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=pic&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">图片 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=highlight&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">精彩 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=bignews&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">头条 </a> ┆<a href="News_Manage.asp?ClassID=<%=Request.QueryString("ClassID")%>&SpecialEName=<%=str_SpecialEName%>&NewsTyp=filt&Keyword=<%=Request("keyword")%>&ktype=<%=Request("ktype")%>">幻灯片</a>  </div></td>
      <td width="9%" class="hback"><a href="Class_Rss.asp?Class=<%=Request.QueryString("ClassID")%>"><img src="../Images/rss200.png" height="15" border="0"></a></td>
    </form>
  </tr>
</table>
<%if Request.QueryString("ClassId")<>"" then%>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  <tr>
    <td class="hback"> 位置导航:<A href="News_Manage.asp">全部新闻</a>
      <%response.write fs_news.navigation(NoSqlHack(Request.QueryString("ClassID")))%></td>
  </tr>
</table>
<%end if%>
<%
	  if Not obj_news_rs.eof then
		Response.Write("<table width=""98%"" border=""0"" align=""center"" cellpadding=""2"" cellspacing=""1"" class=""table""> <tr class=""hback""><td>")
		Response.Write("<table width=""100%"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""1"" >")
		Response.Write("<tr>")
		icNum = 0
		Do while Not obj_news_rs.eof
			if obj_news_rs("AddNewsType") =1 then
				str_addType = "News_add.asp"
			Else
				str_addType ="News_add_Conc.asp"
			End if
			if obj_news_rs("IsUrl") = 1 then
				isUrlStr = "(<span class=""tx"">外</span>)"
				str_Href = ""
				str_Href_title = ""& obj_news_rs("ClassName") &""
			Else
				isUrlStr = ""
				str_Href = "<a href="& str_addType &"?ClassID="&obj_news_rs("ClassID")&"><img src=""../images/add.gif"" border=""0"" alt=""添加"& Fs_news.allInfotitle &"""></a>"
				str_Href_title = "<a href=""News_Manage.asp?ClassID="& obj_news_rs("ClassID") &"&SpecialEName="&str_SpecialEName&""" title=""点击进入下一级栏目"">"& obj_news_rs("ClassName") &"</a>"
			End if
			Set obj_news_rs_1 = server.CreateObject(G_FS_RS)
			obj_news_rs_1.Open "Select Count(ID) from FS_NS_NewsClass where ParentID='"& obj_news_rs("ClassID") &"'",Conn,1,1
			if obj_news_rs_1(0)>0 then
				str_action=  "<img src=""images/+.gif""></img>"& str_Href_title &""
			Else
				str_action=  "<img src=""images/-.gif""></img>"& str_Href_title &""
			End if
			obj_news_rs_1.close:set obj_news_rs_1 =nothing
			'得到新闻数量
			if obj_news_rs("IsUrl") = 0 then
				Set obj_cnews_rs = server.CreateObject(G_FS_RS)
				obj_cnews_rs.Open "Select ID from FS_NS_News where ClassID='"& obj_news_rs("ClassID") &"' and  isRecyle=0 and isdraft=0 ",Conn,1,1
				news_count = "("&obj_cnews_rs.recordcount&"/"&fs_news.GetTodayNewsCount(obj_news_rs("ClassID"))
				obj_cnews_rs.close:set obj_cnews_rs = nothing
			Else
				news_count = ""
			End if
			Response.Write"<td height=""22"">"
			Response.Write str_action&isUrlStr&news_count&str_Href

⌨️ 快捷键说明

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