<!--#include virtual="/inc/conn.asp"-->
<!--#include virtual="/inc/sitecon.asp"-->
<!--#include virtual="/inc/chkuser.asp"-->

<%
if trim(SafeRequest("mcode"))<>"" then
call chkmcode(trim(SafeRequest("mi")),trim(SafeRequest("mcode")),trim(SafeRequest("yurl")),trim(SafeRequest("mp"))) 
end if
call logname("1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,99")

call getidzhuangtai()

if cint(getuserydip(request.Cookies("aynameid")))=1 then
call chkip()
end if
%>
<!DOCTYPE html>
<html lang="zh-CN"> 
<head>

<meta charset="gb2312">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
-->
<title>商家后台</title>
<link rel="stylesheet" type="text/css" href="/Template/Template5/usernew/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="/Template/Template5/usernew/css/bootstrap-customize.css">
<link rel="stylesheet" type="text/css" href="/Template/Template5/usernew/css/style.css">
<link rel="stylesheet" type="text/css" href="/Template/Template5/usernew/css/pages.css">

</head> 
<body>

<%
if request.Cookies("aynameid")="" then 
response.Redirect "/index/log"
response.End()
end if

function cbname(url) 
	if instr(1,url,",")>0 then
		ustr=split(url,",")
		for usum=0 to ubound(ustr)
		if thisdaohangurl=ustr(usum) then 
		cbname="on"
		exit for
		end if
		next
	else
	if thisdaohangurl=url then cbname="on"
	end if
end Function


sub iszizhu()
rs.open "select top 1 * from ayzizhu where zyzizhuisok=1 and ayzizhuuid="&trim(request.Cookies("aynameid"))&"" ,conn,1,3
if not(rs.bof and rs.eof) then
	if DateDiff("d",rs("ayzizhudate"),now())>3 then
	rs.delete
	call PopErr2("您的请求已过时效，可以联系管理员重新申请！","index")
	end if
response.Redirect("aotoedit")
response.end
end if
rs.close
end sub

set rst=server.CreateObject("adodb.recordset")
rst.open "select top 1 aynameid,ayjiesuanms from ayname where aynameid="&trim(request.Cookies("aynameid"))&"" ,conn,1,1
ayjiesuanms=rst("ayjiesuanms")
if clng(rst("aynameid"))<>clng(request.Cookies("aynameid")) then response.Redirect "/index/exit"
rst.close

url1=""
if request.Cookies("yurl")<>"" then 
yurl=request.Cookies("yurl")
url1=request.Cookies("yurl")&"user/"
else
yurl=weburl
end if
%>
<!-------------------------------------- 头部开始 -------------------------------------->

<header>
    <div class="container">
        <div class="head">
            <div class="pull-right">
                <div class="user">
				<%
                'rst.open "select * from aytongzhi where t4=1 and aytongzhiuser="&clng(request.Cookies("aynameid"))&" and aytongzhidu=0 order by aytongzhiid desc",conn,1,1
                'messnum=rst.RecordCount
                'rst.close
				
				set rsnum=conn.execute("select count(*) as num from aytongzhi where t4=1 and aytongzhiuser="&clng(request.Cookies("aynameid"))&" and aytongzhidu=0")
				messnum=rsnum("num")
                %>
                <p>
                <a style="color:#FFF; font-size:14px;" href="<%=request.Cookies("yurl")%>/userold/index">使用旧版</a><span class="wh15"></span>
                
                商家：<%=trim(request.Cookies("aytrueuser"))%><span class="wh15"></span>
                
                <a href="mess">站内信[<%=messnum%>]</a><span class="wh15"></span>

                <!--
                级别：<%'=getjbname(trim(request.Cookies("ayjibie")))%><span class="wh15"></span>
                客服:<a target="_blank" href="http://p.qiao.baidu.com/cps/chat?siteId=&userId=">咨询</a><span class="wh15"></span>
                客服QQ:<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<%'=allfuwuqq%>&site=qq&menu=yes"><%'=allfuwuqq%></a><span class="wh15"></span>
				<%'if trim(kfwxerweima)<>"" then%>
                &nbsp;<a onMouseOver="Layerw11.style.display='';" onMouseOut="Layerw11.style.display='none';"  style="cursor:pointer">客服微信</a><span class="wh15"></span>
                <%'end if%>
                -->
                
                <a href="/index/exit">[安全退出]</a><span class="wh15"></span>
				<%if request.Cookies("admindaiguan")="yes" then%>
                &nbsp;&nbsp;<A href="qxdaiguan.asp?act=quxiao">取消代管</A>
                <%end if%>
                </p>
                </div>
            </div>
        <div class="logo"><a href="<%=request.Cookies("yurl")%>/user/index"><img src="<%=weblogo%>" alt=""></a></div>
        </div>
    </div>
</header>
<!-------------------------------------- 头部结束 -------------------------------------->



<%sub userleft()%>
<div class="Layerw11" id="Layerw11" style="display:none">
<div class="lxclubw01">使用微信扫一扫添加客服微信</div>
<div class="lxclubw01"><img src="<%=kfwxerweima%>"  width="230" height="230"/></div>
</div>
	<!-------------------------------------- 栏目开始 -------------------------------------->
    <div class="l">
    
        <div class="ui-navi">
            <ul>
                <li>
                	<div class="i <%=cbname("index,myname,anquan,anquanedit,mibaobang,mibaojie,yinjian,userdaili,dailiedit,renzheng,tuisong,diankabl,mylink,gongzhonghao,mailrenzheng,telrenzheng,aotoedit,chong,chk,nobuylist,dlshouquan,pingtaibuy,kuaijielog")%>">
                    <p><a href="<%=url1%>index" class="ico1">商家中心</a></p>
                        <div class="ex">
                        <p>商家中心</p>
                            <div class="ct">
                            <p><a href="<%=url1%>index" class="<%=cbname("index")%>">后台首页</a></p>
                            <p><a href="<%=url1%>myname" class="<%=cbname("myname,aotoedit")%>">商家信息</a></p>
                            <p><a href="<%=url1%>anquan" class="<%=cbname("anquan,anquanedit,mibaobang,mibaojie,chk")%>">安全中心</a></p>
                            <p><a href="<%=url1%>userdaili" class="<%=cbname("userdaili,dailiedit")%>">代理系统</a></p>
                            <p><a href="<%=url1%>renzheng" class="<%=cbname("renzheng,mailrenzheng,telrenzheng")%>">认证中心</a></p>
                            <p><a href="<%=url1%>tuisong" class="<%=cbname("tuisong")%>">推送设置</a></p>
                            <!--
                            <p><a href="<%'=url1%>yinjian" class="<%'=cbname("yinjian")%>">我的引荐</a></p>
                            <p><a href="<%'=url1%>diankabl" class="<%'=cbname("diankabl")%>">点卡价值</a></p>
                            <p><a href="<%=url1%>pingtaibuy" class="<%=cbname("pingtaibuy")%>">平台代售</a></p>
                            -->
                            <p><a href="<%=url1%>mylink" class="<%=cbname("mylink")%>">店铺链接</a></p>
                            <p><a href="<%=url1%>nobuylist" class="<%=cbname("nobuylist")%>">封禁买家</a></p>
                            <p><a href="<%=url1%>dlshouquan" class="<%=cbname("dlshouquan")%>">登录授权</a></p>
                            <p><a href="<%=url1%>chong" class="<%=cbname("chong")%>">在线充值</a></p>
                            <%if cint(ayjiesuanms)=5 then%>
                            <p><a href="<%=url1%>tixian" class="<%=cbname("tixian,tixianq")%>">申请提现</a></p>
                            <%end if%>
                            <p><a href="<%=url1%>kuaijielog" class="<%=cbname("kuaijielog")%>">快捷登录</a></p>
                            <p><a href="<%=url1%>gongzhonghao" class="<%=cbname("gongzhonghao")%>">公众号</a></p>
                            </div>
                        </div>
                    </div>
                </li>
                
                <li>
                	<div class="i <%=cbname("jiesuan_list,jiesuan_edit")%>">
                    <p><a href="<%=url1%>jiesuan_list" class="ico4">结算账号</a></p>
                        <div class="ex">
                        <p>结算设置</p>
                            <div class="ct">
                            <p><a href="<%=url1%>jiesuan_list" class="<%=cbname("jiesuan_list")%>">结算账号</a></p>
                            </div>
                        </div>
                    </div>
                </li>
                                            
                <li>
                    <div class="i <%=cbname("fenlei,goodlist,goodadd,kaadd,kaaddtxt,kucunka,feika,delka,goodjiazhi,goodedit,goodlink,fenleilink,feikadaili,fenleiedit,fenleijiazhi")%>">
                    <%if pichost<>"/" then%>
                    <p><a href="<%=pichost%>user/goodlist?act=all&mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="ico2">卡密商品</a></p>
					<%else%>
					<p><a href="<%=url1%>goodlist?act=all" class="ico2">商品管理</a></p>
                    <%end if%>
                    
                        <div class="ex"> 
                        <p>卡密商品</p>
                            <div class="ct">
                            <p><a href="<%=url1%>fenlei" class="<%=cbname("fenlei,fenleilink,fenleiedit,fenleijiazhi")%>">商品分类</a></p>
                            
                            <%if pichost<>"/" then%>
                            <p><a href="<%=pichost%>user/goodlist?act=all&mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="<%=cbname("goodlist,goodjiazhi,goodedit,goodlink")%>">商品列表</a></p>
							<p><a href="<%=pichost%>user/goodadd?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="<%=cbname("goodadd")%>">添加商品</a></p>
							<p><a href="<%=pichost%>user/kaadd?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="<%=cbname("kaadd,kaaddtxt")%>">添加卡密</a></p>
							<p><a href="<%=pichost%>user/kucunka?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="<%=cbname("kucunka")%>">库存卡密</a></p>
							<p><a href="<%=pichost%>user/feika?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="<%=cbname("feika,feikadaili")%>">最近卖出</a></p>

							<%else%>
                            <p><a href="<%=url1%>goodlist?act=all" class="<%=cbname("goodlist,goodjiazhi,goodedit,goodlink")%>">商品列表</a></p>
                            <p><a href="<%=url1%>goodadd" class="<%=cbname("goodadd")%>">添加商品</a></p>
                            <p><a href="<%=url1%>kaadd" class="<%=cbname("kaadd,kaaddtxt")%>">添加卡密</a></p>
                            <p><a href="<%=url1%>kucunka" class="<%=cbname("kucunka")%>">库存卡密</a></p>
                            <p><a href="<%=url1%>feika" class="<%=cbname("feika,feikadaili")%>">最近卖出</a></p>
                            <%end if%>

                            </div> 
                        </div>
                    </div>
                </li>
                           
                <li>
                    <div class="i <%=cbname("mydingdan,mydingdan_all,mydingdan_daili,mydingdan_daili_all,mycaiwu,mycaiwu_all,tixian,tixianq,jiesuan,mydingdanc,mydingdan_daili_cha")%>">
                    <p><a href="<%=url1%>mydingdan" class="ico4">订单管理</a></p>
                        <div class="ex">
                        <p>交易管理</p>
                            <div class="ct">
                            <p><a href="<%=url1%>mydingdan" class="<%=cbname("mydingdan,mydingdan_all,mydingdanc")%>">交易订单</a></p>
							<%
							set rsd=server.CreateObject("adodb.recordset")
                            rsd.open "select aydlsjuserid from aydailishang where aydlsjuserid='"&clng(request.Cookies("aynameid"))&"'" ,conn,1,1
                            if not(rsd.bof and rsd.eof) then%>
                            <p><a href="<%=url1%>mydingdan_daili" class="<%=cbname("mydingdan_daili,mydingdan_daili_all,mydingdan_daili_cha")%>">代理订单</a></p>
                            <%end if 
                            rsd.close
                            %>
       						<p><a href="<%=url1%>mycaiwu" class="<%=cbname("mycaiwu,mycaiwu_all")%>">财务流水</a></p>
                            <%if cint(ayjiesuanms)=5 then%>
                            <p><a href="<%=url1%>tixian" class="<%=cbname("tixian,tixianq")%>">申请提现</a></p>
                            <%end if%>
                            <p><a href="<%=url1%>jiesuan" class="<%=cbname("jiesuan")%>">结算记录</a></p>
                            </div>
                        </div>
                    </div>
                </li>
                                            
                <li>
                    <div class="i <%=cbname("tousu,tousu_ok,tousu_no")%>">
                    <%if pichost<>"/" then%>
                    <p><a href="<%=pichost%>user/tousu?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="ico5">投诉举报</a></p>
					<%else%>
					<p><a href="<%=url1%>tousu" class="ico5">投诉列表</a></p>
                    <%end if%>
                        <div class="ex">
                        <p>投诉举报</p>
                            <div class="ct">
                            <%if pichost<>"/" then%>
                            <p><a href="<%=pichost%>user/tousu?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="<%=cbname("tousu")%>">投诉列表</a></p>
							<%else%>
							<p><a href="<%=url1%>tousu" class="<%=cbname("tousu")%>">投诉列表</a></p>
                            <%end if%>
                            
                            <%if pichost<>"/" then%>
                            <p><a href="<%=pichost%>user/tousu_no?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="<%=cbname("tousu_no")%>">未处理</a></p>
							<%else%>
							<p><a href="<%=url1%>tousu_no" class="<%=cbname("tousu_no")%>">未处理</a></p>
                            <%end if%>
                            
                            <%if pichost<>"/" then%>
                            <p><a href="<%=pichost%>user/tousu_ok?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="<%=cbname("tousu_ok")%>">已处理</a></p>
							<%else%>
							<p><a href="<%=url1%>tousu_ok" class="<%=cbname("tousu_ok")%>">已处理</a></p>
                            <%end if%> 
                            </div>
                        </div>
                    </div>
                </li>
                                            
                <li>
                    <div class="i <%=cbname("vip,taocanbuy,mytaocanc,vipbuy")%>">
                    <p><a href="<%=url1%>vip" class="ico6">增值服务</a></p>
                        <div class="ex">
                        <p>增值服务</p>
                            <div class="ct">
                            <p><a href="<%=url1%>vip" class="<%=cbname("vip,vipbuy")%>">收费项目</a></p>
                            <p><a href="<%=url1%>taocanbuy" class="<%=cbname("taocanbuy")%>">商家套餐</a></p>
                            <p><a href="<%=url1%>mytaocanc" class="<%=cbname("mytaocanc")%>">我的套餐</a></p>
                            </div>
                        </div>
                    </div>
                </li>
                                            
                <li>
                    <div class="i <%=cbname("mess,addyouhui,myyouhui,log,tongji,tongjiri,tongjiyue,log_all")%>">
                    <p><a href="<%=url1%>mess" class="ico7">商家助手</a></p>
                        <div class="ex">
                        <p>商家助手</p>
                            <div class="ct">
                            <p><a href="<%=url1%>mess" class="<%=cbname("mess")%>">站内信件</a></p>
                            <p><a href="<%=url1%>addyouhui" class="<%=cbname("addyouhui")%>">添加优惠</a></p>
                            <p><a href="<%=url1%>myyouhui" class="<%=cbname("myyouhui")%>">管理优惠</a></p>
                            <p><a href="<%=url1%>log" class="<%=cbname("log,log_all")%>">操作日志</a></p>
                            <p><a href="<%=url1%>tongji" class="<%=cbname("tongji,tongjiri,tongjiyue")%>">账务统计</a></p>
                            </div>
                        </div>
                    </div>
                </li>
                                            
                <li>
                    <div class="i <%=cbname("gongdanadd,mygongdan,gongdan_c")%>">
                    <%if pichost<>"/" then%>
                    <p><a href="<%=pichost%>user/mygongdan?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="ico8">工单服务</a></p>
					<%else%>
					<p><a href="<%=url1%>mygongdan" class="ico8">工单服务</a></p>
                    <%end if%>

                        <div class="ex">
                        <p>工单服务</p>
                            <div class="ct">
                            <%if pichost<>"/" then%>
                            <p><a href="<%=pichost%>user/mygongdan?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="<%=cbname("mygongdan,gongdan_c")%>">我的工单</a></p>
                            <p><a href="<%=pichost%>user/gongdanadd?mi=<%=request.Cookies("aynameid")%>&mcode=<%=request.Cookies("aysignmd5")%>&yurl=<%=yurl%>&mp=<%=request.Cookies("useripd")%>" class="<%=cbname("gongdanadd")%>">提交工单</a></p>
							<%else%>
                            <p><a href="<%=url1%>mygongdan" class="<%=cbname("mygongdan,gongdan_c")%>">我的工单</a></p>
                            <p><a href="<%=url1%>gongdanadd" class="<%=cbname("gongdanadd")%>">提交工单</a></p>
                            <%end if%>
                            </div>
                        </div>
                    </div>
                </li>
                
                <li>
                    <div class="i <%=cbname("duihuannew,duihuanlist")%>">
                    <p><a href="<%=url1%>duihuannew" class="ico2">兑换中心</a></p>
                        <div class="ex">
                        <p>兑换中心</p>
                            <div class="ct">
                            <p><a href="<%=url1%>duihuannew" class="<%=cbname("duihuannew")%>">兑换</a></p>
                            <p><a href="<%=url1%>duihuanlist" class="<%=cbname("duihuanlist")%>">兑换记录</a></p>
                            </div>
                        </div>
                    </div>
                </li>
                
                <li>
                    <div class="i <%=cbname("pingtaidaishou")%>">
                    <p><a href="<%=url1%>pingtaidaishou" class="ico2">平台代收</a></p>
                        <div class="ex">
                        <p>平台代收</p>
                            <div class="ct">
                            <p><a href="<%=url1%>pingtaidaishou" class="<%=cbname("pingtaidaishou")%>">平台代收</a></p>
                            </div>
                        </div>
                    </div>
                </li>
                
                <li>
                    <div class="i <%=cbname("shangjiazishou")%>">
                    <p><a href="<%=url1%>shangjiazishou" class="ico2">商家自收</a></p>
                        <div class="ex">
                        <p>商家自收</p>
                            <div class="ct">
                            <p><a href="<%=url1%>shangjiazishou" class="<%=cbname("shangjiazishou")%>">商家自收</a></p>
                            </div>
                        </div>
                    </div>
                </li>
                
            </ul>
                                    
        </div>
    </div>
    <!-------------------------------------- 栏目结束 -------------------------------------->
<%end sub%>
