sendauthno.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. <%@page import="org.omg.CORBA.Request"%>
  2. <%@page contentType="text/html;charset=utf-8" %>
  3. <%@ page import="kr.co.hit.live.util.PropertyHelper"%>
  4. <%@ page import="kr.co.hit.live.vo.ValueObject"%>
  5. <%@ page import="kr.co.hit.live.util.StringHelper" %>
  6. <%!
  7. PropertyHelper ph = new PropertyHelper("live.himed.config");
  8. String systemcd = ph.getString("context","systemcd");
  9. String systemnm = ph.getString("context", "systemnm");
  10. String hissystem = ph.getString("system", "his");
  11. String crcsystem = ph.getString("system", "crc");
  12. String devsystem = ph.getString("system", "dev");
  13. String missystem = ph.getString("system", "mis");
  14. String domainstr = ph.getString("session", "domain");
  15. String a = "";
  16. String title = ph.getString("baseinfo", "title" , "");
  17. String tfsuversion = ph.getString("baseinfo", "tfsuversion", "2,6,4,6");
  18. String loginlogo = ph.getString("images" , "loginlogo");
  19. String loginimg = ph.getString("images" , "loginimg");
  20. %>
  21. <%
  22. String domainName = "http://"+ request.getServerName() + ":" + request.getServerPort();
  23. String domainURL = "http://" + domainstr + ":" + request.getServerPort() + "/himed";
  24. domainURL = domainURL.toLowerCase();
  25. String userid = StringHelper.null2void((String)request.getAttribute("userid"));
  26. String usernm = StringHelper.null2void((String)request.getAttribute("usernm"));
  27. String mob1 = StringHelper.null2void((String)request.getAttribute("mob1"));
  28. String mob2 = StringHelper.null2void((String)request.getAttribute("mob2"));
  29. String gtime = StringHelper.null2void((String)request.getAttribute("gtime"));
  30. String userauthno = StringHelper.null2void((String)request.getAttribute("userauthno"));
  31. %>
  32. <html>
  33. <head>
  34. <title><%=title%></title>
  35. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,IE=EmulateIE9"/>
  36. <link href="../css/hismain.css" rel="stylesheet" type="text/css">
  37. <script language="JavaScript" src="../js/ZUM006.js"></script>
  38. <script language="JavaScript" src="../js/ZUM003.js"></script>
  39. <script language="javascript">
  40. <!--
  41. var gTimerID = null;
  42. var gTime = 300;
  43. var gMaxTime = 300;
  44. var resetPwdPage = null;
  45. var authGuidePage = null;
  46. var systemcd = "<%=systemcd%>";
  47. function window::onLoad() {
  48. }
  49. function onBodyLoad() {
  50. <%
  51. String m = (String)request.getAttribute("msg");
  52. // 웹보안관련 특수문자 제거 - 2012.08.14
  53. String [] specialCharacters = {"-", "&", "'", "<", ">", "%28", "%29", "%2B"};
  54. if (m != null) {
  55. for (int idx = 0 ; idx < specialCharacters.length ; idx++) {
  56. m = m.replace(specialCharacters[idx], "");
  57. }
  58. }
  59. String errorMsg = null;
  60. if (m != null) {
  61. if (m.equals("50")){
  62. errorMsg = "정상적으로 인증번호가 전송되었습니다.";
  63. %>
  64. gTimerID = setInterval("checkTimer()",1000);
  65. <%
  66. } else if (m.equals("51")) {
  67. errorMsg = "사용자ID나 사용자명이 잘못되었습니다.";
  68. } else if (m.equals("52")) {
  69. errorMsg = "등록된 전화번호가 없습니다.";
  70. } else if (m.equals("53")) {
  71. errorMsg = "등록된 전화번호가 입력한 전화번호와 다릅니다.";
  72. } else if (m.equals("55")) {
  73. errorMsg = "계정잠금이 해제되었습니다.";
  74. %>
  75. location.href="himed.live";
  76. <%
  77. } else if (m.equals("57")) {
  78. errorMsg = "계정잠금 해제 및\\n" + (String)request.getAttribute("newpwd");
  79. %>
  80. location.href="himed.live";
  81. <%
  82. }else if (m.equals("56")) {
  83. errorMsg = "인증번호가 틀립니다.";
  84. if(!gtime.equals("")){
  85. %>
  86. gTime = <%= gtime %>;
  87. gTimerID = setInterval("checkTimer()",1000);
  88. <%
  89. }
  90. }
  91. }
  92. if (errorMsg != null) {
  93. %>
  94. alert("<%=errorMsg%>");
  95. <%
  96. if(m.equals("52") || m.equals("53")) {
  97. %>
  98. var x = window.screen.width;
  99. var y = window.screen.height;
  100. var left = x / 2 - 500 / 2;
  101. var top = y / 2 - 300 / 2;
  102. var url = "/himed/webapps/com/hismainweb/jsp/authguide.jsp";
  103. var option = "height=500, left=" + left + ", top=" + top +", width=760, location=no, titlebar=no, menubar=no, resizable=no, scrollbars=no, status=no, toolbar=no, min=no, max=no";
  104. if (authGuidePage == null) {
  105. authGuidePage = window.open(url, null, option);
  106. } else if (resetPwdPage.closed) {
  107. authGuidePage = window.open(url, null, option);
  108. }
  109. authGuidePage.focus();
  110. <%
  111. }
  112. }
  113. %>
  114. <%--
  115. if (m.equals("55")){
  116. %>
  117. location.href="himed.live";
  118. <%
  119. }
  120. --%>
  121. }
  122. function isNull(str){
  123. return ((str == null || str == "" || str == "undefined") ? true:false);
  124. }
  125. function openDocumentsFile(openurl){
  126. window.open(openurl);
  127. }
  128. // F1 키 block -- add by parankiho 2008.02.12
  129. document.onhelp=dsble_F1;
  130. function dsble_F1() {
  131. return false;
  132. }
  133. /*
  134. // 비밀번호 초기화 화면
  135. function showResetPwdPage() {
  136. var x = window.screen.width;
  137. var y = window.screen.height;
  138. var left = x / 2 - 500 / 2;
  139. var top = y / 2 - 300 / 2;
  140. var url = "/himed/webapps/com/hismainweb/jsp/resetpwd.jsp";
  141. var option = "height=150, left=" + left + ", top=" + top +", width=300, location=no, titlebar=no, menubar=no, resizable=no, scrollbars=no, status=no, toolbar=no, min=no, max=no";
  142. if (resetPwdPage == null) {
  143. resetPwdPage = window.open(url, null, option);
  144. } else if (resetPwdPage.closed) {
  145. resetPwdPage = window.open(url, null, option);
  146. }
  147. resetPwdPage.focus();
  148. }
  149. */
  150. /*
  151. // 비밀번호 초기화 화면
  152. function showResetPwdPage() {
  153. var url = "/himed/webapps/com/hismainweb/jsp/resetpwd.jsp";
  154. location.href = url;
  155. }
  156. */
  157. // 인증타이머 호출 함수
  158. function checkTimer(){
  159. var stime = document.getElementById("stime");
  160. stime.innerHTML = "("+gTime+" 초 )";
  161. gTime--;
  162. if(gTime <= 0){
  163. window.clearInterval(gTimerID);
  164. gTimerID = null;
  165. stime.innerHTML = "";
  166. }
  167. }
  168. // 인증번호 인증
  169. function authNoForPhoneAuth(flag){
  170. var authNo = document.getElementById("authno");
  171. var cmd = document.getElementById("cmd");
  172. cmd.value = flag;
  173. if((flag == "UNLOCK" || flag == "CHGPW") && gTimerID == null){
  174. alert("인증번호를 받지 않았거나, 정해진 유효시간을 초과했습니다.\n 새로운 인증번호를 받으시기 바랍니다.");
  175. return;
  176. }
  177. if(checkSendAuthNoForPhoneAuth()){
  178. if(gTimerID != null){
  179. document.getElementById("gtime").value = gTime;
  180. }
  181. authNo.action = "sendauthno.live";
  182. authNo.submit();
  183. }
  184. }
  185. /*
  186. // 인증번호 보내기
  187. function sendAuthNoForPhoneAuth(){
  188. var authNo = document.getElementById("authno");
  189. var cmd = document.getElementById("cmd");
  190. cmd.value = "SMS";
  191. if(checkSendAuthNoForPhoneAuth()){
  192. authNo.action = "sendauthno.live";
  193. authNo.submit();
  194. }
  195. }
  196. */
  197. // 인증번호 받기 Validation
  198. function checkSendAuthNoForPhoneAuth(){
  199. if(document.getElementById("userid").value == ""){
  200. alert("사용자ID를 입력해 주세요");
  201. document.getElementById('userid').focus();
  202. return false;
  203. }
  204. if(document.getElementById("usernm").value == ""){
  205. alert("사용자명을 입력해 주세요");
  206. document.getElementById('usernm').focus();
  207. return false;
  208. }
  209. var userMob = document.getElementById("mob1").value + document.getElementById("mob2").value;
  210. if(userMob.length == 10 || userMob.length == 11){
  211. return true;
  212. }else{
  213. alert("휴대폰 번호를 정확하게 입력해 주세요.");
  214. document.getElementById("mob2").focus();
  215. return false;
  216. }
  217. }
  218. function enter(){
  219. }
  220. //-->
  221. </script>
  222. </head>
  223. <body onload="onBodyLoad()">
  224. <table border="1" cellpadding="0" cellspacing="0" width="100%" height="100%">
  225. <tr>
  226. <td align="center" valign="middle">
  227. <table border="0" cellpadding="0" cellspacing="0" width="1000">
  228. <tr>
  229. <td><img src="../images/<%=loginimg%>" width="661" height="410" alt="" border="0"></td>
  230. <td width="339">
  231. <table border="0" cellpadding="0" cellspacing="0">
  232. <tr>
  233. <td background="../images/moto_bg.gif" width="339" height="42" align="center" class="moto"><%=title%></td>
  234. </tr>
  235. </table>
  236. <form method="get" id="authno" name="authno">
  237. <input id="cmd" name="cmd" type="hidden" value="SMS"/>
  238. <input id="gtime" name="gtime" type="hidden" />
  239. <table id="formtbl" border="0" cellpadding="0" cellspacing="0">
  240. <tr>
  241. <td colspan="3"><img src="../images/auth_welcome.gif" width="340" height="90" alt="" border="0"></td>
  242. </tr>
  243. <tr>
  244. <td><img src="../images/auth_id.gif" width="102" height="44" alt="" border="0"></td>
  245. <td colspan="2" width="238px" background="../images/auth_idinput.gif" height="44" valign="middle"><input type="text" id="userid" name="userid" tabIndex="1" onkeydown="enter()" value="<%= userid %>"/></td>
  246. </tr>
  247. <tr>
  248. <td><img src="../images/auth_name.gif" width="102" height="36" border="0"></td>
  249. <td colspan="2" border="0" width="238px" background="../images/auth_nameinput.gif" height="36" valign="middle"><input type="text" id="usernm" name="usernm" style="ime-mode:active" tabIndex="2" onkeydown="enter()" value="<%= usernm %>"/></td>
  250. </tr>
  251. <tr>
  252. <td height="36" ><img src="../images/auth_tel.gif" width="102" height="36"></td>
  253. <td background="../images/auth_telinpt1.gif" width="160" height="36">
  254. <select id="mob1" name="mob1" style="width:50px" onchange="clickEvn();">
  255. <option value="010" <% if(mob1.equals("010")) out.print("selected"); %>>010</option>
  256. <option value="011" <% if(mob1.equals("011")) out.print("selected"); %>>011</option>
  257. <option value="016" <% if(mob1.equals("016")) out.print("selected"); %>>016</option>
  258. <option value="017" <% if(mob1.equals("017")) out.print("selected"); %>>017</option>
  259. <option value="018" <% if(mob1.equals("018")) out.print("selected"); %>>018</option>
  260. <option value="019" <% if(mob1.equals("019")) out.print("selected"); %>>019</option>
  261. </select>
  262. -
  263. <input type="text" id="mob2" name="mob2" maxlength="8" style="width:97px" value="<%= mob2 %>" tabIndex="3">
  264. </td>
  265. <td width="78" height="36"><a href="#none" id="btnPhoneAuthNo" name="btnPhoneAuthNo" onclick="authNoForPhoneAuth('SMS');"><img src="../images/auth_telinpt2.gif" width="78" height="36" alt="" border="0" ></a></td>
  266. </tr>
  267. </tr>
  268. <tr>
  269. <td><img src="../images/auth_no.gif" width="102" height="37" border="0"></td>
  270. <td colspan="2" width="238px" background="../images/auth_noinput1.gif" height="37" valign="middle"><input type="text" id="userauthno" name="userauthno" tabIndex="4" onkeydown="enter()" value="<%= userauthno %>"/>
  271. <span id="stime"></span>
  272. </td>
  273. </tr>
  274. </table>
  275. </form>
  276. <table border="0" cellpadding="0" cellspacing="0">
  277. <tr width="340" align="center">
  278. <td background="../images/auth_bottom1.gif" width="64px" height="21px" alt="" border="0">
  279. </td>
  280. <td ><a href="#none" id="btnUserAuthNo" name="btnUserAuthNo" onclick="authNoForPhoneAuth('UNLOCK');"><img src="../images/auth_bottom22.gif" width="82px" height="24px" alt="" border="0" ></a>
  281. </td>
  282. <td background="../images/auth_bottom3.gif" width="32px" height="21px" alt="" border="0">
  283. </td>
  284. <td ><a href="#none" id="btnUserAuthNo2" name="btnUserAuthNo2" onclick="authNoForPhoneAuth('CHGPW');"><img src="../images/auth_bottom4.gif" width="130px" height="24px" alt="" border="0" ></a>
  285. </td>
  286. <td background="../images/auth_bottom3.gif" width="32px" height="21px" alt="" border="0">
  287. </td>
  288. </tr>
  289. <tr>
  290. <td colspan="5" height="5" align="right"><font color="blue" size="2">※ 비밀번호 초기화시 자동으로 잠금해제 됩니다.</font>
  291. </td>
  292. </tr>
  293. </table>
  294. <table border="0" cellpadding="0" cellspacing="0">
  295. <tr>
  296. <!-- HIS 시스템(운영)인 경우만 기관코드, 나머지는 의료원코드(001)로 : by hoya-->
  297. <td><a href="himed.live"><img src="../images/<%=loginlogo%>" alt="" border="0"></a></td>
  298. </tr>
  299. </table>
  300. </td>
  301. </tr>
  302. </table>
  303. </td>
  304. </tr>
  305. </table>
  306. </body>
  307. </html>