main.jsp 19 KB

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