<html>
<head>
<META content=ywnt,云网互动影视管理系统 name=keywords>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>云网互动影视6.0--服务器管理</title>
<LINK href="css/css.css" type=text/css rel=stylesheet>
</head>
<BODY leftMargin=0 topMargin=0 scroll=yes MARGINHEIGHT="0" MARGINWIDTH="0">
<!--#include file="../Conn.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Function.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Page.asp" -->
<!--#include file="../function/MD5.asp" -->
<%
'===================================================================================================================
'软件名称：云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ：489234,2813712
'程序版权：云网互动科技有限公司
'程序开发：云网互动科技有限公司
'官方网站：http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================
Call CheckLogin("Sever")
sub EditSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Sever where ID="&NoSqlHack(Request.Form("ID"))
		Rs.open sql,Conn,1,3
		RS("SeverName")=NoSqlHack(Request.Form("SeverName"))
		RS("DxUrl")=NoSqlHack(Request.Form("DxUrl"))
		RS("CncUrl")=NoSqlHack(Request.Form("CncUrl"))
		RS("TtUrl")=NoSqlHack(Request.Form("TtUrl"))
		RS("P2pUrl")=NoSqlHack(Request.Form("P2pUrl"))
		RS("P2PType")=NoSqlHack(Request.Form("P2PType"))
		RS("DownUrl")=NoSqlHack(Request.Form("DownUrl"))
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("修改服务器"&Request.Form("SeverName"),3)
		call Admin_ShowErr("<li>服务器修改成功</li>","Admin_Sever.asp",1)
end sub
sub AddSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Sever"
		Rs.open sql,Conn,1,3
		Rs.addnew
		RS("SeverName")=NoSqlHack(Request.Form("SeverName"))
		RS("DxUrl")=NoSqlHack(Request.Form("DxUrl"))
		RS("CncUrl")=NoSqlHack(Request.Form("CncUrl"))
		RS("TtUrl")=NoSqlHack(Request.Form("TtUrl"))
		RS("P2pUrl")=NoSqlHack(Request.Form("P2pUrl"))
		RS("P2PType")=NoSqlHack(Request.Form("P2PType"))
		RS("DownUrl")=NoSqlHack(Request.Form("DownUrl"))
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("添加服务器"&Request.Form("SeverName"),3)
		call Admin_ShowErr("<li>添加服务器成功</li>","Admin_Sever.asp",1)
end sub
sub Del()
	conn.execute "delete from YWNT_TMS_Sever WHERE ID="&NoSqlHack(Request("ID"))&""
	Call AddLog("删除服务器",3)
	call Admin_ShowErr("<li>删除服务器成功！</li>","Admin_Sever.asp",1)
end sub%>
<TABLE class=table cellSpacing=1 cellPadding=3 width="98%" align=center border=0>
  <TBODY>
    <TR>
      <TD class=xingmu colSpan=3>服务器管理</TD>
    </TR>
    <TR>
      <TD class="hback"><a href="Admin_Sever.asp">服务器管理首页</a> | <a href="Admin_Sever.asp?Action=Add">添加服务器</a> </TD>
    </TR>
  </TBODY>
</TABLE>
<% Action=Trim(request("Action"))
Select Case Action
Case "Add"
	call Add()
Case "AddSave"
	call AddSave()
Case "Edit"
	call Edit()
Case "EditSave"
	call EditSave()
Case "Del"
	call Del()
Case else
	call List()
