⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 saveshjiainfo.asp

📁 php 语言写的c2c商城网站程序
💻 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("godbook")("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("name2")=trim(request("name2"))
rs("dz")=trim(request("dz"))
rs("tel")=trim(request("tel"))
rs("pc")=trim(request("pc"))
rs("oicq")=trim(request("qq"))
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('资料修改成功!');window.location.href='admin_right.asp?action=myziliao';</script>"
response.end

'//二级域名
case "url"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shjia] where username='"&shjianame&"'",conn,1,3
rs("url")=trim(request("url"))
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('域名添加成功!');window.location.href='admin_right.asp?action=url';</script>"
response.end

'//商家LOGO
case "logo"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shjia] where username='"&shjianame&"'",conn,1,3
rs("logo")=trim(request("logo"))
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('修改成功!');window.location.href='admin_right.asp?action=logo';</script>"
response.end

'//密码修改
case "pass"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shjia] where username='"&shjianame&"'",conn,1,3
if trim(request("password"))<>"" then
rs("userpassword")=md5(trim(request("password")))
end if
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('密码修改成功!');window.location.href='admin_right.asp?action=pass';</script>"
response.end

'//商家公告
case "gong"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shjia] where username='"&shjianame&"'",conn,1,3
rs("content")=htmlencode2(trim(request("content")))
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('公告修改成功!');window.location.href='admin_right.asp?action=gong';</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='admin_right.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='admin_right.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='admin_right.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='admin_right.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='admin_right.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='admin_right.asp?action=ps';</script>"
response.End
end if

'//删除留言
case "delfk"
dim id
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='admin_right.asp?action=fk';</script>"
response.end

'//删除新闻
case "delnews"
dim newsid
newsid=request.QueryString("newsid")
strdel="delete from [news] where newsid="&newsid
conn.execute(strdel)
conn.close
response.Write "<script language=javascript>alert('你选择的新闻已删除');window.location.href='admin_right.asp?action=glnews';</script>"
response.end
end select
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -