123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- <%@ page language="java" contentType="text/html; charset=euc-kr"%>
- <%
- String domainName = request.getScheme()+"://"+ request.getServerName() + ":" + request.getServerPort();
- String systemName = request.getScheme()+"_"+ request.getServerName() + "_" + request.getServerPort();
-
- // JSESSIONID 값을 가져와서 Launcher 띄울 때 넘겨준다.(서버와 컨테이너 고정용)
- String sessionVal = session.getId();
-
- // CDW에서 넘겨주는 값
- String sParam = request.getParameter("param");
- String titleText = "";
- boolean isCDW = false;
-
- // Knuh Portal 에서 넘겨주는 값 (widget=1)
- String sWidget = request.getParameter("widget");
- boolean isWidget = false;
- // mode에 값을 지정하여 전용 모드를 설정 (mode=hichart)
- String sMode = request.getParameter("mode");
- boolean isHiChart = false;
- boolean isPatCheck = false;
- boolean isCvrCheck = false;
- String sCvrType = "", sRefKey = "";
-
- if(sParam != null && sParam != "") {
- isCDW = true;
- } else if(sWidget != null && Integer.parseInt(sWidget) == 1) {
- isWidget = true;
- } else if("hichart".equals(sMode)) { // mode가 hichart 일때는 HiChart 전용 모드
- isHiChart = true;
- } else if("patcheck".equals(sMode)) { // mode가 patcheck 일때는 PatCheck 전용 모드
- isPatCheck = true;
- } else if("cvrreg".equals(sMode)) { // mode가 cvrreg 일때는 CvrReg 전용 모드
- isCvrCheck = true;
- sCvrType = request.getParameter("cvrtype");
- sRefKey = request.getParameter("refkey");
- } else {
- titleText = "XPLauncher 를 시작합니다.";
- }
- // 서버이름 가져오기
- String serverName = request.getServerName();
- // 서버이름 별로 아이콘이름 지정하기
- String iconName = "로컬";
-
- // 아이콘 표시여부
- boolean iconShow = true;
- // 기관코드
- String sInstcd = "031";
- // 본원운영서버
- if ("hisx031.knuh.kr".equals(serverName)) // 운영
- {
- iconName = "본원";
- iconShow = true;
- sInstcd = "031";
- }
- // 본원교육서버
- else if("hisx031edu.knuh.kr".equals(serverName)) //교육
- {
- iconName = "본원교육";
- iconShow = true;
- sInstcd = "031";
- }
- // 칠곡운영서버
- else if("hisx032.knuh.kr".equals(serverName)) //운영
- {
- iconName = "칠곡";
- iconShow = true;
- sInstcd = "032";
- }
-
- // 칠곡교육서버
- else if ("hisx032edu.knuh.kr".equals(serverName)) // 교육
- {
- iconName = "칠곡교육";
- iconShow = true;
- sInstcd = "032";
- }
- // MIS운영서버
- else if ("misx030.knuh.kr".equals(serverName)) // 운영
- {
- iconName = "MIS";
- iconShow = true;
- sInstcd = "031";
- }
- // MIS교육서버
- else if ("misx030edu.knuh.kr".equals(serverName)) // 교육
- {
- iconName = "MIS교육";
- iconShow = true;
- sInstcd = "031";
- }
- // 치과운영서버
- else if("hisx033.knudh.kr".equals(serverName)) //운영
- {
- iconName = "치과";
- iconShow = true;
- sInstcd = "033";
- }
-
- // 치과교육서버
- else if ("hisx033edu.knudh.kr".equals(serverName)) // 교육
- {
- iconName = "치과교육";
- iconShow = true;
- sInstcd = "033";
- }
- // MIS치과운영서버
- else if ("misx033.knudh.kr".equals(serverName)) // 운영
- {
- iconName = "MIS";
- iconShow = true;
- sInstcd = "033";
- }
- // MIS치과교육서버
- else if ("misx033edu.knudh.kr".equals(serverName)) // 교육
- {
- iconName = "MIS교육";
- iconShow = true;
- sInstcd = "033";
- }
- %>
- <!DOCTYPE html>
- <HTML>
- <HEAD>
- <meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
- <meta http-equiv="X-UA-Compatible" content="requiresActiveX=true">
- <TITLE>HIMED2 Install Page</TITLE>
- <SCRIPT LANGUAGE="javascript">
- var sKey = "<%=systemName%>";
- var Server_Path = "<%=domainName%>";
- var isWebRun = false;
- var bOnError = false;
- var XPLATFORM_CAB_VER = "2019,2,26,1";
- var XPLATFORM_FOLDER_VER = "922240";
- function window::onLoad() {
- TFSmartUpdater.protectSystemMenu(1);
- }
-
- function fn_load() {
- if(bOnError == false) {
- if(setComponentsInstall()) {
- fn_launch();
- fn_close();
- }
- }
- }
- function fn_close() {
- if(navigator.appVersion.indexOf("MSIE 7.") >= 0 || navigator.appVersion.indexOf("MSIE 8.") >= 0 ||
- navigator.appVersion.indexOf("MSIE 9.") >= 0 || navigator.appVersion.indexOf("MSIE 10.") >=0 ||
- navigator.appVersion.indexOf("Trident") >= 0 ) {
- window.open('about:blank','_self').close();
- } else {
- window.opener = self;
- self.close();
- }
- }
- function checkOS()
- {
- var strOS = "";
- if( navigator.appVersion.indexOf("Windows NT 6.2") != -1)
- strOS = "WIN8";
- else if( navigator.appVersion.indexOf("Windows NT 6.1") != -1)
- strOS = "WIN7";
- else if( navigator.appVersion.indexOf("Windows NT 6.0") != -1)
- strOS = "VISTA";
- else if( navigator.appVersion.indexOf("Windows 98") != -1)
- strOS = "98";
- else if( navigator.appVersion.indexOf("Windows NT 5.0") != -1)
- strOS = "2000";
- else if( navigator.appVersion.indexOf("Windows NT 5.2") != -1)
- strOS = "XP";
- else if( navigator.appVersion.indexOf("Windows NT 5.1") != -1)
- strOS = "XP";
- return strOS;
- }
- function fn_objectOnError() {
- bOnError = true;
-
- if("<%=isCDW%>" == "true") {
- alert("Ku2.0이 설치되어 있지 않습니다.\nKu2.0을 먼저 설치하여 주십시오");
- }
- }
- function fn_launch() {
- XPLauncher.version = "9.2.2"; //XPLauncher 설정 상단에 위치해야 함.
- if(checkOS() == "WIN8")
- {
- XPLauncher.componentpath = "%USERAPPLOCAL%";
- } else {
- XPLauncher.componentpath = "%USERAPP%\\TOBESOFT\\XPLATFORM\\9.2.2\\Component";
- }
- if("<%=sessionVal%>" != "") // XPlatform 에 JSESSIONID 세션변수 전달(서버와 컨테이너 고정용)
- XPLauncher.globalvalue = "JSESSIONID:g=" + "<%=sessionVal%>";
-
- // CDW 에서 호출 할 때
- if("<%=isCDW%>" == "true") {
- var param = "<%=sParam%>".replace(/softcenuri.\d{2}.\d{3}:\/\//i, "");
- XPLauncher.globalvalue = XPLauncher.globalvalue + ",gv_CDW_PARAM:g=" + param;
- XPLauncher.xadl = Server_Path + "/himed/xpapps/himedrec.xadl";
- XPLauncher.onlyone = true;
- XPLauncher.loadingimage = Server_Path + "/himed/install/loading.gif";
- XPLauncher.splashimage = Server_Path + "/himed/install/logo" + "<%=sInstcd%>" + ".png";
- }
- // Knuh Portal 에서 호출 할 때
- else if("<%=isWidget%>" == "true") {
- XPLauncher.xadl = Server_Path + "/himed/xpapps/knuhwidget.xadl";
- XPLauncher.onlyone = true;
-
- XPLauncher.loadingimage = Server_Path + "/himed/install/loading_widget.gif";
- XPLauncher.splashimage = Server_Path + "/himed/install/logo" + "<%=sInstcd%>" + ".png";
- XPLauncher.makeshortcut("Knuh Portal", Server_Path + "/himed/install/widget.ico","desktop");
- }
- // Hichart 로 호출 할 때는
- else if("<%=isHiChart%>" == "true") {
- XPLauncher.key = "HC";
- XPLauncher.globalvalue = XPLauncher.globalvalue + ",gv_SINGLE:g=hichart";
- XPLauncher.xadl = Server_Path + "/himed/xpapps/himed_single.xadl";
- XPLauncher.onlyone = true;
- XPLauncher.loadingimage = Server_Path + "/himed/install/loading.gif";
- XPLauncher.splashimage = Server_Path + "/himed/install/logo" + "<%=sInstcd%>" + "_hichart.png";
- }
- // 환자확인시스템으로 호출 할 때는
- else if("<%=isPatCheck%>" == "true") {
- XPLauncher.key = "PC";
- XPLauncher.globalvalue = XPLauncher.globalvalue + ",gv_SINGLE:g=patcheck";
- XPLauncher.xadl = Server_Path + "/himed/xpapps/himed_single.xadl";
- XPLauncher.onlyone = true;
- XPLauncher.loadingimage = Server_Path + "/himed/install/loading.gif";
- XPLauncher.splashimage = Server_Path + "/himed/install/logo" + "<%=sInstcd%>" + "_patcheck.png";
- }
- // 환자확인시스템으로 호출 할 때는
- else if("<%=isCvrCheck%>" == "true") {
- XPLauncher.key = "CR";
- XPLauncher.globalvalue = XPLauncher.globalvalue + ",gv_SINGLE:g=cvrreg,gv_CVR_CVRTYPE:g=" + "<%=sCvrType%>" + ",gv_CVR_REFKEY:g=" + "<%=sRefKey%>";
- XPLauncher.xadl = Server_Path + "/himed/xpapps/himed_single.xadl";
- XPLauncher.onlyone = true;
- XPLauncher.loadingimage = Server_Path + "/himed/install/loading.gif";
- XPLauncher.splashimage = Server_Path + "/himed/install/logo" + "<%=sInstcd%>" + ".png";
- }
- // Ku2.0 에서 호출 할 때
- else {
- XPLauncher.xadl = Server_Path + "/himed/xpapps/himed2.xadl";
- XPLauncher.onlyone = false;
- XPLauncher.loadingimage = Server_Path + "/himed/install/loading.gif";
- XPLauncher.splashimage = Server_Path + "/himed/install/logo" + "<%=sInstcd%>" + ".png";
- }
- //alert("<%=sMode%>" + ", " + "<%=isHiChart%>");
-
- /*
- <% if(iconShow == true) { %>
- XPLauncher.makeshortcut("<%=iconName%>",Server_Path + "/himed/install/EMR.ico","desktop");
- <% } %>
- */
- XPLauncher.launch();
- }
- function fn_download()
- {
- location.href = "./install/TobeSoft/XPlatform_" + XPLATFORM_FOLDER_VER + "/XPLATFORM9.2.2_SetupEngine.exe";
- }
- function setComponentsInstall(){
- // CDW와 Knuh Portal 에서 호출 할 때는 TF 설치 안함
- if("<%=isCDW%>" == "true" || "<%=isWidget%>" == "true") return true;
-
- var result = false;
-
- try {
- //환경 변수 설정
- TFSmartUpdater.setCustomDir("{server}", Server_Path + "/himed/install" );
- TFSmartUpdater.setCustomDir("{client}", "C:\\\himed\\components" );
- TFSmartUpdater.setCustomDir("{systemdir}", "C:\\WINDOWS\\system32" );
- TFSmartUpdater.setCustomDir("{systemurl}", Server_Path + "/himed" );
- TFSmartUpdater.setCustomDir("{syswow64}", "C:\\WINDOWS\\SysWOW64" );
- var link_path = (isWebRun) ? "Link" : "Link_exe";
- var os_path;
-
- if(checkOS() == "XP") {
- os_path = "/xp";
- } else {
- if (window.navigator.userAgent.indexOf("WOW64") >= 0){
- os_path = "/x64";
- } else {
- os_path = "/x86";
- }
- }
-
- var path = Server_Path + "/himed/install/" + link_path + os_path;
- if(isWebRun) {
- if(navigator.appVersion.indexOf("MSIE 7.") >= 0 || navigator.appVersion.indexOf("MSIE 6.") >= 0) {
- TFSmartUpdater.setCustomDir("{ieoption}", "");
- } else {
- path += "/nomerge";
- TFSmartUpdater.setCustomDir("{ieoption}", "-nomerge ");
- }
- }
- TFSmartUpdater.setCustomDir("{lnkFilePath}", path);
- //다운받을 파일의 목록인 jsp 파일의 경로를 넣어줌...
- var ret = TFSmartUpdater.getConfig(Server_Path+"/himed/install/config/configXP.jsp");
- if (ret == true)
- {
- TFSmartUpdater.ChangeWindowState(8);
-
- result = true;
- }else{
- deleteCookie();
- alert( "구성요소 설치 중 오류가 발생했습니다.\n\n사용중인 브라우저를 모두 닫고 다시 시도하시기 바랍니다." );
- }
- } catch(e) {
- deleteCookie();
- alert( "TFSmartUpdater가 설치되지 않았습니다. 설치후 진행하십시오." );
- } finally {
- return result;
- }
- }
- // 쿠키삭제
- function deleteCookie()
- {
- var cookieName = "HIS";// 쿠키명은 설정 정보에서 가져도록 고치자.
- //쿠키 소멸 날짜를 어제 날짜로 설정한다.
- var expireDate = new Date();
- expireDate.setDate( expireDate.getDate() - 1 );
- setCookie(cookieName,"",expireDate,"/",".knu.ac.kr");
- //alert(document.cookie);
- }
- function setCookie(name, value, expires, path, domain, secure) {
- var curCookie = name + "=" + escape(value) +
- ((expires) ? "; expires=" + expires.toGMTString() : "") +
- ((path) ? "; path=" + path : "") +
- ((domain) ? "; domain=" + domain : "") +
- ((secure) ? "; secure" : "");
-
- document.cookie = curCookie;
- }
- function TrustFormSmartUpdater(id, codebase, width, height)
- {
- // CDW와 Knuh Portal 에서 호출 할 때는 TF 설치 안함
- if("<%=isCDW%>" == "true" || "<%=isWidget%>" == "true") return true;
-
- var obj="";
- obj=obj+ "<OBJECT id='"+id+"' CLASSID='CLSID:ED5D862B-6A06-46DE-A929-F2C588742CBD' codebase='"+codebase+"' width='"+width+"' height='"+height+"'>";
- obj=obj+ "<PARAM name='deleteZipFile' value='true'/>"; // zip 파일을 지운다
- obj=obj+ "<PARAM name='registry' value='false'/>"; // registry를 이용하지 않는다.
- obj=obj+ "<PARAM name='configDir' value='C:\\\himed'/>"; // config 파일이 저장될 local 경로를 설정
- obj=obj+ "<PARAM name='enableLog' value ='true' />"; // log를 남긴다.
- obj=obj+ "<PARAM name='selfUi' value ='true' />"; // 자체 UI를 이용한다.
- obj=obj+ "<PARAM name='dlgNotClose' value='true' />"; // UI를 하나의 dialog로 사용한다.
- obj=obj+ "<PARAM name='fileinuse_hidden' value='skip'/>"; // FileInUse Dialog에서 button을 hidden 할 지 여부
- obj=obj+ "<PARAM name='deleteLogLevel' value='1'/>"; // 로그를 value달 전까지 보관 (1은 한달동안의 로그만 보관) added by CBJ 2012.03.23
- obj=obj+ "</OBJECT>";
-
- document.write(obj);
- }
- function XPlatformUpdater() {
- var engine_install_Info = "";
- var launcher_install_Info = "";
- if("<%=isCDW%>" == "true") {
- engine_install_Info = "";
- launcher_install_Info = "";
- } else {
- var engineFilePath = "./install/TobeSoft/XPlatform_" + XPLATFORM_FOLDER_VER + "/XPLATFORM9.2.2_SetupEngine.cab#VERSION=" + XPLATFORM_CAB_VER;
- var launcherFilePath = "./install/TobeSoft/XPlatform_" + XPLATFORM_FOLDER_VER + "/XPLATFORM9.2.2_XPLauncher.cab#VERSION=" + XPLATFORM_CAB_VER;
-
- engine_install_Info = 'CodeBase="' + engineFilePath + '"';
- launcher_install_Info = 'Codebase="' + launcherFilePath + '"';
- }
-
- //XPLATFORM Engine
- document.write('<OBJECT ID="XPlatformAXCtrl" CLASSID="CLSID:FF4E5C35-06C0-4912-9046-B7A6A8B92BEB" width="0" height="0" '
- + engine_install_Info
- + '" onError="fn_objectOnError()">'
- + '</OBJECT>');
- //XPLATFORM Launcher
- document.write('<OBJECT ID="XPLauncher" CLASSID="CLSID:A30D5481-7381-4dd9-B0F4-0D1D37449E97" width="0" height="0" '
- + launcher_install_Info
- + '" onError="fn_objectOnError()">'
- + '<PARAM NAME="key" VALUE="' + sKey + '">'
- + '</OBJECT>');
- }
- </SCRIPT>
- </HEAD>
- <BODY onload="fn_load()">
- <SCRIPT LANGUAGE="JavaScript">
- // XPlatformUpdater
- <!--
- XPlatformUpdater();
- //-->
- // TFSmartUpdater
- <!--
- TrustFormSmartUpdater("TFSmartUpdater", Server_Path + "/himed/install/TrustForm/TFSmartUpdater_m.cab#version=2,6,4,7", "0", "0");
- //-->
- </SCRIPT>
- <div><%=titleText%></div>
- </BODY>
- </HTML>
|