End Select
sub List()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
    <tr>
      <td width="5%" align="center" class=xingmu>ID</td>
      <td width="15%" align="center" class=xingmu>服务器名称</td>
      <td width="10%" align="center" class=xingmu>线路</td>
      <td align="center" class=xingmu>服务器地址</td>
      <td width="15%" align="center" class=xingmu>P2P类型</td>
      <td width="10%" align="center" class=xingmu>操作</td>
    </tr>
		<%Set Rs = server.CreateObject(YWNT_TMS_RS)
		sql="Select * from YWNT_TMS_Sever Order by id asc"
		Rs.open sql,Conn,1,1 
		do while Not RS.Eof%>
  <form action="Admin_Sever.asp?Action=EditSave" method="post" name="form<%=RS("ID")%>" id="form">
    <tr>
      <td height=32 rowspan="5" align="center" class="hback"><%=RS("ID")%></td>
      <td height=32 rowspan="5" align="center" class="hback"><input name="SeverName" type="text" id="SeverName" value="<%=RS("SeverName")%>" size="10"></td>
      <td align="center" class="hback">电信      </td>
      <td align="center" class="hback"><input name="DxUrl" type="text" id="DxUrl" value="<%=RS("DxUrl")%>" size="35"></td>
      <td align="center" class="hback">&nbsp;</td>
      <td rowspan="5" align="center" class="hback"><input name="id" type="hidden" value="<%= RS("ID") %>"><A href="javascript:form<%=RS("ID")%>.submit();">修改</A>｜<A href="Admin_Sever.asp?ID=<%=RS("ID")%>&Action=Del">删除</A></td>
    </tr>
    <tr>
      <td align="center" class="hback">网通</td>
      <td align="center" class="hback"><input name="CncUrl" type="text" id="CncUrl" value="<%=RS("CncUrl")%>" size="35"></td>
      <td align="center" class="hback">&nbsp;</td>
    </tr>
    <tr>
      <td align="center" class="hback">铁通</td>
      <td align="center" class="hback"><input name="TtUrl" type="text" id="TtUrl" value="<%=RS("TtUrl")%>" size="35"></td>
      <td align="center" class="hback">&nbsp;</td>
    </tr>
    <tr>
      <td align="center" class="hback">P2P</td>
      <td align="center" class="hback"><input name="P2pUrl" type="text" id="P2pUrl" value="<%=RS("P2pUrl")%>" size="35"></td>
      <td align="center" class="hback"><select name="P2PType" id="P2PType">
        <option value="1" <%if RS("P2pType")=1 then Response.Write"selected"%>>bobop2p</option>
        <option value="2" <%if RS("P2pType")=2 then Response.Write"selected"%>>原力p2p</option>
		<option value="3" <%if RS("P2pType")=3 then Response.Write"selected"%>>Qvod</option>
            </select></td>
    </tr>
    <tr>
      <td align="center" class="hback">下载</td>
      <td align="center" class="hback"><input name="DownUrl" type="text" id="DownUrl" value="<%=RS("DownUrl")%>" size="35"></td>
      <td align="center" class="hback">&nbsp;</td>
    </tr>
  </form>
	<%RS.MoveNext
	loop
	RS.Close
	Set RS = Nothing%>
</table>
<br>
  <%end sub
sub Add()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tr>
    <td width="15%" align="center" class=xingmu>服务器名称</td>
    <td width="10%" align="center" class=xingmu>线路</td>
    <td align="center" class=xingmu>服务器地址</td>
    <td width="15%" align="center" class=xingmu>P2P类型</td>
    <td width="10%" align="center" class=xingmu>操作</td>
  </tr>
  <form action="Admin_Sever.asp?Action=AddSave" method="post" name="form" id="form">
    <tr>
      <td height=32 rowspan="5" align="center" class="hback"><input name="SeverName" type="text" id="SeverName" size="10"></td>
      <td align="center" class="hback">电信 </td>
      <td align="center" class="hback"><input name="DxUrl" type="text" id="DxUrl" size="35"></td>
      <td align="center" class="hback">&nbsp;</td>
      <td rowspan="5" align="center" class="hback"><input type="submit" name="Submit2" value="添加"></td>
    </tr>
    <tr>
      <td align="center" class="hback">网通</td>
      <td align="center" class="hback"><input name="CncUrl" type="text" id="CncUrl" size="35"></td>
      <td align="center" class="hback">&nbsp;</td>
    </tr>
    <tr>
      <td align="center" class="hback">铁通</td>
      <td align="center" class="hback"><input name="TtUrl" type="text" id="TtUrl" size="35"></td>
      <td align="center" class="hback">&nbsp;</td>
    </tr>
    <tr>
      <td align="center" class="hback">P2P</td>
      <td align="center" class="hback"><input name="P2pUrl" type="text" id="P2pUrl" size="35"></td>
      <td align="center" class="hback"><select name="P2PType" id="P2PType">
        <option value="1">bobop2p</option>
        <option value="2">原力p2p</option>
		<option value="3">Qvod</option>
            </select></td>
    </tr>
    <tr>
      <td align="center" class="hback">下载</td>
      <td align="center" class="hback"><input name="DownUrl" type="text" id="DownUrl" size="35"></td>
      <td align="center" class="hback">&nbsp;</td>
    </tr>
  </form>
</table>
<%end sub
call connclose()%>
</BODY></HTML>
