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

<script>document.getElementById('o_2').setAttribute("class", "ed"); document.getElementById("t_2").style.display="";document.getElementById('s_2_2').setAttribute("class", "ed4");</script>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<%
act=SafeRequest("act")

if act="sj" then
id=SafeRequest("id")
sql="select * from aygood where aygoodid="&clng(id)&" and aygoodsuoyouid="&clng(request.Cookies("aynameid"))&"" 
rs.open sql,conn,1,3
if rs.bof and rs.eof then
rs.close
call PopErr("未找到此商品")
else

if rs("issjsuo")=1 then
call PopErr("该商品被限制上架")
response.End()
end if

rs("aygoodzhuangtai")=0
rs.update
rs.close
call logadd(request.Cookies("aynameid"),"商品上架成功"&id,0,0)
response.Redirect request.Cookies("url")
end if
end if

if act="xj" then
id=SafeRequest("id")
sql="select * from aygood where aygoodid="&clng(id)&" and aygoodsuoyouid="&clng(request.Cookies("aynameid"))&"" 
rs.open sql,conn,1,3
if rs.bof and rs.eof then
rs.close
call PopErr("未找到此商品")
else
rs("aygoodzhuangtai")=1
rs.update
rs.close
call logadd(request.Cookies("aynameid"),"商品下架成功"&id,0,0)
response.Redirect request.Cookies("url")
end if
end if


if act="edit" then


sql="select ayisguolv,ayguolvcon from ayquanju" 
rs.open sql,conn,1,1
ayisguolv=rs("ayisguolv")
ayguolvcon=trim(rs("ayguolvcon"))
rs.close

aygooddlid=SafeRequestform("aygooddlid")'上级代理ID
goodid=SafeRequestform("goodid")
feilei=SafeRequestform("feilei")
aygoodsuoyouid=request.Cookies("aynameid")
shunxu=SafeRequestform("shunxu")
mingcheng=trim(SafeRequestform("mingcheng"))
jiage=SafeRequestform("jiage")
jiageedit=SafeRequestform("jiageedit")
if ccur(jiage)<>ccur(jiageedit) then call chkyanzheng("goodlist")
if ccur(jiage)<0.1 then call PopErr("商品价格不能低于0.1元")
call cisnum(jiage)
pifa=SafeRequestform("pifa")  '0
chengben=SafeRequestform("chengben")
if chengben="" then chengben=0
yujing=SafeRequestform("yujing")
ayyujingmss=SafeRequestform("ayyujingmss") '1
if ayyujingmss="" then ayyujingmss=0
ayyujingmail=SafeRequestform("ayyujingmail") '1
if ayyujingmail="" then ayyujingmail=0
ayyujingtel=SafeRequestform("ayyujingtel") '1
if ayyujingtel="" then ayyujingtel=0
youhui=SafeRequestform("youhui") '1
aypifa1=SafeRequestform("aypifa1")
aypifa2=SafeRequestform("aypifa2")
aypifa3=SafeRequestform("aypifa3")
aypifa4=SafeRequestform("aypifa4")
aypifa5=SafeRequestform("aypifa5")
aypifaj1=SafeRequestform("aypifaj1")
aypifaj2=SafeRequestform("aypifaj2")
aypifaj3=SafeRequestform("aypifaj3")
aypifaj4=SafeRequestform("aypifaj4")
aypifaj5=SafeRequestform("aypifaj5")

dailij1=SafeRequestform("dailij1")
dailij2=SafeRequestform("dailij2")
dailij3=SafeRequestform("dailij3")
dailij4=SafeRequestform("dailij4")
dailij5=SafeRequestform("dailij5")

dailicb1=SafeRequestform("dailicb1")
dailicb2=SafeRequestform("dailicb2")
dailicb3=SafeRequestform("dailicb3")
dailicb4=SafeRequestform("dailicb4")
dailicb5=SafeRequestform("dailicb5")

ayissaopay=SafeRequestform("ayissaopay")
aygoodtodaili=SafeRequestform("aygoodtodaili")
if aygoodtodaili="" then aygoodtodaili=0

if clng(aygooddlid)<>0 then
	if chengben<>0 or aygoodtodaili<>0 then
	if ccur(aygoodtodaili)=<ccur(chengben) then call PopErr("无论是否有下级代理，请将代理价格设置高于成本价格")
	end if
end if


content1=SafeRequestformks("content1")
content2=SafeRequestformks("content2")
buylx=SafeRequestform("buylx")
kahaoname=trim(SafeRequestform("kahaoname"))
kaminame=trim(SafeRequestform("kaminame"))
if kaminame="" then kaminame=" "

if trim(kahaoname)=""  then call PopErr("卡号名称不能空")

	if hosturl<>"/" and trim(content1)<>"" then
		hoststr=split(allhosturl,"|")
		For hostsum=0 To Ubound(hoststr) '原已提交路径变更标示
		content1=replace(trim(content1),hoststr(hostsum)&"updata/goodpic/",hoststr(hostsum)&"updata/goodpic2/")
		content2=replace(trim(content2),hoststr(hostsum)&"updata/goodpic/",hoststr(hostsum)&"updata/goodpic2/")
		next
	
	'替换新加路径	
	'content1=replace(trim(content1),"/updata/goodpic/",""&hosturl&"updata/goodpic/")
	'content2=replace(trim(content2),"/updata/goodpic/",""&hosturl&"updata/goodpic/")
	content1=replace(trim(content1),"/kindeditor/asp/../../","/")
	content2=replace(trim(content2),"/kindeditor/asp/../../","/")
	
	'原路径标示还原
	hoststr=split(allhosturl,"|")
	For hostsum=0 To Ubound(hoststr)
	content1=replace(trim(content1),hoststr(hostsum)&"updata/goodpic2/",hoststr(hostsum)&"updata/goodpic/")
	content2=replace(trim(content2),hoststr(hostsum)&"updata/goodpic2/",hoststr(hostsum)&"updata/goodpic/")
	next
	
	end if
	
	
