📄 dsave.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/function.asp"-->
<%
founderr=false
dim title,content
if request.form("title")="" or len(request.form("title"))>40 then
errmsg=errmsg+"<br>"+"<li>日记标题输入错误(未输入或长度超过了40个字节)!"
founderr=true
else
title=trim(request.form("title"))
end if
if request.form("content")="" or len(request.form("content"))>600 then
errmsg=errmsg+"<br>"+"<li>日记内容最多为600个字符,请减少你的日记内容!!"
founderr=true
else
content=trim(request.form("content"))
end if
if founderr=true then
call txl_error()
else
set rs=server.createobject("adodb.recordset")
sql="select * from diary where (id is null)"
rs.open sql,conn,1,3
rs.addnew
if trim(request.form("adddata"))="" then
rs("addtime")=DATE()
else
rs("addtime")=trim(request.form("adddata"))
end if
rs("title")=title
rs("content")=content
rs("postuser")=request.form("realname")
rs("feeling")=request.form("feeling")
rs("private")=request.form("private")
rs("weather")=request.form("weather")
rs.update
rs.close
if founderr=true then
call txl_error()
else
Response.Redirect "d_index.asp"
end if
set rs=nothing
end if
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -