📄 df.asp
字号:
<%@ CODEPAGE = "936" %>
<!--#include file="users.asp" -->
<!--#include file="jl.asp" -->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/const.asp"-->
<%
dim down1,down2,down3,down4,down5
dim txt1,txt2,txt3,txt4,txt5
dim name
dim classid
dim Nclassid
dim size
dim mode
dim roof
dim commend
dim tj
dim hot
dim pic
dim show
dim homepage
dim sql
dim rs
dim founderr
founerr=false
if trim(request.form("name"))="" then
founderr=true
errmsg=errmsg+"<li>软件名称不能为空</li>"
end if
if trim(request.form("show"))="" then
founderr=true
errmsg=errmsg+"<li>软件简介不能为空</li>"
end if
if founderr=false then
down1=request("down1")
down2=request("down2")
down3=request("down3")
down4=request("down4")
down5=request("down5")
txt1=request("txt1")
txt2=request("txt2")
txt3=request("txt3")
txt4=request("txt4")
txt5=request("txt5")
name=htmlencode2(request.form("name"))
classid=request("classid")
Nclassid=request("Nclassid")
size=htmlencode2(request("size"))
mode=htmlencode2(request("mode"))
roof=htmlencode2(request("roof"))
commend=htmlencode2(request("commend"))
tj=htmlencode2(request("tj"))
hot=htmlencode2(request("hot"))
pic=request("pic")
homepage=request("homepage")
show=htmlencode2(request("show"))
if request.form("hot")="on" then
hot=1
else
hot=0
end if
if request.form("tj")="on" then
tj=1
else
tj=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("txt1")=txt1
if txt2<>"" then
rs("txt2")=txt2
end if
if txt3<>"" then
rs("txt3")=txt3
end if
if txt4<>"" then
rs("txt4")=txt4
end if
if txt5<>"" then
rs("txt5")=txt5
end if
rs("down1")=down1
if down2<>"" then
rs("down2")=down2
end if
if down3<>"" then
rs("down3")=down3
end if
if down4<>"" then
rs("down4")=down4
end if
if down5<>"" then
rs("down5")=down5
end if
rs("name")=name
rs("classid")=classid
rs("Nclassid")=Nclassid
rs("size")=size
rs("mode")=mode
rs("commend")=commend
rs("tj")=tj
rs("hot")=hot
rs("pic")=pic
rs("homepage")=homepage
rs("show")=show
rs("roof")=roof
rs("time")=now()
rs.update
end sub
sub editsoft()
sql="select * from download where id="&request("id")
rs.open sql,conn,1,3
rs("down1")=down1
rs("down2")=down2
rs("down3")=down3
rs("down4")=down4
rs("down5")=down5
rs("txt1")=txt1
rs("txt2")=txt2
rs("txt3")=txt3
rs("txt4")=txt4
rs("txt5")=txt5
rs("name")=name
rs("classid")=classid
rs("Nclassid")=Nclassid
rs("size")=size
rs("mode")=mode
rs("commend")=commend
rs("tj")=tj
rs("hot")=hot
rs("pic")=pic
rs("homepage")=homepage
rs("show")=show
rs("roof")=roof
rs("time")=now()
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="#0066FF">
<br>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" align="center">
<tr>
<td width="100%" height="20" bgcolor="#999999">
<p align="center"><font color="#FFFFFF">
<%if request("action")="add" then%>
添加
<%else%>
修改
<%end if%>
程序成功</font>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#CCCCCC">
<p align="left"><br>
显示名称为:<%=request.form("name")%> <br>
下载地址1为:<%=down1%> 说明是:<%=txt1%><br>
下载地址2为:<%=down2%> 说明是:<%=txt2%><br>
下载地址3为:<%=down3%> 说明是:<%=txt3%><br>
下载地址4为:<%=down4%> 说明是:<%=txt4%><br>
下载地址5为:<%=down5%> 说明是:<%=txt5%> <br>
</p>
您可以进行其他操作 </td>
</tr>
</table>
<%
else
response.write "由于以下的原因不能保存数据:"
response.write errmsg
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -