
<%
/************************************************************@@
  * Program Name	: tot_reports_excel.jsp
  * Description		: /집계자/내문서함/등록함/문서 등록
  * Author			: 기현테크
  * Create Date		: 2010.11.24
  * History			:
@@************************************************************/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"
	import="java.net.URLEncoder" import="java.net.URLDecoder"
	import="kr.co.kihyun.beans.user.HttpSSOLogin" import="java.util.*"
	import="java.io.StringReader"
	import="javax.swing.text.html.parser.ParserDelegator"
	import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.util.Stopwatch"
	import="kr.co.kihyun.text.html.TagFilter"
	import="kr.co.kihyun.text.html.ServletUtil"
	import="kr.co.kihyun.text.html.CallbackHandler"
	import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.moumi.doc.MDoc"
	import="kr.co.kihyun.moumi.doc.table.MTable"
	import="kr.co.kihyun.moumi.doc.table.TableDefine"
	import="kr.co.kihyun.moumi.doc.table.TableCreation"
	import="kr.co.kihyun.moumi.doc.table.item.MItem"
	import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MString"%>

<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>

<%
try{
	/********** session내의 userId **********/
	String usID = HttpSSOLogin.getLoginID(request);

	/********** parameter **********/
	String docID = clearXSS(MString.checkNull(request.getParameter("docID")),"");
	String partID = clearXSS(request.getParameter("partID"),""); 
	int gradeCode = MInteger.parseInt(request.getParameter("gradeCode"), -1); 
	int tableNum = MInteger.parseInt(request.getParameter("tableNum"), 0);
	int searchType = MInteger.parseInt(request.getParameter("searchType"), -1);
	String displaySummary = MString.checkNull(request.getParameter("displaySummary"));

        //String docName=URLDecoder.decode(request.getParameter("docName"),"UTF-8");
        //String docName=request.getParameter("docName");
        //String docName=URLEncoder.encode(request.getParameter("docName"),"UTF-8");
        String docName=URLDecoder.decode(request.getParameter("docName"));

	//response.setHeader("Accept-Ranges", "bytes");
	//response.setHeader("Content-Disposition","attachment; filename="+request.getParameter("docName").replaceAll(":","_").replace("+", "%20") +".xls;");
        //LJH
        //response.setHeader("Content-Disposition","attachment; filename="+request.getParameter("docName").replaceAll(":","_").replace("+", " ") +".xls;");
        
        //response.setHeader("Content-Disposition","attachment; filename="+docName.replaceAll(":","_").replace("+", " ") +".xls;");
        response.setHeader("Content-Disposition","attachment; filename="+docName.replaceAll(":","_").replace("+", " ") +".hwp;");
	
	%>
<html xmlns:o="urn:schemas-microsoft-com:office:office"
	xmlns:x="urn:schemas-microsoft-com:office:excel"
	xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type"
	content="text/html; charset=UTF-8">
<meta name="ProgId" content="Excel.Sheet">
<meta name="Generator" content="Microsoft Excel 10">
</head>
<body style=''>
<!------------------------------- form config start ------------------------------->
<jsp:include page="./total_reports_hwp_save.jsp" flush="true">
	<jsp:param name="docID" value="<%= docID %>" />
	<jsp:param name="partID" value="<%= partID %>" />
	<jsp:param name="gradeCode" value="<%= gradeCode %>" />
	<jsp:param name="tableNum" value="<%= tableNum %>" />
	<jsp:param name="searchType" value="<%= searchType %>" />
	<jsp:param name="displaySummary" value="<%= displaySummary %>" />
</jsp:include>
</body>
</html>
<%
}catch(Exception ex){ex.printStackTrace();
	out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';"));
}finally{
}
%>
