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

📄 save_file.asp

📁 个人网站模板
💻 ASP
字号:
<!--#include file="conn_admin.asp" -->
<!--#include file="check_admin.asp"-->
<!--#include file="info.asp" -->
<script src="ubbcode.js"></script>
<%
if Request.QueryString("cz")="" then
Response.Redirect"info.asp?info=错误的参数"
else
cz=Request.QueryString("cz")
end if

if cz="del" then

conn.execute "delete from produce where id="&Request.QueryString("id")
Response.Redirect"admin_file.asp"

else

REM ------判断数据有效性------

founderr=false
if trim(Request.Form("name"))="" then
founderr=true
info=info+"<li>请填写作品图片的名称</li>"
end if
if trim(Request.Form("typeid"))="" then
founderr=true
info=info+"<li>请选择分类</li>"
end if

REM ------如果数据是有效的则开始存储数据并显示相关信息------

if founderr=false then 
set rs=server.createobject("adodb.recordset")
if cz="addfile" then
sql="select * from produce where (id is null)" 
rs.open sql,conn,1,3
rs.addnew
rs("time")=now()
else
sql="select * from produce where id="&Request.QueryString("id") 
rs.open sql,conn,1,3
rs("listid")=Request.Form("listid")
end if
rs("name")=Request.Form("name")
rs("typeid")=Request.Form("typeid")
rs("year1")=Request.Form("year1")
rs("month1")=Request.Form("month1")
rs("day1")=Request.Form("day1")
if Request.Form("EditorValue")<>"" then
rs("txtcontent")=Request.Form("EditorValue")
end if
if Request.Form("smallimg")="" then
rs("smallimg")="images/nominipic.gif"
else
rs("smallimg")=Request.Form("smallimg")
end if
rs.update
rs.close
set rs=nothing
conn.close
Set conn=Nothing
if cz="addfile" then
Response.Redirect"admin_file.asp"
else
Response.Redirect"admin_file.asp"
end if
else
call infom()
end if
end if
%>

⌨️ 快捷键说明

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