<%@ Page Language="C#" AutoEventWireup="true" Codebehind="HostAdd.aspx.cs" Inherits="MyITJob.Admin.HostAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title><%=Application["PageTitle"] %> - 分站管理</title>
    <link href="../images/Admin_Style.css" rel="stylesheet" type="text/css" />
    <link href="../images/style.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="/js/GetProvince.js" type="text/javascript"></script>
    <script language="javascript" src="/js/searchjs.js" type="text/javascript"></script>
    <script language='javascript' type="text/javascript">
function CheckAll_JS(form){
  for (var i=0;i<form.elements.length;i++){
    var e = form.elements[i];
    if (e.name != 'chkAll' && e.disabled == false && e.type == 'checkbox') {
      e.checked = form.chkAll.checked;
      if (e.checked)
        hL(e);
      else
        dL(e);
    }
  }
}

function hL(E){
  while (E.tagName!='TR') {E=E.parentElement;}
  E.className='tdbg2';
}
function dL(E){
  while (E.tagName!='TR') {E=E.parentElement;}
  E.className='tdbg';
}
    </script>

    <style type="text/css">
        .style5 { font-weight: bold; }
    </style>

</head>
<body>
    <form id="form1" runat="server" onsubmit='return CheckForm();'>
        <div id="bodyly">
        </div>
        <div id="SearchDivhire" onmousedown="MDown(this)" onmouseup="MUp(this)" onmousemove="MMove(this)">
            <div class="memmenul">
                <div class="leftmenutit">
                    <span class="uns" onclick="unSearchLayers();">[关闭]</span><span id="wintit"></span>
                </div>
                <div style="width: 100%">
                    <div style="margin-top: 10px; margin-left: 20px" id="hiretypes">
                        WorkYi.Com人才招聘系统数据载入中……</div>
                    <div style="width: 540px; display: none; margin-left: 20px" id="city">
                        WorkYi.Com人才系统数据载入中……</div>
                    <div style="margin-top: 10px; margin-left: 20px" id="hiretype">
                        WorkYi.Com人才招聘系统数据载入中……</div>
                </div>
            </div>
        </div>
        <div>
          <table align="center" border="0" cellpadding="2" cellspacing="1" class="border" width="100%">
            <tr class="topbg">
              <td height="26" colspan="2" align="center"><b>分 站 系 统 管 理</b></td>
            </tr>
            <tr class="tdbg">
              <td height="30" style="width: 98px"><strong>管理导航：</strong></td>
              <td><a href="?Action=Add">添加分站</a> | <a href="HostAdd.aspx">管理分站</a></td>
            </tr>
            <tr class="tdbg">
              <td height="30" style="width: 98px"><span class="style5">自动进入分站：</span></td>
              <td>
                  <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
                      RepeatDirection="Horizontal" RepeatLayout="Flow">
                      <asp:ListItem Value="On" Selected="True">开启</asp:ListItem>
                      <asp:ListItem Value="Off">关闭</asp:ListItem>
                  </asp:RadioButtonList>
                  <asp:Button ID="Button1" runat="server" Text="设 置" 
                      style="height:24px; vertical-align:middle" onclick="Button1_Click" />
                  <span style="color:red"><span lang="zh-cn">&nbsp;</span>* 根据客户的所在地IP，自动进入相应的分站。如果没有该分站，则进入主站。(自动跳转时，分站只能以省为单位)</span>
                </td>
            </tr>
          </table>
          <br />
<asp:Panel ID="manage" runat="server">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td>
                            <table align="center" border="0" cellpadding="4" cellspacing="1" class="border" width="100%">
                                <tr class="topbg" height="22">
                                    <td align="center" width="60">
                                        <strong>选中</strong></td>
                                    <td align="center" width="59">
                                        <strong>ID</strong></td>
                                    <td align="center" width="164">
                                        <strong>中文标注名</strong></td>
                                    <td align="center" width="515">
                                        <strong>分站域名</strong></td>
                                    <td align="center" width="185">
                                        <strong>图片标识</strong></td>
                                    <td align="center" width="82">
                                        <strong>状态</strong></td>
                                    <td align="center" width="45">
                                        <strong>排序</strong></td>
                                    <td align="center" width="134">
                                        <strong>常规操作</strong></td>
                                </tr>
                                <asp:Repeater ID="RP1" runat="server">
                                    <ItemTemplate>
                                        <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
                                            <td align='center'>
                                                <input name="checkbox" id="checkbox" type="checkbox" value="<%#Eval("id") %>" /></td>
                                            <td align='center' width='59'>
                                                NO.<%#Eval("id") %></td>
                                            <td align='center'>
                                                <%#Eval("Host_CnName") %>
                                            </td>
                                            <td width='515' align='center'>
                                                <%#Eval("Host_EnName") %>.xxx.com | www.xxx.com/<%#Eval("Host_EnName") %></td>
                                            <td width='185' align='center'>
                                                <%#Eval("Host_Img") %>
                                            </td>
                                            <td align='center' width='82'>
                                                <%#isPast() %>
                                            </td>
                                            <td align='center' width='45'>
                                                <%#Eval("Host_Order") %>
                                            </td>
                                            <td align='center' width='134'>
                                                <a href=HostAdd.aspx?Action=Edit&Id=<%#Eval("id") %>>修改</a> | <a href="HostAdd.aspx?Action=Del&Id=<%#Eval("id") %>" onclick="return confirm('确定要删除此项吗？此操作不可逆。');">删除</a></td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                            <input name='chkAll' type='checkbox' onclick='CheckAll_JS(this.form)' value='checkbox' />
                            <asp:Button ID="CheckAll" runat="server" Text="删 除" OnClick="CheckAll_Click" />
                            <br />
                            <div id="paging" runat="server">
                            </div>
                      </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="AorE" runat="server" Width="100%" Visible="false">
            <script language="javascript">
                function CheckForm() {
                    if (form1.TextBox1.value == "") {
                        alert('中文域名标示不能为空');
                        form1.TextBox1.focus();
                        return false;
                    }
                    if (form1.TextBox2.value == "") {
                        alert('中文域名标示不能为空');
                        form1.TextBox2.focus();
                        return false;
                    }
                }
            </script>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>
                            <table width='100%' border='0' align='center' cellpadding='4' cellspacing='1' class='border'>
                                <tr class='tdbg'>
                                    <td width="12%" align="right" class="tdbg2" style="width: 12%">
                                        中文标注名：</td>
                                    <td colspan="2">
                                        <asp:TextBox ID="TextBox1" runat="server" Width="156px"></asp:TextBox>
                                        &nbsp;<span class="up_next">* 比如：xx人才网、xx分站</span></td>
                                </tr>
                                <tr class='tdbg'>
                                    <td class="tdbg2" align="right" style="width: 12%">
                                        分站域名：</td>
                                    <td width="35%">
                                        http://<asp:TextBox ID="TextBox2" runat="server" Width="76px" onkeyup="textfield.value = TextBox2.value"></asp:TextBox>
                                        .xxx.com
                                        <br />
                                        http://www.xxx.com/
                                            <input name="textfield" type="text" disabled="disabled" id="textfield" size="10" /><br />
                                          <span class="up_next">*【警告】如果是用二级域名进行的安装，则不能开启分站功能。</span></td>
                                    <td width="53%">
                                        分站域名归属地区：
                                        <input type="hidden" name="workadd" enableviewstate="false" />
                                        <input id="workadds" name="workadds" class="jstext" onclick="JumpSearchLayers(0,0,2,'form1','workadds','workadd');"
                                            readonly="readonly" value="选择分站对应的省市" />
                                        <br />
                                        <span class="up_next">* 根据 分站域名 的定义来决定此处的匹配地区，修改时不选则为默认</span></td>
                                </tr>
                                <tr class='tdbg'>
                                    <td class="tdbg2" align="right" style="width: 12%">
                                        图片标识：</td>
                                    <td colspan="2">
                                        <input id="File1" runat="server" style="width: 379px" type="file" /> <span class="up_next">* 宽290，高78。修改时不选则为默认</span>
                                        <%if(_imgsrc != null) {%><br /><img src="../images/CityLogo/<%=_imgsrc %>" width="290" height="78" /><%} %>
                                    </td>
                                </tr>
                                <tr class="tdbg">
                                    <td align="right" class="tdbg2" style="width: 12%">
                                        启用：</td>
                                    <td colspan="2">
                                        <asp:CheckBox ID="Passed" runat="server" Text="勾选则为开启" /></td>
                                </tr>
                                <tr class="tdbg">
                                    <td align="right" class="tdbg2" style="width: 12%">
                                        排序：</td>
                                    <td colspan="2">
                                        <asp:TextBox ID="TextBox3" runat="server" Text="0" MaxLength="2" Width="30px" onkeyup="if(isNaN(value))execCommand('undo')"></asp:TextBox>
                                        <span class="up_next">* 数字越大，排名越高</span></td>
                                </tr>
                                <tr class="tdbg">
                                    <td align="right" class="tdbg2" style="width: 12%">
                                        分站关键字：</td>
                                    <td colspan="2">
                                        <asp:TextBox ID="gjz_text" runat="server" Width="523px"></asp:TextBox></td>
                                </tr>
                                <tr class="tdbg">
                                    <td align="right" class="tdbg2" style="width: 12%">
                                        分站描述：</td>
                                    <td colspan="2">
                                        <asp:TextBox ID="miaoshu" runat="server" Width="523px"></asp:TextBox></td>
                                </tr>
                            </table>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="height: 22px">
                                        <div align="center">
                                            <asp:Button ID="Submit1" runat="server" Text="确 认" OnClick="Submit1_Click" />
                                            <input id="Reset1" type="reset" value="重 置" />
                                            <br />
                                        <asp:Label ID="city_lable" runat="server" ForeColor="Red"></asp:Label></div>
                                    </td>
                                </tr>
                            </table>
              <span class="up_next">备注：</span><br />
                            如果 分站域名 输入的是“hn” ，则 分站域名归属地区 选择 “湖南省-不限”；<br />
                          如果 分站域名 输入的是“huaihua”或“hh” ，则 分站域名归属地区 选择 “怀化市”。<br />
                          凡是以 <span class="up_next">分站域名.xxx.com</span> 的域名地址都需要泛解析才能生效。</td>
                    </tr>
                </table>
            </asp:Panel>
      </div>
    </form>
</body>
</html>
