<!--#include file="../Include/Char.asp" -->
<!--#include file="../Include/Conn.asp" -->
<!--#include file="../include/md5pass.asp"-->
<%
if Request.ServerVariables("REQUEST_METHOD")="POST" then
   m_UserName = checkStr(Trim(Request.Form("txtUserName")))
   m_Password = checkStr(Trim(Request.Form("txtPassword")))
    m_rePassword = checkStr(Trim(Request.Form("re_txtPassword")))
     if m_username="" or m_password="" then
	 call msgbox("对不起，用户名与密码不能为空",1)
	response.end 
	 end if
	 if m_repassword<>m_password then
	 call msgbox("对不起，请确认输入的密码！",1)
	 response.end 
	 end if
   m_PayClass = checkStr(Trim(Request.Form("txtPayClass")))
   m_CompanyName = checkStr(Trim(Request.Form("txtCompanyName")))
     if m_companyname="" then
	 call msgbox("对不起，商家名称不能为空",1)
	 response.end 
	 end if
   m_TypeID = Request.Form("TypeID")
   if instr(m_TypeID,":") <> 0 then
     m_CityTypeID = mid(m_TypeID,1,instr(m_TypeID,":")-1)
     m_AreaTypeID = mid(m_TypeID,instr(m_TypeID,":")+1)
   else
	 m_CityTypeID = 0
	 m_AreaTypeID = 0
   end if
   m_TradeType = checkStr(Trim(Request.Form("selTrade")))
   m_Traffic = checkStr(Trim(Request.Form("Traffic")))
   m_Consume = checkStr(Trim(Request.Form("txtConsume")))
   m_Linkman = checkStr(Trim(Request.Form("Linkman")))
      if m_linkman="" then
	 call msgbox("对不起，联系人不能为空",1)
	 response.end 
	 end if
   m_BusinessHours = checkStr(Trim(Request.Form("txtBusinessHours")))
   m_BusinessHours2 = checkStr(Trim(Request.Form("txtBusinessHours2")))
   m_YouhuiTime = (Trim(Request.Form("txtYouhuiTime")))
   m_YouhuiTime2 = (Trim(Request.Form("txtYouhuiTime2")))
   m_Other = checkStr(Trim(Request.Form("txtOther")))
   m_Tbtj = checkStr(Trim(Request.Form("txtTbtj")))
      m_Agio = checkStr(Trim(Request.Form("txtAgio")))
    if m_Agio="" then
	 call msgbox("对不起，打折折扣不能为空",1)
	 response.end 
	 end if
   m_Tel = checkStr(Trim(Request.Form("Tel")))  
    if m_Tel="" then
	 call msgbox("对不起，联系电话不能为空",1)
	 response.end 
	 end if
   m_StarGrade = checkStr(Trim(Request.form("selStarGrade")))
   m_Address = checkStr(Trim(Request.Form("Address")))
     if m_Address="" then
	 call msgbox("对不起，商家地址不能为空",1)
	 response.end 
	 end if
   m_WebSite = checkStr(Trim(Request.Form("WebSite")))
   m_post = checkStr(Trim(Request.Form("post")))
   m_email = checkStr(Trim(Request.Form("email")))
  m_Car = checkStr(Trim(Request.Form("txtCar")))
   m_Commend = 0

   m_AgioContent = checkStr(Trim(Request.Form("txtAgioContent")))
   m_Intro = checkStr(rTrim(Request.Form("content")))
   m_uptype = checkStr(Trim(Request.Form("up_type")))'判定是/否为乐扣卡加盟商
   if m_uptype="" then
   m_uptype="0"
   end if
   m_uptype1 = checkStr(Trim(Request.Form("up_type1")))'判定是/否为手机短信加盟商
   if m_uptype1="" then
   m_uptype1="0"
   end if
   m_uptype=m_uptype&","&m_uptype1
   m_gettype = checkStr(rTrim(Request.Form("get_type")))
   m_post = checkStr(rTrim(Request.Form("posts")))
   lxrdh = checkStr(rTrim(Request.Form("lxrdh")))
 if Request.Querystring("action")="Insert" then
    set rs = server.CreateObject("adodb.recordset")
    m_SQL = "Select * From CityCard_League Where username='"&m_UserName&"'"
	rs.open m_SQL,conn,1,3
	if not rs.Eof then
	   rs.Close
	   call msgbox("对不起，该用户名已存在，请更换用户名后再试",1)
	else
	  rs.addnew
	  rs("username")=m_UserName
	  rs("password")=m_Password
	  rs("name")=m_CompanyName
	  rs("iscard")=m_uptype
	  rs("operation")=m_Operation
	  rs("payclass")=m_PayClass
	  rs("grade")=m_gettype
	  rs("logo")="defaultlogo.gif"
	  rs("hangyeid")=m_TradeType
	  rs("stateid")=m_CityTypeID
	  rs("cityid")=m_AreaTypeID
	  rs("traffic")=m_Traffic
	  rs("Consume")=m_Consume
	  rs("linkman")=m_Linkman
	  rs("startbusinesstime")=m_BusinessHours
	  rs("endbusinesstime")=m_BusinessHours2
	  rs("starttime")=m_YouhuiTime
	  rs("endtime")=m_YouhuiTime2
	  rs("businesstimecontent")=m_Other
	  rs("tel")=m_Tel
	  rs("lxrdh")=lxrdh
	  rs("Car")=m_Car
	  rs("Tbtj")=m_Tbtj
	  rs("cabaretgrade")=m_StarGrade
	  rs("address")=m_Address
	  rs("email")=m_email
	  rs("post")=m_post
	  rs("website")=m_Website
	  rs("tuijian")=m_Commend
	  rs("agio")=m_Agio
	  rs("agiocontent")=m_AgioContent
	  rs("content")=m_Intro
	  rs("adddate")=now()
	  rs("ischecked")=0
	rs.update
	rs.Close
	   Response.Cookies("UploadImage") = ""
	   call msgbox("恭喜您，您的加盟申请已经提交请等待审核！48小时之内我们会与您联系！","login.asp")
      response.end 
	 
     end if '//rs.eof
  end if
  
  
