<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Company_add.aspx.cs" Inherits="web.admin.Company_add" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>ProductField</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<LINK href="images/adminstyle.css" type="text/css" rel="stylesheet"></LINK>
<style type="text/css">
body {margin:0px; height:768px}
</style>
		<script language="JavaScript">
<!--
//By Dicky 2005-2-17 11:16:49
function Window_Load(Flag)
{

if (Flag == 0)
{

  parent.document.all['Loading'].style.display = 'block';
  parent.document.all['Loading'].style.width = '500';
   parent.document.all['Loading'].style.height = '60';
  //show the window
}
else
{
  parent.document.all['Loading'].style.display = 'none';
  
  //hide the window
}
}
//-->
</script>


<script src="../img/js/notice.js" type="text/javascript"></script>
<script language="javascript" src="../inc/overlib.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
	</HEAD>
	<body rightmargin="0" leftmargin="0" topmargin="0">
	
		<form id="Form1" method="post" runat="server">
		<div style="width:0px;height:0px;border:1px solid gray;dispaly:none;" id="container"></div>
<input type="hidden" id="lng" name="lng"/><input type="hidden" id="lat" name="lat"/>
<table width="100%" height="550"  cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td valign="top">
<div class="top">
          <table width="100%" align="center" cellpadding="0" cellspacing="0" background="img/labelbg.gif" >
            <tr>
		      <td height="33" class="tl"></td>
		      <td class="tm"><span class="tt">店铺管理 &gt;&gt; 店铺添加 <span style="color: #ff3300">(带*号的必须填写)</span></span></td>
		      <td class="tm2"><span class="tt"></span></td>
		<td class="tr"></td>
	</tr>
