<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shjia] where username='"&request.cookies("bjx")("shjianame")&"' ",conn,1,1
id=rs("shjiaid")
%>
<%
set rsu=server.CreateObject("adodb.recordset")
rsu.open "select * from [shjia] where username='"&request.cookies("bjx")("shjianame")&"' ",conn,1,1
lx=rsu("lx")
%>
<%if request.cookies("bjx")("shjianame")="" then
response.Redirect "admin_login.asp"
response.End
end if
%>

  <%
  if lx=0 then
  response.write "<font color=red>&nbsp对不起，您是目前是免费用户，不能使用此项功能！请马上升级成为<a href=../gbook.asp>C型用户</a></font>"
  end if
    if lx=1 then
  response.write "<font color=red>&nbsp;&nbsp对不起，您是目前是B型用户（即网店型用户），不能使用此项功能！请马上升级成为<a href=../gbook.asp>C型用户</a></font>"
  end if
    if lx=2 then
  %>
	<%
	dim rss
	jiamengid=request.QueryString("id")
	set rss=server.CreateObject("adodb.recordset")
	rss.open "select * from jiameng where jiamengid="&jiamengid,conn,1,1
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style3 {color: #FF0000}
-->
</style>
<title>New Page 1</title>
</head>

<body>
 <SCRIPT LANGUAGE="JavaScript">
<!--
function checkkk()
{
     if(checkspace(document.myform.name.value)) {
	document.myform.name.focus();
    alert("您还没有写标题！");
	return false;
	  }
     if(checkspace(document.myform.pic.value)) {
	document.myform.pic.focus();
    alert("请添加您的形象图片！");
	return false;
		  }
     if(checkspace(document.myform.pic1.value)) {
	document.myform.pic1.focus();
    alert("请您至少添加5张产品展示图片！");
	return false;
			  }
     if(checkspace(document.myform.pic2.value)) {
	document.myform.pic2.focus();
    alert("请您至少添加5张产品展示图片！");
	return false;
				  }
				      if(checkspace(document.myform.pic3.value)) {
	document.myform.pic3.focus();
    alert("请您至少添加5张产品展示图片！");
	return false;
	
				  }
				      if(checkspace(document.myform.pic4.value)) {
	document.myform.pic4.focus();
    alert("请您至少添加5张产品展示图片！");
	return false;
				  }
				      if(checkspace(document.myform.pic5.value)) {
	document.myform.pic5.focus();
    alert("请您至少添加5张产品展示图片！");
	return false;
				  }
     if(checkspace(document.myform.xiangmu.value)) {
	document.myform.xiangmu.focus();
    alert("请输入您的项目介绍信息！");
	return false;
					  }
     if(checkspace(document.myform. touzi.value)) {
	document.myform.touzi.focus();
    alert("请输入您的市场及投资分析信息！");
	return false;

  }
     if(checkspace(document.myform.ad.value)) {
	document.myform.ad.focus();
    alert("请输入广告语！");
	return false;
  }
 
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
//-->
</script>
<form name="myform" method="post" action="savezs.asp?id=<%=rss("jiamengid")%>" onSubmit="return checkkk()" >
<table border="0" width="100%"  class="tableBorder">
  <tr>
    <td width="100%" background="../admin/images/bg_3.gif" height="25" align="center"><font color="#FFFFFF"><b>添加招商加盟信息</b></font></td>
  </tr>
  <tr>
    <td width="100%" bgcolor="#D6DBF7">
      <table border="1" width="100%" bordercolorlight="#FFFFFF" cellspacing="0" cellpadding="0" bordercolordark="#D6DBF7">
        <tr>
        <%set rs=server.createobject("adodb.recordset")
	rs.open "select * from shjia where username='"&request.cookies("bjx")("shjianame")&"' ",conn,1,1
	%>
	<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_Nclass order by Nclassidorder ",conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
   count = 0
   do while not rs.eof 
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
        count = count + 1
        rs.movenext
        loop
        rs.close
%>
		
onecount=<%=count%>;

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

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { //这句不是很理解
             document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>

<td bgcolor="#D6DBF7" align="center" width="10%">

<b>类别</b>
</td>
	<td width="90%" bgcolor="#D6DBF7" colspan="2">
<%set rs=server.createobject("adodb.recordset")
	rs.open "select * from shjia where username='"&request.cookies("bjx")("shjianame")&"' ",conn,1,1
	%>
	<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_Nclass order by Nclassidorder ",conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
   count = 0
   do while not rs.eof 
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
        count = count + 1
        rs.movenext
        loop
        rs.close
%>
		
onecount=<%=count%>;

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

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
             document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
	
	<%
	set rs1=server.CreateObject("adodb.recordset")
	rs1.open "select * from jiameng ",conn,1,1

    rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>
		<select class="wenbenkuang" name="anclassid" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
<% 
        do while not rs.eof
%>
		<option value="<%=rs("anclassid")%>" <%if rs1("anclassid")=rs("anclassid") then%>selected<%end if%>><%=trim(rs("anclass"))%></option>
		<%
        rs.movenext
        loop
		end if
        rs.close
%>
		</select>
		小类：                                                          
		<select class="wenbenkuang" name="Nclassid">
<%rs.open "select * from shop_Nclass where anclassid="&rs1("anclassid") ,conn,1,1
		do while not rs.eof%>
		<option value="<%=rs("NclassID")%>" <%if rs1("nclassid")=rs("nclassid") then%>selected<%end if%>><%=rs("Nclass")%></option>
		<% rs.movenext
			loop
			rs.close
			set rs = nothing
			%>
	</select><font color=red>*</font>
</td>
        </tr>
        <tr>
<td bgcolor="#D6DBF7" align="center" width="10%">
<b>标题</b>
</td>
<td bgcolor="#D6DBF7" width="90%" colspan="2"> 
	<%
	jiamengid=request.QueryString("id")
	set rs=server.CreateObject("adodb.recordset")
	rs.open "select * from jiameng where jiamengid="&jiamengid,conn,1,1
%>
<input class="wenbenkuang" name="name" type="text" id="pingpai" size="45" value="<%=rs("name")%>"><font color=red>*</font>
</td>
        </tr>
        <tr>
  <td bgcolor="#D6DBF7" align="center" width="10%"><b>类型</b></td>
  <td bgcolor="#D6DBF7" width="90%" colspan="2">  
	<select class="wenbenkuang" name="lx" size="1" >              
	<option <%if rs("lx")=1 then%>selected<%end if%> value="1">招商</option>
	<option <%if rs("lx")=2 then%>selected<%end if%> value="2">加盟</option>
      <option <%if rs("lx")=3 then%>selected<%end if%> value="3">代理</option>
      <option <%if rs("lx")=4 then%>selected<%end if%> value="4">合作</option>
    </select><font color="#FF0000">*</font> </td>
        </tr>
        <tr>
  <td bgcolor="#D6DBF7" align="center" width="10%"><b>页面样式选择</b></td>
  <td bgcolor="#D6DBF7" width="27%"> 

	<select class="wenbenkuang" name="style" size="1" onChange="changelocation(document.myform.id.options[document.myform.id.selectedIndex].value)">            
	  <%
	  id=rs("style")
  set rsa=server.createobject("adodb.recordset")
  rsa.open "select * from yangshi where id="& id ,conn,1,1
  do while not rsa.eof
  %>
	<option <%if rsa("id")=rsa("id") then%>selected<%end if%> value="<%=rsa("id")%>"><%=rsa("style")%></option>       
    <%rsa.movenext 
  loop
  %> </select>

  &nbsp; </td>                                                                                                   
  <td bgcolor="#D6DBF7" width="63%">

     
    <font color="#FF0000"><a href="javascript:;" onClick="javascript:window.open('style.asp','','width=710,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;">查看模板页面样式</A>*</font>      
   
 </td>       
        </tr>
        <tr>
  <td bgcolor="#D6DBF7" align="center" width="10%"><b>形象图片</b></td>
  <td bgcolor="#D6DBF7" width="90%" colspan="2">  
    <input class="wenbenkuang" name="pic" type="text" id="zhuang1" size="20" value="<%=rs("pic")%>"><input class="go-wenbenkuang" type="button" name="Submit3" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	               
      <font color="#FF0000">*招商加盟样板店图片或公司企业图片！</font>                                                                                                            
 </td>
        </tr>
        <tr>
    <td bgcolor="#D6DBF7" align="center" width="10%"><b>产品展示图片1</b></td>
    <td bgcolor="#D6DBF7" width="90%" colspan="2"> 
    <input class="wenbenkuang" name="pic1" type="text" id="zhuang" size="20" value="<%=rs("pic1")%>">
	<input class="go-wenbenkuang" type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic1&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	                                                                                                                             
    　<font color="#FF0000">*最多可以上传10张供展示的图片！</font>
	</td>
        </tr>
                <tr>
    <td bgcolor="#D6DBF7" align="center" width="10%"><b>产品展示图片2</b></td>
    <td bgcolor="#D6DBF7" width="90%" colspan="2"> 
    <input class="wenbenkuang" name="pic2" type="text" id="zhuang" size="20" value="<%=rs("pic2")%>">
	<input class="go-wenbenkuang" type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic2&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	                                                                                                                             
    　<font color="#FF0000">*最多可以上传10张供展示的图片！</font>
	</td>
        </tr>        <tr>
    <td bgcolor="#D6DBF7" align="center" width="10%"><b>产品展示图片3</b></td>
    <td bgcolor="#D6DBF7" width="90%" colspan="2"> 
    <input class="wenbenkuang" name="pic3" type="text" id="zhuang" size="20" value="<%=rs("pic3")%>">
	<input class="go-wenbenkuang" type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic3&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	                                                                                                                             
    　<font color="#FF0000">*最多可以上传10张供展示的图片！</font>
	</td>
        </tr>        <tr>
    <td bgcolor="#D6DBF7" align="center" width="10%"><b>产品展示图片4</b></td>
    <td bgcolor="#D6DBF7" width="90%" colspan="2"> 
    <input class="wenbenkuang" name="pic4" type="text" id="zhuang" size="20" value="<%=rs("pic4")%>">
	<input class="go-wenbenkuang" type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic4&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	                                                                                                                             
    　<font color="#FF0000">*最多可以上传10张供展示的图片！</font>
	</td>
        </tr>        <tr>
    <td bgcolor="#D6DBF7" align="center" width="10%"><b>产品展示图片5</b></td>
    <td bgcolor="#D6DBF7" width="90%" colspan="2"> 
    <input class="wenbenkuang" name="pic5" type="text" id="zhuang" size="20" value="<%=rs("pic5")%>">
	<input class="go-wenbenkuang" type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic5&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	                                                                                                                             
    　<font color="#FF0000">*最多可以上传10张供展示的图片！</font>
	</td>
        </tr>        <tr>
    <td bgcolor="#D6DBF7" align="center" width="10%"><b>产品展示图片6</b></td>
    <td bgcolor="#D6DBF7" width="90%" colspan="2"> 
    <input class="wenbenkuang" name="pic6" type="text" id="zhuang" size="20" value="<%=rs("pic6")%>">
	<input class="go-wenbenkuang" type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic6&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	                                                                                                                             
    　<font color="#FF0000">*最多可以上传10张供展示的图片！</font>
	</td>
        </tr>        <tr>
    <td bgcolor="#D6DBF7" align="center" width="10%"><b>产品展示图片7</b></td>
    <td bgcolor="#D6DBF7" width="90%" colspan="2"> 
    <input class="wenbenkuang" name="pic7" type="text" id="zhuang" size="20" value="<%=rs("pic7")%>">
	<input class="go-wenbenkuang" type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic7&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	                                                                                                                             
    　<font color="#FF0000">*最多可以上传10张供展示的图片！</font>
	</td>
        </tr>        <tr>
    <td bgcolor="#D6DBF7" align="center" width="10%"><b>产品展示图片8</b></td>
    <td bgcolor="#D6DBF7" width="90%" colspan="2"> 
    <input class="wenbenkuang" name="pic8" type="text" id="zhuang" size="20" value="<%=rs("pic8")%>">
	<input class="go-wenbenkuang" type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic8&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	                                                                                                                             
    　<font color="#FF0000">*最多可以上传10张供展示的图片！</font>
	</td>
        </tr>        <tr>
    <td bgcolor="#D6DBF7" align="center" width="10%"><b>产品展示图片9</b></td>
    <td bgcolor="#D6DBF7" width="90%" colspan="2"> 
    <input class="wenbenkuang" name="pic9" type="text" id="zhuang" size="20" value="<%=rs("pic9")%>">
	<input class="go-wenbenkuang" type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic9&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	                                                                                                                             
    　<font color="#FF0000">*最多可以上传10张供展示的图片！</font>
	</td>
        </tr>        <tr>
    <td bgcolor="#D6DBF7" align="center" width="10%"><b>产品展示图片10</b></td>
    <td bgcolor="#D6DBF7" width="90%" colspan="2"> 
    <input class="wenbenkuang" name="pic10" type="text" id="zhuang" size="20" value="<%=rs("pic10")%>">
	<input class="go-wenbenkuang" type="button" name="Submit2" value="上传大图片" onClick="window.open('../upload_add.asp?formname=myform&editname=pic10&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">	                                                                                                                             
    　<font color="#FF0000">*最多可以上传10张供展示的图片！</font>
	</td>
        </tr>
        <tr>
          <td width="25%" align="center"><b>项目介绍</b></td>
          <td width="75%" valign="middle" colspan="2">
          <textarea name="xiangmu" cols="58" rows="15">
      <%=rs("xiangmu")%>              </textarea><font color="#FF0000">*对要招商加盟或代理合作的项目进行介绍！</font>
          </td>
        </tr>
        <tr>
          <td width="25%" align="center"><b>市场及投资分析</b></td>
          <td width="75%" colspan="2">
          <textarea name="touzi" cols="58" rows="15">
                     <%=rs("touzi")%></textarea><font color="#FF0000">*对要进行招商加盟或代理合作的项目，进行市场分析及投资效益分析！</font>
          </td>
        </tr>
                    <tr>
          <td width="25%" align="center"><b>招商加盟方式</b></td>
          <td width="75%" colspan="2">
          <textarea name="fangshi" cols="58" rows="15"><%=rs("fangshi")%>
                    </textarea><font color="#FF0000">*对要进行招商加盟或代理合作的项目的招商加盟方式进行说明！</font>
          </td>
        </tr>
        <tr>
          <td width="25%" align="center"><b>广告语</b></td>
          <td width="75%" colspan="2"><input class="wenbenkuang" name="ad" type="text" id="zhuang0" size="61" value="<%=rs("ad")%>"><font color="#FF0000">*写出宣传您项目的经典广告语，要求16字以内！</font></td>
        </tr>
        <tr>
          <td width="25%" align="center"></td>
          <td width="75%" colspan="2"></td>
        </tr>
        <tr>
          <td width="25%" align="center"></td>
          <td width="75%" colspan="2"></td>
        </tr>
        <tr>
          <td width="100%" align="center" colspan="3">
<input type="submit" value="提交保存" name="B1">&nbsp;&nbsp;&nbsp;     
              <input type="reset" value="全部重写" name="B2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</form>
</body>

</html>
<%end if%>


