<%@ page language="C#" autoeventwireup="true" inherits="safe_path, App_Web_tqrintju" %>

<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">

<html>
<head>
<title>safehost</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
<link type="text/css" href="../css/common.css" rel="Stylesheet" />
</head>

<body>
<script type="text/javascript">
function checkform(theForm)
{
    if (!confirm("真的要删除吗？删除后无法恢复！"))
        return false;
     else 
         return true;
}

function AddPath(){
    if(form1.pathclass.value=="")
    {
      window.alert("请选择目录类型");
      theForm.pathclass.focus();
      return false;
    }
 return true;
}
</script>

    <form id="form1" runat="server">
    <div id="tt">
    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" class="site_bg_site" id="Table1">
        <tbody>
        <tr class="tr3 s3" style="height:30px;">
            <td><h4><b>提示信息</b></h4></td>
        </tr>
            <tr class="tr3 s3" style="height:30px;">
                <td>
                1、添加目录前请确认路径有效，如果强行添加将会出现错误。<br />
                2、目录结构为：给定路径+类型文件夹名（如：选中添加类型为虚拟主机存放目录，给定路径为D：\safehost 格式化后路径为D：\safehost\wwwroot）。
                <br/>3、类型文件名参照：虚拟主机存放目录==》wwwroot；独立FTP存放目录==》ftproot；MSSQL数据库存放目录==》sqlroot。
                <br/><font color="#ff0000">4、注意：删除文件夹时，将删除该文件夹以及其下所有文件！请谨慎操作！</font>
                </td>
            </tr>
        </tbody>
    </table>
   <br/>
   
   <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" class="site_bg_site" id="Table2">
        <tbody>
        <tr class="tr3 s3" style="height:30px;">
            <td><h4><b>存放路径设置</b></h4></td>
        </tr>
        </tbody>
    </table>
 
    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" class="site_bg_site" id="tab">

    <tr class="tr3 s3" style="height:30px;">

    <td class="site_bg_bs" width="100px" scope="col" align="middle"><strong>存放路径地址</strong></td>
    <td class="site_bg_bs" width="110px" scope="col" align="middle"><strong>存放站点数量(个)</strong></td>
    <td class="site_bg_bs" width="100px" scope="col"  align="middle"><strong>启用或停止路径</strong></td>
    <td class="site_bg_bs" width="100px" scope="col" align="middle"><strong>操作</strong></td>
  </tr>

<asp:Repeater ID="Repeater" runat="server" onitemcommand="Repeater_ItemCommand">
             <ItemTemplate>
				 <tr class="tr3 s3">
                     <td class="site_bg_bs" align="middle">
                     <asp:Label ID="lblpath" Visible="true" runat="server" Text=' <%# DataBinder.Eval(Container.DataItem, "path")%>'> </asp:Label>
				</td>
					<td id="times" class="site_bg_bs" align="middle">
					<asp:Label ID="lbltimes" Visible="true" runat="server" Text=' <%# DataBinder.Eval(Container.DataItem, "times")%>'></asp:Label>
					</td> 
					<td class="site_bg_bs" align="middle">
					<asp:Label ID="lblstate" Visible="true" runat="server" Text=' <%# DataBinder.Eval(Container.DataItem, "state")%>'>
					 </asp:Label><asp:LinkButton ID="btnchange" runat="server"  CommandName="change">&nbsp;点击切换状态</asp:LinkButton></td>
					<td class="site_bg_bs" align="middle">
                        <asp:ImageButton ID="btnDelete" runat="server" ToolTip="删除" CommandName="del" OnClientClick="return checkform(this)" ImageUrl="../images/host/del.gif" />
				</tr>
             </ItemTemplate>
  </asp:Repeater>
 
</table>
<table>
    <tbody>
         <tr class="tr3 s3" style="height:30px;">
          <td class="site_bg_bs"  height=25 width="11%">&nbsp;路径地址：</td>
          <td class="site_bg_bs"  width="18%"><select id=pathclass runat="server" class=site_bg_bs 
              name=pathclass> <option selected value="">请选择目录类型</option> <option 
              value=1>虚拟主机存放目录</option> <option value=0>独立FTP存放目录</option> 
              <option value=2>MSSQL数据库存放目录</option></select></td>
          <td class="site_bg_bs"  height=30 width="4%"><select id=disk_pm runat="server" class=input_to_to 
            name=disk_pm></select></td>
            
          <td  class="site_bg_bs"  width="23%"><INPUT id=pathname runat="server" value="" class=input_to_to 
            title="请输入目录名称 如:www 或 root\web" size=25 name=pathname></td>
          <td  class="site_bg_bs" width="12%">
          
           <asp:ImageButton ID="btnYes" runat="server"  OnClientClick="return AddPath()" 
                  ImageUrl="~/images/sys/asspath.gif" onclick="btnYes_Click" />
          </td>
          <td  class="site_bg_bs" width="32%">注：将会在服务器<SPAN class=syt_1>自动创建</SPAN>对应目录</td></tr>
    </tbody>
</table>
    </div>
    
    </form>
    
</body>

</html>