📄 admin_news_add_save.asp
字号:
<%
if session("admin__user")="" then
Response.Redirect "login.asp?id=8"
end if
Randomize
dtt= int((999-100+1) * RND +100)
%>
<!--#include file = admin_chk.asp -->
<!--#include file = admin_conn.asp -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<%
if request("lm")<>"" or request("title")="" or request("content")="" then
lm=trim(request("lm"))
aaa=split(lm,"|")
lm1=aaa(0)
lm2=aaa(1)
title=trim(request("title"))
content=request("content")
tj=trim(request("tj"))
html=trim(request("html"))
zz=trim(request("zz"))
tuwen=trim(request("tuwen"))
url=trim(request("url"))
titlecolor=trim(request("titlecolor"))
xgnews=trim(request("xgnews"))
ontop=trim(request("ontop"))
if ontop<>"5" then ontop=3
ontop=int(ontop)
if zz="" then zz=" "
if url="" then url=" "
if tj="" then tj="不推荐"
if html="1" then
filename=date()&"-"&hour(now())&"-"&Minute(now())&"-"&Second(now())&"-"&dtt&".htm"
else
filename="0"
end if
response.write filename
pic=" "
nr=LCase(content)
if instr(nr,"<img")<>0 and instr(nr,"src=")<>0 then
nr=replace(nr,"""","")
aa=Split(nr,"<img")
bb=aa(1)
cc=split(bb,">")
dd=cc(0)
ee=split(dd,"src=")
ff=ee(1)
gg=split(ff," ")
if tuwen="1" then
pic=gg(0)
end if
end if
if request("edit")="" then
sql = "select top 1 * from news"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,2
rs.addnew
rs("updat")=now()
else
sql = "select * from news where id="&request("id")
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,2
end if
rs("lm")=lm1
rs("lm2")=lm2
rs("html")=filename
rs("title")=title
rs("titlecolor")=titlecolor
rs("content")=content
rs("zz")=zz
rs("tj")=tj
rs("pic")=pic
rs("url")=url
rs("adduser")=session("admin__user")
rs("xgnews")=xgnews
rs("ontop")=ontop
rs.update
rs.close
set rs=nothing
Response.Redirect "admin_news_add.asp?lmid="&lm2&"&titlecolor="&titlecolor
end if
conn.close
set conn=nothing
Response.Redirect "admin_news_add.asp?lmid="&lm2&"&titlecolor="&titlecolor&"&html="&html
%>
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -