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

<script>document.getElementById('o_2').setAttribute("class", "ed"); document.getElementById("t_2").style.display="";document.getElementById('s_2_1').setAttribute("class", "ed4");</script>
<script type="text/javascript" src="/inc/qrcode.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title><%=webname%>-商品分类-分类链接</title>

<%

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

act=SafeRequest("act")
id=SafeRequest("id")

	
	if act="pedit" then
	gname=trim(SafeRequestform("gname"))
	id=SafeRequestform("id")
	if gname="" then call PopErr("个性链接不能为空")
	if id="" then call PopErr("参数错误")
	
	if len(trim(gname))<5 or len(trim(gname))>15 then call PopErr("个性名称长度应大于4位小于15位")
	
	sql="select aykafenleimd5,iszhuxiao from aykafenlei where aykafenleimd5='"&gname&"' and iszhuxiao=0"
	rs.open sql,conn,1,1
	if not(rs.bof and rs.eof) then
	call PopErr("该个性名称被占用，请重新选择")
	response.End()
	end if 
	rs.close
	
	sql="select * from aykafenlei where aykafenleiid="&id&" and aykanamesuoyou="&request.Cookies("aynameid")&"" 
	rs.open sql,conn,1,3
		if rs.bof and rs.eof then
		rs.close
		call PopErr("未找到参数")
    	else
		rs("aykafenleimd5")=trim(gname)
		rs.update
		rs.close
		call logadd(request.Cookies("aynameid"),"分类设置个性链接成功"&id,0,0) 
		call PopErr2("设置成功","fenleilink?id="&id&"")
		end if
	end if
	
	
	if act="gedit" then
	gname=trim(SafeRequestform("gname"))
	id=SafeRequestform("id")
	if gname="" then call PopErr("个性链接不能为空")
	if id="" then call PopErr("参数错误")
	
	if len(trim(gname))<5 or len(trim(gname))>15 then call PopErr("个性名称长度应大于4位小于15位")
	
	sql="select * from aykafenlei where ayfldlmd5url='"&gname&"' and iszhuxiao=0"
	rs.open sql,conn,1,1
	if not(rs.bof and rs.eof) then
	call PopErr("该个性名称被占用，请重新选择")
	response.End()
	end if 
	rs.close
	
	sql="select * from aykafenlei where aykafenleiid="&id&" and aykanamesuoyou="&request.Cookies("aynameid")&"" 
	rs.open sql,conn,1,3
		if rs.bof and rs.eof then
		rs.close
		call PopErr("未找到参数")
    	else
		rs("ayfldlmd5url")=trim(gname)
		rs.update
		rs.close
		call logadd(request.Cookies("aynameid"),"分类设置独立个性链接成功"&id,0,0) 
		call PopErr2("设置成功","fenleilink?id="&id&"")
		end if
	end if
%>
 

<script language="javascript">
  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;
}


function checkform1()
{ 

if(document.form1.gname.value=="")
{alert("请填写完整");return false}


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

} 

