<% 옵션 명시적 '************************************************ '설명: 37080308 주소록 ' 작성자: gwd 2002-11-05 '************************************************ %> <!--#include file="pub/funcxml.asp"--> <!--#include 파일="pub/constpub.asp"--> <!--#include 파일="pub/funcpub.asp"--> <!--#include file="pub/class/clsPerson.asp"--> <% 희미한 objXml, objPerson Dim strErr Set objXml = Server.CreateObject("MSXML2.DOMDocument") Set objPerson = New Cls_Person ' Cls_Person 객체 생성 If Request.Form("btnOk") <> "" Then LoadXmlDoc(objXml, C_XMLFILE, False, strErr)이면 'XML 파일 로드' 해당 속성에 값 할당 objPerson.Name = CheckStrInput(Request.Form("txtName")) objPerson.Nick = CheckStrInput(Request.Form("txtNick")) objPerson.Mobile = CheckStrInput(Request.Form("txtMobile")) objPerson.Tel = CheckStrInput(Request.Form("txtTel")) objPerson.Email = CheckStrInput(Request.Form("txtEmail")) objPerson.QQ = CheckStrInput(Request.Form("txtQQ")) objPerson.Company = CheckStrInput(Request.Form("txtCompany")) If Not objPerson.AddToXml(objXml) Then ' Cls_Person 클래스의 AddToXml 메서드를 호출하여 데이터를 추가합니다 AddErr strErr, objPerson.GetLastError 또 다른 AddErr strErr, "성공적으로 추가되었습니다" Response.Write "<스크립트 언어=""javascript"">opener.location.reload();</script>" 종료 조건 종료 조건 종료 조건 objXml = 없음으로 설정 %> <HTML> <헤드> <TITLE><% = C_TITLE %></TITLE> <META HTTP-EQUIV="content-type" CONTENT="text/html;charset=GB2312"/> <link rel="stylesheet" href="contact.css" type="text/css"> <스크립트 언어="javascript"> <!-- 함수 CheckForm() { 사실을 반환; } //--> </스크립트> </HEAD> <바디> <% = strErr %> <div class="title">연락처 추가</div> <form name="form1" method="post" action="add.asp" onsubmit="return CheckForm()"> <테이블 align="center" width="100%" cellpacing="1" cellpadding="2" border="0" bgcolor="#666600"> <tr bgcolor="#ffffff"> <td width="25%" bgcolor="#e5e5e5" align="right"><b>이름: </b></td> <td width="75%"><input type="text" name="txtName" size="25" class="input" value="<%=CheckStrOutput(objPerson.Name)%>"></td > </tr> <tr bgcolor="#ffffff"> <td bgcolor="#e5e5e5" align="right"><b>영어 이름: </b></td> <td><input type="text" name="txtNick" size="25" class="input" value="<%=CheckStrOutput(objPerson.Nick)%>"></td> </tr> <tr bgcolor="#ffffff"> <td bgcolor="#e5e5e5" align="right"><b>휴대폰: </b></td> <td><input type="text" name="txtMobile" size="25" class="input" value="<%=CheckStrOutput(objPerson.Mobile)%>"></td> </tr> <tr bgcolor="#ffffff"> <td bgcolor="#e5e5e5" align="right"><b>전화: </b></td> <td><input type="text" name="txtTel" size="25" class="input" value="<%=CheckStrOutput(objPerson.Tel)%>"></td> </tr> <tr bgcolor="#ffffff"> <td bgcolor="#e5e5e5" align="right"><b>이메일:</b></td> <td><input type="text" name="txtEmail" size="25" class="input" value="<%=CheckStrOutput(objPerson.Email)%>"></td> </tr> <tr bgcolor="#ffffff"> <td bgcolor="#e5e5e5" align="right"><b>QQ:</b></td> <td><input type="text" name="txtQQ" size="25" class="input" value="<%=CheckStrOutput(objPerson.QQ)%>"></td> </tr> <tr bgcolor="#ffffff"> <td bgcolor="#e5e5e5" align="right"><b>회사: </b></td> <td><input type="text" name="txtCompany" size="25" class="input" value="<%=CheckStrOutput(objPerson.Company)%>"></td> </tr> </테이블> <br> <div 정렬="중앙"> <입력 유형="제출" 이름="btnOk" 값="제출"> <input type="button" name="btnClose" value="Close" onclick="javascript:return window.close();"> </div> </양식> </BODY> </HTML> <% objPerson = 아무것도 설정하지 않음 %> |