📄 admin_shop.asp
字号:
<!--#include file="conn.asp" -->
<!-- #include file="inc/info.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/myinc.asp" -->
<%admheader
'=========================================================
'Copyright (C) 2003-2004 AspEase.Com. All rights reserved.
'Web: http://www.aspease.com
'Email: byhucn@126.com,lzz9812@163.com
'=========================================================
'
'FileName: admin_shop.asp
'Version:2.0
'UpdateTime: 2004-10-7 16:04:47
'Script Written by www.aspease.com
'=========================================================
select case rst("action")
case "showshop"
call showshop
case "editshop"
call editshop
case "saveshop"
call saveshop
case "delshop"
call delshop
case else
call showshop
end select
admfooter
sub showshop
sql="select * from shops,users where shopownerid=regid order by shopid desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
totalcs=rs.recordcount
response.Write("<table width=""95%"" border=""0"" cellspacing=""1"" cellpadding=""3"" class=""tableBorder"" align=""center"">")
response.Write(" <form name=""frmshop"" method=""post"" action="""">")
response.Write(" <tr> ")
response.Write(" <td colspan=""4"" class=row>查找商店名: ")
response.Write(" <input name=""shopname"" type=""text"" id=""shopname""> <input type=""submit"" name=""Submit"" value=""查找""> ")
response.Write(" </td>")
response.Write(" </tr>")
response.Write(" </form>")
If rst("submit")="查找" Then
sqlf="select * from shops,users where shopownerid=regid and shopname="&sqlstr(rst("shopname"))&" order by shopid desc"
set rs1=conn.execute(sqlf)
response.Write(" <tr> ")
response.Write(" <th width=""27%"">商店名称</th>")
response.Write(" <th width=""25%"">店主</th>")
response.Write(" <th width=""17%"" height=""25""> 删除 </th>")
response.Write(" <th width=""31%""> 修改 </th>")
response.Write(" </tr>")
If rs1.eof Then
response.Write(" <tr> ")
response.Write(" <td colspan=""4"" class=row>没有找到")
response.Write( rst("shopname") )
response.Write("</td>")
response.Write(" </tr>")
rs1.close
else
response.Write(" <tr> ")
response.Write(" <td width=""27%"" class=row><a href=""usershop.asp?shopid=")
response.Write( rs1("shopid") )
response.Write(""" target=""_blank"">")
response.Write( rs1("shopname") )
response.Write("</a></td>")
response.Write(" <td width=""25%"" class=row>")
response.Write( rs1("regusername") )
response.Write("</td>")
response.Write(" <td width=""17%"" class=row> <a href=""?action=delshop&id=")
response.Write( rs1("shopid") )
response.Write("&userid=")
response.Write( rs1("regid") )
response.Write(""" onclick=""{if(confirm('确定删除吗?')){this.document.frmShop.submit();return true;}return false;}"">删除</a></td>")
response.Write(" <td width=""31%"" class=row> <a href=""?action=editshop&id=")
response.Write( rs1("shopid") )
response.Write(""">修改他的商店</a> ")
response.Write(" </td>")
response.Write(" </tr>")
rs1.close
end if
response.End()
else
response.Write(" <tr> ")
response.Write(" <th width=""27%"" height=""25"">商店名称</th>")
response.Write(" <th width=""25%"" height=""25"">店主</th>")
response.Write(" <th width=""17%"" height=""25""> 删除 </th>")
response.Write(" <th width=""31%"" height=""25""> 修改 </th>")
response.Write(" </tr>")
If rs.eof Then
response.Write(" <tr> ")
response.Write(" <td width=""27%"" class=row>还没有商店</td>")
response.Write(" <td width=""25%"" class=row> </td>")
response.Write(" <td width=""17%"" class=row></td>")
response.Write(" <td width=""31%"" class=row> </td>")
response.Write(" </tr>")
Else
auction_page=10%><!--#include file="inc/libt.inc"--><%
response.Write(" <tr> ")
response.Write(" <td width=""27%"" class=row><a href=""usershop.asp?shopid=")
response.Write( rs("shopid") )
response.Write(""" target=""_blank"">")
response.Write( rs("shopname") )
response.Write("</a></td>")
response.Write(" <td width=""25%"" class=row>")
response.Write( rs("regusername") )
response.Write("</td>")
response.Write(" <td width=""17%"" class=row> <a href=""?action=delshop&id=")
response.Write( rs("shopid") )
response.Write("&userid=")
response.Write( rs("regid") )
response.Write(""" onclick=""{if(confirm('确定删除吗?')){this.document.frmShop.submit();return true;}return false;}"">删除</a></td>")
response.Write(" <td width=""31%"" class=row><a href=""?action=editshop&id=")
response.Write( rs("shopid") )
response.Write(""">修改他的商店</a></td>")
response.Write(" </tr>")
%><!--#include file="inc/libf.inc"--><%
end if
end if
myfpage "admin_shop.asp",rst("action")
response.Write("</table>")
end sub
sub editshop
id=fval(rst("id"))
sql="select * from shops where shopid="&sqlval(id)
set rs=conn.execute(sql)
response.Write("<table border=""0"" id=gwidth width=""95%"" class=""tableBorder"" align=""center"">")
response.Write(" <form name=""frmShop"" action=""?action=saveshop&id=")
response.Write(fval(rst("id")))
response.Write(""" method=""post"">")
response.Write(" <tr> ")
response.Write(" <th height=""24"" colspan=""2"" align=""left"">修改商店信息</th>")
response.Write(" </tr>")
response.Write(" <tr class=row> ")
response.Write(" <td width=""45"" align=""left"" class=row>名称</td>")
response.Write(" <td width=""293"" class=row> ")
response.Write(" <input type=""text"" name=""ShopName"" size=""20"" value=""")
response.Write( rs("ShopName") )
response.Write(""">")
response.Write(" </td>")
response.Write(" </tr>")
response.Write(" <tr> ")
response.Write(" <td align=""left"" class=row>类别</td>")
response.Write(" <td class=row> ")
response.Write(" <select size=""1"" name=""ShopType"">")
response.Write(" ")
set t=conn.execute("select * from cat order by catid")
if t.eof then
response.Write(" <option value= """">还没有分类呢</option>")
response.Write(" ")
end if
while not t.eof
response.Write(" <option value= ")
response.Write(fval(t("catid")))
response.Write(">")
response.Write(t("catname"))
response.Write("</option>")
response.Write(" ")
t.movenext
wend
response.Write(" </select>")
response.Write(" <font color=""#FF0000"">*</font></td>")
response.Write(" </tr>")
response.Write(" <tr> ")
response.Write(" <td align=""left"" class=row>介绍<br>")
response.Write(" </td>")
response.Write(" <td valign=""middle"" class=row> ")
response.Write(" <textarea rows=""7"" name=""ShopDesc"" cols=""40"">")
response.Write( rs("ShopDescription") )
response.Write("</textarea>")
response.Write(" </td>")
response.Write(" </tr>")
response.Write(" <tr> ")
response.Write(" <td align=""left"" class=row>公告<br>")
response.Write(" </td>")
'=========================================================
'Copyright (C) 2003-2004 AspEase.Com. All rights reserved.
'Web: http://www.aspease.com
'Email: byhucn@126.com,lzz9812@163.com
'=========================================================
'
'FileName: index.asp
'Version:2.0
'UpdateTime: 2004-10-7 16:07:47
'Script Written by www.aspease.com
'=========================================================
response.Write(" <td class=row> ")
response.Write(" <textarea rows=""6"" name=""ShopNotice"" cols=""40"">")
response.Write(rs("ShopNotice"))
response.Write("</textarea>")
response.Write(" </td>")
response.Write(" </tr>")
response.Write(" <tr> ")
response.Write(" <td align=""left"" class=row>配送<br>")
response.Write(" 说明<br> </td>")
response.Write(" <td class=row> ")
response.Write(" <textarea rows=""6"" name=""ShopDeliver"" cols=""40"">")
response.Write(rs("ShopDeliver"))
response.Write("</textarea>")
response.Write(" </td>")
response.Write(" </tr>")
response.Write(" <tr> ")
response.Write(" <td class=row>店铺<br>标志</td>")
response.Write(" <td class=row> <INPUT NAME=""shoplogoURL"" TYPE=""TEXT"" id=""shoplogoURL"" value=")
response.Write(rs("shoplogo"))
response.Write(" SIZE=""20"" MAXLENGTH=""255"">")
response.Write(" <img src=""")
response.Write(rs("shoplogo"))
response.Write(""" width=""184"" height=""48""> </td>")
response.Write(" </tr>")
response.Write(" <tr> ")
response.Write(" <td class=row></td>")
response.Write(" <td class=row> ")
response.Write(" <input type=""submit"" name=""submit"" value=""修改""> ")
response.Write(" <input type=""reset"" value=""还原"">")
response.Write(" </td>")
response.Write(" </tr>")
response.Write(" <tr> ")
response.Write(" <td class=row></td>")
response.Write(" <td class=row></td>")
response.Write(" </tr> </form> ")
response.Write(" </table> ")
end sub
sub saveshop
Set rs1 = Server.CreateObject("ADODB.recordset")
rs1.open "select * from shops where shopid="&sqlval(rst("id")),conn,1,3
RS1("ShopName")=rst("ShopName")
RS1("ShopCat")=rst("ShopType")
rs1("shopdescription")=rst("ShopDesc")
rs1("shopnotice")=rst("ShopNotice")
rs1("shopdeliver")=rst("ShopDeliver")
rs1("shoplogo")=rst("shoplogoURL")
rs1.update
rs1.close
set rs1=nothing
response.Write("修改成功")
end sub
sub delshop
sql="delete from shops where shopid="&sqlval(rst("id"))
conn.execute(sql)
conn.execute("delete from shopshelf where shopshelf_owner="&sqlval(rst("userid")))
conn.execute("delete from upshelf where up_shelfowner="&sqlval(rst("userid")))
conn.execute("delete from tuijian where tj_shopownerid="&sqlval(rst("userid")))
conn.execute("update auctions set auc_upshelf='N' where auc_ItemOwner="&sqlval(rst("userid")))
response.write "删除成功"
end sub
'=========================================================
'Copyright (C) 2003-2004 AspEase.Com. All rights reserved.
'Web: http://www.aspease.com
'Email: byhucn@126.com,lzz9812@163.com
'=========================================================
'
'FileName: admin_shop.asp
'Version:2.0
'UpdateTime: 2004-10-7 16:04:47
'Script Written by www.aspease.com
'=========================================================%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -