db = cs4_open(); //- ƒ}ƒCBAD+A581EŒDšΕžmκ[δЦŽεΨ[main]••›Ψ[sub]) $myrecipe_list = get_MyRecipe($p['uid'],$user_data[0]); //- •\ަ‚·‚€EδYŸƒΗξY’ιΎΰcqd if(!empty($myrecipe_list['main'])){ $nowdate_count = (mktime(0,0,0,date("m"),date("d"),date("Y")) - mktime(0,0,0,1,1,2005)) / (24*60*60); $main_index = $nowdate_count % count($myrecipe_list['main']); if(DEBUG_MODE){ print "
ŽεΨ -> "; print ($main_index + 1)."/".count($myrecipe_list['main'])." ( view / total )"; //var_dump($myrecipe_list['main']); print "
RecipeID => "; foreach($myrecipe_list['main'] as $key => $val){ print ($i + 1)."/".$val['rcp_no'].","; $i++; } print "
"; } } if(!empty($myrecipe_list['sub'])){ $nowdate_count = (mktime(0,0,0,date("m"),date("d"),date("Y")) - mktime(0,0,0,1,1,2005)) / (24*60*60); $sub_index = $nowdate_count % count($myrecipe_list['sub']); if(DEBUG_MODE){ print "
•›Ψ -> "; print ($sub_index + 1)."/".count($myrecipe_list['sub'])." ( view / total )"; //var_dump($myrecipe_list['sub']); print "
RecipeID => "; foreach($myrecipe_list['sub'] as $key => $val){ print ($ix + 1)."/".$val['rcp_no'].","; $ix++; } print "
"; } //- ŽεH‚Ζ“―‚Ά‚Ι‚Θ‚Α‚½Žž‚̏ˆ— -- BTS No.44 ‘Ξ‰ž by Aida 06/02/02 if(!empty($myrecipe_list['main'])){ if($myrecipe_list['main'][$main_index]['rcp_no'] == $myrecipe_list['sub'][$sub_index]['rcp_no']){ //- •›Ψ‚ͺˆ€E’’’‰C•’εgκh[„‹ if(1 >= count($myrecipe_list['sub'])){ $myrecipe_list['sub'] = ""; }else{ $sub_index++; } } } } cs4_close($this->db); // ƒeƒ“ƒvBAD+A581EŽ£”Δ•CΰXο’BAD+DF8D $template =& loadTemplate( $p ); //- myrecipe if(!empty($myrecipe_list['main'])){ if(('i' == $p['carrier'] && '2' == $p['version']) || ('v' == $p['carrier'] && '3' == $p['version']) || ('e' == $p['carrier'] && '3' == $p['version']) || ('w' == $p['carrier']) || ('g' == $p['carrier'])){ $thumbnail_path = sprintf("%s/%s_n-thm.jpg",IMG_DIR_RECIPE,$myrecipe_list['main'][$main_index]['rcp_no']); if(file_exists($thumbnail_path)){ $template->setCurrentBlock('__ImageLinkMain__'); $template->setVariable('image_id',$myrecipe_list['main'][$main_index]['rcp_no']); $template->parseCurrentBlock(); } } $template->setCurrentBlock('__Main__'); $template->setVariable('phrase',$myrecipe_list['main'][$main_index]['rcp_exp']); $template->setVariable('rcp_no',$myrecipe_list['main'][$main_index]['rcp_no']); $template->setVariable('title',$myrecipe_list['main'][$main_index]['rcp_nm']); $template->parseCurrentBlock(); }else{ $template->hideBlock('__Main__'); $template->TouchBlock('__NoMain__'); } if(!empty($myrecipe_list['sub'])){ if(('i' == $p['carrier'] && '2' == $p['version']) || ('v' == $p['carrier'] && '3' == $p['version']) || ('e' == $p['carrier'] && '3' == $p['version']) || ('w' == $p['carrier']) || ('g' == $p['carrier'])){ $thumbnail_path = sprintf("%s/%s_n-thm.jpg",IMG_DIR_RECIPE,$myrecipe_list['sub'][$sub_index]['rcp_no']); if(file_exists($thumbnail_path)){ $template->setCurrentBlock('__ImageLinkSub__'); $template->setVariable('image_id',$myrecipe_list['sub'][$sub_index]['rcp_no']); $template->parseCurrentBlock(); } } $template->setCurrentBlock('__Sub__'); $template->setVariable('phrase',$myrecipe_list['sub'][$sub_index]['rcp_exp']); $template->setVariable('rcp_no',$myrecipe_list['sub'][$sub_index]['rcp_no']); $template->setVariable('title',$myrecipe_list['sub'][$sub_index]['rcp_nm']); $template->parseCurrentBlock(); }else{ $template->hideBlock('__Sub__'); $template->TouchBlock('__NoSub__'); } //- ƒf[ƒ^•ύX—phiddenƒpƒ‰ƒ[ƒ^ƒZƒbƒg foreach($terms_arr as $tmp_key => $tmp_val){ foreach($terms_arr[$tmp_key] as $key => $val){ if(1 == $user_data[0][$key]){ $template->setCurrentBlock('__HiddenParam__'); $template->setVariable('name',$key); $template->parseCurrentBlock(); } } } $template->show(); } myrecipe_top( $p , $user_data); ?>