28,409
社区成员




<%@codepage = 936%>
<!--#include file="../include/function.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="fckeditor/fckeditor.asp"-->
<%
response.charset="GBK"
if session("admin")="" then
call sussLoctionHref("非法登录","admin_login.asp")
end if
dim picdir
picdir = "goods"
if request.form("send") = "添加商品" then
dim rs,sql,goodsname,goodscode,goodsweight,goodsnumber,goodsnew,goodshot,goodsfast,goodsunit,goodsprice1,goodspoint,goodsprice2,picdir1,picdir2,goodspoint,goodsinfo,goodscontent
goodsname=request.form("goodsname")
goodscode=request.form("goodscode")
goodsweight=request.form("goodsweight")
goodsnumber=request.form("goodsnumber")
goodsnew=request.form("goodsnew")
goodshot=request.form("goodshot")
goodsfast=request.form("goodsfast")
goodsunit=request.form("goodsunit")
goodsprice1=request.form("goodsprice1")
goodsprice2=request.form("goodsprice2")
goodspoint=request.form("goodspoint")
picdir1=request.form("picdir1")
picdir2=request.form("picdir2")
goodsinfo=request.form("goodsinfo")
goodscontent=request.form("goodscontent")
if goodsnew=1 then
goodsnew = true
elseif goodsnew="" then
goodsnew = false
end if
if goodshot=1 then
goodshot = true
elseif goodshot="" then
goodshot = false
end if
if goodsfast= 1 then
goodsfast= true
elseif goodsfast="" then
goodsfast=false
end if
if goodsunit= "" then
goodsunit="个"
end if
set rs=server.createobject("adodb.recordset")
sql="select * from goods"
rs.open sql,conn,1,3
rs.addnew
rs("goods_name")=goodsname
rs("goods_code")=goodscode
rs("goods_weight")=goodsweight
rs("goods_number")=goodsnumber
rs("goods_new")=goodsnew
rs("goods_hot")=goodshot
rs("goods_fast")=goodsfast
rs("goods_unit")=goodsunit
rs("goods_price1")=goodsprice1
rs("goods_price2")=goodsprice2
rs("goods_point")=goodspoint
rs("goods_pic1")=picdir1
rs("goods_pic2")=picdir2
rs("goods_info")=goodsinfo
rs("goods_content")=goodscontent
rs.update
call close_rs
response.write "<script>alert('商品发布成功!');location.href='admin_add_goods.asp'</script>"
end if
%>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>后台管理</title>
<link rel="stylesheet" type="text/css" href="style/admin.css" />
</head>
<body>
<div id="addnew">
<h3 style="text-align:center;color:red;margin:20px;">添加商品</h3>
<form method="post" name="add" action="admin_add_goods.asp">
<p>商品名称:<input type="text" name="goodsname" class="text" /></p>
<p>商品编号:<input type="text" name="goodscode" class="text" /></p>
<p>商品重量:<input type="text" name="goodsweight" class="text1" /> kg</p>
<p>商品库存:<input type="text" name="goodsnumber" class="text1" /></p>
<p>加入推荐:<input type="checkbox" name="goodsnew" value="1" /> 新品 <input type="checkbox" name="goodshot" value="1" /> 热卖 <input type="checkbox" name="goodsfast" value="1" /> 速递</p>
<p>商品单位:<input type="text" name="goodsunit" class="text1" /></p>
<p>市场价格:<input type="text" name="goodsprice1" class="text1" /> 元</p>
<p>本店价格:<input type="text" name="goodsprice2" class="text1" /> 元</p>
<p>赠送积分:<input type="text" name="goodspoint" class="text1" /> </p>
<p>上传小图:<input type="text" readonly="readonly" name="picdir1" /> <a href="###" onclick="javascript:open('upfile.asp?picdir=<%=picdir%>','upfile','width=400,height=200')">上传</a></p>
<p>上传大图:<input type="text" readonly="readonly" name="picdir2" /> <a href="###" onclick="javascript:open('upfile2.asp?picdir=<%=picdir%>','upfile','width=400,height=200')">上传</a></p>
<p>商品简介:<textarea name="goodsinfo"></textarea></p>
<p>详细内容:</p>
<p>
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor '创建一个编辑器的实例
oFCKeditor.BasePath = "fckeditor/" '配置编辑器的路径,我站点根目录下的一个目录
oFCKeditor.ToolbarSet = "Default" '完整和简化.Basic
oFCKeditor.Width = "100%" '编辑器的长度
oFCKeditor.Height = "400" '编辑器的高度
oFCKeditor.Value = "" '这个是给编辑器初始值
oFCKeditor.Create "goodscontent" '以后编辑器里的内容都是由这个content 取得
%>
</p>
<p><input type="submit" value="添加商品" name="send" class="submit" /></p>
</form>
</div>
</body>
</html>