</table>
</div>


		     
     
       
            <table width="100%" border="0" align="center" cellpadding="4" cellspacing="2"  style="height: 376px">
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px"   > 店铺用户手机号：</td>
                <td width="1344" align="left" > <asp:TextBox ID="username" runat="server"></asp:TextBox> 
                  <span style="color: #ff0000">&nbsp;( 前台使用手机登陆 ) 
                  <asp:Label ID="zhm" runat="server" ></asp:Label>
                  </span></td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px"   > 选择店铺所在区域：</td>
                <td width="1344" align="left" > <asp:Label ID="Label1" runat="server" ></asp:Label> 
                  <br /> <asp:TextBox ID="qyz" runat="server"></asp:TextBox> &nbsp; 
                  <asp:dropdownlist id="ddlTopAreas" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlTopAreas_SelectedIndexChanged1"> 
                  </asp:dropdownlist> <asp:dropdownlist id="ddlArea" runat="server" AutoPostBack="True"  OnSelectedIndexChanged="ddlArea_SelectedIndexChanged"> 
                  </asp:dropdownlist> <span style="color: #ff0033">说明：可多选择，将一个店铺添加到多个区域当中！</span></td>
              </tr>
              <tr bgcolor="#FFFFFF" style="display:none;"> 
                <td align="right" style="width: 500px"   > 选择店铺所属分类：</td>
                <td width="1344" align="left" > <asp:DropDownList ID="plei" runat="server"> 
                  </asp:DropDownList> &nbsp;</td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px" > 店铺登陆密码：</td>
                <td align="left" > <asp:TextBox ID="password" runat="server" TextMode="Password"></asp:TextBox> 
                  &nbsp; &nbsp; <asp:Label ID="sm" runat="server"></asp:Label> 
                </td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px"  > &nbsp;店铺确认密码：</td>
                <td align="left" > <asp:TextBox ID="repassword" runat="server" TextMode="Password"></asp:TextBox></td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px"   > 店铺形象图片：</td>
                <td width="1344" align="left" > <asp:FileUpload ID="FileUpload1" runat="server" Width="282px" />&nbsp; 
                  <%if(base.Request.QueryString["id"]!=null){ %>
                  <a href="#" onMouseOver="return overlib('<IMG SRC=../Upload/company/<%=tp %> >', CAPTION, '<%=mc %>',FGCOLOR, '#fcfcfc', BGCOLOR, '#DADADA', CAPCOLOR, '#000000', BORDER, 1, CLOSETEXT, 'Close');" onMouseOut="nd();"><IMG SRC="images/icon-viewpic.gif" border="0"></a> 
                  <asp:Label ID="scsm" runat="server"></asp:Label> 
                  <%} %>
                </td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px" > <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="CompanyName"
                        ErrorMessage="店铺名称不能为空">*</asp:RequiredFieldValidator>
                  店铺名称：</td>
                <td align="left"  > <asp:TextBox ID="CompanyName" runat="server" Width="352px"></asp:TextBox> 
                </td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px" > 特色简单说明：</td>
                <td align="left"  > <asp:TextBox ID="ady" runat="server" Width="494px"></asp:TextBox> 
                  &nbsp;</td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px; height: 61px;"  > <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="CompanyShort"
                        ErrorMessage="交通线路不能为空" Width="16px">*</asp:RequiredFieldValidator>
                  交通线路：</td>
                <td align="left" style="height: 61px" > <asp:TextBox ID="CompanyShort" runat="server" Width="409px" Height="46px" TextMode="MultiLine"></asp:TextBox></td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px"> &nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="CompanyAddress"
                        ErrorMessage="详细地址不能为空" Display="Dynamic">*</asp:RequiredFieldValidator>
                  详细地址：</td>
                <td align="left"> <asp:TextBox ID="CompanyAddress" runat="server" Width="259px"></asp:TextBox> &nbsp;
                    <input onclick="dtzr();" type="button" value="点击设置经纬度" />
                  <span style="color: #ff0033">说明：地址一定要填写详细准确，否则影响电子地图显示的正确性！</span> 
                </td>
              </tr>
              <tr bgcolor="#FFFFFF"> 
                <td  align="right" style="width: 500px" > 
                  <asp:RequiredFieldValidator ID="RequiredFieldValidator111111" runat="server" ControlToValidate="xiaofei"
                        ErrorMessage="人均消费不能为空">*</asp:RequiredFieldValidator>
                  人均消费：</td>
                <td align="left"> 
                  <asp:TextBox ID="xiaofei" runat="server" Width="67px"></asp:TextBox>
                  元</td>
              </tr>
      
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px" > <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="Fax"
                        ErrorMessage="电话不能为空">*</asp:RequiredFieldValidator>
                  座机电话：</td>
                <td align="left" > <asp:TextBox ID="Fax" runat="server" Width="240px"></asp:TextBox> 
                  &nbsp; &nbsp; &nbsp; 如：0000-0000000 ( 可不带区号)</td>
              </tr>
      
     
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px"  >是否通过：</td>
                <td align="left"> <asp:DropDownList ID="Dtg" runat="server"> 
                    <asp:ListItem Value="1">通过</asp:ListItem>
                    <asp:ListItem Value="0">不通过</asp:ListItem>
                  </asp:DropDownList> &nbsp;</td>
              </tr>
    
              <tr bgcolor="#FFFFFF"> 
                <td align="right" style="width: 500px"  >店铺介绍和其他说明：</td>
                <td align="left">
                <FCKeditorV2:FCKeditor id="ftbContent" runat ="server" ToolbarSet="Default" Height="300px" Width="86%" ></FCKeditorV2:FCKeditor>
                </td>
              </tr>
            </table>
         
  


   

<table width="100%">
<tr bgcolor="#FFFFFF"> 
                                      <td colspan="2" align="center"> <asp:Button ID="Button1" runat="server" Text="　添加　" OnClick="Button1_Click" /> 
                                        <input id="Reset2" type="reset" value="　重置　" /> 
                                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                        ShowSummary="False" /> </td>
                                    </tr>
</table>
 
    </td>
  </tr>
</table>
<div id="overDiv" style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute"></div>
		</form>
	</body>
</HTML>

<script type="text/javascript">
       var map = new BMap.Map("container"); 
          map.centerAndZoom(new BMap.Point(121.480,31.220), 6);   
           var localSearch= new BMap.LocalSearch (map, {       renderOptions: {         pageCapacity: 8,         autoViewport: true,        selectFirstResult: false       }     });    
               localSearch.enableAutoViewport(); 
                function dtzr()  {    
                 if(document.getElementById("CompanyAddress").value=="")
                {
                alert("请填写完地址后，再点击此按钮！");
                return false;
                }
                     var keyword = "<%=config.Cityname %>" + document.getElementById("CompanyAddress").value;  
                   
                         localSearch.setSearchCompleteCallback(function(searchResult){      
                             var poi = searchResult.getPoi(0);       
                                alert(poi.point.lng+"   "+poi.point.lat+"\t\n设置成功");       
                                    // map.centerAndZoom(poi.point, 8); 
                                      	document.getElementById("lng").value = poi.point.lng ;
			                           document.getElementById("lat").value = poi.point.lat; 
                                    });    
                                     localSearch.search(keyword);    
                                     
                                       } 
                                        </script> 
                                        