function checkform2()
{ 

if(document.form2.gname.value=="")
{alert("请填写完整");return false}


if(CheckIfnum(document.form2.gname.value)==true){
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; }
.logindlreg2{cursor:pointer;margin-left:5px; padding:7px;font-family:"Microsoft YaHei",Verdana,Arial; font-size:13px; text-align:center; color:#505050; font-weight:bold; background:#F2F2F2; border:#C3C3C3 solid 1px; border-radius:2px; }
.logindlreg2:hover{color:#505050;border:#999999 solid 1px; border-radius:2px; }
.logindlregedit{ margin-top:3px;height:36px;font-family:"Microsoft YaHei",Verdana,Arial; line-height:30px; font-size:13px; text-align:center; color:#505050; font-weight:bold; background:#F2F2F2;  border:#C3C3C3 solid 1px; border-radius:2px; }
.logindlregedit:hover{color:#505050;border:#999999 solid 1px; border-radius:2px; }
.logindlreg2tj{ margin-top:4px;height:36px;font-family:"Microsoft YaHei",Verdana,Arial; line-height:30px; font-size:13px; text-align:center; color:#ffffff; font-weight:bold; background:#F79740; border:0; border-radius:2px; }
.logindlreg2tj:hover{background:#F99C48; }
.reginputdd{ width:110px; height:36px; border:#CCC solid 1px; text-indent:10px; line-height:36px}
.reginputddd{ width:40px; height:36px; border:#CCC solid 1px; text-indent:10px; line-height:36px}
.reginputdddd{ width:50px; height:36px; border:#CCC solid 1px; text-indent:10px; line-height:36px}
</style>
<br>
<DIV id=main2> 

<DIV style="PADDING-LEFT:0px">
<DIV id=main_right_content>

<H2><SPAN>分类链接</SPAN></H2>


<DIV class=main4>


					<%if id="" then call PopErr("参数不完整")

					zdwapurl=wapurl
					
					sql="select * from ayname where aynameid="&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
					
					ayismd5=rs("ayismd5")
						
					rs.close
					
					sql="select * from aykafenlei where aykafenleiid="&id&" and aykanamesuoyou="&request.Cookies("aynameid")&"" 
					rs.open sql,conn,1,1
					if rs.bof and rs.eof then call PopErr("未找到数据")%>
    <table>
           		  		<tr>
                            <td width="110">分类名称：</td>
                            <td><%=trim(rs("aykafenleiname"))%></td>
                        </tr>

                        <%
						web1=weburl
						zweburl=weburl
						%>
           		  		<tr>
                            <td width="110">普通链接：</td>
                            <td>
                            <form name="form1" method="post" action="?act=pedit"  onSubmit="return checkform1()">
                            <a style="color:#F60" href="<%=zweburl%><%=trim(rs("aykafenleimd5"))%>.html" target="_blank"><%=zweburl%><%=trim(rs("aykafenleimd5"))%>.html</a>
							&nbsp;&nbsp;设置个性链接
                            &nbsp;<input name="gname" type="text" id="gname" size="15" maxlength="15" class="reginputdd" value="<%if not isnull(trim(rs("aykafenleimd5"))) then response.Write trim(rs("aykafenleimd5"))%>"/>
							<input name="id" type="hidden" value="<%=id%>" />
							<input type="submit" name="button" id="button" value="  设置  " class="logindlregedit"/>
                            </form>
                            </td>
                        </tr>
           		  		
           		  		<tr>
                            <td width="110">普通链接二维码：</td>
                            <td>
							<%if iswap="yes" then
							erweima=web1&trim(rs("aykafenleimd5"))&".html"
							%>
                            <div id="qrcode"></div>
                            <script type="text/javascript">var qrcode = new QRCode(document.getElementById("qrcode"), {width:160,height:160});qrcode.makeCode("<%=trim(ReplaceTrim(erweima))%>");</script>
							将二维码截屏保存，可在微信中推广
                            <%else%>
                            [暂未开启]
                            <%end if%>
                            </td>
                        </tr>
                        
                        
                        <tr><td width="110" height="10"></td><td></td></tr>
           		  		<tr style="background-color:#F7F7F7"><td width="110" height="10"></td><td></td></tr>
           		  		<tr><td width="110" height="10"></td><td></td></tr>
                        
           		  		<tr>
                            <td width="110">固定链接：</td>
                            <td>
                            <form name="form2" method="post" action="?act=gedit"  onSubmit="return checkform2()">
                            <a style="color:#F60" href="<%=zweburl%>buy/<%=trim(rs("ayfldlmd5url"))%>.html" target="_blank"><%=zweburl%>buy/<%=trim(rs("ayfldlmd5url"))%>.html</a>
                            &nbsp;&nbsp;设置个性链接
                            &nbsp;<input name="gname" type="text" id="gname" size="15" maxlength="15" class="reginputdd" value="<%if not isnull(trim(rs("ayfldlmd5url"))) then response.Write trim(rs("ayfldlmd5url"))%>"/>
                            <input name="id" type="hidden" value="<%=id%>" />
                            <input type="submit" name="button" id="button" value="  设置  " class="logindlregedit"/>
                            </form>
                            </td>
                        </tr>
           		  		
           		  		<tr>
                            <td width="110">固定链接二维码：</td>
                            <td>
							<%if iswap="yes" then
							erweima=web1&"buy/"&trim(rs("ayfldlmd5url"))&".html"
							%>
                            <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>
                        </tr>
                        <!--
           		  		<tr>
                            <td width="110">嵌套代码：</td>
                            <td>
							&lt;iframe src=&quot;<%'=qiantao%>&quot; frameborder=&quot;0&quot; scrolling=&quot;yes&quot; width=&quot;980&quot; height=&quot;940&quot; &gt;&lt;/iframe&gt;  <br>
        					&lt;iframe src=&quot;<%'=gqiantao%>&quot; frameborder=&quot;0&quot; scrolling=&quot;yes&quot; width=&quot;980&quot; height=&quot;940&quot; &gt;&lt;/iframe&gt;
                            </td>
                        </tr>
                        -->
                    </table>
<%rs.close%>


                    <div class="mzsmbox2">
                    分类普通链接：当买家打开时可以选择商品分类，也可以选择分类下的商品。<br>
                    分类固定链接：当买家打开时只固定显示该商品分类，但可以选择该分类下的商品。<br>
                    嵌套代码：当购买嵌套功能后，可以将嵌套代码放置自己的网页，提供买家进行购买支付。
                    </div>


  </DIV>


</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>

<br>

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


