%@ page import="java.io.*" %>
<%@ include file ="../include/common.jsp"%>
Printing...
<%
String thisLine;
int start, intStartCheck, intEndCheck, startTable, endTable, statusTable;
String filePath = gbl_dir + "health_info/disease_information/osteoporosis/";
int fileCount = 24;
String[] fileName = new String[fileCount];
fileName[0] = "e_osteoporosis_about.html";
fileName[1] = "e_osteoporosis_effect.html";
fileName[2] = "e_osteoporosis_victum.html";
fileName[3] = "e_osteoporosis_prevent.html";
fileName[4] = "e_osteoporosis_diagnose.html";
fileName[5] = "e_osteoporosis_treat_intro.html";
fileName[6] = "e_osteoporosis_treat_drugs.html";
fileName[7] = "e_osteoporosis_treat_phy.html";
fileName[8] = "e_osteoporosis_treat_phy0.html";
fileName[9] = "e_osteoporosis_treat_phy1.html";
fileName[10] = "e_osteoporosis_treat_phy2.html";
fileName[11] = "e_osteoporosis_treat_phy3.html";
fileName[12] = "e_osteoporosis_treat_phy4.html";
fileName[13] = "e_osteoporosis_guide.html";
fileName[14] = "e_osteoporosis_guide_food.html";
fileName[15] = "e_osteoporosis_guide_food1.html";
fileName[16] = "e_osteoporosis_guide_food2.html";
fileName[17] = "e_osteoporosis_guide_food3.html";
fileName[18] = "e_osteoporosis_guide_food4.html";
fileName[19] = "e_osteoporosis_guide_food5.html";
fileName[20] = "e_osteoporosis_guide_food6.html";
fileName[21] = "e_osteoporosis_guide_example.html";
fileName[22] = "e_osteoporosis_guide_value.html";
fileName[23] = "e_osteoporosis_guide_table.html";
for (int i=0; i < fileCount; i++) {
FileInputStream fname = new FileInputStream(filePath + fileName[i]);
InputStreamReader isr = new InputStreamReader(fname, "Big5");
BufferedReader brInputBuffer = new BufferedReader(isr);
start = 0;
intStartCheck = -1;
intEndCheck = -1;
startTable = -1;
endTable = -1;
statusTable = 0;
out.println("");
out.println("");
while ((thisLine = brInputBuffer.readLine()) != null) { // while loop begins here
if ((start == 1) && (statusTable == 2)) {
if (intStartCheck != -1) {
out.println(thisLine.substring(intStartCheck, thisLine.length()));
} else if (intEndCheck != -1) {
out.println(thisLine.substring(0, intEndCheck));
} else {
out.println(thisLine);
}
}
intStartCheck = thisLine.indexOf("");
startTable = thisLine.indexOf("");
if (intStartCheck != -1) {
start = 1;
}
if ((start == 1) && (intEndCheck != -1)) {
start = 0;
}
if ((start == 1) && (startTable != -1) && (statusTable == 0)) {
statusTable = 1;
}
if ((start == 1) && (endTable != -1) && (statusTable == 1)) {
statusTable = 2;
}
} // end while
out.println("");
out.println(" ");
fname.close();
}
%>
|