change_passwd.jsp 12 KB

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