123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <%@ page language="java" pageEncoding="UTF-8" %>
- <%@ page import="java.io.File" %>
- <%@ page import="kr.comsquare.soonsu.define.AdminMessage" %>
- <%@ page import="kr.comsquare.common.library.FileLib" %>
- <%@ 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 strUserHome = System.getProperty("user.home");
- String strUserPath = TrustFormServletContextListener.s_strApplicationName + "/kr/comsquare/admin/";
- 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())
- {
- String strAdminXML = new String();
- strAdminXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
- strAdminXML = strAdminXML + "<tfConfig>\r\n";
- strAdminXML = strAdminXML + "\t<loginInfo>\r\n";
- strAdminXML = strAdminXML + "\t\t<loginId>trustform</loginId>\r\n";
- strAdminXML = strAdminXML + "\t\t<loginPw>soonsu</loginPw>\r\n";
- strAdminXML = strAdminXML + "\t</loginInfo>\r\n";
- strAdminXML = strAdminXML + "\t<generatePath>\r\n";
- strAdminXML = strAdminXML + "\t</generatePath>\r\n";
- strAdminXML = strAdminXML + "</tfConfig>";
- FileLib.saveFile(objAdminFile, strAdminXML);
- }
- %>
- <script src="<%=strUserPath%>HttpClient.js" type="text/javascript"></script>
- <script type="text/javascript">
- var objHttpClient = new HttpClient();
-
- function submitLogin ()
- {
- if (document.getElementById("inputId").value == "")
- {
- alert("<%=objAdminMessage.getMessage("admin01")%>");
- document.getElementById("inputId").focus();
- return;
- }
-
- if (document.getElementById("inputPassword").value == "")
- {
- alert("<%=objAdminMessage.getMessage("admin02")%>");
- document.getElementById("inputPassword").focus();
- return;
- }
-
- 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("<%=strUserPath%>AdminLogin.tfs", strData, false);
-
- if (strResult == "Success")
- {
- location.href = "<%=strUserPath%>main.jsp";
- }
- else if (strResult == "InitFailure")
- {
- alert("<%=objAdminMessage.getMessage("admin03")%>");
- }
- else if (strResult == "LoginFailure")
- {
- alert("<%=objAdminMessage.getMessage("admin04")%>");
- }
- else if (strResult == "TrialExpire")
- {
- alert("<%=objAdminMessage.getMessage("admin06")%>");
- }
- else
- {
- alert("<%=objAdminMessage.getMessage("admin05")%>");
- }
- }
- </script>
- <body topmargin="0" leftmargin="0" bgcolor="#ECECEC" marginwidth="0" marginheight="0">
- <table cellpadding="0" cellspacing="0" align="center" style="position:absolute;left:50%;top:50%;margin:-250 0 0 -250; background-color:#FFFFFF;">
- <tr>
- <td width="500px" height="201px" colspan="5"><img src="<%=strUserPath%>image/admin01_<%=strLanguage%>.jpg" width="500px" height="201px" border="0"/></td>
- </tr>
- <tr>
- <td width="50px" height="49px" style="background-color:#ECECEC">
- </td>
- <td width="5px" height="49px">
- </td>
- <td width="390px" height="49px" background="image/admin02.jpg">
- <table cellpadding="0" cellspacing="0" align="center">
- <tr>
- <td align="center" width="45px" height="49px" rowspan="2"><img src="<%=strUserPath%>image/admin05_<%=strLanguage%>.jpg" width="45px" height="49px" border="0"/></td>
- <td align="center" width="160px" height="24px">
- <input id="inputId" type="text" style="font-family:<%=strFontFamily%>;font-size:10pt;width:140px;height:20px;border:1px solid #D6D6D6;" tabindex="1" onkeypress="if (event.keyCode==13) {submitLogin();}" title="<%=objAdminMessage.getTip("admin01")%>"/>
- </td>
- <td align="center" width="74px" height="49px" rowspan="2">
- <img src="<%=strUserPath%>image/admin06.jpg" tabindex="3" style="width:74px; height:45px; border-style:none; background-color:#CCCCCC; cursor:hand; " onclick="submitLogin();" onkeypress="if (event.keyCode==13) {submitLogin();}" title="<%=objAdminMessage.getTip("admin03")%>" alt="<%=objAdminMessage.getTip("admin03")%>"/>
- </td>
- </tr>
- <tr>
- <td align="center" width="160px" height="25px">
- <input id="inputPassword" type="password" style="width:140px;height:20px;border:1px solid #D6D6D6;" tabindex="2" onkeypress="if (event.keyCode==13) {submitLogin();}" title="<%=objAdminMessage.getTip("admin02")%>"/>
- </td>
- </tr>
- </table>
- </td>
- <td width="5px" height="49px">
- </td>
- <td width="50px" height="49px" style="background-color:#ECECEC">
- </td>
- </tr>
- <tr>
- <td width="50px" height="62px" style="background-color:#ECECEC"></td>
- <td width="5px" height="62px"></td>
- <td width="390px" height="62px" background="<%=strUserPath%>image/admin03.jpg"></td>
- <td width="5px" height="62px"></td>
- <td width="50px" height="62px" style="background-color:#ECECEC"></td>
- </tr>
- <tr>
- <td width="500px" height="46px" colspan="5"><img src="<%=strUserPath%>image/admin04.jpg" width="500px" height="46px" border="0"/></td>
- </tr>
- </table>
- </body>
- </html>
|