1,"catcher"=>2,"infielder"=>3,"outfielder"=>4,"manager"=>5); $POSINAME=array(1=>"Pitchers",2=>"Catchers",3=>"Infielders",4=>"Outfielders",5=>"Manager & Coaches"); $pos = $POSITION[$p]; $pos_name = $POSINAME[$POSITION[$p]]; $sql = " SELECT * FROM player_$PREFIX "; $sql .= " WHERE pl_open_flg::int >= $OPEN_LEVEL "; $sql .= " AND (pl_position::int = $pos or pl_position2::int = $pos)"; if($pos == 5){ $sql .= " ORDER BY pl_sort_num::int asc"; } else{ $sql .= " ORDER BY pl_number::int asc"; } $res = DBPG::Query($sql); $LR = array("l"=>"L","r"=>"R","s"=>"S"); while($row = pg_fetch_assoc($res)){ $num = $row['pl_number']; $list[$num]['name'] = $eng_player_list[$row['pl_number']]; // $list[$num]['name'] = $row['pl_name']; // $list[$num]['furi'] = $row['pl_name_kana']; $list[$num]['img'] = GetPlayerPicture(array("teamname"=>$PREFIX,"number"=>$num, "size"=>'92w')); $list[$num]['position'] = $POSINAME[$pos]; // START: 140322 add $list[$num]['birth'] = date("M j, Y",strtotime($row['pl_birthday'])); $list[$num]['pitchbat'] = $row['pl_batting']? $LR[$row['pl_batting']]."/": ""; $list[$num]['pitchbat'].= $row['pl_pitching']? $LR[$row['pl_pitching']]."": ""; //END: 140322 add if($pos == 5){ $list[$num]['position'] = $row['pl_position_name']; } $list[$num]['link'] = '/en/team/player/detail/'.$row['pl_number'].'.html'; } // echo '
';
// print_r($list);
// echo '

'; $_SMARTY->assign("pos",$pos); $_SMARTY->assign("pos_name",$pos_name); // 140322 add $_SMARTY->assign("list",$list); $_SMARTY->assign("link",$link); $_SMARTY->assign("meta",$meta); $_SMARTY->display($tpl,$cache_key); ?>