<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_InterfaceManage, WebApp_deploy" title="整合频道管理" debug="false" enableEventValidation="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:650px; dialogHeight:500px; help: yes; scroll: yes; status: no');
      break;
      case "Modify":
        window.location.href='Admin_AddInterface.aspx?Action=Modify&InterfaceID='+document.getElementById(ctlName).value;
      break;    
  }   
   //判断对应的返回值
  if(recdata==true)
  {
     // 刷新当前窗口
     window.location.reload();
  } 
}
function SetInterfaceConfig(url)
{
  var floderIndex=url.lastIndexOf("/");
  var fileTypeIndex=url.lastIndexOf("."); 
  var urllen=url.length;
  var fileType=url.substring(fileTypeIndex)
  var ConfigUrl=url.substring(0,floderIndex)+"/inc/HoWaveConfigSetup"+fileType;
  window.open(ConfigUrl,"_blank","height=680px,width=700px,menubar=0,toolbar=0,status=0")
 // showModalDialog(ConfigUrl,'','dialogWidth:700px; dialogHeight:680px; help: yes; scroll: yes; status: no') ;
}
</script> 
  

<table class="adminheading">  
<tr>           
   <th>整合频道管理</th> 
   <td align="right"><div style="width:100px"><a href="javascript:void(0)" id="AddNewInterface" onclick="AddInterface('','Add')" >添加新整合</a></div></td>
   <td class="rtdw"></td>
</tr>     
</table>

      <asp:GridView id="GridView1" runat="server" EnableViewState="false" RowStyle-Height="15px" PageSize="20" OnRowDataBound="GridView1_RowDataBound" AutoGenerateColumns="False" CssClass="adminlist" DataKeyNames="InterfaceID" AllowSorting="True" AllowPaging="True">
          <Columns>
                <asp:BoundField DataField="InterfaceID" HeaderText="ID">
                    <HeaderStyle Width="5%" />
                </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="8%" />
                </asp:TemplateField>                     
                <asp:TemplateField HeaderText="后台整合">
                    <ItemTemplate>
                      <asp:Literal ID="EnableAdminInterface" runat="server" Text='<%# (Convert.ToInt32(Eval("EnableAdminInterface"))==1)?"√":"×" %>'/> 
                    </ItemTemplate>
                    <HeaderStyle Width="8%" />
                </asp:TemplateField>                    
                 <asp:TemplateField HeaderText="同步注册">
                    <ItemTemplate>
                      <asp:Literal ID="RegClose" runat="server" Text='<%# (Convert.ToInt32(Eval("RegClose"))==1)?"×":"√" %>'/> 
                    </ItemTemplate>
                     <HeaderStyle Width="8%" />
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="同步登录">
                    <ItemTemplate>
                      <asp:Literal ID="LoginClose" runat="server" Text='<%# (Convert.ToInt32(Eval("LoginClose"))==1)?"×":"√" %>'/> 
                    </ItemTemplate>
                     <HeaderStyle Width="8%" />
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="跨域名">
                    <ItemTemplate>
                      <asp:Literal ID="CrossDomain" runat="server" Text='<%# (Convert.ToInt32(Eval("CrossDomain"))==1)?"√":"×" %>'/> 
                    </ItemTemplate>
                     <HeaderStyle Width="8%" />
                </asp:TemplateField>  
                <asp:TemplateField HeaderText="前台接口">
                    <ItemTemplate>
                      <asp:HyperLink ID="InterfaceFrontUrl" runat="server"  Text="测试"  NavigateUrl='<%# Eval("InterfaceFrontUrl")+m_testurl %>' Target="_blank"/> 
                    </ItemTemplate>
                     <HeaderStyle Width="8%" />
                </asp:TemplateField> 
                 <asp:TemplateField HeaderText="后台接口">
                    <ItemTemplate>
                      <asp:HyperLink ID="InterfaceAdminUrl" runat="server" Text="测试" NavigateUrl='<%# Eval("InterfaceAdminUrl")+m_adminTestUrl %>' Target="_blank"/> 
                    </ItemTemplate>
                     <HeaderStyle Width="8%" />
                </asp:TemplateField>                 
                <asp:TemplateField HeaderText="操作选项">
                   <ItemTemplate>
                       <div><a  id="UpdateInterface" runat="server">修改</a>|<asp:HiddenField ID="HiddenInterfaceID" runat="server" Value='<%# Eval("InterfaceID") %>' /> 
                           <asp:LinkButton id="btnDelete" runat="server"   
                               OnClientClick ="return confirm('确定要删除此整合频道吗?')" CommandName='<%# Eval("InterfaceID") %>' Text="删除" 
                               oncommand="btnDelete_Command"/>|<asp:Panel id="SetupSpan" runat="server"><a href="javascript:SetInterfaceConfig('<%# Eval("InterfaceFrontUrl") %>')" title="整合配置设置">配置</a></asp:Panel></div>           
                   </ItemTemplate>
                    <HeaderStyle Width="15%" />
                </asp:TemplateField>                    
          </Columns>
          <EmptyDataTemplate>
		  <tr>
		    <th style="width:5%;">ID</th><th>频道名称</th><th>系统版本</th><th>更新时间</th><th style="width:8%;">前台整合</th><th style="width:8%;">后台整合</th><th style="width:8%;">同步注册</th><th style="width:8%;">同步登录</th><th style="width:8%;">跨域名</th><th scope="col" style="width:8%;">前台接口</th><th scope="col" style="width:8%;">后台接口</th><th scope="col" style="width:15%;">操作选项</th>
		  </tr>
		  <tr>
		    <td colspan="12">暂无整合！</td>
		  </tr>
	  </EmptyDataTemplate>
          <RowStyle Height="15px" />
     </asp:GridView>     
  <p></p>
  <div class="help_intro" >
    <h1>帮助说明：</h1>
    <ul style=" word-spacing:2px; line-height:20px">
       <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>如果点击测试打开页面出错或者找不到页面，那么你需要点击整合接口配置设置</li></ul>
       </li>
        <li>
          <b>整合配置设置</b>
          <ul>
             <li>默认管理认证码为:howave,请使用后立即更改</li><li>整合配置设置文件是放在目标系统/inc/文件夹内，用于配置整合接口的设置如前后台密钥，网站地址等等</li><li>如果点击测试打开页面出错或者找不到页面，那么你需要检查目标系统inc/是否存在该文件</li></ul>
       </li>
    </ul>
  </div>
    
</asp:Content>

