<%@ page language="C#" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_InterfaceManage, HoWaveIMSV5.0" title="整合频道管理" debug="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
function AddInterface(ctlName,action){
var recdata=false;
  switch (action)
  {
      case "Add":
        recdata=showModalDialog('Admin_AddInterface.aspx?Action=Add','','dialogWidth:670px; dialogHeight:650px; help: yes; scroll: yes; status: no');
      break;
      case "Modify":
        recdata=showModalDialog('Admin_AddInterface.aspx?Action=Modify&InterfaceID='+document.getElementById(ctlName).value,'','dialogWidth:670px; dialogHeight:650px; help: yes; scroll: yes; status: no');      
      break;
  }   
   //判断对应的返回值
  if(recdata==true)
  {
     // 刷新当前窗口
     window.top.location.href="Admin_Index.aspx?MainUrl=Admin_InterfaceManage.aspx";   
  } 
}
</script>   
<fieldset class="FieldSetStlye">
<legend>整合频道管理</legend>
  <div style="text-align:right;"><a href="javascript:void(0)" id="AddNewInterface" onclick="AddInterface('','Add')" >添加新整合</a></div>  
      <asp:GridView id="GridView1" runat="server" EnableViewState="false" Width="100%" RowStyle-Height="15px" PageSize="20" OnRowDataBound="GridView1_RowDataBound" AutoGenerateColumns="False" CssClass="adminlist" DataKeyNames="InterfaceID" DataSourceID="ObjectDataSource1" AllowSorting="True" AllowPaging="True" __designer:wfdid="w1">
          <Columns>
                <asp:BoundField DataField="InterfaceID" HeaderText="ID">
                    <HeaderStyle Width="20px" />
                </asp:BoundField>
                <asp:BoundField DataField="InterfaceName" HeaderText="频道名称" />
                <asp:BoundField DataField="Version" HeaderText="系统版本" />                   
                <asp:BoundField DataField="UpdateTime" HeaderText="更新时间" HtmlEncode="false"   DataFormatString="{0:yyyy-MM-dd}" />
                <asp:TemplateField HeaderText="前台整合">
                    <ItemTemplate>
                      <asp:Literal ID="EnableFrontInterface" runat="server" Text='<%# (Convert.ToInt32(Eval("EnableFrontInterface"))==1)?"√":"×" %>'/> 
                    </ItemTemplate>
                    <HeaderStyle Width="60px" />
                </asp:TemplateField>                     
                <asp:TemplateField HeaderText="后台整合">
                    <ItemTemplate>
                      <asp:Literal ID="EnableAdminInterface" runat="server" Text='<%# (Convert.ToInt32(Eval("EnableAdminInterface"))==1)?"√":"×" %>'/> 
                    </ItemTemplate>
                    <HeaderStyle Width="60px" />
                </asp:TemplateField>                    
                 <asp:TemplateField HeaderText="同步注册">
                    <ItemTemplate>
                      <asp:Literal ID="RegClose" runat="server" Text='<%# (Convert.ToInt32(Eval("RegClose"))==1)?"×":"√" %>'/> 
                    </ItemTemplate>
                     <HeaderStyle Width="60px" />
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="同步登录">
                    <ItemTemplate>
                      <asp:Literal ID="LoginClose" runat="server" Text='<%# (Convert.ToInt32(Eval("LoginClose"))==1)?"×":"√" %>'/> 
                    </ItemTemplate>
                     <HeaderStyle Width="60px" />
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="跨域名">
                    <ItemTemplate>
                      <asp:Literal ID="CrossDomain" runat="server" Text='<%# (Convert.ToInt32(Eval("CrossDomain"))==1)?"√":"×" %>'/> 
                    </ItemTemplate>
                     <HeaderStyle Width="60px" />
                </asp:TemplateField>  
                <asp:TemplateField HeaderText="前台接口">
                    <ItemTemplate>
                      <asp:HyperLink ID="InterfaceFrontUrl" runat="server"  Text="测试"  NavigateUrl='<%# Eval("InterfaceFrontUrl")+m_testurl %>' Target="_blank"/> 
                    </ItemTemplate>
                     <HeaderStyle Width="60px" />
                </asp:TemplateField> 
                 <asp:TemplateField HeaderText="后台接口">
                    <ItemTemplate>
                      <asp:HyperLink ID="InterfaceAdminUrl" runat="server" Text="测试" NavigateUrl='<%# Eval("InterfaceAdminUrl")+m_adminTestUrl %>' Target="_blank"/> 
                    </ItemTemplate>
                     <HeaderStyle Width="60px" />
                </asp:TemplateField>                 
                <asp:TemplateField HeaderText="操作选项">
                   <ItemTemplate>
                       <a href="javascript:void(0)" id="UpdateInterface" runat="server">修改</a>|                          
                       <asp:HiddenField ID="HiddenInterfaceID" runat="server" Value='<%# Eval("InterfaceID") %>' />
                       <asp:LinkButton id="btnDelete" runat="server" OnClientClick ="return confirm('确定要删除此整合频道吗?')" CommandName="Delete" Text="删除"/>               
                   </ItemTemplate>
                    <HeaderStyle Width="200px" />
                </asp:TemplateField>                    
          </Columns>
         <RowStyle Height="15px" />
     </asp:GridView>     
  <p></p>
  <div style="padding:10px; border:solid 1px #3872B2">
    <ul>
       <li>
          <b>什么叫跨域名</b>
          <ul>
             <li>跨域名即是两个网站的根域名不相同如www.sina.com.cn和www.sohu.com则这两个站属于不同域名的站点，这种情况的整合属于跨域名整合</li></ul>
       </li>
        <li>
          <b>什么叫跨子域名</b>
          <ul>
             <li>跨子域名即是两个网站的根域相同如 www.sina.com.cn 和 sport.sina.com.cn 则这两个站属于根域名相同，子域名不同的站点，这种情况的整合不属于跨域名</li>
             <li>这种情况的整合需要在<b>网站管理</b>--<b>网站信息配置</b>---<b>整合设置</b>--<a href="Admin_Config.aspx">设置根域名</a></li>
             <li>子域名或者说是二级域名的格式是如www.jsp163.com,bbs.jsp163.com 则它们的根域名为<b>jsp163.com</b></li></ul>
       </li>
       <li>
          <b>什么是测试</b>
          <ul>
             <li>点击测试将会带测试参数连接到你所设定的接口，如果打开的页面可以正确显示测试信息则接口配置正确</li>
             <li>如果点击测试打开页面出错或者找不到页面，那么你需要重新设置好接口的路径及接口配置文件inc/UpiConfig</li>
          </ul>
       </li>
    </ul>
  </div>
</fieldset>    
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetInterfaceName" TypeName="InterfaceBLL" DeleteMethod="DelInterface"  >
        <DeleteParameters>
            <asp:Parameter Name="InterfaceID" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
</asp:Content>

