/* 
    IntraPMS Project
    사용자의 개인 정보를 변경하는 html폼을 제공하는 서블릿

    
*/
import java.io.* ;
import javax.servlet.* ;
import javax.servlet.http.* ;

import java.util.*;

import java.sql.DriverManager ;
import java.sql.Connection ;
import java.sql.Statement ;
import java.sql.ResultSet ;
import java.sql.SQLException ;

import com.etri.groupware.*;
import com.etri.groupware.organization.*;

public class PersonInformationServlet extends HttpServlet
{
	GroupwareControllerInterface gc = null ;
	OrganizationManagementControllerInterface  omc = null ;
	Properties myPro = null ;

	public void init ( ServletConfig config ) throws ServletException {
		super.init ( config ) ;
		System.out.println ( "PersonInforamtionServlet init () Call..........." ) ;

		// 그룹웨어 컨트롤러를 생성한다.
		// 먼저 프라퍼티를 생성한다.
		myPro = new Properties ( ) ;
		// DB매니저 구현 클래스 이름 설정
		myPro.put ( "OrganizationDBManagerClassName" , "PandaSoftOrganizationDBManager" ) ;
		myPro.put ( "BBSDBManagerClassName" , "PandaSoftBBSDBManager" ) ;
		myPro.put ( "EDADBManagerClassName" , "PandaSoftEDADBManager" ) ;
		myPro.put ( "MailDBManagerClassName" , "PandaSoftMailDBManager" ) ;
		////////////////////////////////////////
		System.out.println ( "사원 개인 정보 서블릿의 POST에서 프라퍼티 설정을 무사히 마쳤습니다." ) ;
		
		try {
			gc = GroupwareController.init ( myPro ) ;
			/////////////////////////////////////////////////
			System.out.println ( "사원 개인 정보 서블릿의 POST에서 사용할 그룹웨어 컨트롤러 생성을 무사히 마쳤습니다." ) ;
			
			// 조직도 관리 컨트롤러를 가져온다.
			omc = gc.createOrganizationManagementController ( ) ;
			///////////////////////////////////////////////////////////
			System.out.println ( "사원 개인 정보 서블릿의 POST에서 사용할 조직도 관리 컨트롤러 생성도 무사히 마쳤습니다." ) ;
		} catch ( Exception e ) { }
		
	}
	
	public void destroy ( ) {
		super.destroy();
		DBConnectionManager.instance.release() ;
		System.out.println ( "PersonInformationServlet destroy () Call..........." ) ;
	}

