⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.asp

📁 本组件是继作者原“艾恩ASP无组件上传类”修改整合而成, 具有和无组件上传类相同的功能,并且具有无组件类不能相比的优越性能。 能实现的功能主要包括:自由提取表单数据、自由限制上传扩展名、自由限制上
💻 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 + -