<%@ page contentType="text/html; charset=euc-jp" %> <%@ page import = "java.util.*, java.io.*, java.text.*, java.sql.*" %> <%@ page errorPage="syserror_user.jsp" %> <%! private String NumConv(String input) { if (input==null || input.equals("null")) { return "0"; } else { return input; } } %> <% int n, rcnt; String query; ResultSet rs, cnt; db.open(); query = "SELECT * FROM recipe_category WHERE del is not true AND id = 3 ORDER BY number"; rs = db.select(query); rs.last(); int c = rs.getRow(); rs.first(); rs = db.select(query); String[] genr_title = new String[c + 1]; String[] genr_comment = new String[c + 1]; String[] genr_img = new String[c + 1]; while (rs.next()) { int num = rs.getInt("number"); genr_title[num] = rs.getString("option"); genr_comment[num] = rs.getString("category_s"); genr_img[num] = rs.getString("image"); } %> 〜本当のおいしさを〜いかりスーパー
トップページ>レシピ一覧
詳細検索へ
ちょっとした工夫でおいしい料理を楽しもう
レシピカテゴリ別一覧
世界中の料理レシピがご覧になれます。イタリアン、フレンチ、中華、和食・・・。今日の気分は何料理ですか?
>>レシピ検索はこちらから
<% query = "SELECT count(*) FROM recipe WHERE del is not true AND start_date <= current_timestamp"; rs = db.select(query); rs.next(); rcnt = rs.getInt(1); if (rcnt > 30) { rcnt = 30; } %>
【最新レシピ】〜本日投稿されたレシピ〜

<<全<%=rcnt%>件>>
<% query = "SELECT * FROM recipe WHERE del is not true AND start_date <= current_timestamp ORDER BY id DESC LIMIT 10"; rs = db.select(query); while (rs.next()) { %> <% } %>
">●<%=rs.getString("title")%>
<% query = "SELECT count(*) FROM recipe WHERE del is not true AND start_date <= current_timestamp AND vote > 0"; rs = db.select(query); rs.next(); rcnt = rs.getInt(1); if (rcnt > 30) { rcnt = 30; } %>
【人気レシピ】〜投票数の多いレシピ〜

<<全<%=rcnt%>件>>
<% query = "SELECT * FROM recipe WHERE del is not true AND start_date <= current_timestamp AND vote > 0 ORDER BY vote DESC LIMIT 10"; rs = db.select(query); while (rs.next()) { %> <% } %>
">●<%=rs.getString("title")%>
<% for (n = 1; n <= c; n ++) { %> <% query = "SELECT count(*) FROM recipe WHERE del is not true AND start_date <= current_timestamp AND category_3 = " + n; rs = db.select(query); rs.next(); rcnt = rs.getInt(1); %> <% n ++; %> <% if (genr_title[n].length()>0) { %> <% query = "SELECT count(*) FROM recipe WHERE del is not true AND start_date <= current_timestamp AND category_3 = " + n; rs = db.select(query); rs.next(); rcnt = rs.getInt(1); %> <% } %>
【<%=genr_title[n]%>】〜<%=genr_comment[n]%>〜
<% if (genr_img[n].length()>0) { %>
<% } %> <<全<%=rcnt%>件>>
<% query = "SELECT * FROM recipe WHERE del is not true AND start_date <= current_timestamp AND category_3 = " + n + " LIMIT 10"; rs = db.select(query); while (rs.next()) { %> <% } %>
">●<%=rs.getString("title")%>
【<%=genr_title[n]%>】〜<%=genr_comment[n]%>〜
<% if (genr_img[n].length()>0) { %>
<% } %> <<全<%=rcnt%>件>>
<% query = "SELECT * FROM recipe WHERE del is not true AND start_date <= current_timestamp AND category_3 = " + n + " LIMIT 10"; rs = db.select(query); while (rs.next()) { %> <% } %>
">●<%=rs.getString("title")%>
<% } %>

あなたのご自慢のレシピを投稿しませんか。
あなたのレシピでいかりのサイトを盛り上げてください!
>>レシピ登録の手順
調理時間: 難易度: ジャンル: 材料:
<% HashMap hm1=new HashMap(); query = "SELECT category_1, count(*) FROM recipe WHERE del is not true AND start_date <= current_timestamp GROUP BY category_1"; cnt = db.select(query); while (cnt.next()) { hm1.put(cnt.getString("category_1"), cnt.getString("count")); } query = "SELECT * FROM recipe_category WHERE del is not true AND id = 1 ORDER BY number"; rs = db.select(query); while (rs.next()) { String number = rs.getString("number"); String option = rs.getString("option"); String count = (String)hm1.get(rs.getString("number")); out.println ("" + option + "(" + NumConv(count) + ")
"); } %>
<% HashMap hm2=new HashMap(); query = "SELECT category_2, count(*) FROM recipe WHERE del is not true AND start_date <= current_timestamp GROUP BY category_2"; cnt = db.select(query); while (cnt.next()) { hm2.put(cnt.getString("category_2"), cnt.getString("count")); } query = "SELECT * FROM recipe_category WHERE del is not true AND id = 2 ORDER BY number"; rs = db.select(query); while (rs.next()) { String number = rs.getString("number"); String option = rs.getString("option"); String count = (String)hm2.get(rs.getString("number")); out.println ("" + option + "(" + NumConv(count) + ")
"); } %>
<% HashMap hm3=new HashMap(); query = "SELECT category_3, count(*) FROM recipe WHERE del is not true AND start_date <= current_timestamp GROUP BY category_3"; cnt = db.select(query); while (cnt.next()) { hm3.put(cnt.getString("category_3"), cnt.getString("count")); } query = "SELECT * FROM recipe_category WHERE del is not true AND id = 3 ORDER BY number"; rs = db.select(query); while (rs.next()) { String number = rs.getString("number"); String option = rs.getString("option"); String count = (String)hm3.get(rs.getString("number")); out.println ("" + option + "(" + NumConv(count) + ")
"); } %>
<% HashMap hm4=new HashMap(); query = "SELECT category_4, count(*) FROM recipe WHERE del is not true AND start_date <= current_timestamp GROUP BY category_4"; cnt = db.select(query); while (cnt.next()) { hm4.put(cnt.getString("category_4"), cnt.getString("count")); } query = "SELECT * FROM recipe_category WHERE del is not true AND id = 4 ORDER BY number"; rs = db.select(query); while (rs.next()) { String number = rs.getString("number"); String option = rs.getString("option"); String count = (String)hm4.get(rs.getString("number")); out.println ("" + option + "(" + NumConv(count) + ")
"); } %>
レシピの投稿は、以下に同意の上お願いいたします。

1.雑誌掲載のレシピ、TV番組放映のレシピ等、他人が考案したものを投稿することは
「著作権の侵害」にあたりますのでおやめください。

2.投稿者様オリジナルのレシピであっても、過去に雑誌等に投稿して掲載されたもの
は、その雑誌社などが著作権を持っている場合がありますので、ご注意ください。

3.投稿されたレシピは、当社で選考の上、お勧めレシピとしてご紹介させていただき
ますが、都合により削除する場合がございますので予めご了承ください。



 
<% db.close(); %>