📄 adminsave.asp
字号:
<%
if session("admin")="" then
response.redirect "admin.asp"
response.end
end if
%>
<!--#include file="conn.asp"-->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/const.asp"-->
<%
dim filename,filename1,filename2
dim filename3,filename4,filename5,filename6,filename7,filename8,filename9,filename10,filename11,filename12,filename13,filename14,filename15,filename16,filename17,filename18,filename19,filename20
dim showname
dim bb
dim club
dim classid
dim Nclassid
dim note
dim rs
dim hot
dim system
dim fromurl
dim size
dim images
dim order
dim hots
dim hide
dim founderr
dim kind
founerr=false
if trim(request.form("txtshowname"))="" then
founderr=true
errmsg=errmsg+"<li>软件名称不能为空</li>"
end if
if trim(request.form("txtnote"))="" then
founderr=true
errmsg=errmsg+"<li>软件简介不能为空</li>"
end if
if trim(request.form("classid"))="" then
founderr=true
errmsg=errmsg+"<li>请选择类别</li>"
end if
if trim(request.form("Nclassid"))="" then
founderr=true
errmsg=errmsg+"<li>请选择软件分类</li>"
end if
if trim(request.form("kind"))="" then
founderr=true
errmsg=errmsg+"<li>请选择软件性质</li>"
end if
if founderr=false then
movie=request("movie")
club=request("club")
filename=request("txtfilename")
filename1=request("txtfilename1")
filename2=request("txtfilename2")
filename3=request("txtfilename3")
filename4=request("txtfilename4")
filename5=request("txtfilename5")
filename6=request("txtfilename6")
filename7=request("txtfilename7")
filename8=request("txtfilename8")
filename9=request("txtfilename9")
filename10=request("txtfilename10")
filename11=request("txtfilename11")
filename12=request("txtfilename12")
filename13=request("txtfilename13")
filename14=request("txtfilename14")
filename15=request("txtfilename15")
filename16=request("txtfilename16")
filename17=request("txtfilename17")
filename18=request("txtfilename18")
filename19=request("txtfilename19")
filename20=request("txtfilename20")
showname=htmlencode2(request.form("txtshowname"))
bb=htmlencode2(request("txtbb"))
classid=request("classid")
Nclassid=request("Nclassid")
kind=request("kind")
note=htmlencode2(request("txtnote"))
hot=htmlencode2(request("hot"))
system=htmlencode2(request("system"))
size=htmlencode2(request("size"))
images=request("images")
fromurl=htmlencode2(request("fromurl"))
order=htmlencode2(request("order"))
if request.form("hots")="on" then
hots=1
else
hots=0
end if
if request.form("hide")="on" then
hide=1
else
hide=0
end if
set rs=server.createobject("adodb.recordset")
if request("action")="add" then
call newsoft()
elseif request("action")="edit" then
call editsoft()
end if
sub newsoft()
sql="select * from download where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("movie")=movie
rs("club")=club
rs("filename")=filename
if filename1<>"" then
rs("filename1")=filename1
end if
if filename2<>"" then
rs("filename2")=filename2
end if
if filename3<>"" then
rs("filename3")=filename3
end if
if filename4<>"" then
rs("filename4")=filename4
end if
if filename5<>"" then
rs("filename5")=filename5
end if
if filename6<>"" then
rs("filename6")=filename6
end if
if filename7<>"" then
rs("filename7")=filename7
end if
if filename8<>"" then
rs("filename8")=filename8
end if
if filename9<>"" then
rs("filename9")=filename9
end if
if filename10<>"" then
rs("filename10")=filename10
end if
if filename11<>"" then
rs("filename11")=filename11
end if
if filename12<>"" then
rs("filename12")=filename12
end if
if filename13<>"" then
rs("filename13")=filename13
end if
if filename14<>"" then
rs("filename14")=filename14
end if
if filename15<>"" then
rs("filename15")=filename15
end if
if filename16<>"" then
rs("filename16")=filename16
end if
if filename17<>"" then
rs("filename17")=filename17
end if
if filename18<>"" then
rs("filename18")=filename18
end if
if filename19<>"" then
rs("filename19")=filename19
end if
if filename20<>"" then
rs("filename20")=filename20
end if
rs("showname")=showname
rs("bb")=bb
rs("classid")=classid
rs("Nclassid")=Nclassid
rs("fromurl")=fromurl
rs("note")=note
rs("system")=system
rs("hot")=hot
rs("hots")=hots
rs("kind")=kind
rs("stop")=hide
if size<>"" and size<>"K" then
rs("size")=size
end if
rs("images")=images
rs("orders")=order
rs("lasthits")=date()
rs("dateandtime")=date()
rs("dayhits")=0
rs("weekhits")=0
rs("hits")=0
rs.update
end sub
sub editsoft()
sql="select * from download where id="&request("id")
rs.open sql,conn,1,3
rs("movie")=movie
rs("club")=club
rs("filename")=filename
rs("filename1")=filename1
rs("filename2")=filename2
rs("filename3")=filename3
rs("filename4")=filename4
rs("filename5")=filename5
rs("filename6")=filename6
rs("filename7")=filename7
rs("filename8")=filename8
rs("filename9")=filename9
rs("filename10")=filename10
rs("filename11")=filename11
rs("filename12")=filename12
rs("filename13")=filename13
rs("filename14")=filename14
rs("filename15")=filename15
rs("filename16")=filename16
rs("filename17")=filename17
rs("filename18")=filename18
rs("filename19")=filename19
rs("filename20")=filename20
rs("showname")=showname
rs("bb")=bb
rs("classid")=classid
rs("Nclassid")=Nclassid
rs("fromurl")=fromurl
rs("note")=note
rs("system")=system
rs("hot")=hot
rs("hots")=hots
rs("stop")=hide
rs("kind")=kind
if size="" or size="K" then
rs("size")=Null
else
rs("size")=size
end if
rs("images")=images
rs("orders")=order
rs("lasthits")=date()
rs("dateandtime")=date()
rs.update
end sub
set rs=nothing
conn.close
set conn=nothing
%>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body bgcolor="#468ea3">
<br><br>
<table width="50%" border="0" cellpadding="3" cellspacing="1" align="center">
<tr>
<td width="100%" height="20" bgcolor="#145f74">
<p align="center"><font color="#FFFFFF">
<%if request("action")="add" then%>
添加
<%else%>
修改
<%end if%>
程序成功</font>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#a5d0dc">
<p align="left"><br>
显示名称为:<%=request.form("txtshowname")%> <%=bb%><br>
下载地址1为:<%=filename%><br>
下载地址2为:<%=filename1%><br>
下载地址3为:<%=filename2%><br>
下载地址4为:<%=filename3%><br>
下载地址5为:<%=filename4%><br>
下载地址6为:<%=filename5%><br>
下载地址7为:<%=filename6%><br>
下载地址8为:<%=filename7%><br>
下载地址9为:<%=filename8%><br>
下载地址10为:<%=filename9%><br>
下载地址11为:<%=filename10%><br>
下载地址12为:<%=filename11%><br>
下载地址13为:<%=filename12%><br>
下载地址14为:<%=filename13%><br>
下载地址15为:<%=filename14%><br>
下载地址16为:<%=filename15%><br>
下载地址17为:<%=filename16%><br>
下载地址18为:<%=filename17%><br>
下载地址19为:<%=filename18%><br>
下载地址20为:<%=filename19%><br>
下载地址21为:<%=filename20%><br>
</p>
您可以进行其他操作
</td>
</tr>
</table>
<%
else
response.write "由于以下的原因不能保存数据:"
response.write errmsg
end if
%>
<%if makejs=1 then%>
<IFRAME SRC="gx1.asp" WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no></IFRAME>
<%end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -