📄 news_manage.asp
字号:
<% Option Explicit %>
<!--#include file="../../FS_Inc/Const.asp" -->
<!--#include file="lib/cls_main.asp" -->
<!--#include file="../../FS_Inc/Function.asp"-->
<!--#include file="../../FS_InterFace/MF_Function.asp" -->
<!--#include file="../../FS_InterFace/NS_Function.asp" -->
<!--#include file="../../FS_Inc/Func_page.asp" -->
<%'Copyright (c) 2006 Foosun Inc. Code by Simpwind.Xie
Dim Conn,User_Conn
Dim CharIndexStr
Dim Fs_news,obj_news_rs,obj_news_rs_1,isUrlStr,str_Href,obj_cnews_rs,news_count,str_Href_title,str_action,str_ClassID,news_SQL
Dim obj_newslist_rs,newslist_sql,strpage,str_showTF,str_ClassID_1,str_Editor,str_Keyword,str_GetKeyword,str_ktype
Dim select_count,select_pagecount,i,Str_GetPopID,Str_PopID,str_check,str_UrlTitle,icNum,str_addType,str_addType_1
Dim str_Rec,str_isTop,str_hot,str_pic,str_highlight,str_bignews,str_filt,str_Constr,str_Top,tmp_pictf
Dim str_s_classIDarray,tmp_splitarrey_id,tmp_splitarrey_Classid,tmp_i,str_Move_type,str_t_classID,C_NewsIDarrey,Tmp_rs,Tmp_TF_Rs
Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo
Dim StrSql,ArrSql(),temp_j,str_rep_type,str_rep_select_type,str_AdvanceTF,str_s_Content,str_t_Content,str_start_char,str_end_char,f_PLACE_OBJ
Dim str_SpecialEname,SQL_SpecialEname,str_Get_Special,sp_i
Dim fso_tmprs_,NewsSavePath,Str_Temp_Flag
int_RPP=30 '设置每页显示数目
int_showNumberLink_=8 '数字导航显示数目
showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
str_nonLinkColor_="#999999" '非热链接颜色
toF_="<font face=webdings title=""首页"">9</font>" '首页
toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
toL_="<font face=webdings title=""最后一页"">:</font>"
MF_Default_Conn
MF_User_Conn
MF_Session_TF
set Fs_news = new Cls_News
Fs_News.GetSysParam()
If Not Fs_news.IsSelfRefer Then response.write "非法提交数据":Response.end
str_ClassID = NoSqlHack(Request.QueryString("ClassID"))
str_SpecialEname = NoSqlHack(Request.QueryString("specialEname"))
if Request("Action")="makehtml" then
if not Get_SubPop_TF(str_ClassID,"NS011","NS","news") then Err_Show
response.Redirect "Get_NewsHtml.asp?Id="&server.URLEncode(Replace(request.Form("C_NewsID")," ",""))&"&ClassId="&Request.QueryString("ClassId")&"&type=makenews"
End if
if Request("Action")="Toold" then
response.Redirect "Get_OldNews.asp?Id="&server.URLEncode(Replace(request.Form("C_NewsID")," ",""))&"&ClassId="&Request.QueryString("ClassId")&""
end if
if Request("Action") = "signDel" then
if not Get_SubPop_TF(str_ClassID,"NS003","NS","news") then Err_Show
Dim strShowErr
if fs_news.ReycleTF = 1 then
Conn.execute("Update FS_NS_News set isRecyle = 1 where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
strShowErr = "<li>"& Fs_news.allInfotitle &"已经删除</li><li>"& Fs_news.allInfotitle &"已经临时放到回收站中</li>"
Else
strShowErr = "<li>"& Fs_news.allInfotitle &"已经彻底删除</li>"
''===============
''删除图片文件
set fso_tmprs_ = Conn.execute("select NewsPicFile from FS_NS_News where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
if not fso_tmprs_.eof then
fso_DeleteFile(fso_tmprs_(0))
end if
fso_tmprs_.close
''小图
set fso_tmprs_ = Conn.execute("select NewsSmallPicFile from FS_NS_News where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
if not fso_tmprs_.eof then
fso_DeleteFile(fso_tmprs_(0))
end If
'删除静态文件
set fso_tmprs_ = Conn.execute("select FS_NS_News.SaveNewsPath,FS_NS_News.FileName,FS_NS_News.FileExtName,FS_NS_NewsClass.SavePath,FS_NS_NewsClass.ClassEName from FS_NS_News,FS_NS_NewsClass where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"' and FS_NS_News.IsURL=0 and FS_NS_NewsClass.ClassID=FS_NS_News.ClassID")
If G_VIRTUAL_ROOT_DIR = "" Then
NewsSavePath = ""
Else
NewsSavePath = "/" & G_VIRTUAL_ROOT_DIR
End If
If Not fso_tmprs_.eof Then
NewsSavePath=NewsSavePath&fso_tmprs_("SavePath")&"/"&fso_tmprs_("ClassEName")&fso_tmprs_("SaveNewsPath")&"/"&fso_tmprs_("FileName")&"."&fso_tmprs_("FileExtName")
fso_DeleteFile(NewsSavePath)
End If
'删除静态文件结束
fso_tmprs_.close
''===============
Conn.execute("Delete From FS_NS_News where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
'删除浏览权限新闻,以防产生垃圾信息
Conn.execute("Delete From FS_MF_Pop where InfoID='"& NoSqlHack(Request.QueryString("NewsID"))&"' and PopType='NS'")
'删除静态文件
End if
set conn=nothing:set user_conn=nothing
Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl="&Request.ServerVariables("HTTP_REFERER")&"")
Response.end
End if
if Request("Action") = "singleCheck" then
if not Get_SubPop_TF(str_ClassID,"NS004","NS","news") then Err_Show
Conn.execute("Update FS_NS_News set isLock = 0 where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
strShowErr = "<li>"& Fs_news.allInfotitle &"审核成功</li>"
set conn=nothing:set user_conn=nothing
Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../News_Manage.asp")
Response.end
Elseif Request("Action") = "singleUnCheck" then
if not Get_SubPop_TF(str_ClassID,"NS005","NS","news") then Err_Show
Conn.execute("Update FS_NS_News set isLock = 1 where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
strShowErr = "<li>"& Fs_news.allInfotitle &"锁定成功</li>"
set conn=nothing:set user_conn=nothing
Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../News_Manage.asp")
Response.end
End if
if Request("Action") = "signUnTop" then
if not Get_SubPop_TF(str_ClassID,"NS006","NS","news") then Err_Show
Conn.execute("Update FS_NS_News set popid =0 where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
strShowErr = "<li>"& Fs_news.allInfotitle &"解固成功</li>"
set conn=nothing:set user_conn=nothing
Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../News_Manage.asp")
Response.end
End if
if Request("Action") = "signTop" then
if not Get_SubPop_TF(str_ClassID,"NS006","NS","news") then Err_Show
Conn.execute("Update FS_NS_News set popid =5 where NewsID='"& NoSqlHack(Request.QueryString("NewsID"))&"'")
set conn=nothing:set user_conn=nothing
strShowErr = "<li>"& Fs_news.allInfotitle &"总固顶成功</li><li>如果需要区域固顶,请在修改中设定</li>"
Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../News_Manage.asp")
Response.end
End if
If Request.Form("Action") = "Del" then
if not Get_SubPop_TF(str_ClassID,"NS003","NS","news") then Err_Show
Dim DelID,Str_Tmp,Str_Tmp1
DelID = request.Form("C_NewsID")
if DelID = "" then
strShowErr = "<li>你必须选择一项再删除</li>"
set conn=nothing:set user_conn=nothing
Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
Response.end
End if
if fs_news.ReycleTF = 1 then
Conn.execute("Update FS_NS_News set isRecyle=1 where ID in ("&DelID&")")
set conn=nothing:set user_conn=nothing
strShowErr = "<li>"& Fs_news.allInfotitle &"已经删除</li><li>"& Fs_news.allInfotitle &"已经临时放到回收站中</li>"
Else
''===============
''删除图片文件
set fso_tmprs_ = Conn.execute("select NewsPicFile from FS_NS_News where ID in ("&DelID&")")
do while not fso_tmprs_.eof
fso_DeleteFile(fso_tmprs_(0))
fso_tmprs_.movenext
loop
fso_tmprs_.close
''小图
set fso_tmprs_ = Conn.execute("select NewsSmallPicFile from FS_NS_News where ID in ("&DelID&")")
do while not fso_tmprs_.eof
fso_DeleteFile(fso_tmprs_(0))
fso_tmprs_.movenext
loop
fso_tmprs_.close
''===============
'删除静态文件
set fso_tmprs_ = Conn.execute("select FS_NS_News.SaveNewsPath,FS_NS_News.FileName,FS_NS_News.FileExtName,FS_NS_NewsClass.SavePath,FS_NS_NewsClass.ClassEName from FS_NS_News,FS_NS_NewsClass where FS_NS_News.ID in ("& DelID &") and FS_NS_News.IsURL=0 and FS_NS_NewsClass.ClassID=FS_NS_News.ClassID")
While Not fso_tmprs_.eof
If G_VIRTUAL_ROOT_DIR = "" Then
NewsSavePath = ""
Else
NewsSavePath = "/" & G_VIRTUAL_ROOT_DIR
End If
NewsSavePath=NewsSavePath&fso_tmprs_("SavePath")&"/"&fso_tmprs_("ClassEName")&fso_tmprs_("SaveNewsPath")&"/"&fso_tmprs_("FileName")&"."&fso_tmprs_("FileExtName")
fso_DeleteFile(NewsSavePath)
fso_tmprs_.movenext
Wend
'删除静态文件结束
Conn.execute("Delete From FS_NS_News where ID in ("&DelID&")")
set conn=nothing:set user_conn=nothing
strShowErr = "<li>您选择的"& Fs_news.allInfotitle &"已经彻底删除了</li>"
End if
Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../News_manage.asp?ClassID="&Request("ClassID")&"")
Response.end
End if
If Request.Form("Action") = "unlock" then
if not Get_SubPop_TF(str_ClassID,"NS004","NS","news") then Err_Show
Dim str_UnLockID
str_UnLockID = request.Form("C_NewsID")
if str_UnLockID = "" then
set conn=nothing:set user_conn=nothing
strShowErr = "<li>你必须选择一项再操作</li>"
Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
Response.end
End if
Conn.execute("Update FS_NS_News set isLock = 0 where ID in ("& str_UnLockID &")")
strShowErr = "<li>"& Fs_news.allInfotitle &"审核成功</li>"
set conn=nothing:set user_conn=nothing
Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
Response.end
End if
If Request.Form("Action") = "lock" then
if not Get_SubPop_TF(str_ClassID,"NS005","NS","news") then Err_Show
Dim str_LockID
str_LockID = request.Form("C_NewsID")
if str_LockID = "" then
strShowErr = "<li>你必须选择一项再操作</li>"
set conn=nothing:set user_conn=nothing
Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
Response.end
End if
Conn.execute("Update FS_NS_News set isLock = 1 where ID in ("& str_LockID &")")
strShowErr = "<li>"& Fs_news.allInfotitle &"锁定成功</li>"
set conn=nothing:set user_conn=nothing
Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
Response.end
End if
If Request.Form("Action") = "Move_News" then
if not Get_SubPop_TF(str_ClassID,"NS009","NS","news") then Err_Show
str_s_classIDarray =Replace(Request.Form("s_Classid")," ","")
str_t_classID=Replace(Request.Form("t_Classid")," ","")
str_Move_type = Trim(Replace(Request.Form("Move_type")," ",""))
C_NewsIDarrey = Trim(Replace(Request.Form("C_NewsID")," ",""))
'判断是否是外部栏目
If str_t_classID="" Then
strShowErr = "<li>请选择目标栏目</li>"
set conn=nothing:set user_conn=nothing
Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
Response.end
End If
Set Tmp_TF_Rs = Conn.execute("select isUrl From FS_NS_NewsClass Where ClassID = '"& str_t_classID &"'")
if Tmp_TF_Rs(0)=1 then
set conn=nothing:set user_conn=nothing
strShowErr = "<li>目标"& Fs_news.allInfotitle &"栏目不能为外部栏目</li>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -