<%@ page contentType="text/html; charset=euc-jp" %> <%@ page import = "java.util.*, java.io.*, java.text.*, java.sql.*" %> <%--@ page errorPage="/syserror.jsp" --%> <%! private String NumFormat(String num) { int n = Integer.valueOf(num).intValue(); DecimalFormat NumFormat = new DecimalFormat("###,###"); return NumFormat.format(n); } private String StrConv( String val ) throws UnsupportedEncodingException { if ( val != null ) { StringBuffer sb = new StringBuffer(); StringCharacterIterator sci = new StringCharacterIterator( val ); for ( char c = sci.current(); c != StringCharacterIterator.DONE; c = sci.next()) { if ( c == '\n') { sb.append("
"); } else if(c == '\r') { sb.append(""); } else { sb.append(c); } } return sb.toString(); } else { return ""; } } static public boolean StrCheck( String input ) { int length = input.getBytes().length; if ( length == 0 ) { return false; } return true; } private String NullConv( String val ) { try { val.equals("null"); return val; } catch (Exception e) { return ""; } } %> <% String gid = request.getParameter("id"); String query; db.open(); query = new StringBuffer() .append("SELECT * FROM goods ") .append("WHERE del is not true ") .append("AND (start_date <= current_timestamp or start_date is null) ") .append("AND (end_date >= current_timestamp or end_date is null) ") .append("AND id = ") .append( gid ) .toString(); ResultSet rs = db.select( query ); if (!rs.next()) { String errmsg = "ご指定の商品は現在お取り扱いを終了しております
\n"; session.setAttribute("ErrMsg", errmsg ); %> <% } query = new StringBuffer() .append("SELECT * FROM category ") .append("WHERE del is not true ") .append("AND id = ") .append( rs.getString("category_id_1")) .toString(); ResultSet cat = db.select( query ); cat.next(); %> 〜本当のおいしさを〜いかりスーパー
トップページショッピング" target="_top"><%= cat.getString("category") %>><%= rs.getString("product") %>
詳細検索へ
ショッピングをお楽しみください
  <%= rs.getString("product") %>
<%= rs.getString("appeal_comment_1") %>
<% if ( rs.getString("image_l").length() > 0 ) { %> " width="300" height="280" alt="食材写真"> <% } %>
代金 ¥<%= NumFormat( rs.getString("price")) %>
送料 <% if ( rs.getString("shipping_free").equals("t")) { %> 送料は商品代金に含まれています。
送料の詳細はこちらをご確認ください。
<% } else { %> 別途送料を頂戴いたします <% } %>
数量 <%= rs.getString("quantity") %>
備考 <%= rs.getString("limit_date") %>
購入数
より美味しく楽しめる品をご一緒に
<% if ( rs.getString("special").equals("t")) { %>
<%= rs.getString("special_title") %>
<% if ( rs.getString("image_m_1").length() > 0 ) { %> " width="170" height="120" align="left"> <% } if ( rs.getString("image_m_2").length() > 0 ) { %> " width="170" height="120" align="right"> <% } %> <%= rs.getString("special_comment") %>
<% } %>
商品へのこだわり
<% if ( rs.getString("image_m_3").length() > 0 ) { %> " width="170" height="120" align="left"> <% } %> <%= rs.getString("appeal_comment_2") %>
お客さまからの声
<%-- [modified 2003-11-19] --%> <% if ( rs.getString("user_voice_1").equals("") && rs.getString("user_voice_2").equals("") && rs.getString("user_voice_3").equals("")) { %> <% } %> <%-- [modified 2003-11-19] --%>

まだ投稿されておりません。

<%= rs.getString("user_voice_1") %>
<%= rs.getString("user_voice_2") %>
<%= rs.getString("user_voice_3") %>
  >>この商品の感想を投稿する
<% if ( rs.getString("related_product_1") != null || rs.getString("related_product_2") != null || rs.getString("related_product_3") != null) { String rel_1 = rs.getString("related_product_1") == null ? "'0'" : ( rs.getString("related_product_1")).equals("null") ? "'0'" : "'" + rs.getString("related_product_1") + "'"; String rel_2 = rs.getString("related_product_2") == null ? "'0'" : ( rs.getString("related_product_2")).equals("null") ? "'0'" : "'" + rs.getString("related_product_2") + "'"; String rel_3 = rs.getString("related_product_3") == null ? "'0'" : ( rs.getString("related_product_3")).equals("null") ? "'0'" : "'" + rs.getString("related_product_3") + "'"; %>
  
<% query = new StringBuffer() .append("SELECT * FROM goods ") .append("WHERE del is not true ") .append("AND (start_date is null OR start_date <= current_timestamp) ") .append("AND (end_date is null OR end_date >= current_timestamp) ") .append("AND id in(" + rel_1 + "," + rel_2 + "," + rel_3 + ")") .toString(); ResultSet rel = db.select( query ); while ( rel.next()) { %> <% } %>
<% if ( rel.getString("image_s").length() > 0 ) { %> " width="60" height="40"> <% } %>
" target="_top"><%= rel.getString("product") %>
<%= rel.getString("mini_comment") %>
<% } if ( rs.getString("recipe_1") != null || rs.getString("recipe_2") != null || rs.getString("recipe_3") != null) { String rec_1 = rs.getString("recipe_1") == null ? "'0'" : ( rs.getString("recipe_1")).equals("null") ? "'0'" : "'" + rs.getString("recipe_1") + "'"; String rec_2 = rs.getString("recipe_2") == null ? "'0'" : ( rs.getString("recipe_2")).equals("null") ? "'0'" : "'" + rs.getString("recipe_2") + "'"; String rec_3 = rs.getString("recipe_3") == null ? "'0'" : ( rs.getString("recipe_3")).equals("null") ? "'0'" : "'" + rs.getString("recipe_3") + "'"; %>
●関連レシピ
<% query = new StringBuffer() .append("SELECT * FROM recipe ") .append("WHERE del is not true ") .append("AND start_date <= current_timestamp ") .append("AND id in(" + rec_1 + "," + rec_2 + "," + rec_3 + ")") .toString(); ResultSet rec = db.select( query ); while ( rec.next()) { %> <% } %>
<% if ( rec.getString("image_s").length() > 0 ) { %> " width="60" height="41" align="left"> <% } %> " target="_top">
<%= rec.getString("title") %>
<% } %>
" target="_top">>><%= cat.getString("category") %>一覧に戻る

 
<% db.close (); %>