db = cs4_open(); // 商品に対する問合せ if(!empty($p['p_no']) && empty($p['mode'])){ //-- ジャンル配列 $gnr_name_arr = array( '12' => array('rice','厳選日本のお米100選'), '11' => array('water','世界の銘水100選'), '13' => array('spice','究極の調味料'), '14' => array('kitchen','キッチングッズ'), '15' => array('oishu','五つ星のお取寄せ'), '16' => array('oishu','五つ星のお取寄せ') ); $item_detail = get_item_detail($this->db,$p['p_no'],1); $pdc_detail = get_producer_detail($this->db,$item_detail['pdc_no']); $dir_name = $gnr_name_arr[substr($item_detail['p_gnr'],0,2)][0]; $back_url = sprintf("/%s/%s_detail.php?p[p_no]=%d",$dir_name,$dir_name,$item_detail['uniq_id']); $back_url_footer = sprintf("/%s/%s_top.php",$dir_name,$dir_name); //- ジャンルID $genre = $item_detail['pdc_no']; $template->setVariable('genre_id',$genre); //- 商品番号 $template->setCurrentBlock('__ItemNo__'); $template->setVariable('p_no',$p['p_no']); $template->parseCurrentBlock(); //- 商品詳細戻り $template->setCurrentBlock('__BacktoItem__'); $template->setVariable('detail_url',$back_url); $template->parseCurrentBlock(); //- 商品トップ戻り $template->setCurrentBlock('__ItemFooter__'); $template->setVariable('return_url',$back_url_footer); $template->setVariable('return_page',$gnr_name_arr[substr($item_detail['p_gnr'],0,2)][1]); $template->parseCurrentBlock(); }else{ // 注文に対する問合せ if(!empty($p['mode'])){ $item_detail = get_item_detail($this->db,$p['p_no'],1); $pdc_detail = get_producer_detail($this->db,$item_detail['pdc_no']); $template->setVariable('p_no',$p['p_no']); $genre = $item_detail['pdc_no']; $template->setVariable('mode',$p['mode']); // サイトに対する問合せ }else{ $genre = '1'; } $template->setVariable('genre_id',$genre); $template->TouchBlock('__SiteHeader__'); $template->setVariable('inq_target','美食総合倶楽部'); $template->HideBlock('__BacktoItem__'); $template->HideBlock('__ItemFooter__'); $template->TouchBlock('__SupportFooter__'); } cs4_close($this->db); //- 次ページからのエラー戻り用 if(!empty($p['title'])){ $template->setVariable('title_val',$p['title']); } if(!empty($p['body'])){ $template->setVariable('body',$p['body']); } $template->show(); } support_input( $p ); ?>