<!--#include virtual="/show/userhead.asp"-->

<script>document.getElementById('o_1').setAttribute("class", "ed"); document.getElementById("t_1").style.display="";document.getElementById('s_1_9').setAttribute("class", "ed4");</script>

<script type="text/javascript" src="/inc/qrcode.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 
<%
call chkwurl()

rs.open "select shangjiabao from ayquanju",conn,1,1
shangjiabao=rs("shangjiabao")
rs.close


act=SafeRequestform("act")

if act="edit" then

gename=trim(SafeRequestform("gename"))
gename2=trim(SafeRequestform("gename2"))
if gename="" then call PopErr("请填写完整")
ayismd5=trim(SafeRequestform("ayismd5"))
if ayismd5="" then ayismd5=0

if isNumeric(gename) then call PopErr("个性名称不能为全数字")

if gename<>"" then

	if gename<>gename2 then
	
		fanstr=nofan
		jstr=split(fanstr,",")
		for mysum=0 to ubound(jstr)
		if  Instr(gename,jstr(mysum)) > 0 then
		call PopErr("该个性名称禁止使用，请更换")
		end if
		next
	
		sql="select aygename,iszhuxiao from ayname where aygename='"&gename&"' and iszhuxiao=0" 
		rs.open sql,conn,1,1
		if not(rs.bof and rs.eof) then
		call logadd(request.Cookies("aynameid"),"此个性名字已被占用"&gename,0,1)
		call PopErr("此个性名字已被占用")
		end if
		rs.close
		
		sql="select aymd5,iszhuxiao from ayname where aymd5='"&gename&"' and iszhuxiao=0" 
		rs.open sql,conn,1,1
		if not(rs.bof and rs.eof) then
		call logadd(request.Cookies("aynameid"),"此个性名字已被占用"&gename,0,1)
		call PopErr("此个性名字已被占用")
		end if
		rs.close
		
	end if
	
end if

sql="select * from ayname where aynameid="&clng(request.Cookies("aynameid"))&"" 
rs.open sql,conn,1,3
	if cint(rs("isvipid"))=0 then
	if len(trim(gename))<6 or len(trim(gename))>15 then call PopErr("个性名称长度应大于5位小于15位，开通尊贵VIP享受1-5位个性链接")
	end if
rs("aygename")=gename
rs("ayismd5")=ayismd5
rs.update
call logadd(request.Cookies("aynameid"),"个性url设置成功"&gename,0,0)
call PopErr2("设置成功","mylink")
rs.close

end if
%>

<script language="javascript">
  function CheckIfEnglish(String)
{
    var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890_";
     var i;
     var c;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) < 0)
	     return false;
     }
     return true;
}
  function CheckIfnum(String)
{
    var Letters = "1234567890";
     var i;
     var c;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) < 0)
	     return false;
     }
     return true;
}


 </script>
<script language="javascript">

if(CheckIfEnglish(str)==false)
{
document.getElementById("gename").value="";
alert("输入的个性名字字符有误");
return false;
}

if(CheckIfnum(str)==true){
document.getElementById("gename").value="";
alert("个性名字不可以全是数字");
return false;
}

} 
 </SCRIPT>
<script language="javascript">
function checkform1()
{ 

if(document.form1.gename.value=="")
{alert("填写有误请更正");return false}

if(CheckIfEnglish(document.form1.gename.value)==false)
{
document.getElementById("gename").value="";
alert("输入个性名字字符有误");
return false;
}

if(CheckIfnum(str)==true){
document.getElementById("gename").value="";
alert("个性名字不可以全是数字");
return false;
}

} 
 </script>
