db = cs4_open(); // レシピ詳細から来た場合には配列に追加する if($p['id']){ $p['id0'] = $p['id']; $show_line = 1; $flg = 1; } // データを削除する for($i=0;$i<$show_line;$i++){ $id = sprintf("id%s", $i); if($p[$id]){ if( $favor = is_favorite($this->db, $p[$id], $p['uid']) ){ $recipe = get_rcpDetail($this->db,$p[$id]); $where = sprintf("car_no = '%s' and p_no = '%s' ", $p['uid'], $p[$id]); $ret_update = cs4_delete($this->db,"bsc_list",$where); if($ret_update){ $template->setCurrentBlock('__Delete__'); $template->setVariable('recipe_name',$recipe[0]['rcp_nm']); $template->parseCurrentBlock(); $template->hideBlock('__ShowError__'); $template->hideBlock('__ShowError2__'); }else{ $template->touchBlock('__ShowError2__'); $template->hideBlock('__Regist__'); } }else{ $template->touchBlock('__ShowError__'); $template->hideBlock('__Regist__'); } }else{ } } if($flg == 1){ $template->hideBlock('__Link2__'); $template->setCurrentBlock('__Link1__'); $template->setVariable('contents',$p['contents']); $template->setVariable('rcp_no',$p[$id]); $template->parseCurrentBlock(); }else{ $template->touchBlock('__Link2__'); $template->hideBlock('__Link1__'); } $template->show(); cs4_close($this->db); } favor_delete($p); ?>