<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">
<script language="JavaScript" src="YWNT_TMS_Inc/YWNT_TMS_Common.js"></script>
<!--#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("FeatureType")
sub EditSave()
		if chkinputchar(Request.Form("FeatureNameE"))=False then
		call Admin_ShowErr("<li>专题栏目英文名只能是英文与数字</li>","javascript:history.go(-1);",0)
		exit sub
		end if
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_FeatureClass where ID="&NoSqlHack(Request.Form("ID"))
		Rs.open sql,Conn,1,3
		RS("FeatureName")=NoSqlHack(Request.Form("FeatureName"))
		RS("FeatureNameE")=NoSqlHack(Request.Form("FeatureNameE"))
		RS("FeaturePic")=NoSqlHack(Request.Form("FeaturePic"))
		RS("FeatureTemplate")=NoSqlHack(Request.Form("FeatureTemplate"))
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("修改专题栏目"&Request.Form("FeatureName"),4)
		call Admin_ShowErr("<li>专题栏目修改成功</li>","Admin_FeatureType.asp",1)
end sub
sub AddSave()
		if chkinputchar(Request.Form("FeatureNameE"))=False then
		call Admin_ShowErr("<li>专题栏目英文名只能是英文与数字</li>","javascript:history.go(-1);",0)
		exit sub
		end if
		if CheckFeature("FeatureNameE",NoSqlHack(request.Form("FeatureNameE")),"'")>0 then 
		call Admin_ShowErr("<li>专题栏目英文名重复，请重新输入！</li>","javascript:history.go(-1);",0)
		exit sub
		end if
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_FeatureClass"
		Rs.open sql,Conn,1,3
		Rs.addnew
		RS("FeatureName")=NoSqlHack(Request.Form("FeatureName"))
		RS("FeatureNameE")=NoSqlHack(Request.Form("FeatureNameE"))
		RS("FeaturePic")=NoSqlHack(Request.Form("FeaturePic"))
		RS("FeatureTemplate")=NoSqlHack(Request.Form("FeatureTemplate"))
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("添加专题栏目"&Request.Form("FeatureName"),4)
		call Admin_ShowErr("<li>专题栏目添加成功</li>","Admin_FeatureType.asp",1)
end sub
sub Del()
	conn.execute "delete from YWNT_TMS_FeatureClass WHERE ID = "&NoSqlHack(Request("ID"))&""
	Call AddLog("删除专题栏目",4)
	call Admin_ShowErr("<li>专题栏目删除成功！</li>","Admin_FeatureType.asp",1)