	/*----------------------------------------------------------------- */
	/**
	 [메소드이름]: doGet<br>
	 [기능]: 사용자의 개인 정보를 변경하는 html폼을 제공한다.<br>
	 [파라미터]: HttpServletRequest request, HttpServletResponse response<br>
	 [호출자] : 사용자<br>
	 */
	/*--------------------------------------------------------------- */		
	public void doGet (
		HttpServletRequest request ,
		HttpServletResponse response ) throws ServletException , IOException
	{
		PrintWriter out ;
		String head = " 팬더 소프트 " ;
		// Set content type and other response header fields first
		response.setContentType ( "text/html;charset=euc-kr" ) ;
		// then write the data of the response
		out = new PrintWriter ( new OutputStreamWriter ( response.getOutputStream ( ) , "EUC-KR" ) ) ;
		
		/////////////////////////////////////////////
		// 세션 확인 부분 - 인증되지 않은 사용자의 경우 Login.html 로 되돌려 보낸다.
		String authenKind = null ;
		String id = null ;
		String department = null ;
		String team = null ;
		String authenName = null ;
		String authenLoginStatus = null;
		
		HttpSession session = request.getSession ();
		authenLoginStatus =  (String)session.getValue("Authentication");
		
		if( (authenLoginStatus == null) || ( !(authenLoginStatus.equals("true")) ) ){
			session.invalidate();
			response.sendRedirect("../Login.html");
		} else {
			authenKind = (String)session.getValue("Kind");
			id = (String)session.getValue("Id");
			department = (String)session.getValue("Department") ;
			team = (String)session.getValue("Team") ;
			authenName = (String)session.getValue("Name");   
		}
		/////////////////////////////////////////////

		Official[] allOfficial ;

		Team oTeam = new Team ( ) ;
		oTeam.setName ( team ) ;
		oTeam.setUpDepartment ( department ) ;
		allOfficial = omc.getAllOfficial ( oTeam ) ;
		
		int index ;
		for ( index=0 ; !(allOfficial[index].getId().equals(id)) ; index++ ) ;
		
		out.println ( "<html><head><title>팬더 소프트</title>" ) ;
		out.println ( "<style type=\"text/css\">" ) ;
		out.println ( "BODY {font-size:9pt; color:\"#000000\"; line-height:14px;}" ) ;
		out.println ( "A:Link {font-size:9pt; color:\"#000033\"; line-height:14px; text-decoration:none}" ) ;
		out.println ( "A:Visited {font-size:9pt; color:\"#330033\"; line-height:14px; text-decoration:none}" ) ;
		out.println ( "A:Hover {font-size:9pt; color:\"#0000ff\"; line-height:14px; text-decoration:underline}" ) ;
		out.println ( "td {font-size:9pt;}" ) ;
		out.println ( "td.red {font-size:9pt; color:\"#ff0000\"}" ) ;
		out.println ( "td.black {font-size:9pt; color:\"#000000\"}" ) ;
		out.println ( "td.navy {font-size:9pt; color:\"#000066\"}" ) ;
		out.println ( "td.space {font-size:1pt;}" ) ;
		out.println ( "</style>  </HEAD>" ) ;
		out.println ( "<body>" ) ;
		
		out.println ( "<p align=right><img src=\"/image/우측_개인정보.gif\"></p>" ) ;
		
		out.println ( "<script language=\"JavaScript\">" ) ;
		out.println ( "<!--" ) ;
		out.println ( "	function Check_Form(form)" ) ;
		out.println ( "	{ " ) ;
		out.println ( "	if ( form.id.value.length == 0 )	 alert(\"사원의 ID는 필수 항목입니다!!!!\");" ) ;
		out.println ( "	else if ( form.password.value.length == 0 )	 alert(\"사원의 패스워드는 필수 항목입니다!!!!\");" ) ;
		out.println ( "	else if ( form.password2.value.length == 0 )	 alert(\"사원의 패스워드 확인은 필수 항목입니다!!!!\");" ) ;
		out.println ( "	else if ( form.password2.value != form.password.value )	 alert(\"패스워드가 일치하지 않습니다.!!!!\");" ) ;
		out.println ( "	else if ( form.residentRegistrationNum.value.length == 0 )	 alert(\"사원의 주민등록번호는 필수 항목입니다!!!!\");" ) ;				
		out.println ( "	else if ( form.firstName.value.length == 0 )	 alert(\"사원의 이름은 필수 항목입니다!!!!\");" ) ;
		out.println ( "	else if ( form.familyName.value.length == 0 )	 alert(\"사원의 성은 필수 항목입니다!!!!\");" ) ;
		out.println ( "	else if ( form.sex.value.length == 0 )	 alert(\"사원의 성별은 필수 항목입니다!!!!\");" ) ;
		out.println ( "	else if ( form.weightWork.value.length == 0 )	 alert(\"사원의 주요업무는 필수 항목입니다!!!!\");" ) ;
		out.println ( "	else if ( form.orders.value.length == 0 )	 alert(\"사원의 직급은 필수 항목입니다!!!!\");" ) ;
		out.println ( "	else {" ) ;
		out.println ( "           var numMonth=form.month.selectedIndex;" ) ;
		out.println ( "           var valueMonth = form.month.options[numMonth].value;" ) ;
		out.println ( "           var numDay=form.day.selectedIndex;" ) ;
		out.println ( "           var valueDay=form.day.options[numDay].value;" ) ;
		out.println ( "           var numYear=form.year.selectedIndex;" ) ;
		out.println ( "           var valueYear=form.year.options[numYear].value;" ) ;
		out.println ( "              if((((form.year.options[numYear].value % 4) == 0) && ((form.year.options[numYear].value % 100) != 0) || ((form.year.options[numYear].value % 400) == 0))){" ) ;
		out.println ( "                     var temp = 1;" ) ;
		out.println ( "              }" ) ;
		out.println ( "              else{" ) ;
		out.println ( "                     var temp = 2;" ) ;
		out.println ( "              }" ) ;
		out.println ( "	      if((form.month.options[numMonth].value == 1) && ((form.day.options[numDay].value > 31) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"1월은 1에서 31일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "        else if((form.month.options[numMonth].value == 2) && (temp == 1) && (form.day.options[numDay].value > 29)){" ) ;
		out.println ( "                  alert(\"윤년 2월은 1에서 29일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 2) && (temp == 2) && (form.day.options[numDay].value >28)){" ) ;
		out.println ( "                  alert(\"평년 2월은 1에서 28일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 3) && ((form.day.options[numDay].value > 31) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"3월은 1에서 31일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 4) && ((form.day.options[numDay].value > 30) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"4월은 1에서 30일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 5) && ((form.day.options[numDay].value > 31) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"5월은 1에서 31일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 6) && ((form.day.options[numDay].value > 30) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"6월은 1에서 30일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 7) && ((form.day.options[numDay].value > 31) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"7월은 1에서 31일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 8) && ((form.day.options[numDay].value > 31) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"8월은 1에서 31일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 9) && ((form.day.options[numDay].value > 30) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"9월은 1에서 30일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 10) && ((form.day.options[numDay].value > 31) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"10월은 1에서 31일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 11) && ((form.day.options[numDay].value > 30) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"11월은 1에서 30일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else if((form.month.options[numMonth].value == 12) && ((form.day.options[numDay].value > 31) || (form.day.options[numDay].value < 1))){" ) ;
		out.println ( "                  alert(\"12월은 1에서 31일 사이입니다.\");" ) ;
		out.println ( "              }   " ) ;
		out.println ( "              else form.submit(); " ) ;
		out.println ( "        }		" ) ;
		out.println ( "	} " ) ;
		out.println ( "function Back_Click()" ) ;
		out.println ( "	{ " ) ;
		out.println ( "		history.back();" ) ;
		out.println ( "	} " ) ;
		out.println ( "function img_Click()" ) ;
		out.println ( "	{ " ) ;
		out.println ( "    var file ; " ) ;
		out.println ( "    document.all.img.style.display=(document.all.img.style.display=='none')?'':'none';" ) ;
		out.println ( "    file = \"file:///\" + document.forms[0].image.value ; " ) ;
		out.println ( "		document.forms[0].img.src = file ; " ) ;
		out.println ( "	} " ) ;
		out.println ( "function firstfileView()" ) ;
		out.println ( "	{ " ) ;
		out.println ( "    var file ; " ) ;
		out.println ( "    document.all.img.style.display=(document.all.img.style.display=='none')?'':'none';" ) ;
		// 서버에 저장된 파일을 꺼내서 보여줘야 한다.
		out.println ( "    file = \"/file/org/\" + \"" + allOfficial[index].getImagePath() + "\" ; " ) ;
		out.println ( "		document.forms[0].img.src = file ; " ) ;     
		out.println ( "	} " ) ;
		out.println ( "function fileView()" ) ;
		out.println ( "	{ " ) ;
		out.println ( "    document.all.file.style.display=(document.all.file.style.display=='none')?'':'none';" ) ;
		out.println ( "    document.all.view.style.display=(document.all.view.style.display=='none')?'':'none';" ) ;
		out.println ( "	} " ) ;
		out.println ( "//-->" ) ;
		out.println ( "</script>" ) ;
		out.println ( "<form action=\"/servlet/PersonInformationChangeServlet\" method=\"POST\" enctype=\"multipart/form-data\">" ) ;
		out.println ( "<TABLE align=center border=0 cellPadding=2 cellSpacing=1 width=700>" ) ;
		out.println ( "  <TBODY><TR>" ) ;
		out.println ( "    <TD height=10 bgColor=#3399ff><FONT color=#ffffff size=2><B>[ 개인 정보 변경하기 ]</B></FONT> " ) ;
		out.println ( "  </TD></TR></TBODY></TABLE>" ) ;
		out.println ( "<CENTER><TABLE bgColor=#cccccc border=0 cellPadding=1 cellSpacing=1 width=700>" ) ;
				
		out.println ( "<tr bgColor=#f7f7f7>" ) ;
		// 아이디 입력하기.
		out.println ( "<td width=150><IMG src=\"/image/icon_red.gif\"><FONT size=2> ID</font></td>" ) ;
		out.println ( "<td colspan=2>" + id + "</td>" ) ;
		out.println ( "<input type=\"hidden\" name=\"id\" value=\"" + id + "\">" ) ;
		// 패스워드 입력하기
		out.println ( "<td width=150><IMG src=\"/image/icon_red.gif\"><FONT size=2> 패스워드</font></td>" ) ;
		out.println ( "<td colspan=2><input class=form type=\"password\" size=\"10\" name=\"password\" value=\"" + allOfficial[index].getPassword() + "\"><FONT size=1 color=red>&nbsp;*확인</font><input class=form type=\"password\" size=\"10\" name=\"password2\" value=\"" + allOfficial[index].getPassword() + "\"></td>" ) ;
		out.println ( "</tr><tr bgColor=#f7f7f7>" ) ;
				
		// 주민 등록번호
		out.println ( "<td ><IMG src=\"/image/icon_red.gif\"><FONT size=2> 주민등록번호</font></td>" ) ;
		out.println ( "<td colspan=2><input class=form type=\"text\" size=\"15\" name=\"residentRegistrationNum\" value=\"" + allOfficial[index].getResidentRegistrationNum() + "\"></td>" ) ;
		// 성별
		out.println ( "<td ><IMG src=\"/image/icon_red.gif\"><FONT size=2> 성별</font></td>" ) ;
		out.println ( "<td colspan=2><select class=form name=\"sex\">" ) ;
		if ( allOfficial[index].getSex() ) {
			out.println ( "<option selected value=\"1\">남자</option><option value=\"2\">여자</option></select></td>" ) ;
		} else {
			out.println ( "<option value=\"1\">남자</option><option selected value=\"2\">여자</option></select></td>" ) ;
		}
		out.println ( "</tr><tr bgColor=#f7f7f7>" ) ;
				
		// 성
		out.println ( "<td ><IMG src=\"/image/icon_red.gif\"><FONT size=2> 성</font></td>" ) ;
		out.println ( "<td colspan=2><input class=form type=\"text\" size=\"10\" name=\"familyName\" value=\"" + allOfficial[index].getFamilyName() + "\"></td>" ) ;			
		// 이름
		out.println ( "<td ><IMG src=\"/image/icon_red.gif\"><FONT size=2> 이름</font></td>" ) ;
		out.println ( "<td colspan=2><input class=form type=\"text\" size=\"10\" name=\"firstName\" value=\"" + allOfficial[index].getFirstName() + "\"></td>" ) ;
		out.println ( "</tr><tr bgColor=#f7f7f7>" ) ;
	
		// 직급
		out.println ( "<td ><IMG src=\"/image/icon_red.gif\"><FONT size=2> 직급</font></td>" ) ;
		out.println ( "<td colspan=2>" + allOfficial[index].getOrders() + "</td>" ) ;
		out.println ( "<input type=\"hidden\" name=\"orders\" value=\"" + allOfficial[index].getOrders() + "\">" ) ;
		// 나이 입력하기
		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 나이</font></td>" ) ;
		out.println ( "<td colspan=2><select class=form name=\"age\">" ) ;
		for ( int a = 18 ; a < 51 ; a++ ) {
			if ( allOfficial[index].getAge() == a ) {
				out.println ( "<option selected value=\"" + a + "\">" + a + "</option>" ) ;
			} else {
				out.println ( "<option value=\"" + a + "\">" + a + "</option>" ) ;
			}
		}
		out.println ( "</select></td>" ) ;
		out.println ( "</tr><tr bgColor=#f7f7f7>" ) ;
				
		// 부서 입력하기
		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 부서</font></td>" ) ;
		if ( department.equals("null") ) {
			out.println ( "<td colspan=2 valign=middle><input class=form type=\"hidden\" name=\"department\" value=\"" + department + "\">없음</td>" ) ;
		} else {
			out.println ( "<td colspan=2 valign=middle><input class=form type=\"hidden\" name=\"department\" value=\"" + department + "\">" + department + "</td>" ) ;
		}
		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 팀</font></td>" ) ;
		if ( team.equals("null") ) {
			out.println ( "<td colspan=2 valign=middle><input class=form type=\"hidden\" name=\"team\" value=\"" + team + "\">없음</td>" ) ;
		} else {
			out.println ( "<td colspan=2 valign=middle><input class=form type=\"hidden\" name=\"team\" value=\"" + team + "\">" + team + "</td>" ) ;
		}
		out.println ( "</tr><tr bgColor=#f7f7f7>" ) ;
		
		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 전화번호</font></td>" ) ;
		out.println ( "<td colspan=2><input class=form type=\"text\" size=\"20\" name=\"phoneNumber\" value=\"" + allOfficial[index].getPhoneNumber() + "\"></td>" ) ;
		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 팩스 번호</font></td>" ) ;
		out.println ( "<td colspan=2><input class=form type=\"text\" size=\"20\" name=\"faxNumber\" value=\"" + allOfficial[index].getFaxNumber() + "\"></td>" ) ;
		
		out.println ( "</tr><tr bgColor=#f7f7f7>" ) ;
		out.println ( "<td><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 휴대폰</font></td>" ) ;
		out.println ( "<td colspan=2><input class=form type=\"text\" size=\"20\" name=\"personalPhone\" value=\"" + allOfficial[index].getPersonalPhone() + "\"></td>" ) ;
		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 집 전화번호</font></td>" ) ;
		out.println ( "<td colspan=2><input class=form type=\"text\" size=\"20\" name=\"homePhoneNumber\" value=\"" + allOfficial[index].getHomePhoneNumber() + "\"></td>" ) ;
		out.println ( "</tr><tr bgColor=#f7f7f7>" ) ;
		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 주소</font></td>" ) ;
		out.println ( "<td colspan=2><input class=form type=\"text\" size=\"25\" name=\"address\" value=\"" + allOfficial[index].getAddress() + "\"></td>" ) ;
		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 우편번호</font></td>" ) ;
		out.println ( "<td colspan=2><input class=form type=\"text\" size=\"20\" name=\"zipCode\" value=\"" + allOfficial[index].getZipCode() + "\"></td>" ) ;
		out.println ( "</tr><tr bgColor=#f7f7f7>" ) ;
		
		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 권한 </font></td>" ) ;
		if ( allOfficial[index].getUserKind() == 0 ) {
			out.println ( "<td colspan=2><input class=form type=\"hidden\" name=\"userKind\" value=\"0\"> 사용자</td>" ) ;
		} else {
			out.println ( "<td colspan=2><input class=form type=\"hidden\" name=\"userKind\" value=\"1\"> 관리자</td>" ) ;
		}		
	
		out.println ( "<td><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 입사일</font></td>" ) ;
		out.println ( "<td colspan=2><p><select class=form name=\"year\">" ) ;
		Calendar cal = allOfficial[index].getEnterCompanyDay() ;
		for ( int y = 1990 ; y < 2021 ; y++ ) {
			if ( cal.get(Calendar.YEAR) == y ) {
				out.println ( "<option selected value=\"" + y + "\">" + y + "</option>" ) ;
			} else {
				out.println ( "<option value=\"" + y + "\">" + y + "</option>" ) ;
			}
		}
		out.println ( "</select>" ) ;
			
		out.println ( "<select name=\"month\">" ) ;
		for ( int m = 1 ; m < 13 ; m++ ) {
			if ( cal.get(Calendar.MONTH) == m ) {
				out.println ( "<option selected value=\"" + m + "\">" + m + "</option>" ) ;
			} else {
				out.println ( "<option value=\"" + m + "\">" + m + "</option>" ) ;
			}
		}
		out.println ( "</select>" ) ;
		
		out.println ( "<select name=\"day\">" ) ;
		for ( int d = 1 ; d < 32 ; d++ ) {
			if ( cal.get(Calendar.DATE) == d ) {
				out.println ( "<option selected value=\"" + d + "\">" + d + "</option>" ) ;
			} else {
				out.println ( "<option value=\"" + d + "\">" + d + "</option>" ) ;
			}
		}
		out.println ( "</select></p></td>" ) ;
		out.println ( "</tr><tr bgColor=#f7f7f7>" ) ;

		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 주요 업무</font></td>" ) ;
		out.println ( "<td colspan=5><textarea class=form name=\"weightWork\" rows=\"2\" cols=\"60\">" + allOfficial[index].getWeightWork() + "</textarea></td>" ) ;
		out.println ( "</tr><tr bgColor=#f7f7f7>" ) ;
		out.println ( "<td ><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 기타 사항</font></td>" ) ;
		out.println ( "<td colspan=5><textarea class=form name=\"others\" rows=\"2\" cols=\"60\">" + allOfficial[index].getOthers() + "</textarea></td>" ) ;
		out.println ( "</tr>" ) ;
	
		// 사진 입력하기
		out.println ( "<TR bgColor=#f7f7f7><td><IMG src=\"/image/icon_dot1.gif\"><FONT size=2> 사진</font></td>" ) ;
		// 파일 업로드 하기.
		out.println ( "<td colspan=5 valign=center>" ) ;
		out.println ( "<INPUT type=button name=fileview value=\"사진 보기\" onClick=\"firstfileView()\">" ) ;
		out.println ( "<INPUT  type=button name=fileview value=\"사진 다시선택\" onClick=\"fileView()\">" ) ;
		out.println ( "<input STYLE=\"display:none\" id=file class=form type=\"file\" size=20 name=\"image\"><input type=\"hidden\" name=\"box\" value=\"box\">" ) ;
		out.println ( "<input STYLE=\"display:none\" id=view class=form name=\"but1\" type=\"button\" value=\"보기\" onClick=\"img_Click()\">" ) ;
		// 파일 업로드를 위한 파일 다이얼 로그 박스가 나오는 버튼이다.
		out.println ( "<img STYLE=\"display:none\" id=img name=img border=\"2\"></td>" ) ;
		out.println ( "</tr>" ) ;
		out.println ( "<TR bgColor=#f7f7f7><TD align=right colSpan=6><FONT color=red size=2><IMG src=\"/image/icon_red.gif\"> \"붉은색\"아이콘 항목은 반드시 입력하셔야 합니다. </FONT></TD></TR>" ) ;
				
		out.println ( "</TABLE></CENTER>" ) ;

		out.println ( "<BR><CENTER><TABLE border=0 cellPadding=2 cellSpacing=1>" ) ;
		out.println ( "  <TR><TD width=680 align=right>" ) ;
		out.println ( "<INPUT type=button name=update value=\"변경하기\" onClick=\"Check_Form(this.form)\">" ) ;
		out.println ( "<INPUT type=button name=back value=\"되돌아 가기\" onClick=\"Back_Click()\">" ) ;
		out.println ( "</TD></TR></TABLE></CENTER></FORM>" ) ;

		out.println ( "</body></html>" ) ;		
		
		out.close ( ) ;
	}
}


			
		