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

📄 shopacc.asp

📁 宁波娱乐在线城市,丰富的内容版块
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!-- #include file="shopconn.asp" -->
<%
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
		Response.Write("对不起,您不是社区用户,请先注册!")
        Response.End
else
dim act,rs1
dim maxlist,currentpage,pcount,page_count,endpage
dim shopnumber,shopid
maxlist=10
%><HTML><HEAD><title>超级市场 → 审批商店</title>
<script ID="clientEventHandlersJS" LANGUAGE="javascript">
<!--
function ShowGRZL(nc) {
    l = screen.width/2-500/2;
    t = screen.height/2-250/2;
    window.open('../grzl.asp?NC='+nc,'fGRZL','scrollbars=no,toolbar=no,menubar=no,location=no,status=no,resizable=no,width=500,height=250,left='+l+',top='+t);
}//-->
</script>
<%call shophead()
if master then
act=request("act")
if act="acc" then
call shopacc()
elseif act="noacc" then
call shopnoacc
else
call main()
end if
else
response.write "<script>alert('您没有管理权限!');history.go(-1);</script>"
response.end
end if%></center></body></html>
<%
end if
sub main()
dim brs
%>
<TABLE cellpadding="2" cellspacing="1" width=100% bgcolor="#F2F8FF">
<TBODY bgcolor="#B7D3FF">
<TR>
<TD colspan="6" align="center" height="25"><%
set rs=server.createobject("adodb.recordset")
sql="select * from shoptmp order by id desc"
rs.open sql,connshop,1,1
if rs.eof and rs.bof then%><BR>暂时没有待审批的商店!<BR><BR><%else
shopnumber=rs.recordcount
currentpage=trim(request("page"))
if currentpage="" or not isinteger(currentpage) then
currentpage=1
else
currentpage=clng(currentpage)
if err then
currentpage=1
err.clear
end if
end if
if shopnumber mod maxlist=0 then
Pcount= shopnumber \ maxlist
else
Pcount= shopnumber \ maxlist+1
end if%>超市目前共有 <font color=red><%=cstr(shopnumber)%></font> 个商店等待审批</td></tr><TR>
<TD align="center" height="25">商店招牌</TD>
<TD align="center">店名</TD>
<TD align="center">店主</TD>
<TD align="center">商店广告</TD>
<TD align="center">申请时间</TD>
<TD align="center">操作</TD>
</TR>
<%
RS.MoveFirst
if currentpage > Pcount then currentpage = Pcount
if currentpage<1 then currentpage=1
RS.Move (currentpage-1) * maxlist
page_count=0
do while not rs.eof and page_count < maxlist
%>
<tr>
<td align="center"><IMG src="<%=rs("shoppic")%>" border="0"></td>
<td align="center"><%=rs("shopname")%></td>
<td align="center"><a href="javascript:ShowGRZL('<%=rs("boss")%>')"><%=rs("boss")%></a></td>
<td align="center"><%=rs("shopface")%></td>
<td align="center"><%=rs("datetime")%></td>
<td align="center"><a href=?shopid=<%=rs("id")%>&act=acc><font color=red>通过</font></a>&nbsp;<a href=?shopid=<%=rs("id")%>&act=noacc><font color=red>否决</font></a></td>
</tr>
<%
page_count=page_count+1
rs.movenext
loop
%>
<tr><td colspan="6" align="center" height="25">页次:<b><%=currentpage%></b>/<b><%=Pcount%></b>页&nbsp;
每页:<b><%=maxlist%></b> 总数:<b><%=shopnumber%></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;分页:
<%if currentpage > 4 then%>
<a href="?page=1">[1]</a>...
<%
end if
if Pcount>currentpage+3 then
endpage=currentpage+3
else
endpage=Pcount
end if
for i=currentpage-3 to endpage
if not i<1 then
if i = clng(currentpage) then%><font color=red>[<%=i%>]</font><%else
%>
<a href="?page=<%=i%>"><%=i%></a>
<%		end if
end if
next
if currentpage+3 < Pcount then%>... <a href=?page=<%=Pcount%>>[<%=Pcount%>]</a><%end if
end if%></td></tr></TBODY></table><%rs.close
set rs=nothing
end sub

sub shopacc()
dim brs,username
shopid=request("shopid")
set rs=server.createobject("adodb.recordset")
sql="select * from shoptmp where id="&shopid
rs.open sql,connshop,1,1
username=rs("boss")
set brs=server.createobject("adodb.recordset")
sql="select * from shop where (id is null)"
brs.open sql,connshop,1,3
brs.addnew
brs("shopname")=rs("shopname")
brs("boss")=rs("boss")
brs("shopface")=rs("shopface")
brs("shoppic")=rs("shoppic")
brs("shoprq")=0
brs("shopvalue")=100
brs("shopstart")=08
brs("shopclose")=20
brs("ifopen")=true
brs("datetime")=date()
brs.update
brs.close
sql="delete from shoptmp where id="&shopid
brs.open sql,connshop,1,3
set brs=nothing

dim message,sendid,rs1
strsql="select ID from HY where NC='"& Application("NC") & "'"
rs1.open strsql,conn,1,1
sendid=rs("ID")
rs1.close
set rs1=nothing

set rs=server.createobject("adodb.recordset")
message="您的商店已经通过审批,请进入商店管理页面设置您的商店。"

sql = "Insert Into LY (NC,ID,NR,ZT,SJ,LB) Values('"
sql = sql & username & "',"& sendid &",'"& message & "',0,'"&ConvertDateTime(Now())&"',0)"
conn.execute(sql)
%>
<table><tr><td align=center>恭喜,操作成功!</td></tr>
<%response.write "<meta http-equiv=refresh content=""3;url=shopacc.asp"">"%>
<tr><td>系统将自动在3秒后返回审批商店,您现在可以选择下面操作:
<UL><li><a href=/><font color=#000000>返回中央广场</font></a></li>
<li><a href=shoped.asp><font color=#000000>返回我的购物车</font></a></li>
<li><a href=shop.asp><font color=#000000>返回商店列表</font></a></li></UL>
</td></tr></table>
<%
end sub

sub shopnoacc()
dim brs,username
shopid=request("shopid")
set rs=server.createobject("adodb.recordset")
sql="select * from shoptmp where id="&shopid
rs.open sql,connshop,1,1
username=rs("boss")
rs.close
sql="delete from shoptmp where id="&shopid
rs.open sql,connshop,1,3

dim message,sendid,rs1
strsql="select ID from HY where NC='"& Application("NC") & "'"
rs1.open strsql,conn,1,1
sendid=rs("ID")
rs1.close
set rs1=nothing

set rs=server.createobject("adodb.recordset")
message="很遗憾,由于某种缘故,您的商店未通过审批,请认真填写您的入驻申请。"
sql = "Insert Into LY (NC,ID,NR,ZT,SJ,LB) Values('"
sql = sql & username & "',"& sendid &",'"& message & "',0,'"&ConvertDateTime(Now())&"',0)"
conn.execute(sql)
%>
<table><tr><td align=center>恭喜,操作成功!</td></tr>
<%response.write "<meta http-equiv=refresh content=""3;url=shopacc.asp"">"%>
<tr><td>系统将自动在3秒后返回审批商店,您现在可以选择下面操作:
<UL><li><a href=/><font color=#000000>返回中央广场</font></a></li>
<li><a href=shoped.asp><font color=#000000>返回我的购物车</font></a></li>
<li><a href=shop.asp><font color=#000000>返回商店列表</font></a></li></UL>
</td></tr></table>
<%
end sub

connshop.close
set connshop=nothing%>

⌨️ 快捷键说明

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