📄 savefile.asp
字号:
<%
if request.cookies("adminok")="" then
response.redirect "login.asp"
end if
%>
<!--#include file="dbconn.asp"-->
<!--#include file="inc/char.inc"-->
<%
dim filename
dim showname
dim note
dim sql
dim rs
dim cansave
dim founderr
dim errmsg
founerr=false
if trim(request.form("txtfilename"))="" then
founderr=true
errmsg="<li>下载的程序文件名不能为空</li>"
end if
if trim(request.form("txtshowname"))="" then
founderr=true
errmsg=errmsg+"<li>显示名称不能为空</li>"
end if
if founderr=false then
filename=request.form("txtfilename")
showname=htmlencode2(request.form("txtshowname"))
note=htmlencode2(request.form("txtnote"))
set rs=server.createobject("adodb.recordset")
sql="select * from download where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("filename")=filename
rs("showname")=showname
rs("note")=note
rs("dateandtime")=date()
rs.update
rs.close
set rs=noting
conn.close
set conn=nothing
%>
<div align="center">
<table border="1" cellspacing="0" width="50%" bgcolor="#F0F8FF" bordercolorlight="#11B1FF" bordercolordark="#F0F8FF">
<tr>
<td width="100%" bgcolor="#0080C0" height="20">
<p align="center"><font color="#FFFFFF"><b>添加程序成功</b></font></td>
</tr>
<tr>
<td width="100%">
<p align="left"><br>
其文件名为:<%response.write filename%><br>
显示名称为:<%response.write chinesename%></p>
<center>
<p align="center">是否继续添加?<br>
<br>
<a href="addfile.asp">
是</a> <a href="manage.asp">否</a><br>
<br>
</p>
</td>
</tr>
</table>
</div>
<%
else
response.write "由于以下的原因不能保存数据:"
response.write errmsg
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -