?? admin_product.asp
字號(hào):
<%@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>發(fā)布產(chǎn)品</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>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -