package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import java.util.*;
import java.sql.*;
import org.apache.log4j.Category;
import jp.co.sint.database.*;
import jp.co.sint.basic.*;
import jp.co.sint.tools.*;
import jp.co.sint.config.*;
import jp.co.sint.beans.front.*;
import jp.co.sint.beans.mallmgr.*;
import jp.co.sint.bscvsmdk.*;

public class receipt_print3_jsp extends HttpJspBase {


  private static java.util.Vector _jspx_includes;

  static {
    _jspx_includes = new java.util.Vector(1);
    _jspx_includes.add("/other/../include/chk_userinfo_inc.jsp");
  }

  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_response_sendRedirect;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_response_encodeRedirectUrl;

  public receipt_print3_jsp() {
    _jspx_tagPool_response_sendRedirect = new org.apache.jasper.runtime.TagHandlerPool();
    _jspx_tagPool_response_encodeRedirectUrl = new org.apache.jasper.runtime.TagHandlerPool();
  }

  public java.util.List getIncludes() {
    return _jspx_includes;
  }

  public void _jspDestroy() {
    _jspx_tagPool_response_sendRedirect.release();
    _jspx_tagPool_response_encodeRedirectUrl.release();
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=MS932");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			"../util/error.jsp", true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");

/**
 * Copyright (c) 2003-2012 System Integrator Corporation. & Beautygarage Inc.
 *                 All Rights Reserved.
 * @version $Id : receipt_print3.jsp,v 1.0 2012/04/24 Exp $
 * @author      : Naotaka Ohsugi
 * @Description : 領収書印刷３
 * @History
 * Author        Date        Reason
 * ============  ==========  ===========================
 * Naotaka       2012/04/24  Original
 */

      out.write("\r\n");
/**タグのセクション*/
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
/**エラー遷移先の定義のセクション*/
      out.write("\r\n");
      out.write("\r\n");
/**クラスのインポートのセクション*/
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
/**ユーザーログイン情報のチェックのセクション*/
      out.write("\r\n");

/**
 * Copyright (c) 2003-2004 System Integrator Corporation.
 *                 All Rights Reserved.
 * @version $Id : include/chk_userinfo_inc.jsp,v 1.0 2003/10/07 Exp $
 * @author      : Jinwang Chen
 * @Description : フロント側に、ユーザーがログイン情報を確認します。
 * @History
 * Author         Date        Reason
 * ============   ==========  ===========================
 * J.W.Chen       2003/07/28  Original
 */

      out.write("\r\n");
      out.write("\r\n\r\n");
SIUserInfo lUserInfo=SIHTMLUtil.getUserInfo(request);
      out.write("\r\n");
if (lUserInfo.isNotLogin(request) && !SIConfig.SIWEBSHOP_DEVELOPING){
      out.write("\r\n  ");
      /* ----  response:sendRedirect ---- */
      org.apache.taglibs.response.SendRedirectTag _jspx_th_response_sendRedirect_0 = (org.apache.taglibs.response.SendRedirectTag) _jspx_tagPool_response_sendRedirect.get(org.apache.taglibs.response.SendRedirectTag.class);
      _jspx_th_response_sendRedirect_0.setPageContext(pageContext);
      _jspx_th_response_sendRedirect_0.setParent(null);
      int _jspx_eval_response_sendRedirect_0 = _jspx_th_response_sendRedirect_0.doStartTag();
      if (_jspx_eval_response_sendRedirect_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        if (_jspx_eval_response_sendRedirect_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
          out = _bc;
          _jspx_th_response_sendRedirect_0.setBodyContent(_bc);
          _jspx_th_response_sendRedirect_0.doInitBody();
        }
        do {
          out.write("\r\n    ");
          /* ----  response:encodeRedirectUrl ---- */
          org.apache.taglibs.response.EncodeRedirectURLTag _jspx_th_response_encodeRedirectUrl_0 = (org.apache.taglibs.response.EncodeRedirectURLTag) _jspx_tagPool_response_encodeRedirectUrl.get(org.apache.taglibs.response.EncodeRedirectURLTag.class);
          _jspx_th_response_encodeRedirectUrl_0.setPageContext(pageContext);
          _jspx_th_response_encodeRedirectUrl_0.setParent(_jspx_th_response_sendRedirect_0);
          int _jspx_eval_response_encodeRedirectUrl_0 = _jspx_th_response_encodeRedirectUrl_0.doStartTag();
          if (_jspx_eval_response_encodeRedirectUrl_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            if (_jspx_eval_response_encodeRedirectUrl_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
              javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
              out = _bc;
              _jspx_th_response_encodeRedirectUrl_0.setBodyContent(_bc);
              _jspx_th_response_encodeRedirectUrl_0.doInitBody();
            }
            do {
              out.print(SIURLMap.getUrl(request,"webshop.jsp.front.user.login"));
              int evalDoAfterBody = _jspx_th_response_encodeRedirectUrl_0.doAfterBody();
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                break;
            } while (true);
            if (_jspx_eval_response_encodeRedirectUrl_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
              out = pageContext.popBody();
          }
          if (_jspx_th_response_encodeRedirectUrl_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
            return;
          _jspx_tagPool_response_encodeRedirectUrl.reuse(_jspx_th_response_encodeRedirectUrl_0);
          out.write("\r\n  ");
          int evalDoAfterBody = _jspx_th_response_sendRedirect_0.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
        if (_jspx_eval_response_sendRedirect_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
          out = pageContext.popBody();
      }
      if (_jspx_th_response_sendRedirect_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
        return;
      _jspx_tagPool_response_sendRedirect.reuse(_jspx_th_response_sendRedirect_0);
      out.write("\r\n");
}
      out.write("\r\n");
      out.write("\r\n");

//ログ用のインスタンスの生成(common)
Category log=Category.getInstance(SIConfig.SILOG4J_WEBSHOP_CATEGORY_NAME);
//本画面に関わるbeansのデータ
UIRegOrder regOrderID=(UIRegOrder)session.getAttribute(SIConfig.SISESSION_ORDER_DETAIL_NAME);
if (regOrderID==null)regOrderID=new UIRegOrder();

//データベースへのコネンクション(common)
SIDatabaseConnection databaseConnection=new SIDatabaseConnection();try{
Connection connection=databaseConnection.getConnection();

//各サイトの設定(common)
String webshopSite=SIHTMLUtil.getRootPath(request);
String receipt1=SIURLMap.getHttpsUrl(request,"webshop.jsp.front.receipt1");

      out.write("\r\n");
      out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");
      out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"ja\" lang=\"ja\">\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=Shift_JIS\" />\r\n");
      out.write("<title>領収書 - 理美容器具・エステ機器・美容用品の卸販売 BEAUTY GARAGE");
      out.write("</title>\r\n");
      out.write("<meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\r\n");
      out.write("<meta http-equiv=\"Content-Script-Type\" content=\"text/javascript\" />\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(webshopSite);
      out.write("/css/import.css\" media=\"screen,print\" />\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(webshopSite);
      out.write("/css/receipt_print.css\" media=\"screen,print\" />\r\n");
      out.write("<script type=\"text/javascript\">\r\n");
      out.write("<!--\r\nfunction receipt(order_id) {\r\n  var url = \"_receipt_print\" + order_id;\r\n  window.open(url,'receipt','width=740,height=600,top=20,left=20,menubar=0,toolbar=0,status=1,scrollbars=1,resizable=1');\r\n  window.close();\r\n}\r\n// -->\r\n");
      out.write("</script>\r\n");
      out.write("</head>\r\n");
      out.write("<body id=\"print_receipt\">\r\n");
      out.write("<div id=\"container_winReceipt\">\r\n");
      out.write("<div id=\"container_main\">\r\n");
      out.write("<h3>領収書の発行");
      out.write("</h3>");
      out.write("<br />\r\n");
      out.write("<h4>");
      out.write("<span>領収書に記載する情報の設定");
      out.write("</span>");
      out.write("</h4>\r\n");
      out.write("<div class=\"nomalPara_txt2\">\r\n");
      out.write("<br />\r\nご注文番号&nbsp;:&nbsp;");
      out.print(regOrderID.getOrderCode());
      out.write("&nbsp;の領収書情報の設定を完了しました。");
      out.write("<br />\r\n");
      out.write("<br />\r\n以下の「領収書発行」ボタンから、領収書の印刷画面を開くことができます。\r\n");
      out.write("</div>\r\n");
      out.write("<div class=\"btnbox\">\r\n");
      out.write("<a href=\"");
      out.print(receipt1);
      out.write("\">");
      out.write("<img src=\"");
      out.print(webshopSite);
      out.write("/img/btn_receipt_l.gif\" width=\"145\" height=\"24\" alt=\"領収書発行\" />");
      out.write("</a>\r\n");
      out.write("</div>\r\n");
      out.write("</div>");
      out.write("<!-- end of container_main -->\r\n");
      out.write("</div>");
      out.write("<!-- end of container -->\r\n");
      out.write("</div>");
      out.write("<!-- end of border -->\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");

}catch(Exception e){
  e.printStackTrace();
  throw new ServletException();
}finally{
  databaseConnection.close();
}

    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0)
        out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
}
