<!--#include file="connn.asp"-->
<!--#include file="cookies.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">


<title>添加新商盟</title>
<script language="JavaScript" src="calendar.js"></script>
<script language = "JavaScript">
function checkpro()
{
    if(checkspace(document.myform.name.value)) {
	document.myform.name.focus();
    alert("请输入商盟名称！");
	return false;
  }

     if(checkspace(document.myform.code.value)) {
	document.myform.code.focus();
    alert("请输入联系人！");
	return false;
  }
     if(checkspace(document.myform.telll.value)) {
	document.myform.telll.focus();
    alert("请输入联系电话！");
	return false;
  }
      if(checkspace(document.myform.pweight.value)) {
	document.myform.pweight.focus();
    alert("请输入商盟地址！");
	return false;
  }
 
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
	function regInput(obj, reg, inputStr)
	{
		var docSel	= document.selection.createRange()
		if (docSel.parentElement().tagName != "INPUT")	return false
		oSel = docSel.duplicate()
		oSel.text = ""
		var srcRange	= obj.createTextRange()
		oSel.setEndPoint("StartToStart", srcRange)
		var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
		return reg.test(str)
	}
//-->
</script>
<style type=text/css>
BODY{
	margin:0px;
	FONT-SIZE: 12px;
	FONT-FAMILY: "宋体", "Verdana", "Arial", "Helvetica", "sans-serif";
	background-color: #CCCC99; 
	scrollbar-highlight-color: #CC9933; 
	scrollbar-arrow-color: #FFFFFF; 
	scrollbar-base-color: #CC9933
}
table { border:0px; }
td { font:normal 12px 宋体; }
img { vertical-align:bottom; border:0px; }
a { font:normal 12px 宋体; color:#111111; text-decoration:none; }
a:hover { color:#384780;text-decoration:underline; }
.sec_menu { border-left:2px solid #CC3300; border-right:2px solid #CC3300; border-bottom:2px solid #CC3300; overflow:hidden; background:#ffffff; }
.menu_title {background-color: #335EA8;color: white;font-size: 12px;font-weight:bold;height: 25; }
.menu_title span { position:relative; top:2px; left:8px; color:#FFFF00; font-weight:bold; }
.menu_title2 {background-color: #335EA8;color: white;font-size: 12px;font-weight:bold;height: 25; }
.menu_title2 span { position:relative; top:2px; left:8px; color:#FEFEFE; font-weight:bold; }
input,select,Textarea{
font-family:宋体,Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}
</style>

<table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#7b869a"> 
<tr> 
  <td height="24" align="center" bgcolor="#CC3300"><span class="STYLE1"><span class="STYLE3">添加商盟</span></span></td>
</tr> 
<tr>  
<form name="myform" method="post" action="saveaddproduct.asp?action=add">
<td bgcolor="#FFFFFF"> 
  <br>
  <table width="98%" border="2" align="center" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC">
          <tr> 
            <td width="17%" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong>选择分类： </strong></td>
            <td width="83%" bgcolor="#FFFFFF"> 
			<select name="categoryid">  
<%
sort(0)
dim ii
ii=0
sub sort(selec)
	sql="select * from FOX_category where ParentID = "&selec&" order by categoryorder"
	Set Rs1=Conn.Execute(sql)
	do while not rs1.eof
if selec=0 then
%>
<option value="<%=int(rs1("categoryid"))%>"><%=rs1("category")%></option>
<%
else
%>
<option value="<%=int(rs1("categoryid"))%>"><%=string(ii*2,"　")%><%=rs1("category")%></option>
<%
end if
ii=ii+1
	sort rs1("categoryid")
ii=ii-1
	rs1.movenext
	loop
rs1.close
Set Rs1 = Nothing
end sub

%>
		</select>           </td>
          </tr>
          <tr>
            <td align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong>商盟名称： </strong></td>
            <td bgcolor="#FFFFFF"><input name="name" type="text" class="input_sr" id="name" size="30" />            </td>
          </tr>

          <tr> 
            <td align="right" background="images/topbg.gif" bgcolor="#f4f4f4">
			<strong>商盟类型： </strong></td>
            <td bgcolor="#FFFFFF"> <input name="mark" type="text" class="input_sr" id="mark" size="30" >
            <%
set rsMark=server.createobject("adodb.recordset")
rsMark.open "select * from FOX_parductppp order by MarkTop ",conn,1,1
%>
              <select name="SelectMark" onChange="(document.myform.mark.value=this.options[this.selectedIndex].value)">
                <option selected>会员类型</option>
				<% Do While Not rsMark.Eof %>
                <option value="<% = Trim(rsMark("MarkName")) %>"><% = rsMark("MarkName")%></option>
                <%
rsMark.movenext
Loop
rsMark.close
set rsMark=nothing
%>
            </select></td>
          </tr>
          <tr> 
            <td align="right" background="images/topbg.gif" bgcolor="#f4f4f4">
			<strong>联系人：            </strong></td>
            <td bgcolor="#FFFFFF"> <input name="code" type="text" class="input_sr" id="code" size="30">            </td>
          </tr>          
          <tr>
            <td align="right" background="images/topbg.gif" bgcolor="#f4f4f4">
			<strong>联系电话：</strong></td>
            <td bgcolor="#FFFFFF">
			<input name="telll" type="text" class="input_sr" id="telll" size="30"></td>
          </tr>
          <tr>
            <td align="right" background="images/topbg.gif" bgcolor="#f4f4f4">
			<strong>营业时间：</strong></td>
            <td bgcolor="#FFFFFF">
			<input name="waitime" type="text" class="input_sr" id="waitime" size="30"></td>
          </tr>
          <tr>
            <td align="right" background="images/topbg.gif" bgcolor="#f4f4f4">
			<strong>导购路线：</strong></td>
            <td bgcolor="#FFFFFF">
			<input name="luuu" type="text" class="input_sr" id="luuu" size="30"></td>
          </tr>
          <tr>
            <td align="right" background="images/topbg.gif" bgcolor="#f4f4f4">
			<b>所属地区：</b></td>
            <td bgcolor="#FFFFFF">
			<%
dim rsclass
dim sqlclass
dim count
set rsclass=server.createobject("adodb.recordset")
sqlclass = "select * from FOX_shi order by paixu desc"
rsclass.open sqlclass,conn,1,1
%><SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rsclass.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rsclass("shi"))%>","<%= trim(rsclass("sheng"))%>","<%= trim(rsclass("id"))%>");
        <%
        count = count + 1
        rsclass.movenext
        loop
        rsclass.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.shi.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.shi.options[document.myform.shi.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
                      </SCRIPT><%
sqlclass = "select * from FOX_sheng order by paixu desc"
rsclass.open sqlclass,conn,1,1
if rsclass.eof and rsclass.bof then
response.write "请先添加栏目。"
response.end
else
%><SELECT name="sheng" onChange="changelocation(document.myform.sheng.options[document.myform.sheng.selectedIndex].value)" size="1" class="right_bg01">
<OPTION selected value="0">==分类==</OPTION>
                                <%do while not rsclass.eof
%>
                                <OPTION value="<%=trim(rsclass("id"))%>"><%=trim(rsclass("sheng"))%></OPTION>
                                <%
        rsclass.movenext
        loop
	    end if
        rsclass.close
        set rsclass=nothing
%>
                              </SELECT>
                              <SELECT name="shi" size="1" class="right_bg01">
                                <OPTION selected value="0">==二级分类==</OPTION>
                              </SELECT></td>
          </tr>
          <tr>
            <td align="right" background="images/topbg.gif" bgcolor="#f4f4f4">
			<strong>商盟地址： </strong></td>
            <td bgcolor="#FFFFFF">
			<input name="pweight" type="text" class="input_sr" id="pweight" size="49" /></td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4">
			<strong>备注：</strong></td>
            <td bgcolor="#FFFFFF">
			<input name="beizhu" type="text" class="input_sr" id="beizhu" size="49" /></td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4">
			<strong>折扣比率：</strong></td>
            <td bgcolor="#FFFFFF">
			<INPUT NAME="vipprice" TYPE="text" class="input_sr" ID="vipprice" value="0" SIZE="1">　折</td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4">
			<strong>最新打折卡：</strong></td>
            <td bgcolor="#FFFFFF">
			<input name="foxq" type="text" class="input_sr" id="foxq" size="30" />
                <input name="Submit12" type="button" class="input_bot" onclick="window.open('FOX_upimgload.asp?formname=myform&amp;editname=foxq','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传打折卡" /></td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong> 商盟缩略图：</strong></td>
            <td bgcolor="#FFFFFF"><input name="spic" type="text" class="input_sr" id="spic" value="../shangjiaupfiles/nopic.gif" size="30" />
                <input name="Submit11" type="button" class="input_bot" onclick="window.open('Fox_upimgloads.asp?formname=myform&editname=spic','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传商盟缩图" />            </td>
          </tr>
          <tr> 
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong> 商盟原图：</strong></td>
            <td bgcolor="#FFFFFF"> <input name="pic" type="text" class="input_sr" id="pic" VALUE="../shangjiaupfiles/nopic.gif" size="30"> 
              <input name="Submit11" type="button" class="input_bot" onClick="window.open('FOX_upimgload.asp?formname=myform&editname=pic','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传商盟原图">            </td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong>其他展示图一：</strong></td>
            <td bgcolor="#FFFFFF"><input name="p1" type="text" class="input_sr" id="p1" size="30" />
                <input name="Submit11" type="button" class="input_bot" onclick="window.open('FOX_upimgload.asp?formname=myform&amp;editname=p1','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传商盟原图" /></td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong>其他展示图二：</strong></td>
            <td bgcolor="#FFFFFF"><input name="p2" type="text" class="input_sr" id="p2" size="30" />
                <input name="Submit11" type="button" class="input_bot" onclick="window.open('FOX_upimgload.asp?formname=myform&amp;editname=p2','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传商盟原图" /></td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong> 其他展示图三：</strong></td>
            <td bgcolor="#FFFFFF"><input name="p3" type="text" class="input_sr" id="p3" size="30" />
                <input name="Submit11" type="button" class="input_bot" onclick="window.open('FOX_upimgload.asp?formname=myform&amp;editname=p3','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传商盟原图" /></td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong> 其他展示图四：</strong></td>
            <td bgcolor="#FFFFFF"><input name="p4" type="text" class="input_sr" id="p4" size="30" />
                <input name="Submit11" type="button" class="input_bot" onclick="window.open('FOX_upimgload.asp?formname=myform&amp;editname=p4','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传商盟原图" /></td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong> 其他展示图五：</strong></td>
            <td bgcolor="#FFFFFF"><input name="p5" type="text" class="input_sr" id="p5" size="30" />
                <input name="Submit11" type="button" class="input_bot" onclick="window.open('FOX_upimgload.asp?formname=myform&amp;editname=p5','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传商盟原图" /></td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong> 其他展示图六：</strong></td>
            <td bgcolor="#FFFFFF"><input name="p6" type="text" class="input_sr" id="p6" size="30" />
                <input name="Submit11" type="button" class="input_bot" onclick="window.open('FOX_upimgload.asp?formname=myform&amp;editname=p6','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传商盟原图" /></td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong> 其他展示图七：</strong></td>
            <td bgcolor="#FFFFFF"><input name="p7" type="text" class="input_sr" id="p7" size="30" />
                <input name="Submit11" type="button" class="input_bot" onclick="window.open('FOX_upimgload.asp?formname=myform&amp;editname=p7','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传商盟原图" /></td>
          </tr>
          <tr>
            <td height="9" align="right" background="images/topbg.gif" bgcolor="#f4f4f4"><strong> 其他展示图八：</strong></td>
            <td bgcolor="#FFFFFF"><input name="p8" type="text" class="input_sr" id="p8" size="30" />
                <input name="Submit11" type="button" class="input_bot" onclick="window.open('FOX_upimgload.asp?formname=myform&amp;editname=p8','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" value="上传商盟原图" /></td>
          </tr>
          <tr> 
            <td align="right" valign="top" bgcolor="#f4f4f4"><strong>详细简介：            </strong></td>
            <td bgcolor="#FFFFFF"> <INPUT type="hidden" name="detail" value="">	
              <iframe ID="detail" src="../scgjb/ewebeditor.asp?id=detail&style=standard" frameborder="0" scrolling="no" width="550" HEIGHT="350"></iframe>            </td>
          </tr>

          <tr>
            <td height="25" align="right" bgcolor="#f4f4f4"><strong>商盟类别：</strong></td>
            <td bgcolor="#FFFFFF"><input name="recommend" type="radio" value="0" checked="checked" />
普通商盟：默认选项，此商盟会正常显示与前台所属分类中，但不会显示在首页；<br />
<input name="recommend" type="radio" value="1" />
			最新加入：如果您选择新品中架，此商盟将在首页新品区块显示；<br />
<input type="radio" name="recommend" value="2" />
首页推荐：此商盟将不在新品区块显示，而是直接显示在首页推荐商盟区块；<br />
<input type="radio" name="recommend" value="3" />
暂不展示：此商盟将暂不发布，但此数据将收集在未展示商盟管理里，您可在未展示商盟管理里进行上架发布。
<hr size="0" />
                <input name="Submit2" type="submit" class="input_bot" onclick="return checkpro();" value="确认以上修改" />               </td>
          </tr>
</table>
  <br></td></form></tr> </table></body></html>