📄 addproduct.asp
字号:
<!-- #include file="conn.asp" -->
<html>
<head>
</head>
<body bgcolor="">
<Center>
<br><br><br>
<FONT face=Georgia color=#cc0033 size=2><b>Product added successfully</b></font><br><br>
<Font face="Tahoma" size="2">Details of product are</font>
<%
name = request.form("name")
composition = request.form("composition")
mainphg = request.form("mainphg")
advantage = request.form("advantage")
ps = request.form("ps")
cost = request.form("cost")
cat = request.form("category")
Set oRs = Server.CreateObject("ADODB.RecordSet")
SQL = "select max(productid) from products"
Set oRs = objcon.execute(SQL)
max_pid = oRs.Fields(0)
product_id = max_pid + 1
oRs.close
oRs.open "select * from products",objcon,2,3
oRs.AddNew
oRs.Fields("techId") = advantage
oRs.Fields("Name") = name
oRs.Fields("Quality") = composition
oRs.Fields("Price") = cost
oRs.Fields("imagePath") = "store/" & product_id & ".jpg"
oRs.Fields("type") = mainphg
oRs.Update
oRs.close
Set oRs = nothing
response.write "<table Border=2 align=center bordercolor=#0000cc bgcolor="" width=500>"&_
"<tr><td><Font face=Tahoma size=2>Product name</td><td>"&name&"</Font></td></tr>"&_
"<tr><td><Font face=Tahoma size=2>Composition</td><td>"&composition&"</Font></td></tr>"&_
"<tr><td><Font face=Tahoma size=2>Main Pharma Cological Group</td><td>"&mainphg&"</Font></td></tr>"&_
"<tr><td><Font face=Tahoma size=2>Advantages</td><td>"&advantage&"</Font></td></tr>"&_
"<tr><td><Font face=Tahoma size=2>Pack Size</td><td>"&ps&"</Font></td></tr>"&_
"<tr><td><Font face=Tahoma size=2>Cost</td><td>"&cost&"</Font></td></tr></table>"
response.write "<br>Make'product image' having name "&product_id&".jpg and place it in 'TextTileMills/sotre</Font>"
response.write "<br><Font face=Tahoma size=1><a href=admin_options.asp>Go to options page</a></Font>"
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -