<%@ page language="C#" autoeventwireup="true" inherits="admin_script, 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 len(s) { 
var l = 0; 
var a = s.split(""); 
for (var i=0;i<a.length;i++) { 
if (a[i].charCodeAt(0)<299) { 
l++; 
} else { 
l+=2; 
} 
} 
return l; 
}

function add(theForm){
 if (form1.scriptname.value=="") {
    window.alert("请输入脚本名称");
    form1.scriptname.focus();
    return false;
 }
 
var patrn="^[A-Za-z0-9]+$";   
if (!form1.scriptname.value.match(patrn)) 
{
    window.alert("脚本名称只能由字母和数字组成");
    form1.scriptname.focus();
    return false;
}
if (form1.extend.value=="") {
    window.alert("请输入扩展名");
    form1.extend.focus();
    return false;
 }
 if (form1.dllpath.value=="") {
    window.alert("请输入DLL路径");
    form1.dllpath.focus();
    return false;
 }
}

</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="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="200px" scope="col"  align="middle"><strong>DLL文件完整路径</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>
    <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="lblname" Visible="true" runat="server" Text=' <%# DataBinder.Eval(Container.DataItem, "sname")%>'> </asp:Label>
				</td>
                    <td class="site_bg_bs" align=middle><%#Eval("extends")%></td> 
                   <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 class="site_bg_bs" align=middle><%#Eval("verbs")%></td>
					<td class="site_bg_bs" align=middle><%#Eval("owen")%></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="8%" align="center">&nbsp;脚本名：</td> 
          <td  class="site_bg_bs"  width="12%">
          <INPUT id=scriptname runat="server" value="" class=input_to_to title=请输入脚本名称  size=16 name=scriptname></td>
           <td class="site_bg_bs"  height=25 width="8%" align="center">&nbsp;扩展名：</td> 
          <td  class="site_bg_bs"  width="12%">
          <INPUT id=extend runat="server" value="" class=input_to_to title=请输入扩展名（如*.bas，wsvc.axd）  size=16 name=extend></td>
           <td class="site_bg_bs"  height=25 width="8%" align="center">&nbsp;动作：</td> 
          <td  class="site_bg_bs"  width="12%">
          <INPUT id=verbs runat="server" value="" class=input_to_to title=请输入动作，用‘，’号隔开，可留空（如GET）  size=16 name=verbs></td>
          <td class="site_bg_bs"  height=25 width="10%" align="center">&nbsp;DLL路径：</td> 
          <td  class="site_bg_bs"  width="12%">
          <INPUT id=dllpath runat="server" value="" class=input_to_to title=请输入有效的DLL文件路径  size=16 name=dllpath></td>
          <td class="site_bg_bs"  width="12%">
          <select id=pathclass runat="server" class=site_bg_bs name=pathclass> <option selected value="">本服务器</option></select></td>
         
          <td  class="site_bg_bs" width="12%">
           <asp:ImageButton ID="btnYes" runat="server" ImageUrl="~/images/sys/addscript.gif" 
                  OnClientClick="return add(this)" onclick="btnYes_Click" />
          </td>
    </tr>
    </tbody>
</table>
    </div>
    
    </form>
    
</body>

</html>