db = cs4_open(); $this->user = u4user_open(); $unit = get_unit($this->db); // 1ページの表示数 $show_line = 10; $p['page'] = (!empty($p['page']) && '0' < $p['page']) ? $p['page'] : '1'; $where = ""; $where .= " user_id =\"".$p['uid']."\" and main_rcp_no is not null and submain_rcp_no is not null and sub_rcp_no is not null "; $ct = 0; $ct = cs4_num_rows($this->db,'bsc_bento_user',$where); $no = 0; if($ct){ $ret=cs4_select($this->db,"bsc_bento_user",$where); while($row = cs4_fetch_row($ret)) { $date[] = $row['regist_date']; $tmp_favor = ""; $favor_arr[] = get_rcpDetail_L($this->db, $row['main_rcp_no']); /* $rcp[$no][0] = $row['main_rcp_no']; $rcp[$no][1] = $row['submain_rcp_no']; $rcp[$no][2] = $row['sub_rcp_no']; if(!empty($tmp_favor)){ $favor_arr[] = get_rcpDetail_L($this->db, $row['main_rcp_no']); } $no ++; */ } } $ct = count($favor_arr); if(!$ct || $ct == "0"){ $template->hideBlock('__RecipeList__'); $template->TouchBlock('__NoRecipe__'); }else{ $template->hideBlock('__NoRecipe__'); for($i=($p['page'] - 1) * $show_line;$i < ($p['page'] * $show_line) && $i < $ct && !empty($favor_arr[$i][0]['uniq_id']);$i++){ /* if('1' != $p['version'] && ('i' == $p['carrier'] || 'w' == $p['carrier'])){ $thumbnail_path = sprintf("%s/%s_n-thm.jpg",IMG_DIR_RECIPE,$favor_arr[$i][0]['uniq_id']); if(file_exists($thumbnail_path)){ $template->setCurrentBlock('__ShowImage__'); $template->setVariable('img_src',sprintf("/image/recipe/%s_n-thm.jpg",$favor_arr[$i][0]['uniq_id'])); $template->parseCurrentBlock(); } } clearstatcache(); $template->setCurrentBlock('__RecipeList__'); $template->setVariable('rcp_no',$favor_arr[$i][0]['uniq_id']); $template->setVariable('title',$favor_arr[$i][0]['rcp_nm']); */ if(!empty($date[$i])){ $yy = substr($date[$i],0,4); $mm = substr($date[$i],4,2); $dd = substr($date[$i],6,2); $date1 = $yy.".".$mm.".".$dd; $date2 = $yy.$mm.$dd; $template->setCurrentBlock('__RecipeList__'); $template->setVariable('show_date',$date1); $template->setVariable('regist_date',$date2); } $template->parseCurrentBlock(); } } //- ページ送り処理 (Prev) if('1' < $p['page']){ $template->setCurrentBlock('__PagePrev__'); $template->setVariable('prev_page',$p['page'] - 1); $template->parseCurrentBlock(); } //- ページ送り処理 (Next) if(($p['page'] * $show_line) < $ct){ $template->setCurrentBlock('__PageNext__'); $template->setVariable('next_page', $p['page'] + 1); $template->parseCurrentBlock(); } // uidからニックネームを取得 $user_data = u4user_select_one($this->user,"car_no=\"".$p['uid']."\""); //$template->setVariable('nick_name',$user_data['mem_nick_nm']); $template->setVariable('change_url',SSL_PROTO.DOMAIN_NAME."/my/prof_input.php?p[u_id]=".$p['uid']."&p[act]=update&p[contents]=my_rcp"); $template->show(); //DB開放 cs4_close($this->db); u4user_close($this->user); } bentou_list($p); ?>