admin_product.asp

来自「ASPSQL企业网络管理系统」· ASP 代码 · 共 54 行

ASP
54
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../include/config.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<title>发布产品</title>
</head>
<body>
<%
dim id,obj,ss,aa
Set obj = Server.CreateObject("LyfUpload.UploadFile")
if not IsObject(obj) then
	Response.Write "LyfUpload control not installed !"
	Response.End
end if
aa=obj.filetype("product_pic") 
if aa <> "" then
	ss=obj.SaveFiletodb("product_pic") 
else
	ss = "no pic uploaded!"
end if
if ss= "" then
	Response.Write "<center>图片上传失败!<br><br><a href='history.back()'>返 回</a></center>"
else
	with session("rs")
		.Open "product",session("conn"),adOpenDynamic,adLockOptimistic,adCmdTableDirect
		if obj.Request("action") = "insert" then
			.AddNew
		else 
			if obj.Request("action") = "edit" then
				.find "id = " & obj.Request("id") 
			end if
		end if
			.Fields("owner") = obj.Request("owner")
			.Fields("name") = obj.Request("name")
			.Fields("type_id") = obj.Request("type")
			.Fields("price") = obj.Request("price")
			.Fields("unit") = obj.Request("unit")
			.Fields("package") = obj.Request("package")
			.Fields("memo") = obj.Request("memo")
			.Fields("intro") = obj.Request("intro")
			.Fields("pic_type") = aa
			if ss <> "no pic uploaded!" then
				.Fields("pic").AppendChunk obj.DBContent
			end if
		.Update
	end with
	Response.Redirect("../product/insert_product.asp")
end if
%>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?