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 java.io.File;
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.mallmgr.*;
import jp.co.sint.beans.front.*;

public class man_news_preview_jsp extends HttpJspBase {


  private static java.util.Vector _jspx_includes;

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

  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-2009 System Integrator Corporation. & Beautygarage Inc
 *                 All Rights Reserved.
 * @version $Id : mallmgr/cmdty/man_cmdty_preview.jsp,v 2.0 2009/06/24 Exp $
 * @author      : Naotaka Ohsugi
 * @Description : 商品情報プレビュー画面
 * @History
 * Author        Date        Reason
 * ============  ==========  ===========================
 * Naotaka       2009/06/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");

UINewsList newsListID=(UINewsList)session.getAttribute(SIConfig.SISESSION_MAN_NEWS_LIST_NAME);
if (newsListID==null)newsListID=new UINewsList();

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

String pageID = "";
String titleDir = "";
if ("1".equals(newsListID.getDispFlag())) {
  pageID="hair";
  titleDir="/img/hair";
}else if ("2".equals(newsListID.getDispFlag())) {
  pageID="haircosme";
  titleDir="/img/haircosme";
}else if ("3".equals(newsListID.getDispFlag())) {
  pageID="esthe";
  titleDir="/img/esthe";
}else if ("4".equals(newsListID.getDispFlag())) {
  pageID="bed";
  titleDir="/img/bed";
}else if ("5".equals(newsListID.getDispFlag())) {
  pageID="cosme";
  titleDir="/img/cosme";
}else if ("6".equals(newsListID.getDispFlag())) {
  pageID="nail";
  titleDir="/img/nail";
}else if ("7".equals(newsListID.getDispFlag())) {
  pageID="book";
  titleDir="/img/book";
}else if ("8".equals(newsListID.getDispFlag())) {
  pageID="eyelash";
  titleDir="/img/eyelash";
}else {
  pageID="index";
}
String description = newsListID.getDescription();
if (newsListID.getDescription().indexOf("target=\"_blank\"") > 0||newsListID.getDescription().indexOf("target=\"blank\"") > 0) {
  description = newsListID.getDescription().replaceAll("</a>", " <img src=\"/ws/img/icon_blank.gif\" alt=\"\" /></a>");
}

      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\r\n\"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
      out.write("<html LANG=\"ja-JP\">\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Shift_JIS\">\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("<title>ニュースプレビュー");
      out.write("</title>\r\n");
      out.write("<link href=\"");
      out.print(webshopSite);
      out.write("/css/import.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen,print\" />\r\n");
      out.write("<link href=\"");
      out.print(webshopSite);
      out.write("/css/print.css\" rel=\"stylesheet\" type=\"text/css\" media=\"print\" />\r\n");
      out.write("<link href=\"");
      out.print(webshopSite);
      out.write("/css/colorBox.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen,print\" />\r\n");
      out.write("<link href=\"");
      out.print(webshopSite);
      out.write("/css/top.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen,print\" />\r\n");
      out.write("</head>\r\n");
if ("9".equals(newsListID.getDispFlag())) {
      out.write("\r\n");
      out.write("<body bgcolor=\"white\">\r\n");
      out.write("<table width=\"220\" BGCOLOR=\"gainsboro\">\r\n");
      out.write("<tr>");
      out.write("<td BGCOLOR=\"orange\">");
      out.write("<div align=\"center\">");
      out.write("<font size=\"2\" color=\"black\">");
      out.write("<img src=\"");
      out.print(webshopSite);
      out.write("/image/mallmgr/E6DD.gif\">&nbsp;&nbsp;&nbsp;");
      out.write("</font>");
      out.write("<font size=\"2\" color=\"blue\">BG NEWS");
      out.write("</font>");
      out.write("<font size=\"2\" color=\"black\">&nbsp;&nbsp;&nbsp;");
      out.write("<img src=\"");
      out.print(webshopSite);
      out.write("/image/mallmgr/E6DD.gif\">");
      out.write("</font>");
      out.write("</div>");
      out.write("</td>");
      out.write("</tr>\r\n");
      out.write("<tr>");
      out.write("<td>");
      out.print(newsListID.getDescription());
      out.write("<br>");
      out.write("</td>");
      out.write("</tr>\r\n");
      out.write("<tr>");
      out.write("<td>");
      out.write("<hr size=\"1\" color=\"blue\">");
      out.write("</td>");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("<br>");
      out.write("<br>\r\n");
      out.write("<a href=\"javascript:close()\" class=\"arrow02\">閉じる");
      out.write("</a>\r\n");
      out.write("</body>\r\n");
} else if ("10".equals(newsListID.getDispFlag())) {
      out.write("\r\n");
      out.write("<body id=\"eyelash\" class=\"style2 cartLabel3\">\r\n");
      out.write("<div id=\"wrapper\">\r\n");
      out.write("<div id=\"contentsArea\" class=\"clearfix\">\r\n");
      out.write("<div id=\"mainContents\">\r\n");
      out.write("<div id=\"news\" class=\"contentsLayout\">\r\n");
      out.write("<div id=\"news\" class=\"contentsLayout\">\r\n");
      out.write("<h2>");
      out.write("<span>ニュース");
      out.write("</span>");
      out.write("</h2>\r\n");
      out.write("<ul>\r\n");
      out.write("<li>\r\n");
      out.write("<dl>\r\n");
      out.write("<dt>");
      out.print(newsListID.getStartDateTime().substring(2,10));
      out.write("</dt>\r\n");
      out.write("<dd>");
      out.print(description);
      out.write("</dd>\r\n");
      out.write("</dl>\r\n");
      out.write("</li>\r\n");
      out.write("</ul>\r\n");
      out.write("<p class=arrow>");
      out.write("<a href=\"javascript:close()\" class=\"arrow02\">閉じる");
      out.write("</a>");
      out.write("</p>\r\n");
      out.write("</div>\r\n");
      out.write("</div>\r\n");
      out.write("</div>\r\n");
      out.write("</div>\r\n");
      out.write("</div>\r\n");
      out.write("</body>\r\n");
} else {
      out.write("\r\n");
      out.write("<body id=\"");
      out.print(pageID);
      out.write("\" class=\"style3\">\r\n");
      out.write("<div id=\"wrapper\">\r\n");
      out.write("<div id=\"contentsArea\" style=\"width:538px\">\r\n");
      out.write("<div id=\"container\" style=\"width:538px\">\r\n");
      out.write("<div id=\"contents\">\r\n");
      out.write("<div id=\"news\">\r\n");
if ("0".equals(newsListID.getDispFlag())) {
      out.write("\r\n");
      out.write("<h3>");
      out.write("<img src=\"");
      out.print(webshopSite);
      out.write("/img/h_news.gif\" alt=\"ニュース\"  width=\"537\" height=\"25\" />");
      out.write("</h3>\r\n");
}else{
      out.write("\r\n");
      out.write("<h3>");
      out.write("<img src=\"");
      out.print(webshopSite+titleDir);
      out.write("/h_news.gif\" alt=\"ニュース\"  width=\"537\" height=\"35\" />");
      out.write("</h3>\r\n");
}
      out.write("\r\n");
      out.write("<p class=\"more\">");
      out.write("<a href=\"javascript:close()\" class=\"arrow02\">閉じる");
      out.write("</a>");
      out.write("</p>\r\n");
      out.write("<dl>\r\n");
      out.write("\r\n");
      out.write("<dt>[");
      out.print(newsListID.getStartDateTime().substring(2,10));
      out.write("]");
      out.write("</dt>\r\n");
      out.write("<dd>");
      out.print(description);
      out.write("</dd>\r\n");
      out.write("</dl>\r\n");
      out.write("</div>\r\n");
      out.write("</div>\r\n");
      out.write("</div>\r\n");
      out.write("</div>\r\n");
      out.write("</div>\r\n");
      out.write("</body>\r\n");
}
      out.write("\r\n");
      out.write("</html>");
    } 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);
    }
  }
}
