📄 index.asp
字号:
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn">
<head>
<title>An-Upload无组件上传类8.12.20 综合上传示例(1)</title>
<style type ="text/css">
body,table,textarea,span,div,a,input,pre{font-family:verdana,tahoma,arial;}
FORM {margin:3px;}
input {border:1px #bbbbbb solid;background-color:#ffffff;}
textarea {border:1px #bbbbbb solid;background-color:#ffffff;}
.iButton {height:20px;padding:2px;background-color:#eeeeee;}
</style>
</head>
<body style="font-size:12px">
<h3>综合上传示例(1)-添加产品</h3><hr />
<form name="upload" method="post" action="upload.asp" enctype="multipart/form-data" style="line-height :200%;">
产品名称: <input type="text" name ="product_name" /><br />
产品价格: <input type ="text" name ="product_price" /><br />
产品介绍: <textarea cols ="49" rows="5" name="product_introduce"></textarea><br />
产品图片: <input type ="file" name="product_Image" size="40" /><br />
缩 略 图: <input type ="file" name="product_small_Image" size="40" /><br />
<input class="iButton" type="submit" value="添加产品" />
</form>
<hr />
<%
if isnumeric(request.QueryString("del")) and cint(request.QueryString("del"))>0 then
conn.execute "delete * from [product] where [id]=" & request.QueryString("del")
response.Redirect "index.asp"
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from Product Order by [ID] DESC",conn,1,1
if rs.EOF and rs.BOF then
response.Write "没有记录"
else
do while not rs.EOF
response.Write rs("Product_Name") & " -- " & rs("Product_Price") & " -- <a href=""index.asp?del="& rs("ID") &""">删除</a><br />"
rs.MoveNext
loop
end if
rs.Close
set rs=nothing
conn.close
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -