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

📄 admincom.asp

📁 一个功能很全面占用空间的小商城程序,适合个人网上开店使用
💻 ASP
字号:
<%
if session("admin_name")="" then response.end
set rs=server.createobject("adodb.recordset")
%>
<!--#include file="conn.asp"-->
<%
if request("action")="pass1" then
sql="select * from member where user_id="&request("user_id")
rs.open sql,conn,3,3
if rs.eof then
    response.write "没有这个商店的信息,请确认通过了申请"
    response.end
else
    rs("admintuijian")=true
    rs.update
    response.write "<center>"
    response.write "<font color=red>已经成功在首页推荐!</font>"
end if
rs.close
end if
%>
<%
if request("action")="quit" then
sql="select * from member where user_id="&request("user_id")
rs.open sql,conn,3,3
if rs.eof then
    response.write "没有这个商店的信息,请确认通过了申请"
    response.end
else
    rs("admintuijian")=false
    rs.update
    response.write "<center>"
    response.write "<font color=red>已经成功撤消在首页推荐!</font>"
end if
rs.close
end if
%>
<%
if request("action")="pass" then
sql="select * from member where user_id="&request("user_id")
rs.open sql,conn,3,3
if rs.eof then
    response.write "没有这个商店的信息,请确认通过了申请"
    response.end
else
    rs("user_yes")=false
    rs("user_company")=""
    rs.update
    response.write "<center>"
    response.write "<font color=red>已经撤消这个用户的商店拥有权!</font>"
end if
rs.close
end if
%>

<%
dim rs,sql
dim page,maxPerPage
maxPerPage=10 '每页显示的记录数
page=Request("page")
if (page="" or isempty(page)) then page=1
thisUrl="admincom.asp?true=1"
session("adminOldUrl")=thisUrl&"&page="&page
sql="select * from member where user_yes=true"
sql=sql&" order by user_id desc"
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
%>
<html>
<head>
<title>商家维护</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=css.css rel=STYLESHEET type=text/css>
<script language=Javascript>
<!--
function jumpTo(i){
if(i==1){
	this.document.location="<%=thisUrl%>";}
if(i==2){
	this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
	this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
	this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}
//-->
</script>
</head>

<body bgcolor="#9CC7EF" text="#000000" leftmargin="0" topmargin="0">
<div align="center"><br>
</div>
<table width="99%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
  <tr bgcolor="#4296E7"> 
    <form method="post" action="memberList.asp" name="form1">
      <td colspan="8" height="28"> 
        <div align="center"><font color="#FFFFFF">商店管理</font></div>
      </td>
    </form>
  </tr>
  <tr bgcolor="#5EA5E6"> 
    <td width="6%" nowrap> 
      <div align="center"><font color="#FFFFFF">用户名</font></div>
    </td>
    <td width="20%" nowrap> 
      <div align="center"><font color="#FFFFFF">商店名</font></div>
    </td>
    <td width="7%" nowrap> 
      <div align="center"><font color="#FFFFFF">联系电话</font></div>
    </td>
    <td width="19%" nowrap> 
      <div align="center"><font color="#FFFFFF">E-mail</font></div>
    </td>
    <td width="14%" nowrap> 
      <div align="center"><font color="#FFFFFF">开通天数</font></div>
    </td>
    <td width="7%" nowrap> 
      <div align="center"><font color="#FFFFFF">状态</font></div>
    </td>
    <td width="12%" nowrap> 
      <div align="center"><font color="#FFFFFF">首页推荐</font></div>
    </td>
    <td width="15%" nowrap> 
      <div align="center"><font color="#FFFFFF">管理</font></div>
    </td>
  </tr>
  <%
		dim rsID
		i=1
		if not (rs.eof or err) then rs.move (page-1)*maxPerPage
		do while not (rs.eof or err) 
user_id=rs("user_id")
user_company=rs("user_company")
user_regtime=rs("user_regtime")
comdate=datediff("d",user_regtime,date())
admintuijian=rs("admintuijian")
%>
  <tr> 
    <td width="6%" title="点击查看会员信息" style="cursor:hand" onClick="Javascript:window.location='memberMod.asp?id=<%=user_id%>'" bgcolor="#0099FF" nowrap> 
      <div align="center"><%=rs("user_name")%></div>
    </td>
    <td width="20%" title="点击查看商店具体信息" style="cursor:hand" onClick="Javascript:window.location='comlist.asp?user_company=<%=rs("user_company")%>'"><%=rs("user_company")%>&nbsp;</td>
    <td width="7%" nowrap><%=rs("user_tel")%></td>
    <td width="19%"><%=rs("user_mail")%></td>
    <td width="14%"><font color=red><%=comdate%>天</font></td>
 <td width="7%"><%
 if admintuijian=false then 
response.write "普通"
else
response.write "<font color=red>推荐</font>"
end if%></td>
<td width="12%"> 
      <div align="center"> 
<%if admintuijian=0 then%>
<a href="admincom.asp?user_id=<%=user_id%>&action=pass1">推荐</A>
<%else%>
<a href="admincom.asp?user_id=<%=user_id%>&action=quit"><font color=red>撤消</font></A>
<%end if%>
    </div>
		
    </td>
    <td width="15%">
<input type="button" name="Submit3" value="撤消" onClick="deleteMe1()">&nbsp;
<input type="button" name="Submit3" value="删除" onClick="deleteMe2()"><script language=Javascript>
<!--
function deleteMe2(){
	if (confirm("确定删除?该商店的所有商品和定单都将删除,可是恢复不了的啊。")==1){
		window.location="delcom.asp?user_id=<%=user_id%>&user_company=<%=user_company%>";
	}
}

//-->
</script>
<script language=Javascript>
<!--
function deleteMe1(){
	if (confirm("确定撤消?该商店的商品和定单将保留,全部删除请点删除按钮")==1){
		window.location="admincom.asp?user_id=<%=rs("user_id")%>&action=pass";
	}
}

//-->
</script></td>
  </tr>

  <%
		i=i+1
		if i>maxPerPage then exit do
		rs.moveNext
		loop
%>
  <tr bgcolor="#4296E7"> 
    <td colspan="8"> 
      <div align="right"><font color=#FFFFFF><%=rs.recordCount%> 项 第<%=page%>/<%=rs.pageCount%> 
        页 </font> 
        <%if page>1 then%>
        <input type="button" name="Submit3" value="首页" onClick="Javascript:jumpTo(1)">
        <input type="submit" name="Submit4" value="上页" onClick="Javascript:jumpTo(2)">
        <%else%>
        <input type="button" name="Submit3" value="首页" disabled>
        <input type="submit" name="Submit4" value="上页" disabled>
        <%end if
if rs.recordCount>page*maxPerPage then%>
        <input type="submit" name="Submit5" value="下页" onClick="Javascript:jumpTo(3)">
        <input type="submit" name="Submit6" value="末页" onClick="Javascript:jumpTo(4)">
        <%else%>
        <input type="submit" name="Submit5" value="下页" disabled>
        <input type="submit" name="Submit6" value="末页" disabled>
        <%end if%>
      </div>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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