<style>
table{font-size:14px; font-weight:normal;line-height:27px;}
.regts{width:440px; height:36px; border:#CCC solid 1px; background:#f1f1f1; color:#666666; line-height:36px; padding-left:10px}
.reginput{width:290px; height:36px; border:#CCC solid 1px; color:#949494; text-indent:10px; line-height:36px}
.gexian20{float:left;width:100%;height:20px;}
.mzsmbox2{width:90%; height:auto; overflow:hidden; background:#fcf8e2; border-left:#edd28a solid 5px; color:#956825; line-height:22px; padding:20px;margin-left:40px; margin-bottom:60px; font-size:13px;padding-top:20px;}
.neitable table{border: 1px solid #E8E8E8;width: 100%;}
.neitable table tr{border-bottom: 1px solid #E8E8E8;}
.neitable table tr td{line-height: 42px;text-align: center;color: #1b1b1b;font-size: 14px;}
.neitable table tr.hd td{line-height: 35px;background-color: #F7F7F7;}
.btnFn1 {cursor:pointer!important;cursor:hand;  height:40px; width:101px; padding:0px 0px 0 0; }
.btnFn2 {cursor:pointer!important;cursor:hand;  height:40px; width:101px; padding:0px 0px 0 0; font-weight:bold; }
</style>
 <br>
<DIV id=main2> 
<DIV style="PADDING-LEFT:0px">
<DIV id=main_right_content>

<H2><SPAN>店铺链接</SPAN></H2>
<DIV class=main4>

						<%
						zdwapurl=wapurl
						
                        sql="select * from ayname where aynameid="&clng(request.Cookies("aynameid"))&"" 
                        rs.open sql,conn,1,1

						if cint(rs("shangjiabao"))<>2 then
							if cint(shangjiabao)=1 or cint(rs("shangjiabao"))=1 then
								if ccur(rs("ayisxiaojin"))<ccur(xiaobaojine) then
									call logadd(request.Cookies("aynameid"),"非平台VIP会员禁止上架销售",0,1)
									call PopErr2("2018-1-18日起为保障交易安全，非平台VIP会员，暂时不能上架销售","vip") 
									response.End
								end if
							end if
						end if

						
						dstr=split(mid(weburl,1,len(weburl)-1),".")
						if Ubound(dstr)=1 then durl=dstr(0)&"."&dstr(1) 
						if Ubound(dstr)=2 then durl=dstr(1)&"."&dstr(2)
                        %>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: bold; font-size: 14px; color: #FF0000">店铺链接</span><br>
<form action="mylink" method="post" name="form1" id="form1" onSubmit="return checkform1()">
                        <table width="900" class="neitableanquan">
                        <!--
                        <%
						if instr(1,zweburl,"HTTPS://")>0 then 
						httpmode="https://"
						else
						httpmode="http://"
						end if
						
						if rs("ayismd5")=0 then%>
           		  		<tr>
                            <td width="600" align="left">
                            我的首页链接<img src="<%'=ossurl%>images/w.gif" style="margin-top:2px" title="默认商户ID链接"/>： <a href="<%'=weburl%><%'=request.Cookies("aynameid")%>" target="_blank" style="font-family:宋体;"><%'=weburl%><%'=request.Cookies("aynameid")%></a>
                            </td>
                            <td>	
                              <%if isfan="yes" then%>
                              商户短链接：<a href="<%'=httpmode%><%'=request.Cookies("aynameid")%>.<%'=durl%>" target="_blank" style="font-family:宋体;"><%'=httpmode%><%'=request.Cookies("aynameid")%>.<%=durl%></a>
                              <%end if%>
                            </td>
                        </tr>
                        <%end if%>
                        -->
                        <!--
                 		<tr>
                            <td align="left">
							我的安全链接<img src="<%'=ossurl%>images/w.gif" style="margin-top:2px" title="安全链接是不显示商户ID的一种相对安全的链接地址"/>： <a href="<%'=weburl%><%'=trim(rs("aymd5"))%>" target="_blank" style="font-family:宋体;"><%'=weburl%><%'=trim(rs("aymd5"))%></a>
                            </td>
                            <td>
							  <%'if isfan="yes" then%>
                              安全短链接：<a href="<%'=httpmode%><%'=trim(rs("aymd5"))%>.<%'=durl%>" target="_blank" style="font-family:宋体;"><%'=httpmode%><%'=trim(rs("aymd5"))%>.<%'=durl%></a>
                              <%'end if%>
                            </td>
                        </tr>
                        -->
                 		<tr>
                            <td align="left">
                            <%
							web1=weburl
							zweburl=weburl
							%>
                    		我的店铺链接<img src="<%=ossurl%>images/w.gif" style="margin-top:8px" title="个性链接是商户可以自己设置一个容易好记的链接"/>：
                            <%if not isnull(trim(rs("aygename"))) and trim(rs("aygename"))<>"" then
                            gename=trim(rs("aygename"))%> 
                            <a href="<%=zweburl%><%=trim(rs("aygename"))%>" target="_blank" style="font-family:宋体;"><%=zweburl%><%=trim(rs("aygename"))%></a> <span style="color:#390">(绿标链接)</span>
                            <%else
                            gename=trim(request.Cookies("aynameid"))
                            response.Write ("未设置，请先设置一个个性链接")
                            end if
                            %>
                            </td>
                            <td>
                            </td>
                        </tr>
                 		
                 	

                          <input name="ayismd5" type="hidden" id="ayismd5" value="1" />
                 		<tr>
                            <td colspan="2"> 
                            <%
							if not isnull(rs("aygename")) and trim(rs("aygename"))<>"" then isedit="no" '是否可以修改个性链接
							if rs("isvipid")=1 then 
							isedit="yes"
							if DateDiff("d",now(),rs("vipdate"))<1 then isedit="no"
							end if
							%>
                    		设置个性链接<img src="<%=ossurl%>images/w.gif" style="margin-top:8px" title="为您的链接设置一个个性的名字(5至15个字符 不能为全数字)"/>：
                              <%=zweburl%><input name="gename" type="text" class="reginputdd" id="gename" value="<%if not isnull(trim(rs("aygename"))) then response.Write trim(rs("aygename"))%>" <%if isedit="no" then response.Write "readonly"%> size="8" maxlength="15">
                            
                            <input name="act" type="hidden" id="act" value="edit">
                            <input name="gename2" type="hidden" id="gename2" value="<%=trim(rs("aygename"))%>">
                            <span style="color: #999999"> 设置后不能修改！禁止全数字！尊贵VIP享受1-5位短链接 [<a href="vip" style="color:#009933">了解VIP</a>]</span> 
                            </td>
                          </tr>
                 		<tr>
                            <td colspan="2">
       						 <input style="cursor:pointer"  class="logindlreg" type="submit" name="Submit" value=" 设置个性链接 " <%if rs("ayurlno")=1 then response.Write"disabled"%>>
                            </td>
                          </tr>
                    </table>
                    </form>

<br><br>
<br>
<table width="900" class="neitableanquan">
           		  		<tr>
                        
                            <td width="129" align="center">		 
							店铺二维码
                            </td>
                            <td width="388">
							<%if rs("ayismd5")=1 then
								if trim(rs("aygename"))<>"" then
								erweima=web1&trim(rs("aygename"))
								else
                            	erweima=web1&trim(rs("aymd5"))
							    end if
                            else
                            erweima=web1&request.Cookies("aynameid")
                            end if
							%>
                            <%if iswap="yes" then%>
                            &nbsp;&nbsp;<div id="qrcode2"></div>
							<script type="text/javascript">var qrcode2 = new QRCode(document.getElementById("qrcode2"), {width:160,height:160});qrcode2.makeCode("<%=trim(ReplaceTrim(erweima))%>");</script>
                            将二维码截屏保存，可在微信中推广
                            <%else%>
                            [暂未开启]
                            <%end if%>
                            </td>
                         
                            <td width="387">
                          
                            </td>
                            

                        </tr>
                    </table>


                    
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: bold; font-size: 14px; color: #FF0000">其他链接</span><span style="color:#F60">【邀请注册并认证 返现20元】</span><br>
<table width="900" class="neitableanquan">
           		  		<tr>
                        
                            <td width="129" align="center">		 
							邀请链接
                            </td>
                            <td width="388">
							<a href="<%=zweburl%>reg/<%=trim(rs("aymd5"))%>" target="_blank" style="font-family:宋体;"><%=zweburl%>reg/<%=trim(rs("aymd5"))%></a>
                            </td>
                            </td>
                         
                            <td width="387">
                          
                            </td>
                            

                        </tr>
                    </table>  
                       
<%rs.close%>




            <div class="gexian20"></div>
            <div class="mzsmbox2" style="padding-top:20px;">
            链接说明：商品和分类的独立链接在<a href="fenlei">商品分类</a>和<a href="goodlist">商品列表</a>中获取！<br>
            注意：当你把商户支付链接发给买家时,买家可以查看到您名下所有商品分类和商品信息！
            </div>
            
            
            
            
            
</DIV>
</DIV>
<DIV class=clear></DIV></DIV>
</DIV>

<br>

	<!--#include virtual="/show/foot.asp"-->


