<!--#include file="head.asp"-->
<style>body{background-color: #fff;}</style>

<link rel="stylesheet" href="/kindeditor/themes/default/default.css" />
<script src="/Template/newbuy/css/jquery.min.js" type="text/javascript"></script>
<script charset="utf-8" src="/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="/kindeditor/lang/zh-CN.js"></script>

<%
'call iszizhu()


if SafeRequest("act")="on" or SafeRequest("act")="off" then
if SafeRequest("id")="" then call PopErr("缺少参数")
id=SafeRequest("id")

	sql="select * from ayname where aynameid="&request.Cookies("aynameid")&"" 
	rs.open sql,conn,1,3
	
	if cint(rs("isshangzishou"))=0 then
	call PopErr("商家自收接口权限未开通！如需要请联系客服开通")
	end if
	
	
	if trim(rs("zishoudate"))<>"" and isnull(trim(rs("zishoudate")))=false then 
	
		if DateDiff("d",now(),rs("zishoudate"))<1 then
		call PopErr("商家自收接口权限已到期！如需要请联系客服开通")
		end if

		if SafeRequest("act")="on" then  
			if id="ali" then 
			if trim(rs("zsali"))="" or isnull(trim(rs("zsali")))=true then call PopErr("请先上传支付宝收款码，再开启该接口")
			rs("iszsali")=1
			end if
			
			if id="wei" then 
			if trim(rs("zswei"))="" or isnull(trim(rs("zswei")))=true then call PopErr("请先上传微信收款码，再开启该接口")
			rs("iszswei")=1
			end if
			
			if id="qq" then 
			if trim(rs("zsqq"))="" or isnull(trim(rs("zsqq")))=true then call PopErr("请先上传QQ收款码，再开启该接口")
			rs("iszsqq")=1
			end if

		end if
		
		if SafeRequest("act")="off" then	
			if id="ali" then rs("iszsali")=0
			if id="wei" then rs("iszswei")=0
			if id="qq" then rs("iszsqq")=0
		end if
		
		rs.update
	
	else
	
		call PopErr("商家自收接口权限到期时间不正确！请联系客服")
	
	end if
	rs.close
	
	response.Redirect "shangjiazishou"

end if
%>



<main>
<div  class="container">
<div class="ui-lrctnei">
<%call userleft()%>
<div class="r"> 
<div class="ui-content">
                        
					
                            
<div class="neiye">

                   
                                                     
            <!-------------------------------------- 开始 -------------------------------------->									
            <div class="neibiaoti"></div>
            <div class="neibiaoti2">商家自收</div>
            <div class="gexian20"></div>     
						<div class="neitable">
                        
					<script>
								KindEditor.ready(function(K) {
									var uploadsfz1 = K.uploadbutton({
										button : K('#uploadsfz1')[0],
										fieldName : 'imgFile',
										url : '/kindeditor/asp/upload_shoukuan.asp?dir=image',
										afterUpload : function(data) { 
											if (data.error === 0) {
												var url = K.formatUrl(data.url, '');
												urlcon=url.replace("/kindeditor/asp/../../","/"); 
												consfz1.innerHTML='<a href='+urlcon+' target=_blank>【查看收款码】</a> ';
												$.post("/show/upusershoukuanma/?act=upma&id=ali&pic="+urlcon+"",null,function(msg){if(msg == 'ok'){alert("收款码上传成功");}});
												
											} else {
												alert(data.message);
											}
										},
										afterError : function(str) {
											alert('自定义错误信息: ' + str);
										}
									});
									uploadsfz1.fileBox.change(function(e) {
										uploadsfz1.submit();
									});
								});
								
								
								
								KindEditor.ready(function(K) {
									var uploadsfz2 = K.uploadbutton({
										button : K('#uploadsfz2')[0],
										fieldName : 'imgFile',
										url : '/kindeditor/asp/upload_shoukuan.asp?dir=image',
										afterUpload : function(data) { 
											if (data.error === 0) {
												var url = K.formatUrl(data.url, '');
												urlcon=url.replace("/kindeditor/asp/../../","/"); 
												consfz2.innerHTML='<a href='+urlcon+' target=_blank>【查看收款码】</a> ';
												$.post("/show/upusershoukuanma/?act=upma&id=wei&pic="+urlcon+"",null,function(msg){if(msg == 'ok'){alert("收款码上传成功");}});
												
											} else {
												alert(data.message);
											}
										},
										afterError : function(str) {
											alert('自定义错误信息: ' + str);
										}
									});
									uploadsfz2.fileBox.change(function(e) {
										uploadsfz2.submit();
									});
								});
								
								
								KindEditor.ready(function(K) {
									var uploadsfz3 = K.uploadbutton({
										button : K('#uploadsfz3')[0],
										fieldName : 'imgFile',
										url : '/kindeditor/asp/upload_shoukuan.asp?dir=image',
										afterUpload : function(data) { 
											if (data.error === 0) {
												var url = K.formatUrl(data.url, '');
												urlcon=url.replace("/kindeditor/asp/../../","/"); 
												consfz3.innerHTML='<a href='+urlcon+' target=_blank>【查看收款码】</a> ';
												$.post("/show/upusershoukuanma/?act=upma&id=qq&pic="+urlcon+"",null,function(msg){if(msg == 'ok'){alert("收款码上传成功");}});
												
											} else {
												alert(data.message);
											}
										},
										afterError : function(str) {
											alert('自定义错误信息: ' + str);
										}
									});
									uploadsfz3.fileBox.change(function(e) {
										uploadsfz3.submit();
									});
								});

							</script>
                            
						<%
						sql="select * from ayname where aynameid="&request.Cookies("aynameid")&"" 
                        rs.open sql,conn,1,1%>
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td>
                            商家自收接口权限：
							<%
							if cint(rs("isshangzishou"))=0 then response.Write "【未开启，如需要请联系客服】"
							if cint(rs("isshangzishou"))=1 then response.Write "【正常】"
							%> 
                            <br>
                            商家自收权限到期时间：
							<%
							if trim(rs("zishoudate"))<>"" and isnull(trim(rs("zishoudate")))=false then 
							response.Write rs("zishoudate")
							else
							response.Write "-"
							end if
							%>
                            </td>
                          </tr>
                        </table>


                        <table>
           		  		<tr class="hd">
                            <td width="33%">接口名称</td> 
                            <td width="33%">接口状态</td>
                            <td width="33%">收款码</td>
                          </tr>
           		  		<tr>
                          <td>支付宝</td> 
                            <td>
                              <%
							if cint(rs("iszsali"))=0 then response.Write "目前自收接口关闭中，正在使用平台接口。<a href=?act=on&id=ali>【点击开启】</a>"
							if cint(rs("iszsali"))=1 then response.Write "目前自收接口使用中，请商家及时为买家发卡。<a href=?act=off&id=ali>【点击关闭】</a>"
							%>
                          </td>
                            <td>
							<%
							if cint(rs("isshangzishou"))=0 then
							response.Write "请先开通权限，再上传收款码"
							else
							
							if trim(rs("zsali"))<>"" and isnull(trim(rs("zsali")))=false then 
							response.Write "<span id=consfz1><a href="&trim(rs("zsali"))&" target=_blank>【查看收款码】</a></span>  <input type=button id=uploadsfz1 value=重新上传收款码 />"
							else
							response.Write "<span id=consfz1></span> <input type=button id=uploadsfz1 value=上传收款码 />"
							end if

							end if
							%>
                            </td>
                          </tr>
                          
                          
           		  		<tr>
                            <td>微信</td> 
                            <td>
							<%
							if cint(rs("iszswei"))=0 then response.Write "目前自收接口关闭中，正在使用平台接口。<a href=?act=on&id=wei>【点击开启】</a>"
							if cint(rs("iszswei"))=1 then response.Write "目前自收接口使用中，请商家及时为买家发卡。<a href=?act=off&id=wei>【点击关闭】</a>"
							%>
                            </td>
                            <td>
							<%
							if cint(rs("isshangzishou"))=0 then
							response.Write "请先开通权限，再上传收款码"
							else
							
							if trim(rs("zswei"))<>"" and isnull(trim(rs("zswei")))=false then 
							response.Write "<span id=consfz2><a href="&trim(rs("zswei"))&" target=_blank>【查看收款码】</a></span>  <input type=button id=uploadsfz2 value=重新上传收款码 />"
							else
							response.Write "<span id=consfz2></span> <input type=button id=uploadsfz2 value=上传收款码 />"
							end if
							
							end if
							%>
                            </td>
                          </tr>
                          
                          
           		  		<tr>
                            <td>QQ</td> 
                            <td>
							<%
							if cint(rs("iszsqq"))=0 then response.Write "目前自收接口关闭中，正在使用平台接口。<a href=?act=on&id=qq>【点击开启】</a>"
							if cint(rs("iszsqq"))=1 then response.Write "目前自收接口使用中，请商家及时为买家发卡。<a href=?act=off&id=qq>【点击关闭】</a>"
							%>
                            </td>
                            <td>
							<%
							if cint(rs("isshangzishou"))=0 then
							response.Write "请先开通权限，再上传收款码"
							else
							
							if trim(rs("zsqq"))<>"" and isnull(trim(rs("zsqq")))=false then 
							response.Write "<span id=consfz3><a href="&trim(rs("zsqq"))&" target=_blank>【查看收款码】</a></span>  <input type=button id=uploadsfz3 value=重新上传收款码 />"
							else
							response.Write "<span id=consfz3></span> <input type=button id=uploadsfz3 value=上传收款码 />"
							end if
							
							end if
							%>
                            </td>
                          </tr>
				
    				
                    <%
                    rs.close
					%>
                    
           		  		</table>
                    </div>

                   
            <div class="gexian20"></div>
            <div class="mzsmbox2" style="padding-top:20px;">
            商家自收说明： <br>
            就是用你自己的支付宝/微信/QQ账号收款，订单款项直接到你的收款账号。该权限资费30元/月。<br>
            该交易方式流程：买家付款后，平台不会处理订单状态，不能自动发卡！需买家联系商家，收款后的一切事务需商家处理，与平台无关！<br>
            该交易方式，平台不受理投诉，不受理售后！<br>
            
            <br>
            上传二维码规格：只上传二维码区域！！ 上传图片禁止含有二维码以外的任何内容，否则图片缩小后，二维码将看不清导致无法扫码！！
            </div>


            <!-------------------------------------- 结束 -------------------------------------->
                   
     
                   
   
            
          
            
           

        <div class="clearfix"></div>



</div>








</div>
</div>
</div>
</div>
</main>


<footer>
<div class="container">
</div>
</footer>

</body>
</html>