if pifa=1 then 

	if isNumeric(aypifa1)=false or aypifa1="" or aypifaj1="" then call PopErr("NO.1批发数量或单价填写有误")
	if ccur(aypifa1)<2 then call PopErr("首条批发数量应大于1")
	if ccur(aypifaj1)<=0 or ccur(aypifaj1)>20000 then call PopErr("NO.1批发单价填写错误")
	pfjin=split(aypifaj1,".")	
	if Ubound(pfjin)>1 then call PopErr("NO.1批发单价格式输入有误")
	if ccur(aypifaj1)>=ccur(jiage) then call PopErr("NO.1单价优惠价格应小于商品单价")
	if clng(aygooddlid)<>0 then if ccur(aypifaj1)=<ccur(dailicb1) then call PopErr("NO.1批发单价价格应小于代理设置成本价格")
	call cisnum(aypifaj1)
	if dailij1<>"" then
		if aygoodtodaili="" or aygoodtodaili=0 then PopErr("NO.1设置批发代理价格前，请先设置默认代理价格")
		if ccur(dailij1)>=ccur(aygoodtodaili) then PopErr("NO.1首条代理价格应小于默认代理价")
		if ccur(dailij1)>=ccur(aypifaj1) then PopErr("NO.1代理价格应小于批发单价")
		pfjin=split(dailij1,".")	
		if Ubound(pfjin)>1 then call PopErr("NO.1批发代理价格格式输入有误")
		call cisnum(dailij1)
	end if
	
	if aypifa2<>"" then
		if isNumeric(aypifa2)=false then call PopErr("NO.2批发数量填写有误")
	    if aypifa1="" then call PopErr("NO.2请按顺序填写")
		if ccur(aypifa2)<=0 then call PopErr("NO.2批发单价填写错误")
		if ccur(aypifa2)<=ccur(aypifa1) then call PopErr("NO.2批发数量应大于上一级批发数量")
		if aypifaj2="" then	call PopErr("NO.2批发单价价格填写错误")
		if ccur(aypifaj2)<=0 or ccur(aypifaj2)>20000 then call PopErr("NO.2批发单价填写错误")
		pfjin=split(aypifaj2,".")	
		if Ubound(pfjin)>1 then call PopErr("NO.2批发优惠价格输入有误")
		if ccur(aypifaj2)>=ccur(aypifaj1) then call PopErr("NO.2批发单价应逐级递减")
		if clng(aygooddlid)<>0 then if ccur(aypifaj2)=<ccur(dailicb2) then call PopErr("NO.2批发单价价格应小于代理设置成本价格")
		call cisnum(aypifaj2)
		if dailij2<>"" then
			if dailij1="" then PopErr("NO.2批发代理价格请按顺序填写")
			if ccur(dailij2)>=ccur(dailij1) then PopErr("NO.2批发代理单价应逐级递减")
			if ccur(dailij2)>=ccur(aypifaj2) then PopErr("NO.2代理价格应小于批发单价")
			pfjin=split(dailij2,".")	
			if Ubound(pfjin)>1 then call PopErr("NO.2批发代理价格格式输入有误")
			call cisnum(dailij2)
		end if
	end if
	
	if aypifa3<>"" then
		if isNumeric(aypifa3)=false then call PopErr("NO.3批发数量填写有误")
	    if aypifa2="" then call PopErr("NO.3请按顺序填写")
		if ccur(aypifa3)<=0 then call PopErr("NO.3批发单价填写错误")
		if ccur(aypifa3)<=ccur(aypifa2) then call PopErr("NO.3批发数量应大于上一级批发数量")
		if aypifaj3="" then	call PopErr("NO.3批发单价价格填写错误")
		if ccur(aypifaj3)<=0 or ccur(aypifaj3)>20000 then call PopErr("NO.3批发单价填写错误")
		pfjin=split(aypifaj3,".")	
		if Ubound(pfjin)>1 then call PopErr("NO.3批发优惠价格输入有误")
		if ccur(aypifaj3)>=ccur(aypifaj2) then call PopErr("NO.3批发单价应逐级递减")
		if clng(aygooddlid)<>0 then if ccur(aypifaj3)=<ccur(dailicb3) then call PopErr("NO.3批发单价价格应小于代理设置成本价格")
		call cisnum(aypifaj3)
		if dailij3<>"" then
			if dailij2="" then PopErr("NO.3批发代理价格请按顺序填写")
			if ccur(dailij3)>=ccur(dailij2) then PopErr("NO.3批发代理单价应逐级递减")
			if ccur(dailij3)>=ccur(aypifaj3) then PopErr("NO.3代理价格应小于批发单价")
			pfjin=split(dailij3,".")	
			if Ubound(pfjin)>1 then call PopErr("NO.3批发代理价格格式输入有误")
			call cisnum(dailij3)
		end if
	end if
		
	if aypifa4<>"" then
		if isNumeric(aypifa4)=false then call PopErr("NO.4批发数量填写有误")
	    if aypifa3="" then call PopErr("NO.4请按顺序填写")
		if ccur(aypifa4)<=0 then call PopErr("NO.4批发单价填写错误")
		if ccur(aypifa4)<=ccur(aypifa3) then call PopErr("NO.4批发数量应大于上一级批发数量")
		if aypifaj4="" then call PopErr("NO.4批发单价价格填写错误")
		if ccur(aypifaj4)<=0 or ccur(aypifaj4)>20000 then call PopErr("NO.4批发单价填写错误")
		pfjin=split(aypifaj4,".")	
		if Ubound(pfjin)>1 then call PopErr("NO.4批发优惠价格输入有误")
		if ccur(aypifaj4)>=ccur(aypifaj3) then call PopErr("NO.4批发单价应逐级递减")
		if clng(aygooddlid)<>0 then if ccur(aypifaj4)=<ccur(dailicb4) then call PopErr("NO.4批发单价价格应小于代理设置成本价格")
		call cisnum(aypifaj4)
		if dailij4<>"" then
			if dailij3="" then PopErr("NO.4批发代理价格请按顺序填写")
			if ccur(dailij4)>=ccur(dailij3) then PopErr("NO.4批发代理单价应逐级递减")
			if ccur(dailij4)>=ccur(aypifaj4) then PopErr("NO.4代理价格应小于批发单价")
			pfjin=split(dailij4,".")	
			if Ubound(pfjin)>1 then call PopErr("NO.4批发代理价格格式输入有误")
			call cisnum(dailij4)
		end if
	end if
	
	if aypifa5<>"" then
		if isNumeric(aypifa5)=false then call PopErr("NO.5批发数量填写有误")
	    if aypifa4="" then call PopErr("NO.5请按顺序填写")
		if ccur(aypifa5)<=0 then call PopErr("NO.5批发单价填写错误")
		if ccur(aypifa5)<=ccur(aypifa4) then call PopErr("NO.5批发数量应大于上一级批发数量")
		if aypifaj5="" then call PopErr("NO.5批发单价价格填写错误")
		if ccur(aypifaj5)<=0 or ccur(aypifaj5)>20000 then call PopErr("NO.5批发单价填写错误")
		pfjin=split(aypifaj5,".")	
		if Ubound(pfjin)>1 then call PopErr("NO.5批发优惠价格输入有误")
		if ccur(aypifaj5)>=ccur(aypifaj4) then call PopErr("NO.5批发单价应逐级递减")
		if clng(aygooddlid)<>0 then if ccur(aypifaj5)=<ccur(dailicb5) then call PopErr("NO.5批发单价价格应小于代理设置成本价格")
		call cisnum(aypifaj5)
		if dailij5<>"" then
			if dailij4="" then PopErr("NO.5批发代理价格请按顺序填写")
			if ccur(dailij5)>=ccur(dailij4) then PopErr("NO.5批发代理单价应逐级递减")
			if ccur(dailij5)>=ccur(aypifaj5) then PopErr("NO.5代理价格应小于批发单价")
			pfjin=split(dailij5,".")	
			if Ubound(pfjin)>1 then call PopErr("NO.5批发代理价格格式输入有误")
			call cisnum(dailij5)
		end if
	end if
	
