<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% 
String user = (String) session.getAttribute("user");
%>
<% if (user == null) { response.sendRedirect("login.jsp");} else {
user = user.toLowerCase();
if (!user.equals("admin")){
	response.sendRedirect("permission.jsp");
}
else {
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mods</title>
<link rel=stylesheet href="images/stylehome.css" type=text/css>
<Script>
function logout(){
if(confirm('Bạn Thực Sự Muốn Đăng Xuất?'))
{return true;}
else {return false;}
}
</script>
</head>
<body>
<div class="content">
<ul id="root" class="menu">

		 <li>
            <span class='product'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            <a href='../Announce?rep=edit'>Thông Báo</a>
        </li>
		<li>
            <span class='product'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            <a href='../Bill?rep=view'>Hóa Đơn</a>
        </li>

		        <li>
        	<span style='cursor: hand;' childid = 'c_1' class='cat_close category'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
        	<a href='../ProductController?rep=showAll'>Sản Phẩm</a>
        </li>
        <ul id='c_1'>
        	<li>
            	<span class='product'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            	<a href='index.jsp?main=createpd'>Thêm Sản Phẩm</a>
            </li>
                    	<li>
            	<span class='product'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            	<a href='../ProductController?rep=showpdso'>Sản Phẩm Hết Hàng</a>
            </li>

        	<li>
            	<span class='product'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            	<a href='index.jsp?main=viewpd-ID'>Tìm Sản Phẩm</a>
            </li>
       	</ul>		
       					<li>
            <span class='product'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            <a href='../AUser?rep=view'>Khách Hàng</a>
        </li>
				<li>
            <span class='product'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            <a href='index.jsp?main=viewCM'>Comment</a>
        </li>
		
		<li>
        	<span style='cursor: hand;'  childid = 'c_2' class='cat_close category'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
        	<a href='../Support?rep=viewall'>Hỗ Trợ Online</a>
        </li>
        <ul id='c_2'>
        	<li>
            	<span class='product'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            	<a href='index.jsp?main=createsupport'>Thêm Hỗ Trợ</a>
            </li>		
</ul>


<li>
        	<span style='cursor: hand;'  childid = 'c_3' class='cat_close category'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
        	<font color="blue"><b>Tài Khoản</b></font>
        </li>
        <ul id='c_3'>
        	<li>
            	<span class='product'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            	<a class="admin" href='index.jsp?main=changepw'>Đổi Mật Khẩu</a>
            </li>
            <li>
            
            	<span class='product'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
            	<a class="admin" href='../AUser?rep=logout' class="admin" onclick="return logout();">Đăng Xuất</a>
            </li>
		
</ul>


   </ul>   
</div>
</body>
<% }} %>
</html>