end sub
sub FeatureWithSave()
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_FeatureClass where ID="&NoSqlHack(Request.Form("ID"))
		Rs.open sql,Conn,1,3
		RS("FeatureWith")=NoSqlHack(Request.Form("FeatureWith"))
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		'记录日志
		call Admin_ShowErr("<li>专题栏目排序修改成功</li>","Admin_FeatureType.asp?Action=ClassWith",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_FeatureType.asp">专题栏目管理首页</a> | <a href="Admin_FeatureType.asp?Action=Add">添加专题栏目</a> | <a href="Admin_FeatureType.asp?Action=FeatureWith">修改专题栏目排序</a></td>
    </tr>
  </tbody>
</table>
<% Action=Trim(request("Action"))
Select Case Action
Case "Add"
	call Add()
Case "AddSave"
	call AddSave()
Case "Edit"
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_FeatureClass where ID="&NoSqlHack(Request.QueryString("ID"))
		Rs.open sql,Conn,1,1
		YWNT_TMS_ID=RS("ID")
		YWNT_TMS_FeatureName=RS("FeatureName")
		YWNT_TMS_FeatureNameE=RS("FeatureNameE")
		YWNT_TMS_FeaturePic=RS("FeaturePic")
		YWNT_TMS_FeatureTemplate=RS("FeatureTemplate")
		RS.close   
      	set RS=nothing
	call Edit()
Case "EditSave"
	call EditSave()
Case "Del"
	call Del()
Case "FeatureWith"
	call FeatureWith()
Case "FeatureWithSave"
	call FeatureWithSave()
Case else
	call List()
End Select
sub List()
Dim int_RPP
	int_RPP=GetConfig("PageNumber") '设置每页显示数目%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td width="5%" align="center" class=xingmu>ID</td>
      <td width="57%" align="center" class=xingmu>专题栏目名称</td>
      <td width="10%" align="center" class=xingmu>专题栏目排序</td>
      <td width="20%" align="center" class=xingmu>操作</td>
    </tr>
	<%  Set Rs = server.CreateObject(YWNT_TMS_RS)
		sql="Select ID,FeatureName,FeatureWith from YWNT_TMS_FeatureClass Order by FeatureWith asc,id 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
		Rs.PageSize=int_RPP
		cPageNo=NoSqlHack(Request.QueryString("Page"))
		If cPageNo="" Then cPageNo = 1
		If not isnumeric(cPageNo) Then cPageNo = 1
		cPageNo = Clng(cPageNo)
		If cPageNo>Rs.PageCount Then cPageNo=Rs.PageCount 
		If cPageNo<=0 Then cPageNo=1
		Rs.AbsolutePage=cPageNo 
	for i=1 to int_RPP
	 if Rs.eof Then exit For %> 
    <tr>
      <td height=32 align="center" class="hback"><%= RS("ID") %></td>
      <td height=32 class="hback"><%= RS("FeatureName") %></td>
      <td height=32 align="center" class="hback"><%= RS("FeatureWith") %></td>
      <td align="center" class="hback"><A href="Admin_FeatureType.asp?ID=<%= RS("ID") %>&Action=Edit">修改</A>｜<A href="Admin_FeatureType.asp?ID=<%= RS("ID") %>&Action=Del">删除</A></td>
    </tr>
	<%Rs.MoveNext
	next
	end if%>
	<tr align="right">
	<td height=32 colspan="4" class="hback"><% response.Write fPageCount(Rs,cPageNo) %></td>
	</tr>
  </tbody>
</table>
<%RS.Close
Set RS = Nothing
end sub
sub Add()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td colspan="2" class=xingmu>添加专题栏目</td>
    </tr>
	   <form name="form" action="Admin_FeatureType.asp?Action=AddSave" method="post" onSubmit="if (!Featurecheck()) return false;">
    <tr>
      <td width="21%" height=32 align="right" class="hback">专题栏目名称：</td>
      <td class="hback"><input name="FeatureName" type="text" id="FeatureName" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">专题栏目英文名：</td>
      <td class="hback"><input name="FeatureNameE" type="text" id="FeatureNameE" size="40"></td>
    </tr>
	 <tr>
      <td height=32 align="right" class="hback">导航图片：</td>
      <td height=32 class="hback"><input name="FeaturePic" id="FeaturePic" value='http://' size=30 maxlength="200"> 
	<input type="button" name="Button" value="选择图片" onClick="var TempReturnValue=OpenWindow('Dialog/SelectPic.asp?CurrPath=<% = CurrPath %>',500,290,window);if (TempReturnValue!='') document.form.FeaturePic.value=TempReturnValue;" class=Anbutc></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">专题栏目模板：</td>
      <td class="hback"><%call ClassTemplate("FeatureTemplate","",3) %></td>
    </tr>
    <tr>
      <td height=32 colspan="2" align="center" class="hback"><input type="submit" name="Submit" value="添 加"></td>
    </tr>
	  </form>
</tbody>
</table>
<%end sub
sub Edit()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td colspan="2" class=xingmu>修改专题栏目</td>
    </tr>
  <form name="form" action="Admin_FeatureType.asp?Action=EditSave" method="post" onSubmit="if (!Featurecheck()) return false;">
    <tr>
      <td width="21%" height=32 align="right" class="hback">专题栏目名称：</td>
      <td class="hback"><input name="FeatureName" type="text" id="FeatureName" value="<%=YWNT_TMS_FeatureName%>" size="40"></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">专题栏目英文名：</td>
      <td class="hback"><input name="FeatureNameE" type="text" id="FeatureNameE" value="<%=YWNT_TMS_FeatureNameE%>" size="40"></td>
    </tr>
	<tr>
      <td height=32 align="right" class="hback">导航图片：</td>
      <td height=32 class="hback"><input name="FeaturePic" id="FeaturePic" value='<%=YWNT_TMS_FeaturePic%>' size=30 maxlength="200"> 
	<input type="button" name="Button" value="选择图片" onClick="var TempReturnValue=OpenWindow('Dialog/SelectPic.asp?CurrPath=<% = CurrPath %>',500,290,window);if (TempReturnValue!='') document.form.FeaturePic.value=TempReturnValue;" class=Anbutc></td>
    </tr>
    <tr>
      <td height=32 align="right" class="hback">专题栏目模板：</td>
      <td class="hback"><%call ClassTemplate("FeatureTemplate",YWNT_TMS_FeatureTemplate,3) %></td>
    </tr>
    <tr>
      <td height=32 colspan="2" align="center" class="hback"><input name="classid2" type="hidden" value="<%=YWNT_TMS_ClassID%>"><input name="ID" type="hidden" value="<%=YWNT_TMS_ID%>"><input type="submit" name="Submit" value="修 改"></td>
    </tr>
  </form>
</tbody>
</table>
<%end sub
sub FeatureWith()%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td width="5%" align="center" class=xingmu>ID</td>
      <td width="57%" align="center" class=xingmu>专题栏目名称</td>
      <td width="10%" align="center" class=xingmu>专题栏目排序</td>
      <td width="20%" align="center" class=xingmu>操作</td>
    </tr>
	<%  Set Rs = server.CreateObject(YWNT_TMS_RS)
		sql="Select ID,FeatureName,FeatureWith from YWNT_TMS_FeatureClass Order by FeatureWith asc,id 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" action="Admin_FeatureType.asp?Action=FeatureWithSave" method="post"> 
    <tr>
      <td height=32 align="center" class="hback"><%= RS("ID") %></td>
      <td height=32 class="hback"><%= RS("FeatureName") %></td>
      <td height=32 align="center" class="hback"><input name="FeatureWith" type="text" value="<%= RS("FeatureWith") %>" size="5"></td>
      <td align="center" class="hback"><input name="ID" type="hidden" value="<%= RS("ID") %>"><input type="submit" name="Submit" value="修改排序"></td>
    </tr>
  </form>
	<%Rs.MoveNext
	loop
	end if
	Rs.close
	Set Rs=Nothing%>
  </tbody>
</table>
<%end sub
call connclose()%>
</BODY></HTML>
