Copy (2) of sendauthno.jsp 11 KB

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