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

📄 up.asp

📁 视频源代码 视频源代码
💻 ASP
字号:
<%response.expires=0%>
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/vip.asp"-->
<!--#include file="../inc/category.asp"-->
<!--#include file="category.asp"-->
<!--#include file="path.asp"-->
<%
if not adminlevel=1 then
  call msgbox("您的级别不够!",0)
end if

id=strFilter(request("id"),10)
if id="" then
  call msgbox("请正确指定修改新闻!",1)
end if
if not isnumeric(id) then
  call msgbox("请正确指定修改新闻!",1)
end if
id=CCur(id)

title	= strFilter(request("title"),100)
Session("title")	= title

content	= request("SaveContent")
content	= replace(content,vbcrlf,"[BR]")
Session("content")	= content

skey	= strFilter(request("skey"),20)
Session("skey")		= skey

author	= strFilter(request("author"),20)
Session("author")	= author

source	= strFilter(request("source"),200)
Session("source")	= source

otime	= strFilter(request("otime"),20)
Session("otime")	= otime

cs	= GetLength(content)
if title="" then call msgbox("主题不能为空!","../news/chg.asp?id="&id)
if cs<100 then call msgbox("主题内容不能过少!","../news/chg.asp?id="&id)

action	= "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
action	= replace(action,"news/up.asp","")
content = replace(content,action,"")
content = replace(content,"../pic.asp?id=","pic.asp?id=")

sql="select top 1 * from news where id="&id
rs.open sql,conn,1,3
rs("title")	= title
rs("content")	= content
rs("pic")	= Session("photoup")
if Session("skey")><"" then
  rs("skey")	= Session("skey")
end if
if Session("author")><"" then
  rs("author")	= Session("author")
end if
if Session("source")><"" then
  rs("source")	= Session("source")
end if
rs("csize")	= cs
rs("otime")	= Session("otime")
rs.update
rs.close

Session("photodata")	=""
Session("editfilenum")	=""
Session("filenum")	=""
Session("title")	=""
Session("content")	=""
Session("author")	=""
Session("source")	=""
Session("skey")		=""
Session("otime")	=""

if csave=true then%>
<!--#include file="html.asp"-->
<%else
  call msgbox("新闻修改成功!\n\n主题:\n"& title &"\n\n显示:\nhttp://" & Request.ServerVariables("HTTP_HOST")&"/"&newsdir&"/news.asp?id="&id&"\n\n","chg.asp?id="&id)
end if
%>

⌨️ 快捷键说明

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