255 ) $title = "SSK BASEBALL"; $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $common_dir = $site_dir ."/tmpl/"; $common_file = "header.tmpl"; $buf['TITLE'] = $title; switch( $menu_no ){ case MENU_HOME: $buf['POS_HOME'] = 1; break; case MENU_NEWS: $buf['POS_NEWS'] = 1; break; case MENU_BRAND: $buf['POS_BRAND'] = 1; break; case MENU_PLAYER: $buf['POS_PLAYER'] = 1; break; case MENU_PRODUCT: $buf['POS_PRODUCT'] = 1; break; case MENU_STORE: $buf['POS_STORE'] = 1; break; case MENU_MEMBER: $buf['POS_MEMBER'] = 1; break; default: $buf['POS_HOME'] = 1; break; } $buf['SITE_DIR'] = SSKBB_DOMAIN; $buf['SHOP_URL'] = SHOP_URL; $html = TmplUty::getText( $common_dir .$common_file, $buf); return $html; } //フッター取得 function getFooter(){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $common_dir = $site_dir ."/tmpl/"; $common_file = "footer.tmpl"; $buf['SITE_DIR'] = SSKBB_DOMAIN; if( !file_exists($common_dir .$common_file) ){ // print $common_dir .$common_file ."が見つかりません"; }else{ $html = TmplUty::getText( $common_dir .$common_file, $buf); } return $html; } //フッター取得 function getTopBanner(){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $common_dir = $site_dir ."/tmpl/"; $common_file = "top_banner.tmpl"; $buf['SITE_DIR'] = SSKBB_DOMAIN; if( !file_exists($common_dir .$common_file) ){ // print $common_dir .$common_file ."が見つかりません"; }else{ $html = TmplUty::getText( $common_dir .$common_file, $buf); } return $html; } //ブランドメニュー取得 //引数 // menu_id // 1:コンセプト 2:ヒストリー // cate_id // 11:ブランドコンセプト 12:プロダクトコンセプト // 21:ヒストリー 22:年表 // sub_cate_id // 111:ブランドコンセプト // 121:グラブ 122:シューズ 123:バット 124:ウェア 125:エキップメント // 211:SSK野球用品の誕生 212:総合野球ブランドへ 213:海外への進出 214:「ニューSマーク」の誕生と現在 // 221:1940-70年代 222:1980年代 223:1990年代 224:2000年〜 //返値 // htmlバッファ function getBrandMenu( $menu_id=1, $cate_id=1, $sub_cate_id=1 ){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $common_dir = $site_dir ."/tmpl/"; $common_file = "brand_menu.tmpl"; $id = $menu_id .substr($cate_id, -1, 1) .substr($sub_cate_id, -1, 1); //URLと表示名のセット //サブメニュー展開 $buf['BRAND_PUT'] = 0; $buf['PRODUCT_PUT'] = 0; $buf['HISTORY_PUT'] = 1; $buf['CHRONO_PUT'] = 1; //ページ選択状態 switch( $menu_id ){ case 1: $buf['TOP_CONCEPT_SEL'] = 1; break; case 2: $buf['TOP_HISTORY_SEL'] = 1; break; default: $buf['TOP_CONCEPT_SEL'] = 1; break; } //ページ選択状態 switch( $cate_id ){ case 11: $buf['BRAND_SEL'] = 1; break; case 12: $buf['PRODUCT_SEL'] = 1; break; case 21: $buf['HISTORY_SEL'] = 1; break; case 22: $buf['CHRONO_SEL'] = 1; break; default: $buf['BRAND_SEL'] = 1; break; } //ブランドコンセプト $buf['BRAND'][0]['ID'] = 111; $buf['BRAND'][0]['URL'] = "/" .SSKBB_DOMAIN ."/brand/brand_consept.php"; $buf['BRAND'][0]['TITLE'] = "ブランドコンセプト"; //プロダクトコンセプト $buf['PRODUCT'][0]['ID'] = 121; $buf['PRODUCT'][0]['URL'] = "/" .SSKBB_DOMAIN ."/product_concept/gloves.php"; $buf['PRODUCT'][0]['TITLE'] = "グラブ"; $buf['PRODUCT'][1]['ID'] = 122; $buf['PRODUCT'][1]['URL'] = "/" .SSKBB_DOMAIN ."/product_concept/shoes.php"; $buf['PRODUCT'][1]['TITLE'] = "シューズ"; $buf['PRODUCT'][2]['ID'] = 123; $buf['PRODUCT'][2]['URL'] = "/" .SSKBB_DOMAIN ."/product_concept/bat.php"; $buf['PRODUCT'][2]['TITLE'] = "バット"; $buf['PRODUCT'][3]['ID'] = 124; $buf['PRODUCT'][3]['URL'] = "/" .SSKBB_DOMAIN ."/product_concept/wear.php"; $buf['PRODUCT'][3]['TITLE'] = "ウェア"; $buf['PRODUCT'][4]['ID'] = 125; $buf['PRODUCT'][4]['URL'] = "/" .SSKBB_DOMAIN ."/product_concept/equipment.php"; $buf['PRODUCT'][4]['TITLE'] = "エキップメント"; //ヒストリー $buf['HISTORY'][0]['ID'] = 211; $buf['HISTORY'][0]['URL'] = "/" .SSKBB_DOMAIN ."/brand/history1.php"; $buf['HISTORY'][0]['TITLE'] = "SSK野球用品の誕生"; $buf['HISTORY'][1]['ID'] = 212; $buf['HISTORY'][1]['URL'] = "/" .SSKBB_DOMAIN ."/brand/history2.php"; $buf['HISTORY'][1]['TITLE'] = "総合野球ブランドへ"; $buf['HISTORY'][2]['ID'] = 213; $buf['HISTORY'][2]['URL'] = "/" .SSKBB_DOMAIN ."/brand/history3.php"; $buf['HISTORY'][2]['TITLE'] = "海外への進出"; $buf['HISTORY'][3]['ID'] = 214; $buf['HISTORY'][3]['URL'] = "/" .SSKBB_DOMAIN ."/brand/history4.php"; $buf['HISTORY'][3]['TITLE'] = "「ニューSマーク」の誕生と現在"; //年表 $buf['CHRONO'][0]['ID'] = 221; $buf['CHRONO'][0]['URL'] = "/" .SSKBB_DOMAIN ."/brand/brand_history.php"; $buf['CHRONO'][0]['TITLE'] = "1940〜70年代"; $buf['CHRONO'][1]['ID'] = 222; $buf['CHRONO'][1]['URL'] = "/" .SSKBB_DOMAIN ."/brand/brand_history2.php"; $buf['CHRONO'][1]['TITLE'] = "1980年代"; $buf['CHRONO'][2]['ID'] = 223; $buf['CHRONO'][2]['URL'] = "/" .SSKBB_DOMAIN ."/brand/brand_history3.php"; $buf['CHRONO'][2]['TITLE'] = "1990年代"; $buf['CHRONO'][3]['ID'] = 224; $buf['CHRONO'][3]['URL'] = "/" .SSKBB_DOMAIN ."/brand/brand_history4.php"; $buf['CHRONO'][3]['TITLE'] = "2000年〜2005年"; $buf['CHRONO'][4]['ID'] = 225; $buf['CHRONO'][4]['URL'] = "/" .SSKBB_DOMAIN ."/brand/brand_history5.php"; $buf['CHRONO'][4]['TITLE'] = "2006年〜現在"; //チェック foreach($buf['BRAND'] as $idx=>$val ){ if( $id==$val['ID'] ){ $buf['BRAND'][$idx]['SEL'] = 1; } } foreach($buf['PRODUCT'] as $idx=>$val ){ if( $id==$val['ID'] ){ $buf['PRODUCT'][$idx]['SEL'] = 1; } } foreach($buf['HISTORY'] as $idx=>$val ){ if( $id==$val['ID'] ){ $buf['HISTORY'][$idx]['SEL'] = 1; } } foreach($buf['CHRONO'] as $idx=>$val ){ if( $id==$val['ID'] ){ $buf['CHRONO'][$idx]['SEL'] = 1; } } $buf['SITE_DIR'] = SSKBB_DOMAIN; if( !file_exists($common_dir .$common_file) ){ print $common_dir .$common_file ."が見つかりません"; }else{ $html = TmplUty::getText( $common_dir .$common_file, $buf); } return $html; } function getBrandMenu_en( $menu_id=1, $cate_id=1, $sub_cate_id=1 ){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $tmpl_dir = $site_dir ."/tmpl/"; $tmpl_file = "brand_menu.tmpl"; require_once("baseball/getBrandMenuEn.php"); $buf = getBrandDataEn( $menu_id, $cate_id, $sub_cate_id ); $buf['SITE_DIR'] = SSKBB_DOMAIN; $html = TmplUty::getText( $tmpl_dir .$tmpl_file, $buf); return $html; } //プレイヤーズサポートメニュー取得 //引数 // menu_id // 1:アドバイザリースタッフ 2:アクティビティ // cate_id // 11:JAPAN 12:USA // 21:アクティビティ //返値 // htmlバッファ function getPlayerMenu( $menu_id=1, $cate_id=1 ){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $common_dir = $site_dir ."/tmpl/"; $common_file = "player_menu.tmpl"; $id = $menu_id .substr($cate_id, -1, 1); //サブメニュー展開 $buf['ADV_PUT'] = 1; $buf['ACT_PUT'] = 0; //ページ選択状態 switch( $menu_id ){ case 1: $buf['TOP_ADVISOR_SEL'] = 1; break; case 2: $buf['TOP_ACTIVITY_SEL'] = 1; break; default: $buf['TOP_ADVISOR_SEL'] = 1; break; } //URLと表示名のセット //アドバイザリースタッフ $buf['ADV'][0]['ID'] = 11; $buf['ADV'][0]['URL'] = "/" .SSKBB_DOMAIN ."/adv_sup/advisor.php"; $buf['ADV'][0]['TITLE'] = "JAPAN"; $buf['ADV'][1]['ID'] = 12; $buf['ADV'][1]['URL'] = "/" .SSKBB_DOMAIN ."/adv_sup/advisor_usa.php"; $buf['ADV'][1]['TITLE'] = "USA"; //チェック foreach($buf['ADV'] as $idx=>$val ){ if( $id==$val['ID'] ){ $buf['ADV'][$idx]['SEL'] = 1; } } $buf['SITE_DIR'] = SSKBB_DOMAIN; if( !file_exists($common_dir .$common_file) ){ print $common_dir .$common_file ."が見つかりません"; }else{ $html = TmplUty::getText( $common_dir .$common_file, $buf); } return $html; } function getPlayerMenu_en( $menu_id=1, $cate_id=1 ){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $tmpl_dir = $site_dir ."/tmpl/"; $tmpl_file = "player_menu.tmpl"; require_once("baseball/getPlayerMenuEn.php"); $buf = getPlayerDataEn( $menu_id, $cate_id ); $buf['SITE_DIR'] = SSKBB_DOMAIN; $html = TmplUty::getText( $tmpl_dir .$tmpl_file, $buf); return $html; } //ニュースメニュー取得 //引数 // link_script // スクリプト名 //返値 // htmlバッファ function getNewsMenu( $conn, $year="", $st_year=2002, $page_pos="top" ){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $common_dir = $site_dir ."/tmpl/"; $common_file = "news_menu.tmpl"; //URLと表示名のセット if( $year=="" ){ if( $_REQUEST['year'] ) $year = $_REQUEST['year']; else $year = date("Y"); } if( $_REQUEST['search_str'] ){ $buf['search_str'] = $_REQUEST['search_str']; } $year_sel_str = ""; $idx = 0; for( $y = date("Y"); $y >= $st_year; $y--, $idx++ ){ $buf['NEWS_MENU'][$idx]['YEAR'] = $y; if( $year==$y ){ //ページ選択状態 $buf['NEWS_MENU'][$idx]['SEL'] = true; } } require_once("baseball/getNews.php"); if( $page_pos=="detail" ){ $buf['TOP_NEWS_EXIST'] = true; $buf['TOP_NEWS'] = getTopNews($conn); } $buf['SITE_DIR'] = SSKBB_DOMAIN; if( !file_exists($common_dir .$common_file) ){ print $common_dir .$common_file ."is dont find."; }else{ $html = TmplUty::getText( $common_dir .$common_file, $buf); } return $html; } //製品情報左メニュー //引数 // conn:DB接続リソース // cate1:種目ID cate2:品目ID cate3:小分類ID // brand:ブランドID // search_str:検索キーワード //返値 // html文字列 function getProductMenu( $conn, $cate1, $cate2, $cate3, $brand, $search_str, $taisho, $kakakumin, $kakakumax, $shoesize, $wearsize, $probrain_flag=0 ){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; require_once($site_dir ."/syohin_menu.php"); $buf['SITE_DIR'] = SSKBB_DOMAIN; $html = TmplUty::getText( $tmpl_dir .$tmpl_file, $buf); return $html; } //最近見た商品リスト //引数 // conn:DB接続リソース //返値 // html文字列 function getCheckMenu( $conn ){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $buf['dummy'] = time(); require_once($site_dir ."/check_menu.php"); $buf['SITE_DIR'] = SSKBB_DOMAIN; $html = TmplUty::getText( $tmpl_dir .$tmpl_file, $buf); return $html; } //関連商品 //引数 // conn:DB接続リソース //返値 // html文字列 function getKanrenMenu( $conn, $ary_where ){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $common_dir = $site_dir ."/tmpl/"; $common_file = "kanren_menu.tmpl"; require_once("baseball/getKanren.php"); $buf['KANREN'] = getKanrenData($conn, $ary_where); if( is_array($buf['KANREN']) && count($buf['KANREN']) ){ $buf['KANREN_EXIST'] = true; } $buf['SITE_DIR'] = SSKBB_DOMAIN; if( !file_exists($common_dir .$common_file) ){ print $common_dir .$common_file ."is dont find."; }else{ $html = TmplUty::getText( $common_dir .$common_file, $buf); } return $html; } //ショップ左メニュー //引数 // //返値 // html文字列 function getShopMenu( $conn ){ $site_dir = $_SERVER['DOCUMENT_ROOT'] ."/" .SSKBB_DOMAIN; $common_dir = $site_dir ."/tmpl/"; $common_file = "shop_menu.tmpl"; if( $_REQUEST['pidx']=="" ) $pidx ="0"; else $pidx =$_REQUEST['pidx']; if( isset($_REQUEST['fuken']) && $_REQUEST['fuken'] )$buf['fuken'] = $_REQUEST['fuken']; if( isset($_REQUEST['search_str']) && $_REQUEST['search_str'] ) $buf['search_str'] = $_REQUEST['search_str']; $sql = " SELECT ID, NAME FROM WLGUSER.PREFCTBL WHERE ID <= 47 ORDER BY ID"; $rec = DButil::query($conn,$sql); for($i=0; $i= $st_year; $y--, $idx++ ){ $buf['NEWS_MENU'][$idx]['YEAR'] = $y; if( $year==$y ){ //ページ選択状態 $buf['NEWS_MENU'][$idx]['SEL'] = true; } } require_once("getNews.php"); if( $page_pos=="detail" ){ $buf['TOP_NEWS_EXIST'] = true; $buf['TOP_NEWS'] = getTopNews($conn); } $buf['SITE_DIR'] = SSKBB_DOMAIN; if( !file_exists($common_dir .$common_file) ){ print $common_dir .$common_file ."is dont find."; }else{ $html = TmplUty::getText( $common_dir .$common_file, $buf); } return $html; } ?>