<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" -->
<%
'===================================================================================================================
'软件名称：云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ：489234,2813712
'程序版权：云网互动科技有限公司
'程序开发：云网互动科技有限公司
'官方网站：http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================
Call CheckLogin("Region")
sub EditSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_MovieRegion where ID="&NoSqlHack(Request("ID"))
		Rs.open sql,Conn,1,3
		RS("RegionName")=NoSqlHack(Request.Form("RegionName"))
		RS("RegionWith")=NoSqlHack(Request.Form("RegionWith"))
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("修改影片地区"&Request.Form("RegionName"),3)
		call Admin_ShowErr("<li>影片地区修改成功</li>","Admin_Region.asp",1)
end sub
sub AddSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_MovieRegion"
		Rs.open sql,Conn,1,3
		Rs.addnew
		RS("RegionName")=NoSqlHack(Request.Form("RegionName"))
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("添加影片地区"&Request.Form("RegionName"),3)
		call Admin_ShowErr("<li>影片地区添加成功</li>","Admin_Region.asp",1)
end sub
sub Del()
	conn.execute "delete from YWNT_TMS_MovieRegion WHERE ID = "&NoSqlHack(Request("ID"))&""
	Call AddLog("删除影片地区",3)
	call Admin_ShowErr("<li>影片地区删除成功！</li>","Admin_Region.asp",1)
end sub%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td class=xingmu>地区管理</td>
    </tr>
    <tr>
      <td class="hback"><a href="Admin_Region.asp">地区管理首页</a> | <a href="Admin_Region.asp?Action=Add">添加地区</a></td>
    </tr>
  </tbody>
</table>
<% Action=Trim(request("Action"))
Select Case Action
Case "Add"
	call Add()
Case "AddSave"
	call AddSave()
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>
  <tbody>
    <tr>
      <td width="10%" align="center" class=xingmu>ID</td>
      <td align="center" class=xingmu>地区名称</td>
      <td align="center" class=xingmu>排序</td>
      <td width="10%" align="center" class=xingmu>操作</td>
    </tr>
	<%Set Rs = server.CreateObject(YWNT_TMS_RS)
	sql="Select ID,RegionName,RegionWith from YWNT_TMS_MovieRegion Order by RegionWith asc"
	Rs.open sql,Conn,1,1
	if RS.eof then
	Response.Write"<TR  class=""hback""><TD colspan=""4"" class=""hback"" height=""40"">暂无影片地区。</TD></TR>"
	else
	do while not RS.eof%>
	 <form name="form<%=RS("ID")%>" action="Admin_Region.asp?Action=EditSave" method="post">
    <tr>
      <td height=32 align="center" class="hback"><%=RS("ID")%></td>
      <td height=32 align="center" class="hback"><input name="RegionName" type="text" id="RegionName" value="<%=RS("RegionName")%>" size="40"></td>
      <td height=32 align="center" class="hback"><input name="RegionWith" type="text" id="RegionWith" value="<%=RS("RegionWith")%>" size="5"><input name="ID" type="hidden" value="<%=RS("ID")%>"></td>
      <td align="center" class="hback"><A href="javascript:form<%=RS("ID")%>.submit();">修改</A>｜<A href="Admin_Region.asp?Action=Del&ID=<%=RS("ID")%>">删除</A></td>
    </tr>
	</form>
	<%RS.movenext     
    loop
	RS.close 
	end if    
	set RS=nothing%>
  </tbody>
</table>
<%end sub
sub Add()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
 <form name="form" action="Admin_Region.asp?Action=AddSave" method="post">
  <tbody>
    <tr>
      <td colspan="3" class=xingmu>添加地区</td>
    </tr>
    <tr>
      <td width="21%" height=32 align="right" class="hback">地区名称：</td>
      <td width="39%" height=32 class="hback"><input name="RegionName" type="text" size="40"></td>
      <td width="39%" class="hback">&nbsp;&nbsp;<input type="submit" name="Submit" value="添 加"></td>
    </tr>
  </tbody>
  </form>
</table>
<%end sub
call connclose()%>
</BODY></HTML>
