<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_SubSite_UpdateSub, QianboCMS" EnableEventValidation="false" %>
<!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 runat="server">
<title>修改分站</title>
<link href="../Css/layout.css" rel="stylesheet" type="text/css" />
<script src="../../Js/Common.js" type="text/javascript"></script>
<script language="javascript">
function EWEBeditor_Create(s_ID, s_Style){
    document.write('<input type="hidden" name="'+s_ID+'" value="">'
        +'<iframe id="'+s_ID+'__Iframe" src="../../Editor/eWebEditor.htm?id='+s_ID+'&style='+s_Style+'" width="0" height="0" style="display: none;" frameborder="0" scrolling="no"></iframe>');
}
function EWEBeditor_ShowDialog(s_ID, s_Type, s_Mode, s_LinkID_SavePathFileName, s_LinkID_SaveFileName, s_LinkID_OriginalFileName){
    var editor = document.getElementById(s_ID+'__Iframe').contentWindow;
    editor.openUploadDialog(s_Type, s_Mode, s_LinkID_SavePathFileName, s_LinkID_SaveFileName, s_LinkID_OriginalFileName)
}
EWEBeditor_Create("eWebEditor1", "standard650");
</script>
<script>
function conn()
{
    var pass = $("txtPass");
    var ip = $("txtServerIp");
    var uid =  $("txtUserName");
    if(ip.value == "")
    {
        alert('请输入数据库服务器IP！');
        ip.focus();
        return false;
    }
    if(uid.value == "")
    {
        alert('请输入用户名！');
        uid.focus();
        return false;
    }
    System_SubSite_UpdateSub.CanConnect("Server="+ip.value+";uid="+uid.value+";pwd="+pass.value,CallBack);
}
function CallBack(res)
{
    if(res.value == "true")
    {
        alert("数据库连接成功！");
    }
    else
    {
        alert("数据库连接失败！");
    }
}
</script>
</head>

<body>
<table align="center" cellpadding="0" cellspacing="1" class="wzdh" width="99%">
  <tr>
    <td style="padding-left: 10px;"><img src="../Images/Skin/Default/you.gif" align="absmiddle" /> 您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt; <a href="SiteList.aspx">分站列表</a> &gt;&gt; 修改分站</td>
  </tr>
</table>
<table align="center" cellpadding="0" cellspacing="1" class="border" width="99%">
  <tr class="wzlist">
    <td><a href="SiteList.aspx">分站列表</a></td>
  </tr>
</table>
<form id="form1" runat="server">
  <table cellpadding="0" cellspacing="1" width="99%" align="center" class="cd">
    <tr align='center'>
      <td id='TabTitle0' onclick="ShowTabs(0)" class="title6">站点设置</td>
      <td id='TabTitle1' onclick="ShowTabs(1)" class="title5">数据库设置</td>
      <td id='TabTitle2' onclick="ShowTabs(2);" class="title5">管理员设置</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  <table cellpadding="0" cellspacing="1" class="editborder" width="99%" align="center">
    <tbody id="Tabs0">
      <tr>
        <td class="bqleft">站点中文名：</td>
        <td class="bqright"><asp:TextBox ID="txtSiteName" runat="server"></asp:TextBox>
          <span style="color: red;">*</span></td>
      </tr>
      <tr>
        <td class="bqleft">站点英文名：</td>
        <td class="bqright"><asp:TextBox ID="txtSiteEnName" runat="server"></asp:TextBox>
          <span style="color: red;">*</span>
          首字母：<asp:TextBox ID="txtSiteChar" runat="server" Width="40px"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">分站Logo：</td>
        <td class="bqright"><asp:TextBox ID="txtLogo" runat="server" Width="355px"></asp:TextBox>
          <input id="Button1" class="btn" type="button" value="选择图片" onclick="EWEBeditor_ShowDialog('eWebEditor1', 'image', '0', 'txtLogo', '', '')" />
          <asp:TextBox ID="FilePicPath" runat="server" Style="display: none;" Text="logos|0"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">排序值：</td>
        <td class="bqright"><asp:TextBox ID="txtSiteSort" runat="server" Text="999"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">备注：</td>
        <td class="bqright"><asp:TextBox ID="txtSiteRemark" runat="server" TextMode="MultiLine" Height="100px" Width="400px"></asp:TextBox></td>
      </tr>
    </tbody>
    <tbody id="Tabs1" style="display: none;">
      <tr>
        <td class="bqleft">数据库服务器IP：</td>
        <td class="bqright"><asp:TextBox ID="txtServerIp" runat="server" Style="width: 150px;">(local)</asp:TextBox>
          <span style="color: red;">*</span></td>
      </tr>
      <tr>
        <td class="bqleft">创建数据库帐号：</td>
        <td class="bqright"><asp:TextBox ID="txtUserName" runat="server" Style="width: 150px;">sa</asp:TextBox>
          <span style="color: red;">*</span></td>
      </tr>
      <tr>
        <td class="bqleft">创建数据库密码：</td>
        <td class="bqright"><asp:TextBox ID="txtPass" runat="server" TextMode="Password" Style="width: 150px;">123456</asp:TextBox>
          <span style="color: red;">* 不修改请留空</span>
          <input id="btnTest" class="btn" type="button" value="测试连接" onclick="conn();" />
          <label id="loading" style="display: none;">正在测试连接，请稍候…</label></td>
      </tr>
      <tr>
        <td class="bqleft">访问数据库帐号：</td>
        <td class="bqright"><asp:TextBox ID="txtCallName" runat="server" Style="width: 150px;"></asp:TextBox>
          <span style="color: red;">*</span></td>
      </tr>
      <tr>
        <td class="bqleft">访问数据库密码：</td>
        <td class="bqright"><asp:TextBox ID="txtCallPass" runat="server" TextMode="Password" Style="width: 150px;"></asp:TextBox>
          <span style="color: red;">* 不修改请留空</span></td>
      </tr>
      <tr id="trDbName">
        <td class="bqleft">新数据库名称：</td>
        <td class="bqright"><asp:TextBox ID="txtDbName" runat="server" Style="width: 150px;"></asp:TextBox>
          <span style="color: red;">*</span></td>
      </tr>
    </tbody>
    <tbody id="Tabs2" style="display: none;">
<!--
      <tr>
        <td class="bqleft">管理组：</td>
        <td class="bqright"><asp:DropDownList ID="DDlistGroup" runat="server">
          </asp:DropDownList></td>
      </tr>
-->
      <tr>
        <td class="bqleft">管理员登录名：</td>
        <td class="bqright"><asp:TextBox ID="txtAdmLoginName" runat="server" Style="width: 150px;"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">密码：</td>
        <td class="bqright"><asp:TextBox ID="txtAdmPass" runat="server" TextMode="Password" Style="width: 150px;"></asp:TextBox>
          <span style="color: red;">* 不修改请留空</span></td>
      </tr>
      <tr>
        <td class="bqleft">真实姓名：</td>
        <td class="bqright"><asp:TextBox ID="txtAdmRealName" runat="server" Style="width: 150px;"></asp:TextBox>
          <span style="color: red;">*</span></td>
      </tr>
      <tr>
        <td class="bqleft">联系方式：</td>
        <td class="bqright"><asp:TextBox ID="txtAdmContact" runat="server" Columns="35"></asp:TextBox></td>
      </tr>
    </tbody>
    <tr>
      <td class="bqleft"></td>
      <td class="bqright"><asp:Button ID="btnOk" runat="server" CssClass="btn" Text="确定" OnClick="btnOk_Click" />
        <input id="Reset1" class="btn" type="reset" value="重置" />
         </td>
    </tr>
  </table>
</form>
</body>
</html>