?? savejiangpin.asp
字號(hào):
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('網(wǎng)絡(luò)超時(shí)或您還沒(méi)有登陸!');window.location.href='login.asp';</script>"
response.End
end if
if request("shopname")="" or request("shichangjia")="" or request("jifen")="" then
response.Write "對(duì)不起,添加失敗,請(qǐng)用正確的方式添加獎(jiǎng)品!"
response.End
end if
function HTMLEncode2(fString)
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")
HTMLEncode2 = fString
end function
dim shopdate,dazhe
'dazhe=round(request("huiyuanjia")/request("shichangjia"),2)
'if request("shopdateyear")<>"" then
'shopdate=trim(request("shopdateyear"))&"年"&trim(request("shopdatemonth"))&"月"
'else
'shopdate=""
'end if
dim action,shopid
shopid=request.QueryString("id")
action=request.QueryString("action")
select case action
case "add"
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from shop_jiangpin",conn,1,3
rs.AddNew
rs("shopname")=trim(request("shopname")) '商品名稱(chēng)
rs("guige")=trim(request("guige")) '商品規(guī)格
rs("shichangjia")=trim(request("shichangjia")) '市場(chǎng)價(jià)
rs("jifen")=trim(request("jifen")) '積分
rs("shoppic")=trim(request("shoppic")) '小圖片地址
rs("shoppic2")=trim(request("shoppic2")) '大圖片地址
rs("shopcontent")=htmlencode2(trim(request("shopcontent"))) '簡(jiǎn)介
rs("adddate")=now() '加入日期
if request("xianshi")=1 then '推薦
rs("xianshi")=1
else
rs("xianshi")=0
end if
rs.Update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('添加成功!');window.location.href='addjiangpin.asp';</script>"
response.End
case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from shop_jiangpin where shopid="&shopid,conn,1,3
rs("shopname")=trim(request("shopname")) '商品名稱(chēng)
rs("guige")=trim(request("guige")) '商品規(guī)格
rs("shichangjia")=trim(request("shichangjia")) '市場(chǎng)價(jià)
rs("jifen")=trim(request("jifen")) '積分
rs("shoppic")=trim(request("shoppic")) '小圖片地址
rs("shoppic2")=trim(request("shoppic2")) '大圖片地址
rs("shopcontent")=htmlencode2(trim(request("shopcontent"))) '簡(jiǎn)介
rs("adddate")=shopdate '加入日期
if request("xianshi")=1 then '推薦
rs("xianshi")=1
else
rs("xianshi")=0
end if
rs.Update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('修改成功!');history.go(-1);</script>"
response.End
end select
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -