db = cs4_open(); //- 指定材料使用レシピID一覧取得 $rcpno_arr = getRcpNo_from_IngID($p['id']); //- 表示用材料名 $now_ing = get_IngDetail($this->db,$p['id']); //- レシピ詳細取得 $rcp_detail_arr = get_rcpDetail($this->db,$rcpno_arr); // var_dump($rcp_detail_arr); //- 検索結果ゼロ処理 $list_ct = count($rcp_detail_arr);//- 取得件数 if('0' == $list_ct){ print "Not Found your request Recipe !!"; exit; } // テンプレート読み込み $template =& loadTemplate( $p ); $template->setVariable('ingredient_title',$now_ing['mtr_nm']); $template->setVariable('ingredient',$now_ing['mtr_nm']); for($i=$show_line * ($p['page'] - 1) ;$isetCurrentBlock('__RecipeList__'); $template->setVariable('rcp_no',$rcp_detail_arr[$i]['uniq_id']); $template->setVariable('title',$rcp_detail_arr[$i]['rcp_nm']); $template->setVariable('genre',"Wahoo"); $template->parseCurrentBlock(); } //- ページ送り処理 (Prev) if('1' < $p['page']){ $template->setCurrentBlock('__PagePrev__'); $template->setVariable('prev_page',$p['page'] - 1); $template->setVariable('ing_id',$p['id']); $template->parseCurrentBlock(); } //- ページ送り処理 (Next) if($p['page'] * $show_line < count($rcp_detail_arr)){ $template->setCurrentBlock('__PageNext__'); $template->setVariable('next_page', $p['page'] + 1); $template->setVariable('ing_id',$p['id']); $template->parseCurrentBlock(); } $template->setVariable('site_top',SITE_NAME); $template->show(); cs4_close($this->db); } vegetable_other_list( $p ); ?>