<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<% String filen = (String)request.getParameter("filen"); 
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Upload Ảnh</title>
<link rel=stylesheet href="../images/style.css" type=text/css>
<link rel=stylesheet href="images/AjaxForm.css" type=text/css>
<link rel="stylesheet" href="images/uniform.default.css" type="text/css" media="screen">
<style>
div{
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  border-radius: 6px;
}
</style>
<script type="text/javascript" src="js/Upload.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script src="js/jquery.uniform.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
      $(function(){
        $(".UniXT").uniform();
      });
    </script>
</head>

<body>
<br><p>
<center>
<% if (filen != null){
	%> 
	<br>
<div align="Center" style="border:1px solid #cfcfcf;padding:20px 10px 20px 10px;background-color:#f3f3f3; width:250px ">Đường dẫn của hình ảnh là <Br>
<b><a onclick="window.opener.document.form.image.value = 'img/<%= filen %>'; window.self.close();" href="#">img/<%= filen %></a></b> 
</div>	
<% } else { %>
<br>
<div style="border:1px solid #cfcfcf;padding:20px 10px 20px 10px;background-color:#f3f3f3; width:210px ">
<form enctype="multipart/form-data" action="../Upload" method="post" onsubmit="return validateFileExtension(this.fileUpload);">
<table><Tr><td>
<input class="UniXT" name="fileUpload" id="filename" type="file" size="20" onchange="return validateFileExtension(this)" /></td></Tr>
<Tr><td align="left"><input type="submit" class="UniXT" value="Upload" /></td></Tr>
</table>
</form>
</div>
<% } %>
</center>
</body>
</html>