📄 admin_needsoftsave.asp
字号:
<!--#include file="function.asp"-->
<%CheckAdmin2%>
<!--#include file="conn.asp"-->
<!--#include file="inc/char.inc"-->
<%
ID=trim(request.QueryString("id"))
NeedSoftName=trim(request.form("NeedSoftName"))
NeedSoftUrl=trim(request.form("NeedSoftUrl"))
NeedSoftPic=trim(request.form("NeedSoftPic"))
founerr=false
act=request("act")
if NeedSoftName="" then
founderr=true
errmsg="<br><li>工具名称不能为空</li>"
end if
if NeedSoftPic="" then
founderr=true
errmsg="<br><li>工具图片地址不能为空</li>"
end if
if NeedSoftUrl="" then
founderr=true
errmsg="<br><li>工具下载地址不能为空</li>"
end if
if founderr=true then
call error()
else
set rs=server.createobject("adodb.recordset")
if act="edit" and id<>"" then
sql="select * from NeedSoft where ID="&ID
elseif act="add" then
sql="select * from NeedSoft"
else
errmsg="<br><li>操作错误!请联系管理员</li>"
call error()
response.end
end if
rs.open sql,conn,1,3
if act="add" or act="edit" then
if act="edit" then
if rs.eof then
errmsg="<br><li>操作错误!请联系管理员</li>"
call error()
response.end
end if
end if
if act="add" then
rs.addnew
end if
rs("NeedSoftName")=NeedSoftName
rs("NeedSoftPic")=NeedSoftPic
rs("NeedSoftUrl")=NeedSoftUrl
rs.update
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect "admin_NeedSoftMana.asp"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -