himed2.xadl 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <ADL version="1.1">
  3. <TypeDefinition url="default_typedef.xml"/>
  4. <GlobalVariables url="globalvars.xml"/>
  5. <Application id="himed2" codepage="utf-8" language="Korean" loginformurl="" loginformstyle="" windowopeneffect="" windowcloseeffect="" version="" themeid="XPKNU.xtheme" onload="application_onload" usewaitcursor="false" addcookietovariable="true" onerror="application_onerror" licenseurl="XPLATFORM_Client_License.xml" framemovetype="default" ondownloadactivex="application_ondownloadactivex" filesecurelevel="all" networksecurelevel="all" httpretry="0" httptimeout="1800" proxyretry="0" onexit="application_onexit" onbeforeexit="application_onbeforeexit" tracemode="append" engineversion="9.2.2.240" traceduration="14" engineurl="../install/TobeSoft/XPlatform_922240/XPLATFORM9.2.2_SetupEngine.exe" enginesetupkey="{E05CD7D8-28AF-4577-89AC-E4F1F8ABF046}" usesoftkeyboard="false">
  6. <Layout>
  7. <MainFrame id="mainframe" title="maintitle" defaultfont="" resizable="true" showtitlebar="true" showstatusbar="true" position="absolute 0 0 0 0" titletext="Ku2.0" showcascadestatustext="false" showcascadetitletext="false" layered="false" style="showzoomcombo:false;statusbarheight:0;" style.statusbarheight="" onsize="MainFrame_onsize" style.icon="" onactivate="MainFrame_onactivate" ondeactivate="MainFrame_ondeactivate">
  8. <VFrameSet id="VFrameSet" separatesize="120,*,23">
  9. <Frames>
  10. <ChildFrame id="ChildFrameTop" showtitlebar="false" formurl="com_hismainxp::form_top.xfdl" dragmovetype="none" style="statusbarheight:0;" openstatus="normal"/>
  11. <FrameSet id="FrameSet">
  12. <Frames>
  13. <ChildFrame id="ChildFrameWork" formurl="com_hismainxp::form_work.xfdl" dragmovetype="none" resizable="false" showtitlebar="false" openstatus="maximize"/>
  14. </Frames>
  15. </FrameSet>
  16. <ChildFrame id="ChildFrameBottom" showtitlebar="false" formurl="com_hismainxp::form_bottom.xfdl" dragmovetype="none" style="statusbarheight:0;"/>
  17. </Frames>
  18. </VFrameSet>
  19. </MainFrame>
  20. </Layout>
  21. <ScreenInfo/>
  22. <Style url="CSS::xpknu_theme.css"/>
  23. </Application>
  24. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  25. * System Name : HIT
  26. * Job Name :
  27. * File Name : himed2.xadl
  28. * Creator :
  29. * Make Date : 2014-01-01
  30. *
  31. * Description :
  32. *---------------------------------------------------------------------------------------
  33. * Modify Date Modifier Modify Description
  34. *---------------------------------------------------------------------------------------
  35. * 2014-01-01 임준호
  36. *
  37. *---------------------------------------------------------------------------------------
  38. ****************************************************************************************/
  39. //=======================================================================================
  40. // Global Variable
  41. //---------------------------------------------------------------------------------------
  42. //상단 프레임
  43. var agv_objAppTopPath = null;
  44. //업무화면을 관리하는 프레임셋
  45. var agv_objAppWorkPath = null;
  46. //하단 프레임
  47. var agv_objAppBottomPath = null;
  48. //시스템 에러 구분 application_onerror에서 사용
  49. var agv_bSystemError = false;
  50. //업무용 세션 변수
  51. var agv_objBizVariable = null;
  52. //업무용 변수(TF model attribute)
  53. var agv_objBizAttribute = null;
  54. //Cache Variable
  55. var agv_objCommonCache = new Object();
  56. //last transaction time(milli)
  57. var agv_nLastTransactionTime = 0;
  58. //var agv_sStartMemoryInfo = Math.round(system.getMemoryStatus("FreePhysical")/1000000)+"";
  59. //frmf_openForm 함수에서 인자값을 넘길때 사용(frmf_openForm) - frmf_getMainFormParam()에서 사용한다.
  60. var agv_objMainFormParam = null;
  61. //=======================================================================================
  62. // Function
  63. //---------------------------------------------------------------------------------------
  64. /****************************************************************************************
  65. * Argument : 01.usessl : ssl 사용 여부
  66. * Description : ssl 설정
  67. ****************************************************************************************/
  68. function gf_useSSL(usessl)
  69. {
  70. if(system.osversion == "Windows XP") {
  71. gv_bUseSSL = false;
  72. usessl = false;
  73. }
  74. if (usessl){
  75. application.services["SVR"].url = gv_sURLprefixSSL+"/.lxp?";
  76. }else{
  77. application.services["SVR"].url = gv_sURLprefix+"/.lxp?";
  78. }
  79. }
  80. /****************************************************************************************
  81. * Argument :
  82. * Description : 로그인 화면 기동
  83. ****************************************************************************************/
  84. function gf_loginProcess()
  85. {
  86. var nMoniterIndex;
  87. var nScreenLeft;
  88. var nScreenTop;
  89. var nScreenRight;
  90. var nScreenBottom;
  91. var nScreenWidth;
  92. var nScreenHeight;
  93. var arrScreenSize;
  94. var monitorIndex = application.getPrivateProfile("gv_nMonitorIndex");
  95. if(lf_isNull(monitorIndex)) monitorIndex = 1;
  96. nMoniterIndex = monitorIndex;//system.getMonitorIndex(system.cursorx, system.cursory); //모니터번호
  97. //alert("login process="+nMoniterIndex);
  98. objScreenSize = system.getScreenRect(nMoniterIndex);
  99. nScreenLeft = objScreenSize.left;
  100. nScreenTop = objScreenSize.top;
  101. nScreenRight = objScreenSize.right;
  102. nScreenBottom = objScreenSize.bottom;
  103. nScreenWidth = nScreenRight - nScreenLeft;
  104. nScreenHeight = nScreenBottom - nScreenTop;
  105. // //로그인 창 나올때 작업표시줄 아이콘 표시를 위하여 mainframe 크기를 0으로 줄인다.
  106. // var nMainLeft = application.mainframe.position.left;
  107. // var nMainTop = application.mainframe.position.top;
  108. // var nMainWidth = application.mainframe.position.width;
  109. // var nMainHeight = application.mainframe.position.height;
  110. //
  111. application.mainframe.position.left = Math.ceil(nScreenLeft+(nScreenWidth/2));
  112. application.mainframe.position.top = Math.ceil(nScreenTop+(nScreenHeight/2));
  113. application.mainframe.position.width = 1; // 0 인 상태로는 titletext 값 변경이 안됨
  114. application.mainframe.position.height = 1;
  115. application.mainframe.visible = true;
  116. //application.mainframe.style.icon = "theme://images\\icon_titlebar.png";
  117. //로그인 화면 기동
  118. var left = nScreenLeft + (nScreenWidth / 2) - 217;
  119. var top = nScreenTop + (nScreenHeight / 2) - 353;
  120. // left, top 좌표가 원격 접속시 -로 발생하는 현상이 있는 것에 대한 처리
  121. if(left < 0) left = 423;
  122. if(top < 0) top = 140;
  123. var right = left + 434;
  124. var bottom = top + 353;
  125. var objFrame = new ChildFrame("Login", left, top, right, bottom);
  126. objFrame.showtitlebar = false;
  127. objFrame.titlebar.minbutton.enable = true;
  128. objFrame.titlebar.maxbutton.enable = false;
  129. objFrame.layered = true;
  130. objFrame.style.background = "transparent";
  131. objFrame.formurl = "com_hismainxp::form_login.xfdl";
  132. objFrame.style.icon = "IMG::" + gv_currentInstcd + ".png";
  133. var rtn = objFrame.showModal("Login", application.mainframe);
  134. if(rtn=="OK"){
  135. //로그인 창 나올때 mainframe를 원래 크기로 적용한다.
  136. gf_setFrameSize();
  137. // application.mainframe.position.left = nMainLeft;
  138. // application.mainframe.position.top = nMainTop;
  139. // application.mainframe.position.width = nMainWidth;
  140. // application.mainframe.position.height = nMainHeight;
  141. // application.mainframe.visible = true;
  142. // gf_setMenuType(gv_sMenuType);
  143. //
  144. // agv_objAppBottomPath.form.fSetBottomTexts();
  145. }else{
  146. gv_isCanLogout = true;
  147. exit();
  148. }
  149. }
  150. /****************************************************************************************
  151. * Argument :
  152. * Description : 메인 프레임 사이즈 및 위치 설정
  153. ****************************************************************************************/
  154. function gf_setFrameSize()
  155. {
  156. var nMoniterIndex;
  157. var nScreenLeft;
  158. var nScreenTop;
  159. var nScreenRight;
  160. var nScreenBottom;
  161. var nScreenWidth;
  162. var nScreenHeight;
  163. var arrScreenSize;
  164. var objExtCommon = new ExtCommon();
  165. var objExt = new ExtCommon();
  166. var IE_Gbn = objExt.regGetValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\Microsoft\\Internet Explorer\\", "Version", "S");
  167. gv_IE_Ver = IE_Gbn.substr(0,1);
  168. var nTaskBar = objExtCommon.getTaskBarPosition();
  169. var monitorIndex = application.getPrivateProfile("gv_nMonitorIndex");
  170. if(lf_isNull(monitorIndex)) monitorIndex = 1;
  171. nMoniterIndex = monitorIndex;//system.getMonitorIndex(system.cursorx, system.cursory); //모니터번호
  172. objScreenSize = system.getScreenRect(nMoniterIndex);
  173. nScreenLeft = objScreenSize.left;
  174. nScreenTop = objScreenSize.top;
  175. nScreenRight = objScreenSize.right;
  176. nScreenBottom = objScreenSize.bottom;
  177. nScreenWidth = nScreenRight - nScreenLeft;
  178. nScreenHeight = nScreenBottom - nScreenTop;
  179. application.mainframe.position.width = 1280;
  180. var nLeftCenter = nScreenLeft + ((nScreenWidth / 2) - (application.mainframe.position.width / 2));
  181. // tastbar의 x 위치가 마이너스로 나오는 경우에 대한 예외 처리
  182. if(nTaskBar[0] < 0) {
  183. nTaskBar[1] += nTaskBar[0]; // top
  184. nTaskBar[2] += nTaskBar[0]; // right
  185. nTaskBar[3] += nTaskBar[0]; // bottom
  186. nTaskBar[0] = 0; // left
  187. }
  188. // 작업 표시줄 사이즈만 따로 구하자
  189. var nTaskBarWidth = Math.abs(nTaskBar[2] - nTaskBar[0]);
  190. var nTaskBarHeight = Math.abs(nTaskBar[3] - nTaskBar[1]);
  191. var nTaskBarMoniterIndex = system.getMonitorIndex(nTaskBar[0], nTaskBar[1]); //모니터번호
  192. var objTaskBarScreenSize = system.getScreenRect(nTaskBarMoniterIndex);
  193. var nTaskBarScreenLeft = objTaskBarScreenSize.left;
  194. var nTaskBarScreenTop = objTaskBarScreenSize.top;
  195. var nTaskBarScreenRight = objTaskBarScreenSize.right;
  196. var nTaskBarScreenBottom = objTaskBarScreenSize.bottom;
  197. var nTaskBarScreenWidth = nTaskBarScreenRight - nTaskBarScreenLeft;
  198. var nTaskBarScreenHeight = nTaskBarScreenBottom - nTaskBarScreenTop;
  199. var nFixScreenLeft = 0;
  200. var nFixScreenTop = 0;
  201. var nFixScreenRight = 0;
  202. var nFixScreenBottom = 0;
  203. var nFixScreenWidth = 0;
  204. var nFixScreenHeight = 0;
  205. var nFixTaskBarWidth = 0;
  206. var nFixTaskBarHeight = 0;
  207. if((nMoniterIndex != nTaskBarMoniterIndex) && (system.osversion != "Windows 10")) {
  208. nFixScreenLeft = nScreenLeft;
  209. nFixScreenTop = nScreenTop;
  210. nFixScreenRight = nScreenRight;
  211. nFixScreenBottom = nScreenBottom;
  212. nFixScreenWidth = nScreenWidth;
  213. nFixScreenHeight = nScreenHeight;
  214. nFixTaskBarWidth = 0;
  215. nFixTaskBarHeight = 0;
  216. } else {
  217. nFixScreenLeft = nTaskBarScreenLeft;
  218. nFixScreenTop = nTaskBarScreenTop;
  219. nFixScreenRight = nTaskBarScreenRight;
  220. nFixScreenBottom = nTaskBarScreenBottom;
  221. nFixScreenWidth = nTaskBarScreenWidth;
  222. nFixScreenHeight = nTaskBarScreenHeight;
  223. nFixTaskBarWidth = nTaskBarWidth;
  224. nFixTaskBarHeight = nTaskBarHeight;
  225. }
  226. if(nTaskBar[0] == nTaskBarScreenLeft) {
  227. if(nTaskBar[1] == nTaskBarScreenTop) {
  228. if(nTaskBar[2] == nTaskBarScreenRight) { // 위쪽
  229. application.mainframe.position.height = nFixScreenHeight - nFixTaskBarHeight;
  230. application.mainframe.move(nLeftCenter, nFixScreenTop + nFixTaskBarHeight);
  231. } else { // 왼쪽
  232. application.mainframe.position.width = (nFixScreenWidth > 1280) ? 1280 : (nFixScreenWidth - nFixTaskBarWidth);
  233. application.mainframe.position.height = nFixScreenHeight;
  234. application.mainframe.move(nLeftCenter + nFixTaskBarWidth, nFixScreenTop);
  235. }
  236. } else { // 아래쪽
  237. application.mainframe.position.height = nFixScreenHeight - nFixTaskBarHeight;
  238. application.mainframe.move(nLeftCenter, nFixScreenTop);
  239. }
  240. } else if(nTaskBar[2] == nTaskBarScreenRight){ // 오른쪽
  241. application.mainframe.position.width = (nFixScreenWidth > 1280) ? 1280 : (nFixScreenWidth - nFixTaskBarWidth);
  242. application.mainframe.position.height = nFixScreenHeight;
  243. application.mainframe.move(nLeftCenter, nFixScreenTop);
  244. }
  245. if(application.mainframe.position.height <= 1) {
  246. application.mainframe.position.height = 984;
  247. application.mainframe.move(nLeftCenter, nScreenTop);
  248. }
  249. }
  250. /****************************************************************************************
  251. * Argument :
  252. * Description : 로그아웃 처리
  253. ****************************************************************************************/
  254. function gf_logout(){
  255. // 세션토큰 초기화
  256. gv_sSessionToken = "";
  257. gv_sSessionToken_ENC = "";
  258. // 세션변수 초기화
  259. agv_objBizVariable = new Object();
  260. agv_objBizAttribute = new Object();
  261. gds_userInfo.clear();
  262. //메인프레임의 최대화/최소화 상태를 normal 상태로 만든다.
  263. //최대화 상태일때 크기 조절이 안된다.
  264. application.mainframe.openstatus = "normal";
  265. gf_loginProcess();
  266. }
  267. /****************************************************************************************
  268. * Argument : 01.sMenuType : 메뉴타입
  269. * Description : 메뉴타입에 따라 상단프레임(TOP) height 조절
  270. ****************************************************************************************/
  271. function gf_setMenuType(sMenuType){
  272. var vfameset = application.mainframe.VFrameSet;
  273. //trace("menutype : "+ sMenuType);
  274. if (sMenuType == "01"){
  275. // 상단정보를 보이게 조정
  276. vfameset.separatesize = "120,*,23";
  277. }else{
  278. // 상단정보를 숨김
  279. vfameset.separatesize = "35,*,23";
  280. }
  281. }
  282. function gf_setUrl(inst){
  283. application.mainframe.style.icon = "";
  284. var loginSaveInst = "";
  285. if(gv_bLoginSaveinst){
  286. gv_LoginSavedInst = application.getPrivateProfile("gv_LoginSavedInst");
  287. loginSaveInst = gv_LoginSavedInst;
  288. } else {
  289. if(inst != null && inst != "" && inst != undefined)
  290. loginSaveInst = gv_LoginSavedInst = inst;
  291. }
  292. var urlTFArr = application.services["TFURL"].url;
  293. var xadlURLArr = application.xadl.split("/");
  294. if (xadlURLArr[0].indexOf("http") == 0) // 서버환경인 경우
  295. {
  296. // 시스템 구분 미저장 시
  297. if(loginSaveInst == "") {
  298. if(xadlURLArr[2].indexOf("hisx031") != -1) { // 본원 접속
  299. loginSaveInst = "his031";
  300. }
  301. else if(xadlURLArr[2].indexOf("hisx032") != -1) { // 칠곡 접속
  302. loginSaveInst = "his032";
  303. }
  304. else if(xadlURLArr[2].indexOf("misx030") != -1) { // MIS 접속
  305. loginSaveInst = "mis030";
  306. }
  307. else if(xadlURLArr[2].indexOf("crmx030") != -1) { // CRM 접속
  308. loginSaveInst = "crm030";
  309. }
  310. else if(xadlURLArr[2].indexOf("hisx033") != -1) { // 치과 접속
  311. loginSaveInst = "his033";
  312. }
  313. else if(xadlURLArr[2].indexOf("misx033") != -1) { // MIS치과 접속
  314. loginSaveInst = "mis033";
  315. }
  316. }
  317. trace("loginSaveInst : " + loginSaveInst);
  318. var urlArr = application.services["SVR"].url.split("/");
  319. // 로컬서버
  320. if(xadlURLArr[2].indexOf("999dev") != -1){
  321. // if(loginSaveInst == "his031"){
  322. // urlArr = "http://hisx031edu.knuh.kr:80/himed/.lxp?".split("/");
  323. // urlTFArr = "http://his031edu.knuh.kr/himed";
  324. // }else if(loginSaveInst == "his032"){
  325. // urlArr = "http://hisx032edu.knuh.kr:80/himed/.lxp?".split("/");
  326. // urlTFArr = "http://his032edu.knuh.kr/himed";
  327. // }else if(loginSaveInst == "mis030"){
  328. // urlArr = "http://misx030edu.knuh.kr:80/himed/.lxp?".split("/");
  329. // urlTFArr = "http://mis030edu.knuh.kr/himed";
  330. // }
  331. gv_currentInstnm = "개인로컬";
  332. gv_bUseSSL = false;
  333. }
  334. // 교육서버
  335. else if(xadlURLArr[2].indexOf("edu") != -1){
  336. if(loginSaveInst == "his031"){
  337. urlArr = "http://hisx031edu.knuh.kr:80/himed/.lxp?".split("/");
  338. urlTFArr = "http://his031edu.knuh.kr/himed";
  339. gv_currentInstnm = "본원교육";
  340. }else if(loginSaveInst == "his032"){
  341. urlArr = "http://hisx032edu.knuh.kr:80/himed/.lxp?".split("/");
  342. urlTFArr = "http://his032edu.knuh.kr/himed";
  343. gv_currentInstnm = "칠곡교육";
  344. }else if(loginSaveInst == "mis030"){
  345. urlArr = "http://misx030edu.knuh.kr:80/himed/.lxp?".split("/");
  346. urlTFArr = "http://mis030edu.knuh.kr/himed";
  347. gv_currentInstnm = "MIS교육";
  348. }else if(loginSaveInst == "crm030"){
  349. urlArr = "http://crmx030edu.knuh.kr:80/himed/.lxp?".split("/");
  350. urlTFArr = "http://crm030edu.knuh.kr/himed";
  351. gv_currentInstnm = "CRM교육";
  352. }else if(loginSaveInst == "his033"){
  353. urlArr = "http://hisx033edu.knudh.kr:80/himed/.lxp?".split("/");
  354. urlTFArr = "http://his033edu.knudh.kr/himed";
  355. gv_currentInstnm = "치과교육";
  356. }else if(loginSaveInst == "mis033"){
  357. urlArr = "http://misx033edu.knudh.kr:80/himed/.lxp?".split("/");
  358. urlTFArr = "http://mis033edu.knudh.kr/himed";
  359. gv_currentInstnm = "MIS치과교육";
  360. }
  361. gv_bUseSSL = true;
  362. }
  363. // 운영서버
  364. else {
  365. if(loginSaveInst == "his031"){
  366. urlArr = "http://hisx031.knuh.kr:80/himed/.lxp?".split("/");
  367. urlTFArr = "http://his031.knuh.kr/himed";
  368. gv_currentInstnm = "본원운영";
  369. }else if(loginSaveInst == "his032"){
  370. urlArr = "http://hisx032.knuh.kr:80/himed/.lxp?".split("/");
  371. urlTFArr = "http://his032.knuh.kr/himed";
  372. gv_currentInstnm = "칠곡운영";
  373. }else if(loginSaveInst == "mis030"){
  374. urlArr = "http://misx030.knuh.kr:80/himed/.lxp?".split("/");
  375. urlTFArr = "http://mis030.knuh.kr/himed";
  376. gv_currentInstnm = "MIS운영";
  377. }else if(loginSaveInst == "crm030"){
  378. urlArr = "http://crmx030.knuh.kr:80/himed/.lxp?".split("/");
  379. urlTFArr = "http://crm030.knuh.kr/himed";
  380. gv_currentInstnm = "CRM운영";
  381. }else if(loginSaveInst == "his033"){
  382. urlArr = "http://hisx033.knudh.kr:80/himed/.lxp?".split("/");
  383. urlTFArr = "http://his033.knudh.kr/himed";
  384. gv_currentInstnm = "치과운영";
  385. }else if(loginSaveInst == "mis033"){
  386. urlArr = "http://misx033.knudh.kr:80/himed/.lxp?".split("/");
  387. urlTFArr = "http://mis033.knudh.kr/himed";
  388. gv_currentInstnm = "MIS치과운영";
  389. }
  390. gv_bUseSSL = true;
  391. }
  392. trace("urlArr : " + urlArr);
  393. trace("urlTFArr : " + urlTFArr);
  394. trace("gv_currentInstnm : " + gv_currentInstnm);
  395. var domainArr = urlArr[2].split(":");
  396. gv_sURLprefix = "http://"+urlArr[2]+"/"+urlArr[3];
  397. gv_sURLprefixSSL = "https://"+domainArr[0]+":443/"+urlArr[3];
  398. gv_sTFURLprefix = urlTFArr;
  399. gv_bIsPreview = false;
  400. gv_isCommonPopup = true; // 공통 마우스 우측 팝업 사용
  401. }
  402. else // 개발자 환경인 경우 (미리보기환경)
  403. {
  404. var serviceURLArr = application.services["SVR"].url.split("/");
  405. // if(loginSaveInst != ""){
  406. // if(loginSaveInst == "his031"){
  407. // serviceURLArr = "http://hisx031edu.knuh.kr:80/himed/.lxp?".split("/");
  408. // }else if(loginSaveInst == "his032"){
  409. // serviceURLArr = "http://hisx032edu.knuh.kr:80/himed/.lxp?".split("/");
  410. // }else if(loginSaveInst == "mis030"){
  411. // serviceURLArr = "http://misx030edu.knuh.kr:80/himed/.lxp?".split("/");
  412. // }
  413. // }
  414. gv_currentInstnm = "개인로컬";
  415. var localDomainArr = serviceURLArr[2].split(":");
  416. gv_sURLprefix = "http://"+serviceURLArr[2]+"/"+serviceURLArr[3];
  417. gv_sURLprefixSSL = "https://"+localDomainArr[0]+":8443/"+serviceURLArr[3];
  418. gv_sTFURLprefix = urlTFArr;
  419. gv_bIsPreview = true;
  420. gv_bUseSSL = false;
  421. application.mainframe.style.icon = "IMG::KU2_031.ico";
  422. }
  423. if(loginSaveInst == "his031"){
  424. gv_currentInstcd = "his031";
  425. gv_LoginSavedInst = loginSaveInst;
  426. application.mainframe.style.icon = "IMG::KU2_031.ico";
  427. }else if(loginSaveInst == "his032"){
  428. gv_currentInstcd = "his032";
  429. gv_LoginSavedInst = loginSaveInst;
  430. application.mainframe.style.icon = "IMG::KU2_032.ico";
  431. }else if(loginSaveInst == "mis030"){
  432. gv_currentInstcd = "mis030";
  433. gv_LoginSavedInst = loginSaveInst;
  434. application.mainframe.style.icon = "IMG::KU2_030.ico";
  435. }else if(loginSaveInst == "crm030"){
  436. gv_currentInstcd = "crm030";
  437. gv_LoginSavedInst = loginSaveInst;
  438. application.mainframe.style.icon = "IMG::KU2_CRM030.ico";
  439. }else if(loginSaveInst == "his033"){
  440. gv_currentInstcd = "his033";
  441. gv_LoginSavedInst = loginSaveInst;
  442. application.mainframe.style.icon = "IMG::KU2_033.ico";
  443. }else if(loginSaveInst == "mis033"){
  444. gv_currentInstcd = "mis033";
  445. gv_LoginSavedInst = loginSaveInst;
  446. application.mainframe.style.icon = "IMG::KU2_MIS033.ico";
  447. }
  448. // 접속시스템에 따라 타이틀바 아이콘 표시
  449. var objTitlebar = application.mainframe.titlebar;
  450. var oIv = objTitlebar.components["ivIcon"];
  451. if(lf_isNull(oIv)) {
  452. oIv = new ImageViewer();
  453. oIv.init("ivIcon", -1, -1, 27, 25);
  454. oIv.style.background = "#262d39ff";
  455. oIv.style.border = "0 none transparent";
  456. oIv.style.bordertype = "normal 0 0";
  457. oIv.style.padding = "2 0 0 0";
  458. oIv.imagealign = "right top";
  459. objTitlebar.addChild(oIv.name, oIv);
  460. oIv.show();
  461. }
  462. oIv.image = "";
  463. oIv.image = "IMG::" + gv_currentInstcd + ".png";
  464. //gv_bUseSSL = application.getPrivateProfile("gv_bUseSSL") == "true"? true:false ;
  465. gf_useSSL(gv_bUseSSL);
  466. }
  467. //=======================================================================================
  468. // Event
  469. //---------------------------------------------------------------------------------------
  470. /****************************************************************************************
  471. * Components :
  472. * Components ID :
  473. * Event : onload
  474. * Argument : 01.obj : Object
  475. * : 02.e : LoadEventInfo
  476. * Description :
  477. ****************************************************************************************/
  478. function application_onload(obj:Object, e:LoadEventInfo)
  479. {
  480. agv_objAppTopPath = mainframe.VFrameSet.ChildFrameTop; // 상단정보
  481. agv_objAppWorkPath = mainframe.VFrameSet.FrameSet.ChildFrameWork; // 업무화면
  482. agv_objAppBottomPath = mainframe.VFrameSet.ChildFrameBottom; // 하단정보
  483. //업무용 세션 변수 초기화
  484. agv_objBizVariable = new Object();
  485. agv_objBizAttribute = new Object();
  486. gv_isCDW = false;
  487. // 익스플로어에서 url로 접속한 경우 (TFSmartUpdate 실행 안해도 되도록 설정)
  488. if(!lf_isNull(JSESSIONID)) {
  489. gv_bFromWeb = "Y";
  490. }
  491. gf_setUrl();
  492. //gf_setFrameSize();
  493. gf_loginProcess();
  494. }
  495. /****************************************************************************************
  496. * Components : application
  497. * Components ID :
  498. * Event : onerror
  499. * Argument : 01.obj : Object
  500. * : 02.e : ErrorEventInfo
  501. * Description :
  502. ****************************************************************************************/
  503. function application_onerror(obj:Object, e:ErrorEventInfo){
  504. agv_bSystemError = true;
  505. //트랜잭션시 ESC키로 종료막음. - tobesoft 2014.03.17
  506. if(e.errorcode == "-2147418039"){ //ESC키가 눌렸을때
  507. //return true;
  508. }
  509. //임시 오류 확인용
  510. //alert(e.errorcode+"\n"+e.errormsg);
  511. }
  512. /****************************************************************************************
  513. * Components : application
  514. * Components ID :
  515. * Event : ondownloadactivex
  516. * Argument : 01.obj : Object
  517. * : 02.e : LoadEventInfo
  518. * Description : 엑티브 엑스 다운로드 alert 방지용
  519. ****************************************************************************************/
  520. function application_ondownloadactivex(obj:Object, e:LoadEventInfo){
  521. //지우면 안됨.
  522. }
  523. /****************************************************************************************
  524. * Components : MainFrame
  525. * Components ID : mainframe
  526. * Event : onsize
  527. * Argument : 01.obj : MainFrame
  528. * : 02.e : SizeEventInfo
  529. * Description : 메인프레임 리사이즈
  530. ****************************************************************************************/
  531. function MainFrame_onsize(obj:MainFrame, e:SizeEventInfo){
  532. // if(gv_sSessionToken != ""){
  533. // if(e.cx<=1280){
  534. // obj.position.width = 1280;
  535. // return;
  536. // }
  537. // }
  538. }
  539. /****************************************************************************************
  540. * Components : application
  541. * Components ID : application
  542. * Event : onexit
  543. * Argument : 01.obj : Object
  544. * : 02.e : ExitEventInfo
  545. * Description : 메인프레임 닫기
  546. ****************************************************************************************/
  547. function application_onexit(obj:Object, e:ExitEventInfo){
  548. }
  549. function application_onbeforeexit(obj:Object, e:ExitEventInfo)
  550. {
  551. var isCDW = false;
  552. try {
  553. isCDW = gv_isCDW;
  554. } catch(e) {
  555. }
  556. if(isCDW == "false" || !isCDW) {
  557. // 메모 저장 안되는 현상이 있어서 강제로 포커스 날림
  558. agv_objAppWorkPath.form.div_menu_group.div_left_memo.ta_memo.onkillfocus.fireEvent(agv_objAppWorkPath.form.div_menu_group.div_left_memo.ta_memo, new KillFocusEventInfo());
  559. }
  560. if(gv_isCanLogout == true) {
  561. // XPlatform Process가 남아있는 현상이 있어서 종료시 Process 강제 킬하도록 함 (2017.07.29 smkim)
  562. var extCommonApi = new ExtCommon();
  563. var nProcessId = extCommonApi.getCurrentProcessId();
  564. extCommonApi.killProcessById(nProcessId);
  565. return true;
  566. }
  567. // 작업표시줄에서 X 클릭시 메인창이 위로 올라오고 메시지팝업이 뜨도록 수정
  568. application.mainframe.activate();
  569. try {
  570. agv_objAppWorkPath.form.frmf_loadingbarTrace(3);
  571. } catch(e) {}
  572. if(lf_messageBox("Ku2.0 을 종료하시겠습니까?") != 6) {
  573. return false;
  574. }
  575. agv_objAppTopPath.form.lf_logout(true);
  576. return false;
  577. }
  578. function lf_findPopup(sPopupId){
  579. var objForm = application.popupframes[sPopupId];
  580. if(!lf_isNull(objForm)) objForm = application.popupframes[sPopupId].form;
  581. return objForm;
  582. }
  583. function lf_isNull(sValue)
  584. {
  585. if( ("x"+sValue == "xNaN") && ( new String(sValue.length).valueOf() == "undefined")) return true;
  586. if (sValue == null) return true;
  587. var v_ChkStr = new String(sValue);
  588. if (v_ChkStr == null) return true;
  589. if (v_ChkStr.toString().length == 0 ) return true;
  590. return false;
  591. }
  592. function lf_messageBox(pMessage) {
  593. var nMoniterIndex = system.getMonitorIndex(system.cursorx, system.cursory); //모니터번호
  594. var objScreenInfo = system.getScreenRect(nMoniterIndex);
  595. var nScreenLeft = objScreenInfo.left;
  596. var nScreenTop = objScreenInfo.top;
  597. var nScreenRight = objScreenInfo.right;
  598. var nScreenBottom = objScreenInfo.bottom;
  599. var nScreenWidth = nScreenRight - nScreenLeft;
  600. var nScreenHeight = nScreenBottom - nScreenTop;
  601. var objMsgSize = lf_getConfirmMsgSize(pMessage);
  602. var nWidth = 374;
  603. var nHeight = 131;
  604. var nWidthGap = 0;
  605. var nHeightGap = 0;
  606. if(objMsgSize.width > 278){
  607. nWidth = nWidth + (objMsgSize.width-278);
  608. nWidthGap = (objMsgSize.width-278)/2;
  609. }
  610. if(objMsgSize.height > 20){
  611. nHeight = nHeight + (objMsgSize.height-20);
  612. nHeightGap = (objMsgSize.height-20);
  613. }
  614. var nLeft = (nScreenLeft+(nScreenWidth/2))-(nWidth/2);
  615. var nTop = (nScreenTop+(nScreenHeight/2))-(nHeight/2);
  616. var newChild = new ChildFrame();
  617. newChild.showtitlebar = false;
  618. newChild.autosize = false;
  619. //newChild.layered = true;
  620. newChild.resizable = false;
  621. newChild.init("SPZUM00500", nLeft, nTop, nLeft+nWidth, nTop+nHeight);
  622. newChild.formurl = "com_hismainxp::form_confirm.xfdl";
  623. newChild.openalign = "center middle";
  624. var objArgs = new Object();
  625. objArgs.plgv_pMessage = pMessage;
  626. objArgs.plgv_sttWidth = objMsgSize.width;
  627. objArgs.plgv_sttHeight = objMsgSize.height;
  628. objArgs.plgv_nWidthGap = nWidthGap;
  629. objArgs.plgv_nHeightGap = nHeightGap;
  630. objArgs.plgv_msgTitle = "확인";
  631. objArgs.plgv_msgBoxType = "Q";
  632. return newChild.showModal("SPZUM00500", this, objArgs, this, "lock=all");
  633. }
  634. function lf_getConfirmMsgSize(sMsg){
  635. var objExtCommon = new ExtCommon();
  636. var arrMsg = sMsg.split("\n");
  637. var nRowCnt = arrMsg.length;
  638. var nMaxWidth = 0;
  639. var nHeigth = objExtCommon.getTextExtent(new Static("sysf_getConfirmMsgSize"), sMsg)[0];
  640. if(nRowCnt == 1){
  641. nMaxWidth = objExtCommon.getTextExtent(new Static("sysf_getConfirmMsgSize"), sMsg)[1];
  642. }else{
  643. for(var i in arrMsg){
  644. var nCurrWidth = objExtCommon.getTextExtent(new Static("sysf_getConfirmMsgSize"), arrMsg[i])[1];
  645. if(nCurrWidth > nMaxWidth){
  646. nMaxWidth = nCurrWidth;
  647. }
  648. }
  649. }
  650. var objMsgSize = new Object();
  651. objMsgSize.width = nMaxWidth+1;
  652. objMsgSize.height = nHeigth*nRowCnt;
  653. return objMsgSize;
  654. }
  655. function MainFrame_onactivate(obj:MainFrame, e:ActivateEventInfo)
  656. {
  657. var objTitlebar = application.mainframe.titlebar;
  658. var oIv = objTitlebar.components["ivIcon"];
  659. if(!lf_isNull(oIv)) {
  660. oIv.style.background = "#262d39ff";
  661. }
  662. }
  663. function MainFrame_ondeactivate(obj:MainFrame, e:ActivateEventInfo)
  664. {
  665. var objTitlebar = application.mainframe.titlebar;
  666. var oIv = objTitlebar.components["ivIcon"];
  667. if(!lf_isNull(oIv)) {
  668. oIv.style.background = "#5d626bff";
  669. }
  670. }
  671. ]]></Script>
  672. </ADL>