<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<link rel="stylesheet" type="text/css" id="css" href="<%=CurrentSkinPath%>style.css" />
<script type="text/javascript" language="javascript"  src="templates/<%=CurrentTemplateName%>/scripts/common.js"></script>

<!-- {if (base.user.IsMaster)} -->
<div class="mainbox">
	<div class="menu">
	<a href="announcements.aspx" target="_self">发布公告</a> | <a href="announcements.aspx?action=list" target="_self">
			管理公告</a> |<a href="announcements.aspx?action=viewall">公告列表</a>
	</div>
</div>
<!-- {endif} -->
<br />
<!-- {if (action==""||action=="add")} -->
<form action="" method="post" ID="Form1">
	<table class="tablebox tableborder" style="font-size:12px;padding-right:5px;padding-top: 5px; text-align: left; " cellspacing="0" cellpadding="0" border="0">
		<tr>
			<th colspan="2">
				发布论坛公告</th>
		</tr>
		<tr align="left">
			<td width="29%" height="25">用户名</td>
			<td>
				<input readonly value="<%=user.Name%>" name="username" size="20"> <input type="hidden" name="name" id="name" value="<%=user.Name%>">
				<input type="hidden" value="<%=action%>" name="action" id="action">
			</td>
		</tr>
		<tr align="left">
			<td>版 面</td>
			<td>
				<select id="BoardJumpList" name="BoardJumpList">
					<option value="0">论坛首页</option> 
					<!--#include file="_board_jump_list.html"-->
				</select>
				&nbsp;&nbsp;您只能在您管理的版面发布公告</td>
		</tr>
		<tr align="left">
			<td>背景乐</b></td>
			<td><input size="60" onFocus="IEvent('focus',this);"	onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" name="bgs" id="bgs">&nbsp;支持MID或WAV文件，此项非必填。</td>
		</tr>
		<tr align="left">
			<td>标 题</td>
			<td><input size="60" onFocus="IEvent('focus',this);"	onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" name="title" id="title"></td>
		</tr>
		<tr align="left">
			<td>内 容</b></td>
			<td><textarea onFocus="IEvent('focus',this);"	onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" name="content" id="content" rows="8" wrap="VIRTUAL" cols="60"></textarea></td>
		</tr>
		<tr>
			<td class="tablebody2" align="center" colSpan="2">
			<input type="submit" onMousemove="this.className='button_on';"
onMouseout="this.className='button_off'" class="button_off" value="发 布" name="addnews" id="addnews" /></td>
		</tr>
	</table>
</form>
<!--{endif}-->
<!--{if (action=="list")}-->
	<form action="" method="post" ID="Form2">
		<table class="tablebox tableborder"  style="font-size:12px;padding-right:5px;padding-top: 5px; text-align: left; " cellspacing="0" cellpadding="0" border="0">
			<tr>
				<th colspan="4">管理论坛公告</th>
			</tr>
			<tr align="center" style="background:#F3F6FA;">
				<td width="40" >删除</td>
				<td>标题</td>
				<td width="70">作者</td>
				<td width="170">日期</td>
			</tr>
			</tr> 
			<!-- <%
			System.Data.DataTable dt = list.Tables.Count>0?list.Tables[0]:new System.Data.DataTable();
			int	c = dt.Rows.Count, i=0;
				for(;i<dt.Rows.Count;i++) 
				{				
					tpl_StringBuilder.Append("<tr align=\"center\">");
					tpl_StringBuilder.Append("<td>");
					tpl_StringBuilder.Append("<input type='checkbox' name='chkbox' id='chkbox' value='"+ dt.Rows[i]["id"].ToString() +"' class='checkbox' />");
					tpl_StringBuilder.Append("</td>");
					tpl_StringBuilder.Append("<td  align=\"left\">");
					tpl_StringBuilder.Append("<a href=\"announcements.aspx?action=edit&amp;newid=" + dt.Rows[i]["id"].ToString());
					tpl_StringBuilder.Append("\">");
					tpl_StringBuilder.Append(dt.Rows[i]["title"].ToString());
					tpl_StringBuilder.Append("</a>");
					tpl_StringBuilder.Append("</td>");
					tpl_StringBuilder.Append("<td width=\"70\">");
					tpl_StringBuilder.Append(dt.Rows[i]["username"].ToString());
					tpl_StringBuilder.Append("</td>");
					tpl_StringBuilder.Append("<td width=\"170\">");
					tpl_StringBuilder.Append(dt.Rows[i]["addtime"].ToString());
					tpl_StringBuilder.Append("</td>");
					tpl_StringBuilder.Append("</tr>");
				}
				if(i == 0){
					tpl_StringBuilder.Append("<tr id=\"norecord\"><td colspan=\"5\" height=\"40\" class=\"row_no\" align=\"center\">没有搜索到符合条件的记录，点击这里<a href=\"javascript:history.back()\">返回前页</a>。</td></tr>");
				}
			%> -->
			<tr align="center">
				<td colspan="8">
			    	<input name="submit" type="submit" onMousemove="this.className='button_on';"
onMouseout="this.className='button_off'" class="button_off" value="更新列表" id="dellist" name="dellist" />
				</td>
			</tr>
		</table>
	</form>

<!--{endif}-->
<!-- {if (action=="edit")} -->

<div class="toptable">
	<form action="" method="post" ID="Form3">
		<table class="tablebox tableborder" style="font-size:12px;padding-right:5px;padding-top: 5px; text-align: left; " cellspacing="0" cellpadding="0" border="0" ID="Table1">
			<tr>
				<th colspan="2">编辑论坛公告</th>
			</tr>
			<tr align="left">
				<td width="29%" height="25">用户名</td>
				<td>
				<input disabled value="<%=name%>" name="username" size="20" ID="Text2"> <input type="hidden" name="name" id="Hidden1" value="<%=name%>">
					<input type="hidden" value="<%=action%>" name="action" id="Hidden2">
				</td>
			</tr>
			<tr align="left">
				<td>版 面</td>
				<td>
				<select id="Select1" name="BoardJumpList">
				<option value="0">论坛首页</option> 
				<!--#include file="_board_jump_list.html"-->
				</select>
					&nbsp;&nbsp;您只能在您管理的版面发布公告
				</td>
			</tr>
			<tr align="left">
				<td>背景乐</td>
				<td><input size="60" name="bgs" onFocus="IEvent('focus',this);"	onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" id="Text3" value="<%=bgs%>">&nbsp;支持MID或WAV文件，此项非必填。</td>
			</tr>
			<tr align="left">
				<td>标 题</td>
				<td><input size="60" onFocus="IEvent('focus',this);"	onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" name="title" id="Text4" value="<%=title%>"></td>
			</tr>
			<tr align="left">
				<td>内 容</td>
				<td><textarea onFocus="IEvent('focus',this);"	onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" name="content" id="Textarea1" rows="8" wrap="VIRTUAL" cols="60"><%=Server.HtmlEncode(content)%></textarea></td>
			</tr>
			<tr>
				<td vAlign="center" align="middle" colSpan="2">
				<input type="submit" onMousemove="this.className='button_on';" onMouseout="this.className='button_off'" class="button_off" value="修 改" name="savenews" id="savenews" /></td>
			</tr>
		</table>
	</form>
	<script language="javascript">
		var dvbid = document.getElementById("BoardJumpList");
		var dvl = dvbid.length;
		for(var i=0;i<dvl;i++){
			if(dvbid.options[i].value=='<%=BoardJumpList%>'){
				dvbid.options[i].selected=true;
				break;
			}
		}
	</script>
	<!-- {endif} -->
	<!-- {if(action=="showone")}-->

		<table class="tablebox tableborder" style="font-size:12px;padding-right:5px;padding-top: 5px; text-align: left; margin-left:auto; margin-right:auto; " cellspacing="0" cellpadding="0" border="0" ID="Table2">
			<tr>
				<th style="text-align:center"><%=title%></th>
			</tr>
			<tr>
				<td class="thematic" align="center"><B>发布人</B>：<%=name.ToString().Trim()%>&nbsp;&nbsp;&nbsp;&nbsp;<B>发布时间</B>：<%=addtime.ToString()%>&nbsp;<%=bgs.ToString()%></td>
			</tr>
			<tr>
				<td style="line-height:25px;padding:10px;"><%=content%></td>
			</tr>			
		</table>
	<!-- {endif} -->
	<!--{if(action=="viewall")}-->
	   <table class="tablebox tableborder"  cellpadding="0" cellspacing="0">
	    <tr>
	      <th>论坛公告列表</th>
	    </tr>
	   </table>
	   <!--{foreach(DataRow dr in GetAnnouncesList())}-->
	      <table class="tablebox tableborder" style="font-size:12px;text-align: left; " cellpadding="0" cellspacing="0">
	        <tr>
	          <th colspan="2" style="text-align:center;"><%=dr["title"]%></th>
	        </tr>
	        <tr>
	          <td colspan="2"><%=dr["content"]%></td>
	        </tr>
	        <tr style="text-align:center">
	          <th colspan="2" style="text-align:center;">
	          发布者:<%=dr["username"]%>
	          &nbsp;&nbsp;&nbsp;&nbsp;
	             发布时间:<%=dr["addtime"]%>
	          </th>
	        </tr>
	      </table>
	      <br />
	   <!--{endforeach}-->
	   
	<!--#include file="_footer.html"-->
	<!--{endif}-->
	</body>
	</html>
