<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='../Editor/language/schi/editor_lang.js'></script>
<script language=JavaScript src='../Editor/editor.js'></script>
<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" -->
<%
'===================================================================================================================
'软件名称：云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ：489234,2813712
'程序版权：云网互动科技有限公司
'程序开发：云网互动科技有限公司
'官方网站：http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================
Call CheckLogin("Notice")%>
<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_Notice.asp">公告管理首页</a> | <a href="Admin_Notice.asp?Action=Add">添加公告</a> | <a href="Admin_Notice.asp?NoticeTypeS=0">常规公告</a> | <a href="Admin_Notice.asp?NoticeTypeS=1">顶部公告</a></TD>
    </TR>
  </TBODY>
</TABLE>
<%
  function NoticeTypeW(NType)
  Select Case NType
  case 1
  Response.Write"顶部公告"
  case 0
  Response.Write"常规公告"
  end Select
  end function
Select Case Request("Action")
		Case "EditSave"
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Notice where ID="&NoSqlHack(Request.Form("ID"))
		Rs.open sql,Conn,1,3
		RS("NoticeTitle")=NoSqlHack(Request.Form("NoticeTitle"))
		RS("NoticeType")=NoSqlHack(Request.Form("NoticeType"))
		RS("NoticeContent")=NoSqlHack(Request.Form("Content"))
		RS("NoticeColor")=NoSqlHack(Request.Form("NoticeColor"))
		RS("NoticeStrong")=NoSqlHack(Request.Form("NoticeStrong"))
		RS("NoticeEm")=NoSqlHack(Request.Form("NoticeEm"))
		RS("NoticeDate")=Now()
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("修改公告"&Request.Form("NoticeTitle"),1)
		call Admin_ShowErr("<li>公告修改成功！</li>","Admin_Notice.asp",1)
		Case "AddSave"
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Notice"
		Rs.open sql,Conn,1,3
		Rs.addnew
		RS("NoticeTitle")=NoSqlHack(Request.Form("NoticeTitle"))
		RS("NoticeType")=NoSqlHack(Request.Form("NoticeType"))
		RS("NoticeContent")=NoSqlHack(Request.Form("Content"))
		RS("NoticeColor")=NoSqlHack(Request.Form("NoticeColor"))
		RS("NoticeStrong")=NoSqlHack(Request.Form("NoticeStrong"))
		RS("NoticeEm")=NoSqlHack(Request.Form("NoticeEm"))
		RS("NoticeDate")=Now()
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		Call AddLog("添加公告"&Request.Form("NoticeTitle"),1)
		call Admin_ShowErr("<li>公告添加成功！</li>","Admin_Notice.asp",1)
		Case "Del"
		conn.execute "delete from YWNT_TMS_Notice WHERE ID="&NoSqlHack(Request("ID"))
		Call AddLog("删除公告",1)
		call Admin_ShowErr("<li>公告删除成功！</li>","Admin_Notice.asp",1)
		Case "Add"%>
<TABLE class=table cellSpacing=1 cellPadding=3 width="98%" align=center border=0>
 <form name="form" action="Admin_Notice.asp?Action=AddSave" method="post">
  <TBODY>
    <TR>
      <TD colspan="2" class=xingmu>添加公告</TD>
    </TR>
    <TR>
      <TD width="21%" height=32 align="right" class="hback">公告标题：</TD>
      <TD width="79%" class="hback"><input name="NoticeTitle" type="text" size="40"><input name="NoticeColor" type="hidden" value="">
<img src="../Editor/icons/btColor.gif" width="16" height="15" class="overBorder" onClick='p=showModalDialog("../Editor/SelectColor.asp",window,"center:yes;dialogHeight:251px;dialogWidth:300px;help:no;status:no");if(p!=null){this.style.backgroundColor=NoticeColor.value=p.split("*")[0]}else{this.style.backgroundColor=""}'>
<INPUT id="NoticeStrong" type="checkbox" value="1" name="NoticeStrong">
粗体
<INPUT id="NoticeEm" type="checkbox" value="1" name="NoticeEm">
斜体</TD>
    </TR>
    <TR>
      <TD height=32 align="right" class="hback">公告类型：</TD>
      <TD class="hback"><select name="NoticeType">
        <option value="0">常规公告&nbsp; &nbsp;</option>
        <option value="1">顶部公告&nbsp; &nbsp;</option>
      </select>
      </TD>
    </TR>
    <TR>
      <TD height=32 align="right" class="hback">公告内容：</TD>
      <TD class="hback">
	  <script>
		var oEdit1 = new InnovaEditor("oEdit1");
		oEdit1.arrStyle = [["BODY",false,"","font:12px verdana,arial,sans-serif;"]];
		oEdit1.height=400;
		oEdit1.features=["StyleAndFormatting",
			"TextFormatting","ListFormatting","BoxFormatting",
			"ParagraphFormatting","CssText","Styles",
			"Cut","Copy","Paste","|","Undo","Redo","|",
			"Bold","Italic","Underline","|",
			"JustifyLeft","JustifyCenter","JustifyRight","JustifyFull","|",
			"Numbering","Bullets","Indent","Outdent","|",
			"ForeColor","Hyperlink","Clean"];
		oEdit1.RENDER("");
	</script>
	<input type="hidden" name="Content"  id="Content" value=""></TD>
    </TR>
    <TR align="center">
      <TD height=32 colspan="2" class="hback"><input type="button" name="Submit" value="提 交" onClick="SubmitFun();">
        <input type="reset" name="reset" value="重 置"></TD>
    </TR>
  </TBODY>
  </form>
</TABLE>
  <%Case "Edit"
  Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Notice where ID="&NoSqlHack(Request("ID"))
		Rs.open sql,Conn,1,1
		ID=RS("ID")
		NoticeTitle=RS("NoticeTitle")
		NoticeType=RS("NoticeType")
		Content=RS("NoticeContent")
		NoticeColor=RS("NoticeColor")
		NoticeStrong=RS("NoticeStrong")
		NoticeEm=RS("NoticeEm")
		Rs.Close
		Set Rs = Nothing%>
  <TABLE class=table cellSpacing=1 cellPadding=3 width="98%" align=center border=0>
 <form name="form" action="Admin_Notice.asp?Action=EditSave" method="post">
 <input name="ID" type="hidden" value="<%=ID%>">
  <TBODY>
    <TR>
      <TD colspan="2" class=xingmu>修改公告</TD>
    </TR>
    <TR>
      <TD width="21%" height=32 align="right" class="hback">公告标题：</TD>
      <TD width="79%" class="hback"><input name="NoticeTitle" type="text" value="<%=NoticeTitle%>" size="40">
      <input name="NoticeColor" type="hidden" value="<%=NoticeColor%>">