end if
xiangou=SafeRequestform("xiangou")
zhifu=SafeRequestform("zhifu") '1
shouka=SafeRequestform("shouka") '1
ayshmiaoshu=trim(SafeRequestform("ayshmiaoshu"))
ayshurl=trim(SafeRequestform("ayshurl"))
ayshqq=trim(SafeRequestform("ayshqq"))

ayisbankpay=SafeRequestform("ayisbankpay")          '数字     网银支付 0关闭 1开启      
ayisalipay=SafeRequestform("ayisalipay")           '数字     支付宝支付 0关闭 1开启      
ayistenpay=SafeRequestform("ayistenpay")           '数字     财富通支付 0关闭 1开启             
ayisjdpay=SafeRequestform("ayisjdpay") 

ayggodispass=SafeRequestform("ayggodispass")  
aygoodiskucun=SafeRequestform("aygoodiskucun")  
if clng(aygooddlid)<>0 then aygoodiskucun=1     '代理商品 不显示实际库存
ayisqqpay=SafeRequestform("ayisqqpay") 

ayjujingwx=SafeRequestform("ayjujingwx") 
shoukamail=SafeRequestform("shoukamail") 
shoukatel=SafeRequestform("shoukatel") 
shouikawx=SafeRequestform("shouikawx") 
bugpass=SafeRequestform("bugpass") 

if bugpass="" then bugpass=" "
if ayjujingwx="" then ayjujingwx=0
if shoukamail="" then shoukamail=0
if shoukatel="" then shoukatel=0
if shouikawx="" then shouikawx=0


'if ccur(xiangou)=1 then call PopErr("如果开启限购，限购数量必须大于1")

if ayisqqpay="" then ayisqqpay=0
if ayissaopay="" then ayissaopay=0
if ayisbankpay="" then ayisbankpay=0
if ayisalipay="" then ayisalipay=0
if ayistenpay="" then ayistenpay=0
if ayisjdpay="" then ayisjdpay=0

if ayissaopay=0 and ayisqqpay=0 and ayisbankpay=0 and ayisalipay=0  and ayisjdpay=0 and ayistenpay=0 then call PopErr("请至少选择一种支付方式！")

if instr(1,trim(ayshmiaoshu),"|")<>0 then call PopErr("商品描写,字符 | 不可以使用哦，请重新填写！")
if instr(1,trim(ayshurl),"|")<>0 then call PopErr("商户网址,字符 | 不可以使用哦，请重新填写！")
if instr(1,trim(mingcheng),"|")<>0 then call PopErr("商品名称,字符 | 不可以使用哦，请重新填写！")

if ayisguolv=1 then
if guolvRequestform("mingcheng",ayguolvcon)=false then 
call logadd(request.Cookies("aynameid"),"添加商品含有敏感文字"&mingcheng,0,1)
call PopErr(""&ayguolvcon&"，以上敏感词语禁用哦！")
end if


if guolvRequestform("ayshmiaoshu",ayguolvcon)=false then 
call logadd(request.Cookies("aynameid"),"添加商品描述含有敏感文字"&ayshmiaoshu,0,1)
call PopErr(""&ayguolvcon&"，以上敏感词语禁用哦！")
end if

end if


sql="select * from aygood where aygoodid="&clng(goodid)&" and aygoodsuoyouid="&clng(request.Cookies("aynameid"))&"" 
rs.open sql,conn,1,3
	if rs.bof and rs.eof then
	rs.close
	call PopErr("未找到此商品")
	else
	
	if clng(rs("aygooddlid"))<>0 then
	if ccur(chengben)>ccur(jiage) then call PopErr("销售价格不得低于成本价格")
	end if
	
	rs("aygoodsuoyouid")=clng(aygoodsuoyouid)
	rs("aygoodfl")=clng(feilei)
	rs("aygoodsx")=clng(shunxu)
	rs("aygoodname")=mingcheng
	rs("ayjiage")=jiage
	rs("aychenben")=chengben
	rs("aypifayes")=cint(pifa)
	rs("ayyujing")=cint(yujing)
	rs("ayyujingmail")=cint(ayyujingmail)
	rs("ayyujingmss")=cint(ayyujingmss)
	rs("ayyujingtel")=cint(ayyujingtel)
	rs("ayxiangou")=clng(xiangou)
	rs("ayyouhuiyes")=cint(youhui)
	rs("ayzhifu")=cint(zhifu)
	rs("ayshoukatz")=cint(shouka)
	
	if ayshmiaoshu<>"" then 
	rs("ayshmiaoshu")=ayshmiaoshu
	else
	rs("ayshmiaoshu")=" "
	end if
	

	if ayshurl<>"" then 
	rs("ayshurl")=ayshurl
	else
	rs("ayshurl")=" "
	end if
	
	if ayshqq<>"" then 
	rs("ayshqq")=ayshqq
	else
	rs("ayshqq")=0
	end if
	
	if aypifa1="" then 
	   aypifa1=0
	   aypifaj1=0
	   dailij1=0
	end if
	if aypifa2="" then 
	   aypifa2=0
	   aypifaj2=0
	   dailij2=0
	end if
	if aypifa3="" then 
	   aypifa3=0
	   aypifaj3=0
	   dailij3=0
	end if
	if aypifa4="" then 
	   aypifa4=0
	   aypifaj4=0
	   dailij4=0
	end if
	if aypifa5="" then 
	   aypifa5=0
	   aypifaj5=0
	   dailij5=0
	end if
	rs("aypifayes")=cint(pifa)
	if aypifaj1="" then aypifaj1=0
	if aypifaj2="" then aypifaj2=0
	if aypifaj3="" then aypifaj3=0
	if aypifaj4="" then aypifaj4=0
	if aypifaj5="" then aypifaj5=0
	
	if clng(rs("aygooddlid"))=0 then '非代理商品 可以修改批发
	rs("aypifa1")=aypifa1
	rs("aypifa2")=aypifa2
	rs("aypifa3")=aypifa3
	rs("aypifa4")=aypifa4
	rs("aypifa5")=aypifa5
	rs("aypifaj1")=aypifaj1
	rs("aypifaj2")=aypifaj2
	rs("aypifaj3")=aypifaj3
	rs("aypifaj4")=aypifaj4
	rs("aypifaj5")=aypifaj5
	end if
	
	if dailij1="" then dailij1=0
	if dailij2="" then dailij2=0
	if dailij3="" then dailij3=0
	if dailij4="" then dailij4=0
	if dailij5="" then dailij5=0
	rs("dailij1")=dailij1
	rs("dailij2")=dailij2
	rs("dailij3")=dailij3
	rs("dailij4")=dailij4
	rs("dailij5")=dailij5
	
	rs("ayisbankpay")=ayisbankpay          '数字     网银支付 0关闭 1开启      
	rs("ayisalipay")=ayisalipay           '数字     支付宝支付 0关闭 1开启      
	rs("ayistenpay")=ayistenpay           '数字     财富通支付 0关闭 1开启             
	rs("ayggodispass")=cint(ayggodispass)
	rs("aygoodiskucun")=cint(aygoodiskucun)
	rs("ayissaopay")=cint(ayissaopay) 
	rs("aygoodtodaili")=aygoodtodaili 
	rs("goodxx")=content1
	rs("goodbuyxx")=content2
	rs("ayisqqpay")=ayisqqpay
	rs("ayisjdpay")=ayisjdpay
	
	
	rs("ayjujingwx")=ayjujingwx
	rs("shoukamail")=shoukamail
	rs("shoukatel")=shoukatel
	rs("shouikawx")=shouikawx

	rs("kahaoname")=kahaoname
	rs("kaminame")=kaminame
	rs("bugpass")=bugpass
	rs("buylx")=buylx
	
	

	
	
	rs.update
	rs.close
	call logadd(request.Cookies("aynameid"),"商品修改成功"&left(mingcheng,20),6,0)

	call PopErr2("商品修改成功",request.Cookies("url"))

	
	end if

