?? saveshjiainfo.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="../md5.asp"-->
<%
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 action,shjianame
action=request.QueryString("action")
shjianame=request.Cookies("snsn")("shjianame")
select case action
'//用戶資料
case "myziliao"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shjia] where username='"&shjianame&"'",conn,1,3
rs("useremail")=trim(request.form("useremail"))
rs("name")=trim(request("name"))
rs("name2")=trim(request("name2"))
rs("username")=trim(request("username"))
rs("dz")=trim(request("dz"))
rs("tel")=trim(request("tel"))
rs("pc")=trim(request("pc"))
rs("oicq")=trim(request("qq"))
rs("content")=htmlencode2(trim(request("content")))
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('資料修改成功!');window.location.href='../shjia.asp?action=myziliao';</script>"
response.end
'//保存新聞
case "savenews"
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
set rs_news=server.CreateObject("adodb.recordset")
rs_news.open "select * from [shjia] where username='"&shjianame&"'",conn,1,1
title=trim(request.form("title"))
content=trim(request.form("content"))
action=trim(request.form("action"))
set rs=server.CreateObject("adodb.recordset")
if action="add" then
rs.open "select * from [news]",conn,1,3
rs.addnew
rs("shjiaid")=rs_news("shjiaid")
rs("title")=title
rs("content")=htmlencode2(content)
rs("addTime")=now()
rs("shjianame")=shjianame
rs.update
rs.close
set rs=nothing
rs_news.close
set rs_news=nothing
response.Write "<script language=javascript>alert('新聞添加成功!');window.location.href='../shjia.asp?action=addnews';</script>"
response.End
elseif action="modify" then
rs.open "select * from news where newsid=" & cstr(request("id")),conn,1,3
rs("title")=title
rs("content")=htmlencode2(content)
rs("addTime")=now()
'rs("shjianame")=shjianame
rs.update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('新聞修改成功!');window.location.href='../shjia.asp?action=glnews';</script>"
response.End
end if
'//保存付款方式
case "fkfs"
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
set rs_news=server.CreateObject("adodb.recordset")
rs_news.open "select * from [shjia] where username='"&shjianame&"'",conn,1,1
content=trim(request.form("content"))
set rs=server.CreateObject("adodb.recordset")
fkong=trim(request.form("fkong"))
if fkong="" then
rs.open "select * from fkfs",conn,1,3
rs.addnew
rs("shjiaid")=rs_news("shjiaid")
rs("content")=htmlencode2(content)
rs.update
rs.close
set rs=nothing
rs_news.close
set rs_news=nothing
response.Write "<script language=javascript>alert('付款方式添加成功!');window.location.href='../shjia.asp?action=fkfs';</script>"
response.End
else
rs.open "select * from fkfs where shjiaid=" & cstr(request("id")),conn,1,3
rs("content")=htmlencode2(content)
rs.update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('付款方式修改成功!');window.location.href='../shjia.asp?action=fkfs';</script>"
response.End
end if
'//保存配送說明
case "ps"
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
set rs_news=server.CreateObject("adodb.recordset")
rs_news.open "select * from [shjia] where username='"&shjianame&"'",conn,1,1
content=trim(request.form("content"))
set rs=server.CreateObject("adodb.recordset")
psong=trim(request.form("psong"))
if psong="" then
rs.open "select * from ps",conn,1,3
rs.addnew
rs("shjiaid")=rs_news("shjiaid")
rs("content")=htmlencode2(content)
rs.update
rs.close
set rs=nothing
rs_news.close
set rs_news=nothing
response.Write "<script language=javascript>alert('配送說明添加成功!');window.location.href='../shjia.asp?action=ps';</script>"
response.End
else
rs.open "select * from ps where shjiaid=" & cstr(request("id")),conn,1,3
rs("content")=htmlencode2(content)
rs.update
rs.Close
set rs=nothing
response.Write "<script language=javascript>alert('配送說明修改成功!');window.location.href='../shjia.asp?action=ps';</script>"
response.End
end if
'//刪除留言
case "delfk"
dim id,sqldel
id=request.QueryString("fkid")
strdel="delete from [shop_shjiafk] where fkid="&id
conn.execute(strdel)
conn.close
response.Write "<script language=javascript>alert('你選擇的留言已刪除');window.location.href='../shjia.asp?action=fk';</script>"
end select
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -