package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import java.sql.*;
import jp.co.sint.basic.*;
import jp.co.sint.database.*;
import jp.co.sint.tools.*;

public class disclosure_inc_jsp extends HttpJspBase {


  private static java.util.Vector _jspx_includes;

  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_webshop_siiterator_type_id_collection;

  public disclosure_inc_jsp() {
    _jspx_tagPool_webshop_siiterator_type_id_collection = new org.apache.jasper.runtime.TagHandlerPool();
  }

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

  public void _jspDestroy() {
    _jspx_tagPool_webshop_siiterator_type_id_collection.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,
      			null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

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

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

//各サイトの設定(common)
String webshopSite=SIHTMLUtil.getRootPath(request);

      out.write("\r\n");
      out.write("<h2>");
      out.write("<img src=\"");
      out.print(webshopSite);
      out.write("/img/h_r_rtorder.gif\" alt=\"現在のご注文状況（最新100件）\" width=\"195\" height=\"25\" />");
      out.write("</h2>\r\n");
      out.write("<div id=\"infoRtOrder\">\r\n");
      out.write("<table width=\"0\" border=\"0\" cellspacing=\"5\" cellpadding=\"0\">\r\n");
      out.write("<tr>\r\n");
      out.write("<td>&nbsp;");
      out.write("</td>\r\n");
      out.write("<td>注文日時");
      out.write("</td>\r\n");
      out.write("<td>地域");
      out.write("</td>\r\n");
      out.write("<td>金額");
      out.write("</td>\r\n");
      out.write("</tr>\r\n");
      /* ----  webshop:siiterator ---- */
      jp.co.sint.taglib.SIIteratorTag _jspx_th_webshop_siiterator_0 = (jp.co.sint.taglib.SIIteratorTag) _jspx_tagPool_webshop_siiterator_type_id_collection.get(jp.co.sint.taglib.SIIteratorTag.class);
      _jspx_th_webshop_siiterator_0.setPageContext(pageContext);
      _jspx_th_webshop_siiterator_0.setParent(null);
      _jspx_th_webshop_siiterator_0.setType("jp.co.sint.basic.SIOrder");
      _jspx_th_webshop_siiterator_0.setCollection(SIBGUtil.getDisclosureColl(connection));
      _jspx_th_webshop_siiterator_0.setId("disclosureID");
      int _jspx_eval_webshop_siiterator_0 = _jspx_th_webshop_siiterator_0.doStartTag();
      if (_jspx_eval_webshop_siiterator_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        jp.co.sint.basic.SIOrder disclosureID = null;
        disclosureID = (jp.co.sint.basic.SIOrder) pageContext.findAttribute("disclosureID");
        do {
          out.write("\r\n");
          out.write("<tr>\r\n");
          out.write("<td>");
          out.print(disclosureID.getOrderCode());
          out.write("</td>\r\n");
          out.write("<td>");
          out.print(disclosureID.getInitDateTime().substring(5,16));
          out.write("</td>\r\n");
          out.write("<td>");
          out.print(disclosureID.getAddress1());
          out.write("</td>\r\n");
          out.write("<td class=\"price\">￥");
          out.print(SIUtil.NumberFormat(disclosureID.getTotalOfPrice()));
          out.write("</td>\r\n");
          out.write("</tr>\r\n");
          int evalDoAfterBody = _jspx_th_webshop_siiterator_0.doAfterBody();
          disclosureID = (jp.co.sint.basic.SIOrder) pageContext.findAttribute("disclosureID");
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
      }
      if (_jspx_th_webshop_siiterator_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
        return;
      _jspx_tagPool_webshop_siiterator_type_id_collection.reuse(_jspx_th_webshop_siiterator_0);
      out.write("\r\n");
      out.write("</table>\r\n");
      out.write("</div>\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);
    }
  }
}
