Copy of sendauthno.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <%@page contentType="text/html;charset=euc-kr" %>
  2. <%@ page import="kr.co.hit.live.util.PropertyHelper"%>
  3. <%@ page import="kr.co.hit.live.vo.ValueObject"%>
  4. <%!
  5. PropertyHelper ph = new PropertyHelper("live.himed.config");
  6. String systemcd = ph.getString("context","systemcd");
  7. String systemnm = ph.getString("context", "systemnm");
  8. String hissystem = ph.getString("system", "his");
  9. String crcsystem = ph.getString("system", "crc");
  10. String devsystem = ph.getString("system", "dev");
  11. String missystem = ph.getString("system", "mis");
  12. String domainstr = ph.getString("session", "domain");
  13. String a = "";
  14. String title = ph.getString("baseinfo", "title" , "");
  15. String tfsuversion = ph.getString("baseinfo", "tfsuversion", "2,6,4,6");
  16. String loginlogo = ph.getString("images" , "loginlogo");
  17. String loginimg = ph.getString("images" , "loginimg");
  18. %>
  19. <%
  20. String TFSmartUpdater = systemcd+"_TFSmartUpdater";
  21. String domainName = "http://"+ request.getServerName() + ":" + request.getServerPort();
  22. String domainURL = "http://" + domainstr + ":" + request.getServerPort() + "/himed";
  23. domainURL = domainURL.toLowerCase();
  24. String ieGuideURL = "http://" + systemcd + domainstr + ":" + request.getServerPort() + "/docs/guide/Internet_Explorer_Setting_Guide.pdf";
  25. String ieInstallURL = "http://" + systemcd + domainstr + ":" + request.getServerPort() + "/docs/IE8-WindowsXP-x86-KOR.exe";
  26. //Vision 및 공지사항 조회
  27. ValueObject noticeVO = (ValueObject)request.getAttribute("noticelist");
  28. ValueObject visionVO = (ValueObject)request.getAttribute("visionlist");
  29. String notice = "";
  30. String vision = "";
  31. if(noticeVO == null) {
  32. response.sendRedirect("/himed/webapps/com/hismainweb/jsp/himed.live");
  33. } else {
  34. if(noticeVO.size() > 0) {
  35. notice = noticeVO.getString("content", "");
  36. }
  37. }
  38. %>
  39. <html>
  40. <head>
  41. <title><%=title%></title>
  42. <link href="../css/hismain.css" rel="stylesheet" type="text/css">
  43. <script language="JavaScript" src="../js/ZUM006.js"></script>
  44. <script language="JavaScript" src="../js/ZUM003.js"></script>
  45. <script language="javascript">
  46. <!--
  47. var resetPwdPage = null;
  48. var systemcd = "<%=systemcd%>";
  49. function window::onLoad() {
  50. initBrowser(<%=TFSmartUpdater%>);
  51. }
  52. function onBodyLoad() {
  53. <%
  54. String m = (String)request.getParameter("m");
  55. // 웹보안관련 특수문자 제거 - 2012.08.14
  56. String [] specialCharacters = {"-", "&", "'", "<", ">", "%28", "%29", "%2B"};
  57. if (m != null) {
  58. for (int idx = 0 ; idx < specialCharacters.length ; idx++) {
  59. m = m.replace(specialCharacters[idx], "");
  60. }
  61. }
  62. String errorMsg = null;
  63. if (m != null) {
  64. if (m.equals("0")) { // 단순히 인증되지 않은 상태이며 alert 창 띄우지 않고 그냥 로그인 페이지만 띄운다.
  65. errorMsg = null;
  66. } else if (m.equals("1")) {
  67. errorMsg = "등록되지 않은 사용자입니다.";
  68. } else if (m.equals("2")) {
  69. errorMsg = "등록된 근무지 부서가 없습니다.";
  70. } else if (m.equals("3")) {
  71. errorMsg = "시스템 오류입니다. 관리자에게 문의하세요.";
  72. } else if (m.equals("4")) {
  73. errorMsg = "등록된 메뉴그룹이 없습니다.";
  74. } else if (m.equals("7")) {
  75. errorMsg = "암호가 일치하지 않습니다.";
  76. } else if (m.equals("30")) {
  77. errorMsg = "해당 아이디는 현재 휴진상태이므로 로그인 할 수 없습니다.";
  78. } else if (m.equals("40")) {
  79. errorMsg = "잘못된 비밀번호 5회 초과로 계정잠금되었습니다. 본원 의료정보센터/칠곡 정보통신실 (T.6597)로 문의 후 처리바랍니다.";
  80. } else {
  81. errorMsg = "SSO 토큰 검증 실패로 자동 로그인 할수 없습니다.[code="+m+"]";
  82. }
  83. } else {
  84. }
  85. if (errorMsg != null) {
  86. %>
  87. alert('<%=errorMsg%>');
  88. <%
  89. }
  90. %>
  91. userInfoForm.userid.focus();
  92. }
  93. function enterUserId() {
  94. if(event.keyCode == 13) {
  95. userInfoForm.password.focus();
  96. }
  97. }
  98. function enterPassword() {
  99. if(event.keyCode == 13) {
  100. userLogin();
  101. }
  102. }
  103. function isNull(str){
  104. return ((str == null || str == "" || str == "undefined") ? true:false);
  105. }
  106. function checkInput(){
  107. var id = userInfoForm.userid.value.replace(/(^\s*)|(\s*$)/gi, "");
  108. var pw = userInfoForm.password.value;
  109. if(isNull(id)){
  110. alert("아이디를 입력하십시오");
  111. userInfoForm.userid.value = "";
  112. userInfoForm.userid.focus();
  113. return false;
  114. } else {
  115. // 사용자ID 특수문자 입력 제어 - 2012.08.17
  116. var comparedId = id.replace(/([^0-9a-zA-Z]*)/gi, "");
  117. if (id != comparedId) {
  118. alert("아이디는 [영문 숫자]로만 입력하셔야 합니다.");
  119. userInfoForm.userid.focus();
  120. return false;
  121. }
  122. }
  123. if(isNull(pw)){
  124. alert("패스워드를 입력하십시오");
  125. userInfoForm.password.value = "";
  126. userInfoForm.password.focus();
  127. return false;
  128. }
  129. return true;
  130. }
  131. function userLogin(){
  132. if(checkInput()){
  133. userInfoForm.action = "login.live";
  134. userInfoForm.submit();
  135. }
  136. }
  137. function openDocumentsFile(openurl){
  138. window.open(openurl);
  139. }
  140. // F1 키 block -- add by parankiho 2008.02.12
  141. document.onhelp=dsble_F1;
  142. function dsble_F1() {
  143. return false;
  144. }
  145. /*
  146. // 비밀번호 초기화 화면
  147. function showResetPwdPage() {
  148. var x = window.screen.width;
  149. var y = window.screen.height;
  150. var left = x / 2 - 500 / 2;
  151. var top = y / 2 - 300 / 2;
  152. var url = "/himed/webapps/com/hismainweb/jsp/resetpwd.jsp";
  153. 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";
  154. if (resetPwdPage == null) {
  155. resetPwdPage = window.open(url, null, option);
  156. } else if (resetPwdPage.closed) {
  157. resetPwdPage = window.open(url, null, option);
  158. }
  159. resetPwdPage.focus();
  160. }
  161. */
  162. /*
  163. // 비밀번호 초기화 화면
  164. function showResetPwdPage() {
  165. var url = "/himed/webapps/com/hismainweb/jsp/resetpwd.jsp";
  166. location.href = url;
  167. }
  168. */
  169. // 인증번호 받기
  170. function sendAuthNoForPhoneAuth(){
  171. var sendAuthNo = document.getElementId("authNo");
  172. if(checkSendAuthNoForPhoneAuth()){
  173. sendAuthNo.action = "sendAuthNo.live";
  174. sendAuthNo.submit();
  175. }
  176. }
  177. // 인증번호 받기 Validation
  178. function checkSendAuthNoForPhoneAuth(){
  179. if(document.getElementById("phoneNm").value == ""){
  180. alert("이름을 입력해 주세요");
  181. document.getElementById('phoneNm').focus();
  182. return false;
  183. }
  184. var userMob = document.getElementById("mob1").value + document.getElementById("mob2").value;
  185. if(userMob.length == 10 || userMob.length == 11){
  186. return true;
  187. }else{
  188. alert("휴대폰 번호를 정확하게 입력해 주세요.");
  189. document.getElementById("mob2").focus();
  190. return false;
  191. }
  192. }
  193. //-->
  194. </script>
  195. </head>
  196. <body onload="onBodyLoad()">
  197. <SCRIPT LANGUAGE="JavaScript">
  198. <!--
  199. writeMSXML4("msxml","<%=domainName%>/himed/install/TrustForm/msxml4.cab#version=4,20,9818,0", "0", "0");
  200. TrustFormSmartUpdater("<%=systemcd%>"+"_TFSmartUpdater", "<%=domainName%>/himed/install/TrustForm/TFSmartUpdater_m.cab#version=<%=tfsuversion%>", "0", "0");
  201. //-->
  202. </SCRIPT>
  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. <tr>
  215. <td><img src="../images/welcome.gif" width="339" height="119" alt="" border="0"></td>
  216. </tr>
  217. </table>
  218. <form method="post" id="authNo" name="authNo">
  219. <table id="formtbl" height="170">
  220. <tr>
  221. <td width="70px"><img src="../images/bullet_1.gif" width="7" height="7" border="0">&nbsp;사용자ID&nbsp;:</td>
  222. <td width="120px"><input type="text" name="userid" tabIndex="1" onkeydown="enter()" style="width:120px" /></td>
  223. </tr>
  224. <tr>
  225. <td width="70px"><img src="../images/bullet_1.gif" width="7" height="7" border="0">&nbsp;사용자명&nbsp;:</td>
  226. <td width="120px"><input type="text" name="usernm" tabIndex="2" onkeydown="enter()" style="width:120px" /></td>
  227. </tr>
  228. <tr>
  229. <td width="70px"><img src="../images/bullet_1.gif" width="7" height="7" border="0">&nbsp;전화번호&nbsp;:</td>
  230. <td widht="180px" colspan="2">
  231. <select id="mob1" name="mob1" style="width:50px" onchange="clickEvn();">
  232. <option value="010">010</option>
  233. <option value="011">011</option>
  234. <option value="016">016</option>
  235. <option value="017">017</option>
  236. <option value="018">018</option>
  237. <option value="019">019</option>
  238. </select>
  239. -
  240. <input type="text" id="mob2" name="mob2" onkeydown="check_num('mob2', '1')" maxlength="8" class="input_txt" style="width:120px">
  241. <a href="#" id="btnPhoneAuthNo" name="btnPhoneAuthNo" onclick="sendAuthNoForPhoneAuth();clickcr(this,'rmp.code','','',event);" class="btn_ct"><span class="blind">인증번호 받기</span></a>
  242. </td>
  243. </tr>
  244. </table>
  245. </form>
  246. <table border="0" cellpadding="0" cellspacing="0">
  247. <tr>
  248. <!-- HIS 시스템(운영)인 경우만 기관코드, 나머지는 의료원코드(001)로 : by hoya-->
  249. <td><img src="../images/<%=loginlogo%>" alt="" border="0"></td>
  250. </tr>
  251. </table>
  252. </td>
  253. </tr>
  254. </table>
  255. </td>
  256. </tr>
  257. </table>
  258. <map name="login"><area alt="" shape="CIRCLE" coords="41,41,29" href="#"></map>
  259. </body>
  260. </html>