main_backup.jsp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <%@ page contentType="text/html; charset=utf-8" %>
  3. <%@ page import="kr.co.udapsoft.common.menu.*" %>
  4. <%@ page import="kr.co.udapsoft.common.util.*" %>
  5. <%@ page import="kr.co.hsnc.common.util.*" %>
  6. <%@ page import="com.udapsoft.waf.common.util.*" %>
  7. <%@ page import="kr.co.hsnc.common.config.WAFConfig;" %>
  8. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  9. <%
  10. ctx.init(request, response);
  11. String strTitle = WAFConfig.get("waf.ServerType");
  12. %>
  13. <% if( ctx.isSignedOn() ) { %>
  14. <%
  15. ValueObject params = ctx.getParams();
  16. ValueObject user = ctx.getUser();
  17. user.set("USE_SYSTEM", "10");
  18. ctx.setUser(user);
  19. PotalMenuManager menuManager = new PotalMenuManager(request);
  20. String USE_SYSTEM = menuManager.getUseSystem();
  21. %>
  22. <HTML>
  23. <HEAD>
  24. <TITLE><%= strTitle %>ETEC E&C Plant Material Management System</TITLE>
  25. <!-- <META http-equiv="Content-Type" content="text/html; charset=utf-8"> -->
  26. <!-- <META http-equiv="MSThemeCompatible" content="No"> -->
  27. <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
  28. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  29. <LINK href="/css/supplier/style.css" rel="stylesheet" type="text/css">
  30. <STYLE>
  31. html {
  32. height: 100%;
  33. filter: expression(document.execCommand("BackgroundImageCache", false, true));
  34. }
  35. BODY, form {
  36. WIDTH : 100% ;
  37. height: 100%;
  38. OVERFLOW-X : AUTO ;
  39. OVERFLOW-Y : AUTO ;
  40. margin:0;
  41. }
  42. </STYLE>
  43. <SCRIPT language="JavaScript" src="/js/common.js"></SCRIPT>
  44. <SCRIPT language="JavaScript" src="/js/xmlhttp.js"></SCRIPT>
  45. <SCRIPT language="JavaScript" src="/js/objects.js"></SCRIPT>
  46. <SCRIPT language="JavaScript">
  47. /**
  48. * 현재 사용하는 시스템 코드
  49. */
  50. var USE_SYSTEM = "<%= USE_SYSTEM %>";
  51. /**
  52. * Object에 이미지 src 변경 처리
  53. */
  54. function setImg(obj, imgSrc) {
  55. obj.src = imgSrc;
  56. }
  57. /**
  58. * ID에 해당하는 서브메뉴를 나타나도록 처리
  59. */
  60. function showSubMenu(mainMenuId) {
  61. //var mainMenuObj = eval("document.all." + mainMenuId);
  62. var mainMenuObj = document.getElementById(mainMenuId);
  63. //setImg(mainMenuObj, mainMenuObj.getAttribute("on_image_path"));
  64. var subMenuObj = getSubMenuObj(mainMenuObj.getAttribute("index"));
  65. var cRects = mainMenuObj.getClientRects();
  66. subMenuObj.style.left = (cRects[0].left - 2) + "px";
  67. subMenuObj.style.top = (cRects[0].bottom - 2) + "px";
  68. subMenuObj.style.display = "";
  69. }
  70. /**
  71. * ID에 해당하는 서브메뉴를 숨김 처리
  72. */
  73. function hideSubMenu(mainMenuId) {
  74. //var mainMenuObj = eval("document.all." + mainMenuId);
  75. var mainMenuObj = document.getElementById(mainMenuId);
  76. var subMenuObj = getSubMenuObj(mainMenuObj.getAttribute("index"));
  77. subMenuObj.style.display = "none";
  78. //setImg(mainMenuObj, mainMenuObj.getAttribute("off_image_path"));
  79. }
  80. /**
  81. * 모든 서브메뉴를 숨김 처리
  82. */
  83. function hideAllSubMenu() {
  84. if( window.subMenuLayer != null ) {
  85. if( window.subMenuLayer.length == null ) {
  86. window.subMenuLayer.style.display = "none";
  87. }
  88. else {
  89. for( var i = 0 ; i < window.subMenuLayer.length ; i++ ) {
  90. window.subMenuLayer[i].style.display = "none";
  91. }
  92. }
  93. }
  94. }
  95. /**
  96. * index에 해당하는 서브메뉴의 Object를 리턴
  97. */
  98. function getSubMenuObj(index) {
  99. var temp = document.all.subMenuLayer;
  100. if( temp.length == null )
  101. return temp;
  102. else
  103. return temp[index];
  104. }
  105. /**
  106. * 시스템 이동
  107. */
  108. /* function setSystem(sysId) {
  109. var f = document.MenuChangeForm;
  110. f.P_USE_SYSTEM.value = sysId;
  111. f.submit();
  112. } */
  113. function setSystem(systemObj){
  114. resetSystem();
  115. setImg(systemObj, systemObj.getAttribute("on_image_path"));
  116. var systemMenuObj = getSystemMenu(systemObj.getAttribute("index"));
  117. hideAllSystemMenu();
  118. var cRects = systemObj.getClientRects();
  119. var left = cRects[0].left - 10;
  120. systemMenuObj.style.left = left + "px";
  121. systemMenuObj.style.top = 74 + "px";
  122. systemMenuObj.style.display = "inline";
  123. // 2단메뉴가 오른쪽으로 숨어버리는 경우에 대한 처
  124. var systemMenuObjRects = systemMenuObj.getClientRects();
  125. var bodyWidth = window.document.body.clientWidth - 200;
  126. if( (systemMenuObjRects[0].right ) > bodyWidth ) {
  127. left = left - (systemMenuObjRects[0].right - bodyWidth);
  128. if( left < 0 ) left = 0;
  129. systemMenuObj.style.left = left + "px";
  130. }
  131. //document.getElementById("depth2_"+sysId).style.display="block";
  132. 1283 - 1490 - 1430
  133. //systemMenu
  134. }
  135. /**
  136. * 1단메뉴에 이미지 초기화
  137. */
  138. function resetSystem() {
  139. if( document.getElementsByName("system") != null ) {
  140. if( document.getElementsByName("system").length == null ) {
  141. setImg(document.getElementsByName("system"), document.getElementsByName("system").getAttribute("off_image_path"));
  142. //document.all.system.is_selected = "N";
  143. }
  144. else {
  145. for( var i = 0 ; i < document.getElementsByName("system").length ; i++ ) {
  146. setImg(document.getElementsByName("system")[i], document.getElementsByName("system")[i].getAttribute("off_image_path"));
  147. //document.all.system[i].is_selected = "N";
  148. }
  149. }
  150. }
  151. }
  152. /**
  153. * index에 해당하는 2단메뉴의 Object를 리턴
  154. */
  155. function getSystemMenu(index) {
  156. var temp = document.getElementsByName("systemMenu");
  157. if( temp.length == null )
  158. return temp;
  159. else
  160. return temp[index];
  161. }
  162. /**
  163. * 모든 2단메뉴를 숨김 처리
  164. */
  165. function hideAllSystemMenu() {
  166. if( document.getElementsByName("systemMenu") != null ) {
  167. if( document.getElementsByName("systemMenu").length == null ) {
  168. document.getElementsByName("systemMenu").style.display = "none";
  169. }
  170. else {
  171. for( var i = 0 ; i < document.getElementsByName("systemMenu").length ; i++ ) {
  172. document.getElementsByName("systemMenu")[i].style.display = "none";
  173. }
  174. }
  175. }
  176. }
  177. /**
  178. * 메뉴 이동
  179. */
  180. function goMenu(url, pgmGrName, pgmName) {
  181. if( url.substring(0, 1) != "#" ) {
  182. setNowLocation(pgmGrName, pgmName, url);
  183. //parent.document.frames['BodyFrame'].location.href = url;
  184. document.getElementById("menu_linker").href = url;
  185. // document.getElementById("menu_linker").click();
  186. var click_ev = document.createEvent("MouseEvents");
  187. // # initialize the event
  188. click_ev.initEvent("click", true , true );
  189. // # trigger the evevnt
  190. document.getElementById("menu_linker").dispatchEvent(click_ev);
  191. hideAllSubMenu();
  192. //setHelpName("");
  193. }
  194. else {
  195. alert(url.substring(1, url.length));
  196. }
  197. }
  198. /**
  199. * 현재위치 세팅
  200. */
  201. function setNowLocation(pgmGrName, pgmName, url) {
  202. var strHtml = "&nbsp;&nbsp;&nbsp;";
  203. strHtml += "<IMG src='/img/main/location_bullet.gif' alt='' border='0'>"
  204. + "<A href='default.screen' id='location' target='bodyFrame' class='now_location'><B>Home</B></A>&nbsp;&nbsp;";
  205. if( pgmGrName != null ) {
  206. strHtml += "<IMG src='/img/main/title_bullet.gif' width='4' height='7' alt='' border='0'>"
  207. + "&nbsp;&nbsp;"
  208. + "<A href='#' id='location' class='now_location'>" + pgmGrName + "</A>"
  209. + "&nbsp;&nbsp;";
  210. }
  211. if( pgmName != null ) {
  212. strHtml += "<IMG src='/img/main/title_bullet.gif' width='4' height='7' alt='' border='0'>"
  213. + "&nbsp;&nbsp;"
  214. + "<A href='" + url + "' id='location' target='bodyFrame' class='now_location'>" + pgmName + "</A>"
  215. + "&nbsp;&nbsp;";
  216. }
  217. try {
  218. if( document.all['NOW_LOCATION'] != null )
  219. document.all['NOW_LOCATION'].innerHTML = strHtml;
  220. else if( parent.document.all['NOW_LOCATION'] != null )
  221. parent.document.all['NOW_LOCATION'].innerHTML = strHtml;
  222. else if( parent.parent.document.all['NOW_LOCATION'] != null )
  223. parent.parent.document.all['NOW_LOCATION'].innerHTML = strHtml;
  224. else if( parent.parent.parent.document.all['NOW_LOCATION'] != null )
  225. parent.parent.parent.document.all['NOW_LOCATION'].innerHTML = strHtml;
  226. }
  227. catch(errorObject) {
  228. }
  229. }
  230. function doResize(){
  231. allmenu.width = allLayer.document.body.scrollHeight;
  232. allmenu.height = allLayer.document.body.scrollHeight;
  233. }
  234. function AllMenuViewLayer(id){
  235. if (document.all[id].style.display == "none"){
  236. document.getElementById("allLayer").src = "/all_menu.screen";
  237. document.all[id].style.display = "block";
  238. }else{
  239. document.all[id].style.display = "none";
  240. }
  241. }
  242. function MyMenuViewLayer(id){
  243. if (document.all[id].style.display == "none"){
  244. document.all.myLayer.width = "1px";
  245. document.all.myLayer.height = "1px";
  246. document.getElementById("myLayer").src = "/my_menu.screen";
  247. document.all[id].style.display = "block";
  248. }else{
  249. document.all[id].style.display = "none";
  250. }
  251. }
  252. function autoResize(){
  253. var bodyFrame = document.getElementById("bodyFrame");
  254. var iframeHeight= document.body.scrollHeight - 109;
  255. //alert(iframeHeight);
  256. bodyFrame.height = iframeHeight;
  257. }
  258. /* 3 depth menu script start */
  259. function onSubMenuOver(obj) {
  260. try {
  261. obj.style.backgroundColor='#cccccc';
  262. obj.style.color = "white";
  263. }
  264. catch(errorObject) {
  265. showErrorDlg(errorObject);
  266. }
  267. }
  268. function onSubMenuOut(obj) {
  269. try {
  270. obj.style.backgroundColor='#FFFFFF';
  271. obj.style.color = 'black';
  272. }
  273. catch(errorObject) {
  274. showErrorDlg(errorObject);
  275. }
  276. }
  277. /* 3 depth menu script end */
  278. </SCRIPT>
  279. </HEAD>
  280. <BODY onresize="autoResize()">
  281. <A id='menu_linker' target='bodyFrame' href='' style="display:none"></A>
  282. <form name="MenuChangeForm" method="post" action="/main.screen" >
  283. <input type="hidden" name="P_USE_SYSTEM">
  284. <div style="position:absolute;top:20px;right:30px;width:200px; z-index:100;">
  285. <table border="0" cellpadding="0" cellspacing="0">
  286. <tr>
  287. <td><img src="/img/buyer/main/icon_01.png" /></td>
  288. <td>&nbsp;</td>
  289. <td><b><%=user.get("user_name") %></b>'s online.</td>
  290. </tr>
  291. </table>
  292. </div>
  293. <table align="center" cellpadding="0" cellspacing="0" style="width:100%;" border="0">
  294. <tr>
  295. <td valign="top" width="100%" height="100%" style="background-image:url('/img/buyer/main/sub_01.gif'); background-repeat:repeat-x;">
  296. <table width="100%" height="100%" cellpadding="0" cellspacing="0" >
  297. <tr>
  298. <td height="66" valign="top" >
  299. <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
  300. <tr>
  301. <!-- <td width="266" height="66" rowspan="2" style="padding-left:20px;" valign="top"> -->
  302. <td width="251" height="70" rowspan="2" align="right">
  303. <a href="/main.screen"><img src="/img/buyer/main/sub_logo.gif" alt="etecePMS" /></a>
  304. </td>
  305. <td height="47" align="right" valign="middle" class="t_white01_11" >
  306. &nbsp;
  307. </td>
  308. <%-- <td width="" height="25" class="t_white01_11" style="padding-right:30px; color:#eae9e2;" align="right" ><img src="/img/main/icon_01.png" />&nbsp;<%=user.get("user_name") %>'s online.</td> --%>
  309. </tr>
  310. <tr>
  311. <td height="25" align="right" valign="bottom" style="padding-bottom:2px; padding-right:20px;">
  312. <table width="" border="0" cellpadding="0" cellspacing="0">
  313. <tr>
  314. <% if( menuManager.getSystemSize() > 0 ) { %>
  315. <% for( int i = 0 ; i < menuManager.getSystemSize() ; i++ ) { %>
  316. <% ValueObject row = menuManager.getSystemValue(i); %>
  317. <%
  318. for( int j = 0 ; j < menuManager.getMenuGroupSize() ; j++ ) {
  319. ValueObject row2 = menuManager.getMenuGroupValue(j);
  320. %>
  321. <%-- <td class="smenu" id="pgm_group_<%= j %>" index="<%= j %>" onmouseover="showSubMenu('pgm_group_<%= j %>');" onmouseout ="hideSubMenu('pgm_group_<%= j %>');" style="cursor:hand;"><%= row2.get("PGM_GR_NAME") %></td> --%>
  322. <td><img id="pgm_group_<%= j %>" name="system" src="<%= row2.get("OFF_IMAGE_PATH") %>"
  323. index="<%= j %>"
  324. onmouseover="showSubMenu('pgm_group_<%= j %>');"
  325. onmouseout ="hideSubMenu('pgm_group_<%= j %>');"
  326. style="cursor:pointer;"
  327. border="0"
  328. alt="<%= row2.get("PGM_GR_NAME") %>"></td>
  329. <td width="2"></td>
  330. <% } %>
  331. <% } %>
  332. <% } %>
  333. <td width="5"></td>
  334. <td><img src="/img/buyer/main/btn_logout.gif" onclick="self.location='/sign_potal_off.screen';" style="cursor:hand;"></td>
  335. <td width="2" ></td>
  336. <td width="44" class="style"><!--<img src="/img/main/help.gif">--></td>
  337. <td width="10"></td>
  338. </tr>
  339. </table>
  340. </td>
  341. </tr>
  342. </table>
  343. </td>
  344. </tr>
  345. <tr>
  346. <td height="31" align="left" valign="top" >&nbsp;</td>
  347. </tr>
  348. <tr>
  349. <td valign="top" align="center" style="height:100%">
  350. <IFRAME name="bodyFrame" id="bodyFrame" src="/default.screen" width="100%" height="100%" frameborder="0" id="BodyFrame" onload="autoResize(this)" ></IFRAME>
  351. </td>
  352. </tr>
  353. </table>
  354. </td>
  355. </tr>
  356. </table>
  357. <!-- <div style="position:absolute; z-index:50;height:auto important; width:100%; ">
  358. <IFRAME name="bodyFrame" src="/default.screen" width="100%" height="100%" frameborder="0" id="BodyFrame" onload="autoResize(this)" ></IFRAME>
  359. </div> -->
  360. </form>
  361. <!-- sub_menu 레이어시작 -->
  362. <%-- <% String paramStr = ""; %>
  363. <% if( menuManager.getSystemSize() > 0 ) { %>
  364. <% for( int i = 0 ; i < menuManager.getSystemSize() ; i++ ) { %>
  365. <% ValueObject row = menuManager.getSystemValue(i); %>
  366. <div id="systemMenu" name="systemMenu" index="<%= i %>" style="position:absolute; top:74px; Z-INDEX: 3; line-HEIGHT: 29px; display:none; cursor:pointer">
  367. <table height="25" border="0" align="right" cellpadding="0" cellspacing="0">
  368. <!-- <td><img src="/img/menu/group/start_line.gif"/></td> -->
  369. <%
  370. //String paramStr = "";
  371. for(java.util.Enumeration paramNames = request.getParameterNames(); paramNames.hasMoreElements();) {
  372. String paramName = (String)paramNames.nextElement();
  373. paramStr += paramName + "=" + request.getParameter(paramName) + "&";
  374. }
  375. for( int j = 0 ; j < menuManager.getMenuGroupSize() ; j++ ) {
  376. ValueObject row2 = menuManager.getMenuGroupValue(j);
  377. if(row.get("SYSTEM_ID").equals(row2.get("SYSTEM_ID"))){
  378. %>
  379. <td><img src="/img/buyer/main/sub_menu_bar.gif" /></td>
  380. <td class="smenu" id="pgm_group_<%= j %>" index="<%= j %>" onmouseover="showSubMenu('pgm_group_<%= j %>');" onmouseout ="hideSubMenu('pgm_group_<%= j %>');" style="cursor:hand;"><%= row2.get("PGM_GR_NAME") %></td>
  381. <td width="1"></td>
  382. <% } %>
  383. <%} %>
  384. </table>
  385. </div>
  386. <% } %>
  387. <% } %> --%>
  388. <!-- <div align="left" style="top:74px; left:0; Z-INDEX: 3; VISIBILITY: visible; POSITION:absolute; line-HEIGHT: 29px; ">
  389. 상단 메뉴 2
  390. <table height="25" border="0" cellpadding="0" cellspacing="0">
  391. <tr>
  392. <td width="100%" style="padding-right:60px;" >
  393. </td>
  394. <td width="15"></td>
  395. </tr>
  396. tr>
  397. <td height="23" bgcolor="B3D1CE" id="NOW_LOCATION" colspan="3">
  398. &nbsp;&nbsp;&nbsp;<A href='default.screen' id='location' target='bodyFrame' class="now_location"><B>Home</B></A>
  399. </td>
  400. </tr>
  401. </table>
  402. 상단 메뉴 2
  403. </div> -->
  404. <%
  405. for( int i = 0 ; i < menuManager.getMenuGroupSize() ; i++ ) { %>
  406. <% ValueObject row = menuManager.getMenuGroupValue(i); %>
  407. <% int subRowSetSize = menuManager.getSubMenuRowSetSize(i);
  408. int cnt_big = 0;
  409. int cnt_small = 0;
  410. for( int j = 0 ; j < subRowSetSize ; j++ ) {
  411. ValueObject subRow = menuManager.getSubMenuRowValue(i, j);
  412. if( subRow.get("GUBUN").equals("P") )
  413. cnt_big ++;
  414. else if( subRow.get("GUBUN").equals("L") && j != 0 && j != subRowSetSize - 1 )
  415. cnt_small ++;
  416. }
  417. int height = cnt_big * 22 + cnt_small * 10 + 2;
  418. %>
  419. <DIV id="subMenuLayer"
  420. onmouseover="showSubMenu('pgm_group_<%= i %>');"
  421. onmouseout ="hideSubMenu('pgm_group_<%= i %>');"
  422. style="position:absolute; left:1px; top:1px; z-index:1; display:none;">
  423. <TABLE width="<%= menuManager.getSubMenuWidth(i) %>" height="<%= height %>" border="0" cellspacing="0" cellpadding="0" style="cursor:pointer;
  424. border-color: #404149; border-style: solid; border-top-width: 0px; border-bottom-width: 2px; border-right-width: 2px; border-left-width: 2px;
  425. filter=progid:DXImageTransform.Microsoft.fade(duration=0.2) progid:DXImageTransform.Microsoft.Shadow(color='#777777', direction=135, Strength=5);">
  426. <%
  427. for( int j = 0 ; j < subRowSetSize ; j++ ) { %>
  428. <% ValueObject subRow = menuManager.getSubMenuRowValue(i, j); %>
  429. <% if( subRow.get("GUBUN").equals("P") ) { %>
  430. <TR height="22">
  431. <TD onclick="parent.goMenu('<%= subRow.get("SCREEN_NAME") %>', '<%= params.get("PGM_GR_NAME") %>', '<%= subRow.get("PGM_NAME") %>');"
  432. onmouseover="onSubMenuOver(this);"
  433. onmouseout ="onSubMenuOut(this);"
  434. style="TEXT-INDENT:10px;"
  435. align="left" bgcolor="white">
  436. <%-- 레이어의 길이를 자동 산출하기 위해 고정길이 글꼴 사용 --%>
  437. <FONT face="굴림체" color="#000000"><%= subRow.get("PGM_NAME") %></FONT>
  438. </TD>
  439. </TR>
  440. <%
  441. }
  442. else if( subRow.get("GUBUN").equals("L") && j != 0 && j != subRowSetSize - 1 ) { %>
  443. <!-- Line -->
  444. <TR height="10">
  445. <TD>
  446. <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">
  447. <TR>
  448. <TD bgcolor="white" width="4"></TD>
  449. <TD bgcolor="white"><IMG src="/img/main/menuline_bg.gif" border="0" width="100%" height="10"></TD>
  450. <TD bgcolor="white" width="4"></TD>
  451. </TR>
  452. </TABLE>
  453. </TD>
  454. </TR>
  455. <!-- Line -->
  456. <% } %>
  457. <% }
  458. %>
  459. <%-- <iframe width="100%" height="<%= height %>px" src="/main_submenu.screen?<%=paramStr%>i=<%= i %>&PGM_GR_NAME=<%=StringUtils.URLEncode(row.get("PGM_GR_NAME"))%>" style="margin:0; overflow-x:hidden; overflow-y:hidden;" marginwidth=0 marginheight=0 scrolling="no" frameborder="0"></iframe> --%>
  460. </TABLE>
  461. </DIV>
  462. <% } %>
  463. </BODY>
  464. </HTML>
  465. <% }else { %>
  466. <META HTTP-EQUIV="refresh" Content="0.1; url=/index.screen">
  467. <% } %>