<img src="../Editor/icons/btColor.gif" width="16" height="15" class="overBorder" style="background-color:<%=NoticeColor%>;" onClick='p=showModalDialog("../Editor/SelectColor.asp",window,"center:yes;dialogHeight:251px;dialogWidth:300px;help:no;status:no");if(p!=null){this.style.backgroundColor=NoticeColor.value=p.split("*")[0]}else{this.style.backgroundColor=""}'>
<INPUT name="NoticeStrong" type="checkbox" id="NoticeStrong" value="1" <%if NoticeStrong=1 then Response.Write("checked")%>>
粗体
<INPUT id="NoticeEm" type="checkbox" value="1" name="NoticeEm" <%if NoticeEm=1 then Response.Write("checked")%>>
斜体</TD>
    </TR>
    <TR>
      <TD height=32 align="right" class="hback">公告类型：</TD>
      <TD class="hback"><select name="NoticeType">
        <option value="0" <%if NoticeType=0 then Response.Write("selected")%>>常规公告&nbsp; &nbsp;</option>
        <option value="1" <%if NoticeType=1 then Response.Write("selected")%>>顶部公告&nbsp; &nbsp;</option>
      </select>
      </TD>
    </TR>
    <TR>
      <TD height=32 align="right" class="hback">公告内容：</TD>
      <TD class="hback"><pre id="idTemporary" name="idTemporary" style="display:none"><%if Content<>"" then Response.Write Server.HTMLEncode(Content)%></pre>
	  <script>
		var oEdit1 = new InnovaEditor("oEdit1");
		oEdit1.arrStyle = [["BODY",false,"","font:12px verdana,arial,sans-serif;"]];
		oEdit1.height=400;
		oEdit1.features=["StyleAndFormatting",
			"TextFormatting","ListFormatting","BoxFormatting",
			"ParagraphFormatting","CssText","Styles",
			"Cut","Copy","Paste","|","Undo","Redo","|",
			"Bold","Italic","Underline","|",
			"JustifyLeft","JustifyCenter","JustifyRight","JustifyFull","|",
			"Numbering","Bullets","Indent","Outdent","|",
			"ForeColor","Hyperlink","Clean"];
		oEdit1.RENDER(document.getElementById("idTemporary").innerHTML);
	</script>
	<input type="hidden" name="Content"  id="Content" value=""></TD>
    </TR>
    <TR align="center">
      <TD height=32 colspan="2" class="hback"><input type="button" name="Submit" value="提 交" onClick="SubmitFun();">
        <input type="reset" name="reset" value="重 置"></TD>
    </TR>
  </TBODY>
  </form>
</TABLE>
  <%Case Else
  	Dim int_RPP
	int_RPP=GetConfig("PageNumber") '设置每页显示数目%>
<TABLE class=table cellSpacing=1 cellPadding=3 width="98%" align=center border=0>
  <TBODY>
  <TR>
    <TD align="center" class=xingmu>公告标题</TD>
    <TD width="17%" align="center" class=xingmu>公告类型</TD>
    <TD width="17%" align="center" class=xingmu>添加日期</TD>
    <TD width="18%" align="center" class=xingmu>操作</TD>
  </TR>
<%	Set Rs = server.CreateObject(YWNT_TMS_RS)
			sql="Select ID,NoticeTitle,NoticeType,NoticeDate,NoticeColor,NoticeStrong,NoticeEm from YWNT_TMS_Notice "
		if Request.QueryString("NoticeTypeS")<>"" then
			sql=sql&"where NoticeType="&NoSqlHack(Request.QueryString("NoticeTypeS"))&" Order by ID desc"
		else
			sql=sql&"Order by ID desc"
		end if
	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 
	 NoticeTitle=Rs("NoticeTitle")
	 IF Rs("NoticeStrong")<>"" Then
	 NoticeTitle="<strong>"& NoticeTitle &"</strong>"
	 End If
	 IF Rs("NoticeEm")<>"" Then
	 NoticeTitle = "<em>"&NoticeTitle&"</em>"
	 End if
	 IF Rs("NoticeColor")<>"" Then
	 NoticeTitle = "<font color="""&Rs("NoticeColor")&""">"&NoticeTitle&"</font>"
	 End If%> 
  <TR>
    <TD width="49%" height=32 class="hback"><%= NoticeTitle %></TD>
    <TD width="17%" align="center" class="hback"><%call NoticeTypeW(Rs("NoticeType"))%></TD>
    <TD width="17%" align="center" class="hback"><%= Rs("NoticeDate") %></TD>
    <TD width="18%" align="center" class="hback"><A href="Admin_Notice.asp?Action=Edit&ID=<%=RS("ID")%>">修改</A>｜<A href="Admin_Notice.asp?Action=Del&ID=<%=RS("ID")%>">删除</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>
<%End Select
call connclose()%>
</BODY></HTML>