end if

%>

<script language="javascript">
function show1(){
        youhuijia.style.display = "none";
		showcon1.style.display = "none";
		showcon0.style.display = "";
}

function show2(){
        youhuijia.style.display = "";
		showcon1.style.display = "";
		showcon0.style.display = "none";
}
</script>

<script language=javascript>
function CheckIfEnglish( String )<!--检验表单必须是字母或数字-->
{ 
    var Letters = "abcdefghijklmnopqrstuvwxyz0123456789-";
     var i;
     var c;
      if(String.charAt( 0 )=='-')
	return false;
      if( String.charAt( String.length - 1 ) == '-' )
          return false;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) < 0)
	     return false;
     }
     return true;
}
function CheckIfid( String )<!--检验表单必须是数字-->
{ 
    var Letters = "1234567890";
     var i;
     var c;
      if(String.charAt( 0 )=='-')
	return false;
      if( String.charAt( String.length - 1 ) == '-' )
          return false;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) < 0)
	     return false;
     }
     return true;
}
function Checkjinid( String )<!--检验表单必须是数字-->
{ 
    var Letters = "1234567890.";
     var i;
     var c;
      if(String.charAt( 0 )=='-')
	return false;
      if( String.charAt( String.length - 1 ) == '-' )
          return false;
     for( i = 0; i < String.length; i ++ )
     {
          c = String.charAt( i );
	  if (Letters.indexOf( c ) < 0)
	     return false;
     }
     return true;
}
function ischinese(s)<!--检验表单必须是中文-->
{
var ret=true;
for(var i=0;i<s.length;i++)
ret=ret && (s.charCodeAt(i)>=10000);
return ret;
}
</script>
<script language=javascript>
function check_edit()
{
   if(form.feilei.value=="0")
   {alert("请选择分类");return false}
   if(form.shunxu.value=="" || !CheckIfid(form.shunxu.value))
   {alert("商品顺序填写错误");return false}
   if(form.mingcheng.value=="" || form.mingcheng.value.length > 25)
   {alert("商品名称填写错误");return false}
   if(form.jiage.value=="" || form.jiage.value<=0 || !Checkjinid(form.jiage.value))
   //if(form.jiage.value=="" || !Checkjinid(form.jiage.value))
   {alert("商品价格填写错误");return false}
   if(form.chengben.value=="" || !Checkjinid(form.chengben.value))
   {alert("商品成本价格填写错误");return false}
    if(form.yujing.value=="" || !CheckIfid(form.yujing.value))
   {alert("商品预警填写错误");return false}
     if(form.xiangou.value=="" || !CheckIfid(form.xiangou.value))
   {alert("限购数量填写错误");return false}
  	if (form.ayshmiaoshu.value.length > 60){
	alert ("商户描述字符不能超过60");return false;	}
  	if (form.ayshurl.value.length > 60){
	alert ("商户网址字符不能超过60");return false;	}
	
	if(form.ayshqq.value!=""){
  	if (!CheckIfid(form.ayshqq.value) || form.ayshqq.value.length < 5){
	alert ("商户QQ填写错误");return false;	}
	if (!CheckIfid(form.ayshqq.value) || form.ayshqq.value.length > 12){
	alert ("商户QQ填写错误");return false;	}
	}
	
	
   if(!CheckIfid(form.aypifa1.value || form.aypifa1.value.length > 7))
   {alert("优惠选项填写错误");return false}
   if(!CheckIfid(form.aypifa2.value || form.aypifa2.value.length > 7))
   {alert("优惠选项填写错误");return false}
   if(!CheckIfid(form.aypifa3.value || form.aypifa3.value.length > 7))
   {alert("优惠选项填写错误");return false}
   if(!CheckIfid(form.aypifa4.value || form.aypifa4.value.length > 7))
   {alert("优惠选项填写错误");return false}
   if(!CheckIfid(form.aypifa5.value || form.aypifa5.value.length > 7))
   {alert("优惠选项填写错误");return false}
   if(!Checkjinid(form.aypifaj1.value || form.aypifaj1.value.length > 7))
   {alert("优惠选项填写错误");return false}
   if(!Checkjinid(form.aypifaj2.value || form.aypifaj2.value.length > 7))
   {alert("优惠选项填写错误");return false}
   if(!Checkjinid(form.aypifaj3.value || form.aypifaj3.value.length > 7))
   {alert("优惠选项填写错误");return false}
   if(!Checkjinid(form.aypifaj4.value || form.aypifaj4.value.length > 7))


   {alert("优惠选项填写错误");return false}
   if(!Checkjinid(form.aypifaj5.value || form.aypifaj5.value.length > 7))
   {alert("优惠选项填写错误");return false}
   
}
</script>