end if
 Response.Cookies("UploadImage") = ""
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>襄樊生活网 - 商家申请加盟</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css"><link href="../css/Menu.css" rel="stylesheet" type="text/css"><link href="../css/aCardList.css" rel="stylesheet" type="text/css"><SCRIPT src="../js/029bxw.js" type=text/javascript></SCRIPT>
<script language="JavaScript" type="text/JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>

<body onLoad="MM_preloadImages('images/xf_link1b.gif','images/xf_link2b.gif','images/xf_link3b.gif','images/xf_link4b.gif','images/xf_link5b.gif','images/ly_b_2b.gif','images/ly_b_4b.gif','images/ly_b_1b.gif','images/ly_b_3b.gif','images/ly_b_5b.gif')">
<!--#include file="../Include/cardMenu.htm" -->
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td valign="top">
      <table width="100%" border="1" cellpadding="0" cellspacing="5" bordercolor="e2e2e2" bgcolor="f5f5f5">
        <tr> 
          <td height="25" background="images/about_bj.gif" class="p4">&nbsp;<b>·申请加盟　　　　　<% response.write "<font color=ff0000>"&messagebox&"</font>"%></b></td>
        </tr>
      </table>
      <table width="600" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="5"></td>
        </tr>
        <tr> 
          <td height="1" background="images/line.gif" ></td>
        </tr>
      </table>
<%
   '   ID = Request.Cookies("UserID")
     ' SET rs=server.createobject("adodb.recordset")
   '   SQL="SELECT * FROM  CityCard_League WHERE CompanyID ="&ID
    '  rs.Open SQL,conn,1,1 




%>
      <TABLE class=Table_bg height=55 cellSpacing=1 cellPadding=0 width="100%" 
      align=center border=0>
        <TBODY>
          <TR> 
            <TD bgColor=#f7f7f7> <TABLE cellSpacing=0 cellPadding=0 width="99%" align=center 
border=0>
                <TBODY>
                  <TR> 
                    <TD style="LINE-HEIGHT: 180%"><FONT 
                  color=#ff6600>您所填写的资料必须通过我们客户服务人员的审核，<U>审核时间一般为24小时之内</U>， 为了确保您能够享受的超值服务请务必认真填写您公司的详细信息</FONT><FONT color=#ff0000> 
                      - 如在注册中遇到问题，<a href="/about/Gbook_Add.asp">请点此处</a></FONT></TD>
                  </TR>
                </TBODY>
              </TABLE>            </TD>
          </TR>
        </TBODY>
      </TABLE>
      <table width="100%" height="364" border="0" align="center" cellpadding="4" cellspacing="2" bgcolor="#FFFFFF">
        <form name="form1" method="post" action="reginfo.asp?action=Insert">
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="19" align="center">用 户 名：</td>
            <td width="78%"> <input name="txtUserName" type="text" size="15" maxlength="20"> 
              <font color="#FF0000"> * 注：用户名可以为字母、数字与汉字</font></td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="19" align="center">密　　码：</td>
            <td width="78%"> <input name="txtPassword" type="password" size="15" maxlength="20"> 
              <font color="#FF0000">*</font> </td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="19" align="center">确认密码：</td>
            <td width="78%"> <input name="re_txtPassword" type="password" id="re_txtPassword" size="15" maxlength="20"> 
              <font color="#FF0000">*</font> <input name="up_type" type="hidden" id="up_type" value="1">
              <input name="get_type" type="hidden" id="get_type2" value="普通商家"></td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="19" align="center">商家名称：</td>
            <td width="78%"> <input name="txtCompanyName" type="text" size="36" maxlength="20"> 
              <font color="#FF0000">*例: 襄樊龙城国际大酒店 </font></td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="19" align="center">区　　域：</td>
            <td width="78%"> <select name="selBigCategory" onChange="TypeChange(this);" >
                <%
             m_SQL="Select F_ID,F_Value From T_CityType where F_ID=15 order by F_ID"
			 Set rs = conn.Execute(m_SQL)

			 mBigArray = rs.GetRows()
			 for i=0 to ubound(mBigArray,2)
			   m_SQL2="Select * From T_AreaType Where F_CityTypeID="&mBigArray(0,i)&" order by F_Grade"
			   Set rs = conn.Execute(m_SQL2)
			   strSmallCategory = mBigArray(0,i)&"-"
			   Do While not rs.Eof 
   			     strSmallCategory = strSmallCategory & rs("F_ID")&"+"&rs("F_Value")+"-"
				 rs.Movenext
			   Loop
			   Response.write "<option value="&strSmallCategory&">"&mBigArray(1,i)&"</option>"
			 next'for
          %>
              </select> <script language="javascript">                               
function TypeChange(theSelect)
{
var sTemp,sString,i,sBigTypeID;
sValue=theSelect.value;
sSubTypeArray=sValue.split("-");
sBigTypeID = sSubTypeArray[0];
sString="<select name='TypeID'>";
for(i=1;i<sSubTypeArray.length-1;i++)
{
 sTemp=sSubTypeArray[i].split("+");

 sString+="<option value='"+sBigTypeID+":"+sTemp[0]+"'>"+sTemp[1]+"</option>";
}
 sString+="<option value='"+sBigTypeID+":0'>全　部</option>";
sString+="</Select>"
form1.TypeID.outerHTML=sString;

}
</script> <select name="TypeID" >
              </select> <script language="javascript">TypeChange(form1.selBigCategory);</script></td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="2" align="center">所属分类：</td>
            <td width="78%"> <select name="selTrade">
                <%
			   m_SQL = "SELECT F_ID,F_Value FROM T_TradeType ORDER BY F_ID "
			   Set rs = conn.Execute(m_SQL)
			   Do While Not rs.Eof
			     Response.write "<option value='"&rs(0)&"'>"&rs(1)&"</option>"
				 rs.MoveNext
			   Loop
			   rs.Close
			   %>
              </select></td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="19" align="center">收银方式：</td>
            <td width="78%"> <input name="txtPayClass" type="text" size="21" maxlength="20">
            例:刷卡 &amp; 现金 </td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="15" align="center">联 系 人：</td>
            <td> <input name="linkman" type="text" id="linkman" value="" size="10"> 
              <font color="#FF0000">*</font>
              联系人电话：<input type="text" name="lxrdh" id="lxrdh"> 
              例:13661107158            </td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="15" align="center">商家地址：</td>
            <td> <input name="address" type="text" id="address" size="45"> <font color="#FF0000">*</font>
              邮编<input name="posts" type="text" id="posts">            </td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="17" align="center">停 车 位：</td>
            <td width="78%"> <input name="txtCar" type="text" size="36" maxlength="80"> </td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="9" align="center">人均消费：</td>
            <td> <input name="txtConsume" type="text" size="36" maxlength="80">
              例：100RMB</td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="8" align="center">特别推荐：</td>
            <td> <input name="txtTbtj" type="text" size="50" > </td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="8" align="center">营业时间：</td>
            <td width="78%">自 
              <input name="txtBusinessHours" type="text" size="8" maxlength="80">
              至 
              <input name="txtBusinessHours2" type="text"  size="8" maxlength="80">
              例 16至21</td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="17" align="center">补充说明：</td>
            <td width="78%"> <input name="txtOther" type="text" size="36" maxlength="80"></td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="8" align="center">酒店星级：</td>
            <td width="78%"> <select name="selStarGrade">
                <%
			   m_SQL = "SELECT F_ID,F_Value FROM Tour_StarGradeType ORDER BY F_ID DESC"
			   Set rs = conn.Execute(m_SQL)
			   Do While Not rs.Eof
			     Response.write "<option value='"&rs(0)&"'>"&rs(1)&"</option>"
				 rs.MoveNext
			   Loop
			   rs.Close
			   %>
              </select>
              非酒店不需输入</td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="15" align="center">电　　话：</td>
            <td> <input name="tel" type="text" id="tel"> <font color="#FF0000">*
              <input name="txtAgio" type="hidden" value="无折扣" size="12" maxlength="20">
              <input name="txtAgioContent" type="hidden" id="txtAgioContent2" value="无折扣说明">
              <input name="txtYouhuiTime" type="hidden" value="<%=now%>" size="8" maxlength="80">
              <input name="txtYouhuiTime2" type="hidden" value="<%=now%>" size="8" maxlength="80">
</font></td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="15" align="center">电子邮件：</td>
            <td> <input name="email" type="text" id="email"></td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="15" align="center">网　　址：</td>
            <td> <input name="website" type="text" id="website">
            例:http://www.xfwb.net</td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="15" align="center">邮　　编：</td>
            <td> <input name="post" type="text" id="post" size="8" maxlength="6"></td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="15" align="center">交通指向：</td>
            <td> <input name="traffic" type="text" id="traffic" size="35"> 
            例:市内乘1路车广场站下车即到 </td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td width="22%" height="15" align="center" valign="top">公司简介： </td>
            <td> <textarea name="content" cols="65" rows="10" id="content"></textarea></td>
          </tr>
          <tr bgcolor="f5f5f5"> 
            <td height="15" valign="top">&nbsp;</td>
            <td> <input type="submit" name="Submit" value="申请加盟"> <input type="reset" name="Submit2" value="取 消"></td>
          </tr>
        </form>
      </table> </td>
    <td width="180" valign="top">
	<!--#include file="Inc_Ser.asp"-->
</td>
  </tr>
</table>
<!--#include file="../Include/CopyRight.htm" -->
</body>
</html>
