");
$route_id = array(5,6,9,18);
foreach ($route_id as $r_id){
/*------------路線データの抽出------------*/
$con=@mysql_connect("localhost","event","L523GpA");
if(!$con){
unset($con,$data,$r_id,$lat,$lng,$time,$day);
die("DB接続エラー");
}
$select_db=@mysql_select_db("eventdb");
if(!$select_db){
unset($con,$select_db,$r_id,$lat,$lng,$time,$day);
die ("DB選択エラー");
}
@mysql_query("set names utf8");
$sql="select r_name,r_color,suspension_day from nroute_name_tbl where r_id=".$r_id;
$res = mysql_query($sql);
$route_data[$r_id][0] = @mysql_fetch_array($res);//路線のデータ
mysql_free_result($res);
$close=@mysql_close($con);
if(!$close){
unset($con,$select_db,$res,$sql,$row,$close,$r_id,$route_data);
die("DB切断エラー");
}
unset($con,$select_db,$res,$sql,$row,$close);
if($_GET['debug']==1){
echo "路線データ
";
echo "路線名:".$route_data[$r_id][0]['r_name']."
";
echo "ルート色:".$route_data[$r_id][0]['r_color']."
";
echo "運休日等:".$route_data[$r_id][0]['suspension_day']."
";
}
/*------------------------------------------*/
//print("
".$route_data[$r_id][0]['r_name']."
");
print("
".$route_data[$r_id][0]['r_name']."
");
print("
");
print("");
print("現在地 | ");
print(" | ");
print("
");
print("
");
print("運行状況 | ");
print(" | ");
print("
");
print("
");
print("
");
}
print("
");
?>