<title><%=webname%>-编辑商品</title>
<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; }
.reginputd{ width:190px; height:36px; border:#CCC solid 1px; text-indent:10px; line-height:36px}
.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}
.regt3{ width:650px; height:36px; border:#CCC solid 1px; background:#F9F9F9; color:#999999; line-height:36px; padding-left:10px}
</style>
<br>
<DIV id=main2> 
<DIV style="PADDING-LEFT:0px">
<DIV id=main_right_content>
<H2><SPAN>编辑商品</SPAN></H2>
<DIV class=main4>

			<%            
            id=SafeRequest("id")
            if id="" then call PopErr("获取参数错误")
            sql="select * from aygood where aygoodid="&id&" and aygoodisydl=0 and aygoodsuoyouid="&clng(request.Cookies("aynameid"))&"" 
            rs.open sql,conn,1,3
            if rs.bof and rs.eof then
            rs.close
            call PopErr("未找到商品")
            end if
            %>
<form action="?act=edit" method="post" name="form" id="form" onSubmit="return check_edit()">
                        <table class="neitableanquan" width="1080">
           		  		  <tr>
                            <td colspan="2" align="center" width="100" ><span style="color: #FF6600">必填内容</span></td>
                            <td colspan="2"></td>
                       	  </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >所属分类</td>
                            <td  >
						  <%
                          set rsfl=server.CreateObject("adodb.recordset")
                          sql="select * from aykafenlei where aykanamesuoyou="&clng(request.Cookies("aynameid"))&" order by aykafenleisx asc" 
                          rsfl.open sql,conn,1,1
                          if not(rsfl.bof and rsfl.eof) then 
						
						
						
                            if clng(rs("aygooddlid"))<>0 then
							
                                set rsf=server.CreateObject("adodb.recordset")
                                sqlf="select aykanamesuoyou,aykafenleiid,aykafenleiname,aykafenleiid from aykafenlei where aykafenleiid="&rs("aygoodfl")&" and aykanamesuoyou="&request.Cookies("aynameid")&""
								'response.Write sqlf
                                rsf.open sqlf,conn,1,1
                                if not(rsf.bof and rsf.eof) then
                                response.Write trim(rsf("aykafenleiname"))%>
                                <input name="feilei" type="hidden" id="feilei" value="<%=rsf("aykafenleiid")%>">
                                <%
                                else
                                end if
                                rsf.close
                            
                            else
							
                            %>
                              <select name="feilei" id="feilei" class="reginput">
                               <option value="0">请选择商品分类</option>
                              <%do while not rsfl.eof%>
                              <option value="<%=rsfl("aykafenleiid")%>" <%if clng(rs("aygoodfl"))=clng(rsfl("aykafenleiid")) then response.Write("selected")%>><%=rsfl("aykafenleiname")%></option>
                                    <%
                                    set rserji=server.CreateObject("adodb.recordset")
                                    sql="select * from aykafenlei where aykanamesuoyou="&request.Cookies("aynameid")&" and ayshangjiid="&rsfl("aykafenleiid")&" order by aykafenleisx asc" 
                                    rserji.open sql,conn,1,1
                                    if not(rserji.bof and rserji.eof) then
                                    do while not rserji.eof%>
                                    <option value="<%=rserji("aykafenleiid")%>" <%if clng(rs("aygoodfl"))=clng(rserji("aykafenleiid")) then response.Write("selected")%>>&nbsp;&nbsp;┕<%=rserji("aykafenleiname")%></option>
                                    <%
                                    rserji.movenext 
                                    loop
                                    rserji.close
                                    end if
                              rsfl.movenext 
                              loop
                              rsfl.close
                              end if
                              %>
                              </select>
                              <%end if%>
                              
                              <input name="goodid" type="hidden" id="goodid" value="<%=id%>">
                              <input name="aygooddlid" type="hidden" id="aygooddlid" value="<%=rs("aygooddlid")%>">
                            </td>
                          	<td>
                            <div class="regt3" > <%if clng(rs("aygooddlid"))=0 then%>
                                                  <span style="color: #999999">选择一个商品分类</span>
                                                  <%else%>
                                                  <span style="color: #999999">代理商品所属商品分类</span>
                                                  <%end if%>
                            </div>
                            </td>
                        </tr>
                        
           		  		<tr>
                            <td colspan="2" align="center"  >商品名称</td>
                            <td  ><input name="mingcheng" type="text" id="mingcheng" value="<%=server.HTMLEncode(trim(rs("aygoodname")))%>" class="reginput" maxlength="25"></td>
                          	<td><div class="regt3" > 填写商品名称 最多25个字符</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >销售价格</td>
                            <td  ><input name="jiage" type="text" id="jiage" value="<%=Formatnumber(rs("ayjiage"),2,true,-1,0)%>" class="reginput" maxlength="7">
                            <input name="jiageedit" type="hidden" id="jiageedit" value="<%=rs("ayjiage")%>"></td>
                          	<td><div class="regt3" > 商品零售价格，单价不得低于0.1元，订单价格不低于1元<%if clng(rs("aygooddlid"))<>0 then%> <br>代理商品价格必须高于代理成本价格，禁止0元交易<%end if%></div></td>
                        </tr>
           		  		  <tr>
                            <td colspan="2" align="center"  ><span style="color: #FF6600">选填内容</span></td>
                            <td colspan="2"></td>
                       	  </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >商品排序</td>
                            <td  ><input name="shunxu" type="text" id="shunxu" value="<%=rs("aygoodsx")%>" class="reginput" maxlength="4"></td>
                          	<td><div class="regt3" > 商品列表排序 数字越小越靠前</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >限购数量</td>
                            <td  ><input name="xiangou" type="text" id="xiangou" value="<%=rs("ayxiangou")%>" class="reginput" maxlength="7"></td>
                          	<td><div class="regt3" > 0表示购买数量可填写,大于0表示购买数量限制为设置的数值 <span style="color:#F60">开启限购 将不能使用批发优惠功能</span></div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >成本价格</td>
                            <td  ><input name="chengben" type="text" id="chengben" value="<%=Formatnumber(rs("aychenben"),2,true,-1,0)%>" <%if clng(rs("aygooddlid"))<>0 then response.Write "readonly"%> class="reginput" maxlength="7"></td>
                          	<td><div class="regt3" > <%if clng(rs("aygooddlid"))<>0 then%>
                                代理价格，商品零售价格必须高于此价格，禁止0元交易
                                <%else%>
                                商品进货价,可以不填,填写有利于商户系统的利润统计分析
                                <%end if%>
                                </div>
                            </td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >代理价格</td>
                            <td  ><input name="aygoodtodaili" type="text" class="reginput" id="aygoodtodaili" value="<%=Formatnumber(rs("aygoodtodaili"),2,true,-1,0)%>"  maxlength="7"></td>
                          	<td><div class="regt3" > 如果有代理关系 此价格为默认提供给代理商的代理价格</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >库存预警</td>
                            <td  ><input name="yujing" type="text" id="yujing" value="<%=rs("ayyujing")%>" class="reginput" maxlength="7"></td>
                          	<td>
							<%
                            set rsm=server.CreateObject("adodb.recordset")
                            sqlm="select aynameid,isvipid from ayname where aynameid="&clng(request.Cookies("aynameid"))&"" 
                            rsm.open sqlm,conn,1,1
                            isvipid=rsm("isvipid")
                            rsm.close
                            %>
                            <div class="regt3" > 
							<%
                            if cint(isvipid)=1 then 
                            response.Write "0为不做预警，您是尊贵会员，手机短信发送数量不限 "
                            else
                            response.Write "0为不做预警，<a href=vip style=color:#FF6600>[开头尊贵会员，不限短信数量]</a> "
                            end if%>
                            </div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >通知方式</td>
                            <td  >
							<input name="ayyujingmss" type="checkbox" id="ayyujingmss" value="1" <%if cint(rs("ayyujingmss"))=1 then response.Write("checked")%>>站内通知
                            <input name="ayyujingmail" type="checkbox" id="ayyujingmail" value="1" <%if cint(rs("ayyujingmail"))=1 then response.Write("checked")%>>邮件通知
                            <input name="ayjujingwx" type="checkbox" id="ayjujingwx" value="1" <%if cint(rs("ayjujingwx"))=1 then response.Write("checked")%>>微信通知
                            <input name="ayyujingtel" type="checkbox" id="ayyujingtel" value="1" <%if cint(rs("ayyujingtel"))=1 then response.Write("checked")%>>手机通知
                            </td>
                          	<td><div class="regt3" > 请选择库存预警需要通知的方式</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >批发优惠</td>
                            <td  >
                            <input name="pifa" type="radio" value="0" onclick=show1() <%if cint(rs("aypifayes"))=0 then response.Write("checked")%>>不使用
        					<input type="radio" name="pifa" value="1" onclick=show2() <%if cint(rs("aypifayes"))=1 then response.Write("checked")%>>使用
                                <table border="0" cellpadding="0" cellspacing="0" id="youhuijia" <%if cint(rs("aypifayes"))=0 then response.Write("style=display:none")%>>
                                  <tr>
                                    <td height="35" width="89">
                                    >=<input name="aypifa1" type="text" id="aypifa1" value="<%if cint(rs("aypifa1"))<>0 then response.Write rs("aypifa1")%>" <%if clng(rs("aygooddlid"))<>0 then response.Write "readonly"%> size="6" class="reginputdddd">张
                                    </td>
                                    <td width="105">
                                    单价<input name="aypifaj1" type="text" id="aypifaj1" value="<%if rs("aypifaj1")<>0 then response.Write Formatnumber(rs("aypifaj1"),2,true,-1,0)%>" size="6" class="reginputdddd">元
                                    </td>
                                    <td>
                                    代理<input name="dailij1" type="text" id="dailij1" value="<%if rs("dailij1")<>0 then response.Write Formatnumber(rs("dailij1"),2,true,-1,0)%>" size="6" class="reginputdddd">元
                                    </td>
                                  </tr>
                                  <tr>
                                    <td height="35">
                                    >=<input name="aypifa2" type="text" id="aypifa2" value="<%if cint(rs("aypifa2"))<>0 then response.Write rs("aypifa2")%>" <%if clng(rs("aygooddlid"))<>0 then response.Write "readonly"%> size="6" class="reginputdddd">张
                                    </td>
                                    <td>
                                    单价<input name="aypifaj2" type="text" id="aypifaj2" value="<%if rs("aypifaj2")<>0 then response.Write Formatnumber(rs("aypifaj2"),2,true,-1,0)%>" size="6" class="reginputdddd">元
                                    </td>
                                    <td>
                                    代理<input name="dailij2" type="text" id="dailij2" value="<%if rs("dailij2")<>0 then response.Write Formatnumber(rs("dailij2"),2,true,-1,0)%>" size="6" class="reginputdddd">元
                                    </td>
                                  </tr>
                                  <tr>
                                    <td height="35">
                                    >=<input name="aypifa3" type="text" id="aypifa3" value="<%if cint(rs("aypifa3"))<>0 then response.Write rs("aypifa3")%>" <%if clng(rs("aygooddlid"))<>0 then response.Write "readonly"%> size="6" class="reginputdddd">张
                                    </td>
                                    <td>
                                    单价<input name="aypifaj3" type="text" id="aypifaj3" value="<%if rs("aypifaj3")<>0 then response.Write Formatnumber(rs("aypifaj3"),2,true,-1,0)%>" size="6" class="reginputdddd">元
                                    </td>
                                    <td>
                                    代理<input name="dailij3" type="text" id="dailij3" value="<%if rs("dailij3")<>0 then response.Write Formatnumber(rs("dailij3"),2,true,-1,0)%>" size="6" class="reginputdddd">元
                                    </td>
                                  </tr>
                                  <tr>
                                    <td height="35">
                                    >=<input name="aypifa4" type="text" id="aypifa4" value="<%if cint(rs("aypifa4"))<>0 then response.Write rs("aypifa4")%>" <%if clng(rs("aygooddlid"))<>0 then response.Write "readonly"%> size="6" class="reginputdddd">张
                                    </td>
                                    <td>
                                    单价<input name="aypifaj4" type="text" id="aypifaj4" value="<%if rs("aypifaj4")<>0 then response.Write Formatnumber(rs("aypifaj4"),2,true,-1,0)%>" size="6" class="reginputdddd">元
                                    </td>
                                    <td>
                                    代理<input name="dailij4" type="text" id="dailij4" value="<%if rs("dailij4")<>0 then response.Write Formatnumber(rs("dailij4"),2,true,-1,0)%>" size="6" class="reginputdddd">元
                                    </td>
                                  </tr>
                                  <tr>
                                    <td height="35">
                                    >=<input name="aypifa5" type="text" id="aypifa5" value="<%if cint(rs("aypifa5"))<>0 then response.Write rs("aypifa5")%>" <%if clng(rs("aygooddlid"))<>0 then response.Write "readonly"%> size="6" class="reginputdddd">张
                                    </td>
                                    <td>
                                    单价<input name="aypifaj5" type="text" id="aypifaj5" value="<%if rs("aypifaj5")<>0 then response.Write Formatnumber(rs("aypifaj5"),2,true,-1,0)%>" size="6" class="reginputdddd">元
                                    </td>
                                    <td>
                                    代理<input name="dailij5" type="text" id="dailij5" value="<%if rs("dailij5")<>0 then response.Write Formatnumber(rs("dailij5"),2,true,-1,0)%>" <%if clng(rs("aygooddlid"))<>0 then response.Write "readonly"%> size="6" class="reginputdddd">元
                                    </td>
                                  </tr>
                                </table>
                                <input name="dailicb1" type="hidden" id="dailicb1" value="<%=rs("dailicb1")%>">
                                <input name="dailicb2" type="hidden" id="dailicb2" value="<%=rs("dailicb2")%>">
                                <input name="dailicb3" type="hidden" id="dailicb3" value="<%=rs("dailicb3")%>">
                                <input name="dailicb4" type="hidden" id="dailicb4" value="<%=rs("dailicb4")%>">
                                <input name="dailicb5" type="hidden" id="dailicb5" value="<%=rs("dailicb5")%>">
                            </td>
                          	<td>
                            
                            <div class="regt4" id="showcon1" <%if cint(rs("aypifayes"))=0 then response.Write("style=display:none")%>> 是否开启批发 <span style="color:#F60">注：购买数量应逐级递增 优惠单价应逐级递减，代理价格是为下级代理提供的默认价格</span>
                            <br>
                            <%if clng(rs("aygooddlid"))<>0 then%>
								<%if cint(rs("aypifa1"))<>0 then%>
                                大于等于<%=rs("aypifa1")%>张 代理成本价<%if rs("dailicb1")<>"" then response.Write Formatnumber(rs("dailicb1"),2,true,-1,0)%>元<br>
                                <%end if%>
								<%if cint(rs("aypifa2"))<>0 then%>
                                大于等于<%=rs("aypifa2")%>张 代理成本价<%if rs("dailicb2")<>"" then response.Write Formatnumber(rs("dailicb2"),2,true,-1,0)%>元<br>
                                <%end if%>
								<%if cint(rs("aypifa3"))<>0 then%>
                                大于等于<%=rs("aypifa3")%>张 代理成本价<%if rs("dailicb3")<>"" then response.Write Formatnumber(rs("dailicb3"),2,true,-1,0)%>元<br>
                                <%end if%>
								<%if cint(rs("aypifa4"))<>0 then%>
                                大于等于<%=rs("aypifa4")%>张 代理成本价<%if rs("dailicb4")<>"" then response.Write Formatnumber(rs("dailicb4"),2,true,-1,0)%>元<br>
                                <%end if%>
								<%if cint(rs("aypifa5"))<>0 then%>
                                大于等于<%=rs("aypifa5")%>张 代理成本价<%if rs("dailicb5")<>"" then response.Write Formatnumber(rs("dailicb5"),2,true,-1,0)%>元
                                <%end if%>
                            <%end if%>
                            </div>
                            <div class="regt3" id="showcon0" <%if cint(rs("aypifayes"))=1 then response.Write("style=display:none")%>> 是否开启批发 <span style="color:#F60">注：购买数量应逐级递增 优惠单价应逐级递减，代理价格是为下级代理提供的默认价格</span></div>
                            </td>
                        </tr>
                        <%if clng(rs("aygooddlid"))=0 then%>
           		  		<tr>
                            <td colspan="2" align="center"  >优惠券</td>
                            <td  >
                    		<input name="youhui" type="radio" value="0" <%if cint(rs("ayyouhuiyes"))=0 then response.Write("checked")%>>不使用
                            <input type="radio" name="youhui" value="1" <%if cint(rs("ayyouhuiyes"))=1 then response.Write("checked")%>>使用
                            </td>
                          	<td><div class="regt3" > 是否支持买家购卡时使用优惠券 <a href="addyouhui" style="color:#FF6600">[添加优惠券]</a> <a href="myyouhui" style="color:#FF6600">[管理优惠券]</a></div></td>
                        </tr>
                        <%end if%> 
           		  		<tr>
                            <td colspan="2" align="center"  >售卡通知</td>
                            <td  >
                    		<input name="shouka" type="radio" value="0" <%if cint(rs("ayshoukatz"))=0 then response.Write("checked")%>>不使用
         					<input type="radio" name="shouka" value="1" <%if cint(rs("ayshoukatz"))=1 then response.Write("checked")%>>使用
                            </td>
                          	<td><div class="regt3" > 
                            售卡后通知我
							<%
                            if cint(isvipid)=1 then 
                            response.Write "您是尊贵会员 短信不限 "
                            else
                            response.Write "短信剩余"&sysms&"条 <a href=vip style=color:#FF6600>[开头尊贵会员，不限短信数量]</a> <a style=color:#FF6600 href=/user/chong.asp?c=msn>[购买短信流量]</a> "
                            end if%>
                            </div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >通知方式</td>
                            <td  >
                    		<input name="shoukamail" type="checkbox" id="shoukamail" value="1" <%if cint(rs("shoukamail"))=1 then response.Write("checked")%>>邮件通知
                            <input name="shouikawx" type="checkbox" id="shouikawx" value="1" <%if cint(rs("shouikawx"))=1 then response.Write("checked")%>>微信通知
                            <input name="shoukatel" type="checkbox" id="shoukatel" value="1" <%if cint(rs("shoukatel"))=1 then response.Write("checked")%>>手机通知
                            </td>
                          	<td><div class="regt3" > 请选择售卡通知需要通知的方式</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >提卡密码</td>
                            <td  >
                    		<input name="ayggodispass" type="radio" value="0" <%if cint(rs("ayggodispass"))=0 then response.Write("checked")%>>不使用
							<input type="radio" name="ayggodispass" value="1" <%if cint(rs("ayggodispass"))=1 then response.Write("checked")%>>使用
                            </td>
                          	<td><div class="regt3" > 开启后，强制买家购卡时自己设置一个提卡密码,在提取卡密时要正确输入才能提卡</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >显示库存</td>
                            <td  >
                    		<input name="aygoodiskucun" type="radio" value="1" <%if cint(rs("aygoodiskucun"))=1 then response.Write("checked")%>>不显示
							<input type="radio" name="aygoodiskucun" value="0" <%if cint(rs("aygoodiskucun"))=0 then response.Write("checked")%>>显示
                            </td>
                          	<td><div class="regt3" > 不显示，则购买页面以'充足'等代替实际剩余卡密数量</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >卡号名称</td>
                            <td  ><input name="kahaoname" type="text" class="reginput" id="kahaoname" value="<%=trim(rs("kahaoname"))%>" size="15" maxlength="4"></td>
                          	<td><div class="regt3" > 在提取卡密时显示，如序列号,授权码等</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >卡密名称</td>
                            <td  ><input name="kaminame" type="text" class="reginput" id="kaminame" value="<%=trim(rs("kaminame"))%>" size="15" maxlength="4"></td>
                          	<td><div class="regt3" > 在提取卡密时显示，如序列号密码,授权密码等，<span style="color:#F60">留空 则提卡时不显示密码栏，请谨慎操作</span></div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >购卡密码</td>
                            <td  ><input name="bugpass" type="text" class="reginput" id="bugpass" value="<%=trim(rs("bugpass"))%>" size="15" maxlength="15"></td>
                          	<td><div class="regt3" > 商家对商品设置一个密码,买家需要正确输入密码才可以购买,最多15字符,为空则不需要密码</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >客户信息</td>
                            <td  >
                              <select name="buylx" id="buylx" class="reginput">
                              <option value="0" <%if clng(rs("buylx"))=0 then response.Write("selected")%>>任意字符</option>
                              <option value="1" <%if clng(rs("buylx"))=1 then response.Write("selected")%>>必须为数字</option>
                              <option value="2" <%if clng(rs("buylx"))=2 then response.Write("selected")%>>必须为字母</option>
                              <option value="3" <%if clng(rs("buylx"))=3 then response.Write("selected")%>>必须为为数字和字母</option>
                              <option value="4" <%if clng(rs("buylx"))=4 then response.Write("selected")%>>字母或数字,下划线</option>
                              <option value="5" <%if clng(rs("buylx"))=5 then response.Write("selected")%>>必须为中文</option>
                              <option value="6" <%if clng(rs("buylx"))=6 then response.Write("selected")%>>必须为邮箱账号</option>
                              <option value="7" <%if clng(rs("buylx"))=7 then response.Write("selected")%>>必须为手机号</option>
                              </select>
                            </td>
                          	<td><div class="regt3" > 买家下单时预留查询订单的联系方式格式</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >商品描述</td>
                            <td  ><input name="ayshmiaoshu" type="text" id="ayshmiaoshu" value="<%if isnull(trim(rs("ayshmiaoshu")))=true or trim(rs("ayshmiaoshu"))="" then response.Write" ":else:response.Write server.HTMLEncode(trim(rs("ayshmiaoshu"))):end if%>" size="40" maxlength="30" class="reginput"></td>
                          	<td><div class="regt3" > 商品描述将显示在商品出售页与订单查询结果上方 不超过30汉字</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >商户网址</td>
                            <td  ><input name="ayshurl" type="text" id="ayshurl" value="<%if isnull(trim(rs("ayshurl")))=true or trim(rs("ayshurl"))="" then response.Write" ":else:response.Write server.HTMLEncode(trim(rs("ayshurl"))):end if%>" size="40" maxlength="80" class="reginput"></td>
                          	<td><div class="regt3" > 完整地址 如http://ikpay.cn 若为空，商品出售页面则显示商户信息中的站点网址</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >商户QQ</td>
                            <td  ><input name="ayshqq" type="text" id="ayshqq" value="<%if trim(rs("ayshqq"))<>0 then response.Write trim(rs("ayshqq"))%>" maxlength="12" class="reginput"></td>
                          	<td><div class="regt3" > 若为空，商品出售页面则显示商户信息中的联系QQ</div></td>
                        </tr>
           		  		<tr>
                            <td colspan="2" align="center"  >支付方式</td>
                            <td colspan="2">
                            <input type="checkbox" name="ayisbankpay" value="1" <%if rs("ayisbankpay")=1 then response.Write("checked")%> >网银&nbsp;
                            <input type="checkbox" name="ayisalipay" value="1" <%if rs("ayisalipay")=1 then response.Write("checked")%> >支付宝 &nbsp;
                            <input type="checkbox" name="ayistenpay" value="1" <%if rs("ayistenpay")=1 then response.Write("checked")%> >财付通 &nbsp;
                            <input type="checkbox" name="ayissaopay" value="1" <%if rs("ayissaopay")=1 then response.Write("checked")%> >微信 &nbsp;
                            <input type="checkbox" name="ayisqqpay" value="1" <%if rs("ayisqqpay")=1 then response.Write("checked")%> >手Q钱包 &nbsp;
                            <input type="checkbox" name="ayisjdpay" value="1" <%if rs("ayisjdpay")=1 then response.Write("checked")%> >京东钱包 &nbsp;
                            </td>
                       	  </tr>
							<script charset="utf-8" src="/kindeditor/kindeditor.js"></script>
                            <script charset="utf-8" src="/kindeditor/lang/zh-CN.js"></script>
                            <script>
                                    var editor;
                                    KindEditor.ready(function(K) {
                                            editor = K.create('#editor_id', 
                                            {
                                            width : '950px',
                                            height : '300px',
                                            uploadJson : '/kindeditor/asp/json_good.asp',
                                            fileManagerJson : '/kindeditor/asp/json_file_good.asp',
                                            allowFileManager : false,  //图片空间
                                            fillDescAfterUploadImage : true,  //图片上传后编辑
                                            items:[
                                                    'undo', 'redo', '|', 'justifyleft', 'justifycenter', 'justifyright', 'fontname', 'fontsize', 'forecolor', 'hilitecolor',
                                                    'bold', 'italic', '|', 'underline', 'strikethrough', 'image',
                                                    'table', 'hr', 'emoticons', 'link', 'unlink', 'lineheight', 'source'
                                                  ]
                                            });
                                    });
                                    
                                    
                                    
                                    var editor;
                                    KindEditor.ready(function(K) {
                                            editor = K.create('#editor_id2', 
                                            {
                                            width : '950px',
                                            height : '300px',
                                            uploadJson : '/kindeditor/asp/json_good.asp',
                                            fileManagerJson : '/kindeditor/asp/json_file_good.asp',
                                            allowFileManager : false,  //图片空间
                                            fillDescAfterUploadImage : true,  //图片上传后编辑
                                            items:[
                                                    'undo', 'redo', '|', 'justifyleft', 'justifycenter', 'justifyright', 'fontname', 'fontsize', 'forecolor', 'hilitecolor',
                                                    'bold', 'italic', '|', 'underline', 'strikethrough', 'image',
                                                    'table', 'hr', 'emoticons', 'link', 'unlink', 'lineheight', 'source'
                                                  ]
                                            });
                                    });
                            </script>
           		  		  <tr>
                            <td colspan="2" align="center"  >购买说明</td>
                            <td colspan="2">
							 <%
							  if trim(rs("goodxx"))<>"" and isnull(trim(rs("goodxx")))=false then 
							  goodxx=rs("goodxx")
							  else
							  goodxx=" "
							  end if
							  %>
							  <textarea id="editor_id" name="content1"><%=Server.HtmlEncode(goodxx)%></textarea>
                            <span style="color:#F60;font-weight:bold">注：图片宽度不超过880PX，购买说明将显示在商品购买页面的详细说明</span>
                            </td>
                       	  </tr>
            		  	  <tr>
                            <td colspan="2" align="center"  >使用说明</td>
                            <td colspan="2">
							  <%
                              if trim(rs("goodbuyxx"))<>"" and isnull(trim(rs("goodbuyxx")))=false then 
                              goodbuyxx=rs("goodbuyxx")
                              else
                              goodbuyxx=" "
                              end if
                              %>
	  						<textarea id="editor_id2" name="content2"><%=Server.HtmlEncode(goodbuyxx)%></textarea>
                            <span style="color:#F60;font-weight:bold">注：图片宽度不超过880PX，使用说明将显示在提取卡密页面</span>
                            </td>
                       	  </tr>
            		  	  <tr>
                            <td colspan="2" align="center"  ></td>
                            <td colspan="2"><input type="submit" name="Submit" value=" 确 认 修 改 " class="logindlreg"></td>
                       	  </tr>
                    </table>
                    </form>
</DIV>


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

<br>

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


