123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <%@ page language="java" pageEncoding="UTF-8" %>
- <%@ page import="java.io.File" %>
- <%@ page import="org.w3c.dom.Node" %>
- <%@ page import="kr.comsquare.soonsu.define.AdminMessage" %>
- <%@ page import="kr.comsquare.common.library.XmlLib" %>
- <%@ page import="kr.comsquare.soonsu.service.context.TrustFormServletContextListener" %>
- <% request.setCharacterEncoding("UTF-8"); %>
- <html>
- <head>
- <title>TrustForm Soonsu</title>
- </head>
- <%
- String strLanguage = AdminMessage.LANGUAGE;
- String strFontFamily = "Dotum, arial";
- if ("jp".equals(strLanguage))
- {
- strFontFamily = "MS Gothic, arial";
- }
- else if ("us".equals(strLanguage))
- {
- strFontFamily = "arial";
- }
-
- AdminMessage objAdminMessage = new AdminMessage();
- String strLogin = (String)session.getAttribute("login");
- String strUserHome = System.getProperty("user.home");
- String strAppName = TrustFormServletContextListener.s_strApplicationName.replace("/", "");
- strAppName = strAppName.equals("") ? "ROOT" : strAppName;
- File objAdminFile = new File(strUserHome+File.separator + "tfconfig"+ File.separator+strAppName+".xml");
-
- if (!objAdminFile.exists() || strLogin == null || !strLogin.equals("Success"))
- {
- %>
- <script type="text/javascript">
- alert("<%=objAdminMessage.getMessage("main01")%>");
- if (window.parent.document.getElementById("modalBackground"))
- {
- window.parent.document.getElementById("tableModify").style.visibility = "hidden";
- window.parent.document.getElementById("modalBackground").style.visibility = "hidden";
- window.parent.document.getElementById("frameModify").src = "";
- }
- else
- {
- location.href = "index.jsp";
- }
- </script>
- <%
- return;
- }
- Node xnTfConfig = XmlLib.loadXmlDocument(objAdminFile);
- Node xnLoginId = XmlLib.selectSingleNode(xnTfConfig, "loginInfo/loginId");
- Node xnLoginPw = XmlLib.selectSingleNode(xnTfConfig, "loginInfo/loginPw");
- String strGetId = XmlLib.getTextValue(xnLoginId);
- String strGetPassword = XmlLib.getTextValue(xnLoginPw);
- %>
- <script src="HttpClient.js" type="text/javascript"></script>
- <script type="text/javascript">
- var objHttpClient = new HttpClient();
-
- function submitModify ()
- {
- if (document.getElementById("inputId").value == "")
- {
- alert("<%=objAdminMessage.getMessage("admin01")%>");
- document.getElementById("inputId").focus();
- return;
- }
-
- if (document.getElementById("inputPassword").value == "" || document.getElementById("inputPassword").value != document.getElementById("inputPasswordConfirm").value)
- {
- alert("<%=objAdminMessage.getMessage("modify01")%>");
- document.getElementById("inputPassword").focus();
- return;
- }
-
- if (confirm("<%=objAdminMessage.getMessage("modify02")%>"))
- {
- var strData = encodeURI("inputId");
- strData += "=";
- strData += encodeURI(document.getElementById("inputId").value);
- strData += "&";
- strData += encodeURI("inputPassword");
- strData += "=";
- strData += encodeURI(document.getElementById("inputPassword").value);
-
- var strResult = objHttpClient.send("AdminModify.tfs", strData, false);
-
- closeModify();
-
- if (strResult == "Success")
- {
- alert("<%=objAdminMessage.getMessage("modify03")%>");
- }
- else if (strResult == "InitFailure")
- {
- alert("<%=objAdminMessage.getMessage("main01")%>");
- }
- else
- {
- alert("<%=objAdminMessage.getMessage("admin05")%>");
- }
- }
- }
- function closeModify ()
- {
- window.parent.document.getElementById("tableModify").style.visibility = "hidden";
- window.parent.document.getElementById("modalBackground").style.visibility = "hidden";
- window.parent.document.getElementById("frameModify").src = "";
- }
- </script>
- <body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
- <table cellpadding="0" cellspacing="0" align="center">
- <tr>
- <td width="400px" height="170px">
- <table cellpadding="0" cellspacing="0" align="center">
- <tr>
- <td width="73px" height="75px" rowspan="3" style="font-size:0;">
- <img src="image/modify02_<%=strLanguage%>.jpg" width="73px" height="75px" border="0"/>
- </td>
- <td align="right" width="218px" height="25px">
- <input id="inputId" name="inputId" type="text" style="font-family:<%=strFontFamily%>;font-size:9pt;width:208px;height:20px;border:1px solid #D6D6D6;" tabindex="1" onkeypress="javascript:if (event.keyCode==13) {submitModify();}" value="<%=strGetId%>" title="<%=objAdminMessage.getTip("admin01")%>"/>
- </td>
- </tr>
- <tr>
- <td align="right" width="218px" height="25px">
- <input id="inputPassword" name="inputPassword" type="password" style="width:208px;height:20px;border:1px solid #D6D6D6;" tabindex="2" onkeypress="javascript:if (event.keyCode==13) {submitModify();}" value="<%=strGetPassword%>" title="<%=objAdminMessage.getTip("admin02")%>"/>
- </td>
- </tr>
- <tr>
- <td align="right" width="218px" height="25px">
- <input id="inputPasswordConfirm" name="inputPasswordConfirm" type="password" style="width:208px;height:20px;border:1px solid #D6D6D6;" tabindex="3" onkeypress="javascript:if (event.keyCode==13) {submitModify();}" title="<%=objAdminMessage.getTip("modify01")%>"/>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td width="400px" height="82px">
- <table cellpadding="0" cellspacing="0" align="center">
- <tr>
- <td width="379px" height="80px" align="center" style="border-top:1px solid #D8D8D8;">
- <img src="image/modalButtOk_<%=strLanguage%>.gif" tabindex="4" onclick="submitModify();" onkeypress="javascript:if (event.keyCode==13) {submitModify();}" style="background-color:#CCCCCC; cursor:hand; " width="56px" height="25px" border="0" title="<%=objAdminMessage.getTip("modal01")%>" alt="<%=objAdminMessage.getTip("modal01")%>"/>
- <img src="image/modalButtCancel_<%=strLanguage%>.gif" tabindex="5" onclick="closeModify();" onkeypress="javascript:if (event.keyCode==13) {closeModify();}" style="background-color:#CCCCCC; cursor:hand; " width="56px" height="25px" border="0" title="<%=objAdminMessage.getTip("modal02")%>" alt="<%=objAdminMessage.getTip("modal02")%>"/>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </body>
- </html>
|