Copy (4) of sendauthno.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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 owneryn = StringHelper.null2void((String)request.getAttribute("owneryn"));
  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 resetPwdPage = null;
  40. var systemcd = "<%=systemcd%>";
  41. function window::onLoad() {
  42. }
  43. function onBodyLoad() {
  44. <%
  45. String m = (String)request.getAttribute("msg");
  46. // 웹보안관련 특수문자 제거 - 2012.08.14
  47. String [] specialCharacters = {"-", "&", "'", "<", ">", "%28", "%29", "%2B"};
  48. if (m != null) {
  49. for (int idx = 0 ; idx < specialCharacters.length ; idx++) {
  50. m = m.replace(specialCharacters[idx], "");
  51. }
  52. }
  53. String errorMsg = null;
  54. if (m != null) {
  55. if (m.equals("51")) {
  56. errorMsg = "ID나 사용자명이 잘못되었습니다.";
  57. } else if (m.equals("52")) {
  58. errorMsg = "등록된 전화번호가 없습니다.";
  59. } else if (m.equals("53")) {
  60. errorMsg = "등록된 전화번호가 입력한 전화번호와 다릅니다.";
  61. } else if (m.equals("55")) {
  62. errorMsg = "정상적으로 처리되었습니다.";
  63. } else if (m.equals("56")) {
  64. errorMsg = "인증번호가 틀립니다.";
  65. }
  66. }
  67. if (errorMsg != null) {
  68. %>
  69. alert('<%=errorMsg%>');
  70. <%
  71. }
  72. %>
  73. <%--
  74. if (m.equals("55")){
  75. %>
  76. location.href="himed.live";
  77. <%
  78. }
  79. --%>
  80. userInfoForm.userid.focus();
  81. }
  82. function enterUserId() {
  83. if(event.keyCode == 13) {
  84. userInfoForm.password.focus();
  85. }
  86. }
  87. function enterPassword() {
  88. if(event.keyCode == 13) {
  89. userLogin();
  90. }
  91. }
  92. function isNull(str){
  93. return ((str == null || str == "" || str == "undefined") ? true:false);
  94. }
  95. function checkInput(){
  96. var id = userInfoForm.userid.value.replace(/(^\s*)|(\s*$)/gi, "");
  97. var pw = userInfoForm.password.value;
  98. if(isNull(id)){
  99. alert("아이디를 입력하십시오");
  100. userInfoForm.userid.value = "";
  101. userInfoForm.userid.focus();
  102. return false;
  103. } else {
  104. // 사용자ID 특수문자 입력 제어 - 2012.08.17
  105. var comparedId = id.replace(/([^0-9a-zA-Z]*)/gi, "");
  106. if (id != comparedId) {
  107. alert("아이디는 [영문 숫자]로만 입력하셔야 합니다.");
  108. userInfoForm.userid.focus();
  109. return false;
  110. }
  111. }
  112. if(isNull(pw)){
  113. alert("패스워드를 입력하십시오");
  114. userInfoForm.password.value = "";
  115. userInfoForm.password.focus();
  116. return false;
  117. }
  118. return true;
  119. }
  120. function userLogin(){
  121. if(checkInput()){
  122. userInfoForm.action = "login.live";
  123. userInfoForm.submit();
  124. }
  125. }
  126. function openDocumentsFile(openurl){
  127. window.open(openurl);
  128. }
  129. // F1 키 block -- add by parankiho 2008.02.12
  130. document.onhelp=dsble_F1;
  131. function dsble_F1() {
  132. return false;
  133. }
  134. /*
  135. // 비밀번호 초기화 화면
  136. function showResetPwdPage() {
  137. var x = window.screen.width;
  138. var y = window.screen.height;
  139. var left = x / 2 - 500 / 2;
  140. var top = y / 2 - 300 / 2;
  141. var url = "/himed/webapps/com/hismainweb/jsp/resetpwd.jsp";
  142. 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";
  143. if (resetPwdPage == null) {
  144. resetPwdPage = window.open(url, null, option);
  145. } else if (resetPwdPage.closed) {
  146. resetPwdPage = window.open(url, null, option);
  147. }
  148. resetPwdPage.focus();
  149. }
  150. */
  151. /*
  152. // 비밀번호 초기화 화면
  153. function showResetPwdPage() {
  154. var url = "/himed/webapps/com/hismainweb/jsp/resetpwd.jsp";
  155. location.href = url;
  156. }
  157. */
  158. // 인증번호 인증
  159. function authNoForPhoneAuth(){
  160. var authNo = document.getElementById("authno");
  161. var cmd = document.getElementById("cmd");
  162. cmd.value = "AUTH";
  163. if(checkSendAuthNoForPhoneAuth()){
  164. authNo.action = "sendauthno.live";
  165. authNo.submit();
  166. }
  167. }
  168. // 인증번호 보내기
  169. function sendAuthNoForPhoneAuth(){
  170. var authNo = document.getElementById("authno");
  171. var cmd = document.getElementById("cmd");
  172. cmd.value = "SMS";
  173. if(checkSendAuthNoForPhoneAuth()){
  174. authNo.action = "sendauthno.live";
  175. authNo.submit();
  176. }
  177. }
  178. // 인증번호 받기 Validation
  179. function checkSendAuthNoForPhoneAuth(){
  180. if(document.getElementById("userid").value == ""){
  181. alert("ID를 입력해 주세요");
  182. document.getElementById('userid').focus();
  183. return false;
  184. }
  185. if(document.getElementById("usernm").value == ""){
  186. alert("이름을 입력해 주세요");
  187. document.getElementById('usernm').focus();
  188. return false;
  189. }
  190. var userMob = document.getElementById("mob1").value + document.getElementById("mob2").value;
  191. if(userMob.length == 10 || userMob.length == 11){
  192. return true;
  193. }else{
  194. alert("휴대폰 번호를 정확하게 입력해 주세요.");
  195. document.getElementById("mob2").focus();
  196. return false;
  197. }
  198. }
  199. //-->
  200. </script>
  201. </head>
  202. <body onload="onBodyLoad()">
  203. <table border="1" cellpadding="0" cellspacing="0" width="100%" height="100%">
  204. <tr>
  205. <td align="center" valign="middle">
  206. <table border="0" cellpadding="0" cellspacing="0" width="1000">
  207. <tr>
  208. <td><img src="../images/<%=loginimg%>" width="661" height="410" alt="" border="0"></td>
  209. <td width="339">
  210. <table border="0" cellpadding="0" cellspacing="0">
  211. <tr>
  212. <td background="../images/moto_bg.gif" width="339" height="46" align="center" class="moto"><%=title%></td>
  213. </tr>
  214. </table>
  215. <form method="post" id="authno" name="authno">
  216. <input id="cmd" name="cmd" type="hidden" value="SMS"/>
  217. <table id="formtbl" border="0" cellpadding="0" cellspacing="0">
  218. <tr>
  219. <td colspan="3"><img src="../images/auth_welcome.gif" width="340" height="90" alt="" border="0"></td>
  220. </tr>
  221. <tr>
  222. <td><img src="../images/auth_id.gif" width="102" height="44" alt="" border="0"></td>
  223. <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>
  224. </tr>
  225. <tr>
  226. <td><img src="../images/auth_name.gif" width="102" height="36" border="0"></td>
  227. <td colspan="2" border="0" width="238px" background="../images/auth_nameinput.gif" height="36" valign="middle"><input type="text" id="usernm" name="usernm" tabIndex="2" onkeydown="enter()" value="<%= usernm %>"/></td>
  228. </tr>
  229. <tr>
  230. <td height="36" ><img src="../images/auth_tel.gif" width="102" height="36"></td>
  231. <td background="../images/auth_telinpt1.gif" width="160" height="36">
  232. <select id="mob1" name="mob1" style="width:50px" onchange="clickEvn();">
  233. <option value="010" <% if(mob1.equals("010")) out.print("selected"); %>>010</option>
  234. <option value="011" <% if(mob1.equals("011")) out.print("selected"); %>>011</option>
  235. <option value="016" <% if(mob1.equals("016")) out.print("selected"); %>>016</option>
  236. <option value="017" <% if(mob1.equals("017")) out.print("selected"); %>>017</option>
  237. <option value="018" <% if(mob1.equals("018")) out.print("selected"); %>>018</option>
  238. <option value="019" <% if(mob1.equals("019")) out.print("selected"); %>>019</option>
  239. </select>
  240. -
  241. <input type="text" id="mob2" name="mob2" onkeydown="check_num('mob2', '1')" maxlength="8" style="width:97px" value="<%= mob2 %>">
  242. </td>
  243. <td width="78" height="36"><a href="#" id="btnPhoneAuthNo" name="btnPhoneAuthNo" onclick="sendAuthNoForPhoneAuth();"><img src="../images/auth_telinpt2.gif" width="78" height="36" alt="" border="0" usemap="#telno"></a></td>
  244. </tr>
  245. </tr>
  246. <tr>
  247. <td><img src="../images/auth_no.gif" width="102" height="37" border="0"></td>
  248. <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 %>"/></td>
  249. </tr>
  250. </table>
  251. </form>
  252. <table border="0" cellpadding="0" cellspacing="0">
  253. <tr width="340" >
  254. <td background="../images/auth_bottom1.gif" width="125" height="31" alt="" border="0">
  255. </td>
  256. <td ><a href="#" id="btnUserAuthNo" name="btnUserAuthNo" onclick="authNoForPhoneAuth();"><img src="../images/auth_bottom2.gif" width="82px" height="31px" alt="" border="0" usemap="#submit"></a>
  257. </td>
  258. <td background="../images/auth_bottom3.gif" width="133px" height="31px" alt="" border="0">
  259. </td>
  260. </tr>
  261. <tr>
  262. <td colspan="3" height="7"></td>
  263. </tr>
  264. </table>
  265. <table border="0" cellpadding="0" cellspacing="0">
  266. <tr>
  267. <!-- HIS 시스템(운영)인 경우만 기관코드, 나머지는 의료원코드(001)로 : by hoya-->
  268. <td><a href="<%= domainURL %>/webapps/com/hismainweb/jsp/himed.live"><img src="../images/<%=loginlogo%>" alt="" border="0"></a></td>
  269. </tr>
  270. </table>
  271. </td>
  272. </tr>
  273. </table>
  274. </td>
  275. </tr>
  276. </table>
  277. <map name="telno"><area shape="rect" coords="1,11,75,30" href="#"></map>
  278. <map name="submit"><area shape="rect" coords="1,6,80,28" href="#"></map>
  279. </body>
  280. </html>