<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="admin.model.AnnounceMod"%>
<%@page import="admin.model.AnnounceInfo"%>
<% AnnounceInfo announce = (AnnounceInfo)request.getAttribute("announce"); 
	String upok = request.getParameter("upok");
%>
<% if (announce == null) { %><% } else { %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel=stylesheet href='images/style.css' type=text/css>
<script>
document.title="Thông Báo"; 
document.getElementById("titleMod").innerHTML = "Thông Báo";
</script>
<title>Thong Bao</title>
</head>
<body>
<br><p><br>
<% if (upok != null) {%>
<div align="Center" style="border:1px solid #cfcfcf;padding:10px 10px 10px 10px;background-color:#f3f3f3; width:499px ">
<b>Đã cập nhật</b>
</div><br>
<% } %>
   
	<form method="post" action="../Announce">
	
	<% if (new AnnounceMod().recordsan() == 0) { %>
	<input type="hidden" name="rep" value="create"/> <% } else { %>
	<input type="hidden" name="rep" value="update"/> <% } %>
	<table>
	<tr><td><textarea class="UniXT" name="content" rows="25" cols="100"><%= announce.getContent() %></textarea></td></tr>
	<tr><Td>
	<i><font color="#828282">Chấp nhận HTML Code</font></i><Br>
	<i><font color="#828282">Lần cập nhật trước: <%= announce.getDate() %></font></i><Br>
	</Td></tr>
	<tr><td><Br>
	<input class="UniXT" type="submit"  value="Cập nhật"/>
	</td></tr>
	</table>
	</form>
	<br><Br><p>
<% } %>
</body>
</html>