%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.xerces.parsers.*" %>
<%@ page import="org.w3c.dom.*" %>
<%
NodeList clnNod;
int nodeLength;
int colno;
String bgcolor="#99ffdd";
int matchNo = 0;//
String Area = "";
String Category = "";
String categoryS = "";
String Place = "";
String Place2 = "";
String selectedArea;
String selectedCategory;
Vector vPlace = new Vector();
Vector vPlace2 = new Vector();
Vector vRoom;
Vector vid = new Vector();
//DOMパーサーを作成
DOMParser prs = new DOMParser();
prs.parse(application.getRealPath("/toile/input/toile.xml"));
Document doc = prs.getDocument();
Element objRoot = doc.getDocumentElement();
clnNod = objRoot.getChildNodes();//
nodeLength = clnNod.getLength();//
colno = nodeLength/10+1;//テーブル(10行)の数
%>
小金井市のだれでもトイレ施設分類から
| ホーム |
だれでもトイレ一覧 |
施設分類から |
マップ |
提案 |
理想のだれでもトイレ |
活動 |
リンク集 |
小金井市のだれでもトイレ施設分類****
上記分類をクリックすると該当する施設が下に表示されます
<%
matchNo = 0;
selectedCategory = (String)request.getParameter("category");
if (selectedCategory != null) {
if (selectedCategory.equals("1")) categoryS = "市役所";
if (selectedCategory.equals("2")) categoryS = "公民館・集会所";
if (selectedCategory.equals("3")) categoryS = "文化施設";
if (selectedCategory.equals("4")) categoryS = "体育施設";
if (selectedCategory.equals("5")) categoryS = "保健施設";
if (selectedCategory.equals("6")) categoryS = "介護福祉施設";
if (selectedCategory.equals("7")) categoryS = "医療施設";
if (selectedCategory.equals("8")) categoryS = "学校";
if (selectedCategory.equals("9")) categoryS = "交通機関";
if (selectedCategory.equals("10")) categoryS = "その他公共施設";
if (selectedCategory.equals("11")) categoryS = "公園";
if (selectedCategory.equals("12")) categoryS = "商業施設";
for (int i = 1; i < nodeLength; i++) {
Element objNod = (Element)clnNod.item(i);
Attr atrId = (Attr)objNod.getAttributes().item(0);
String id = atrId.getValue();
Element objCategory = (Element)objNod.getElementsByTagName("category").item(0);
Category = objCategory.getChildNodes().item(0).getNodeValue();
if (Category.equals(selectedCategory)) {
Element objPlace = (Element)objNod.getElementsByTagName("place").item(0);
if (objPlace.getChildNodes().item(0) != null)
Place = objPlace.getChildNodes().item(0).getNodeValue();
Element objPlace2 = (Element)objNod.getElementsByTagName("place2").item(0);
if (objPlace2.getChildNodes().item(0) != null) {
Place2 = objPlace2.getChildNodes().item(0).getNodeValue();
} else {
Place2 = "";
}
matchNo += 1;
vid.addElement(String.valueOf(i));
vPlace.addElement(Place);
vPlace2.addElement(Place2);
}
}
%>
|
<%=categoryS%>
|
| |
<%
String back="select.jsp?category="+selectedCategory;//この画面に戻る
for (int i = 0; i < matchNo; i +=3) {
%>
<%
for (int j = 0; j <3; j++) {
int jj = i + j;
if (jj >= matchNo) break;
%>
| |
<%=vPlace.elementAt(jj)%>
<%=vPlace2.elementAt(jj)%>
|
<%
}
%>
| |
<%
}
%>
|
上記施設名をクリックするとその施設のだれでもトイレの詳細が表示されます
<%
}
%>