 <%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="kr.co.hsnc.common.util.*" %> 
<%@ page import="com.udapsoft.waf.common.util.DateUtil" %> 
<%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
<%@ page import="kr.co.hsnc.common.sql.*" %>
<%@ include file="/jsp/work/taglib.jsp" %>

<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
<%
	ctx.init(request, response);
// 	ValueObject user = ctx.getUser();

	
	HandlerStorage storage = ctx.getHandlerStorage();
	
	ValueObject params = storage.getParams();
    ValueObject user = storage.getUser();
    
	ValueObject getSuppCnt = new ValueObject();
	RowSet getMainBidList = new RowSetImpl();
	RowSet getContIngList = new RowSetImpl();
	RowSet PayRequestList = new RowSetImpl();
	RowSet MainNotice = new RowSetImpl();
	RowSet MainBbs = new RowSetImpl();
	RowSet MainTax = new RowSetImpl();
	
	getSuppCnt = storage.getValueObject("getSuppCnt"); 
	getMainBidList = storage.getRowSet("getMainBidList"); 
	
	getContIngList = storage.getRowSet("getContIngList"); 
	PayRequestList = storage.getRowSet("PayRequestList"); 
	MainNotice = storage.getRowSet("MainNotice");
	MainBbs = storage.getRowSet("MainBbs"); 
	MainTax = storage.getRowSet("MainTax");
	
%>

<!-- 로그인 디자인 1 -->

<!-- <div align="center">
   <table width="676" border="0" cellpadding="0" cellspacing="0">
    <tr>
     <td height="80">&nbsp;</td>
    </tr>
    <tr>
     <td height="464" align="left" valign="middle">
       <table width="676" border="0" cellpadding="0" cellspacing="0">
        <tr>
         <td height="218" align="center">&nbsp;<span style="color:#000; line-height:25px;font-size:32px;">E-TEC ePMCS</span><BR><span style="color:#000; line-height:25px;font-size:16px;">SGC이앤씨 플랜트 자재관리 시스템</span></td>
        </tr>
        <tr>
         <td>&nbsp;</td>
        </tr>
       </table>     
     </td>
    </tr>
   </table>
</div> -->

<style type="text/css">
<!--
.style1 {
	color: #FF6600;
	font-weight: bold;
}
.style2 {
	color: #1f94b7;
	font-weight: bold;
}
.style3 {color: #2b4976}
.list_title002{text-align:center; line-height:26px; background-color:#d8e3f0 ;border-right:#c3c3c3 solid 1px; padding:0px 5px }
.list_title002_R{ text-align:center; line-height:26px; background-color:#d8e3f0 ;padding:0px 3px }
.list_title003{ text-align:left; line-height:22px; text-indent:5px; font-size:12px;  color:#333333}
.list_title003 a:link{ text-align:left; line-height:22px; text-indent:5px; font-size:12px; color:#333333; text-decoration:none}
.list_title003 a:visited{color:#8897aa; text-decoration:none;},
.list_title003 a:hover,
.list_title003 a:active,{ text-align:left; line-height:22px; text-indent:5px; font-size:12px; text-decoration:underline; color:#3386cc}
 /* 타이틀 */ 
#title002{}
#title002 ul{ margin:0; padding:0; display: inline-block; line-height:23px; background-image:url(img/sys_title_bg_03.gif); background-repeat:no-repeat; width:363px}
#title002 ul li{ display:inline;font-size:12px; color:#ffffff; text-align:left; list-style:none; margin-left:29px; font-weight:bold;}
.list_field002{ text-align:center; line-height:29px;border-right:#c3c3c3 solid 1px;}
.list_field002_R{ text-align:center; line-height:29px;}

#index_content {
	width: 1100px;
	height: 200px;
	margin: 0 auto;
	top: 50px;
	position: relative;
	background-color: #fff;
}
-->
</style>

<script type="text/javascript">
<!--
var right_name = "<%=user.get("RIGHT_NAME")%>";

	$(document).ready(function(){
	    
	    $("#PayRequest_more").css("display", "none");
	    
	    if(right_name != "PURCHASE" && right_name != "OUTSIDE" )
        {
	        $("#go_detail").css("display", "none");
	        $("#contIng_more").css("display", "none");
        }
	    
	    
	    if(right_name == "PURCHASE")
        {
	        $("#bid_all").attr("href", "/bid/purchase/BidIngList.screen");
	        $("#cont_all").attr("href", "/cont/purchase/ContIngList.screen");
// 	        $("#pay_all").attr("href", "payment/purchase/PayRequestList.screen");
        }
	    else if(right_name == "OUTSIDE" )
        {
	        $("#bid_all").attr("href", "/bid/outside/BidIngList.screen");
	        $("#cont_all").attr("href", "/cont/outside/ContIngList.screen");
// 	        $("#pay_all").attr("href", "/bid/purchase/BidIngList.screen");
        }
	        
	});
	
	
	$("#go_detail").click(function(){
	    
	    if(right_name == "PURCHASE")
        {
	        location.href="/bid/purchase/BidIngList.screen";
        }
	    else if(right_name == "OUTSIDE")
        {
	        location.href="/bid/outside/BidIngList.screen";
        }
	    
	});
	
	function goBidDetail(status_cd, bid_no, bid_deg, demanded_id)
	{
		var job_div = "<%=params.get("job_div")%>";
		
		$("#bid_no").val(bid_no);
		$("#bid_deg").val(bid_deg);
		$("#demanded_id").val(demanded_id);
		
	    if(job_div == "P")
        {
	        if(status_cd == "03")
			{
	            $("#fevent").val("FORM_SELECT_SITE");
	            $("#form1").attr("action", "/bid/purchase/SiteExplanIng.screen");
			}
	        else if(status_cd == "04")
            {
	            $("#fevent").val("FORM_SELECT");
	            $("#form1").attr("action", "/bid/purchase/BidIng.screen");
            }
	        else if(status_cd == "05" || status_cd == "06" || status_cd == "07")
            {
	            $("#fevent").val("FORM_SELECT");
	            $("#form1").attr("action", "/bid/purchase/SuccessBid.screen");
            }
        }
	    else if(job_div == "O")
        {
	        if(status_cd == "03")
	        {
	            $("#fevent").val("FORM_SELECT_SITE");
	            $("#form1").attr("action", "/bid/outside/SiteExplanIng.screen");
			}
	        else if(status_cd == "04")
            {
	            $("#fevent").val("FORM_SELECT");
	            $("#form1").attr("action", "/bid/outside/BidIng.screen");
            }
	        else if(status_cd == "05" || status_cd == "06" || status_cd == "07")
            {
	            $("#fevent").val("FORM_SELECT");
	            $("#form1").attr("action", "/bid/outside/SuccessBid.screen");
            }
        }
	    $("#form1").attr("target", "_self");
		$("#form1").attr("method", "post");
		$("#form1").submit();
	}
	
	
	
	function goiDetail(seq, gubun)
	{
	    if(gubun == "NOTICE")
        {
	        $("#seq").val(seq);
			$("#fevent").val("GET_NOTI_DETAIL");
			$("#form1").attr("action", "/center/center/NotiDetail.screen");
			$("#form1").attr("target", "_self");
			$("#form1").attr("method", "post");
			$("#form1").submit();
        }
	    else if(gubun == "BBS")
        {
	        $("#seq").val(seq);
			$("#fevent").val("GET_REFERENCE_DETAIL");
			$("#form1").attr("action", "/center/center/ReferenceDetail.screen");
			$("#form1").attr("target", "_self");
			$("#form1").attr("method", "post");
			$("#form1").submit();
        }
	}
	
	
	
	function getConIngDetail(pur_cont_mod_id, template_cd, chg_cont_yn)
	{
	    var job_div = "<%=params.get("job_div")%>";
	    
	    if(job_div == "P")
        {
	        $("#PUR_CONT_MOD_ID").val(pur_cont_mod_id);
			$("#TEMPLATE_CD").val(template_cd);
			$("#ChgCont").val(chg_cont_yn);
			$("#fevent").val("FORM_SELECT");
			$("#form1").attr("action", "/cont/purchase/ContDetail.screen");
			$("#form1").attr("target", "_self");
			$("#form1").attr("method", "get");
			$("#form1").submit();
        }
	    else if(job_div == "O")
        {
	        $("#SUB_CONT_MOD_ID").val(pur_cont_mod_id);
			$("#TEMPLATE_CD").val(template_cd);
			$("#ChgCont").val(chg_cont_yn);
			$("#fevent").val("FORM_SELECT");
			$("#form1").attr("action", "/cont/outside/ContDetail.screen");
			$("#form1").attr("target", "_self");
			$("#form1").attr("method", "get");
			$("#form1").submit();
        }
	}
	
	
	function goPayDetail(cont_mod_id, gubun, pay_div, payreq_id)
	{
	    var job_div = "<%=params.get("job_div")%>";
	    
	    if(job_div == "P")
        {
	        if(gubun == "S")
            {
	            $("#selectSubContModId").val(cont_mod_id);
				$("#fevent").val("");
				$("#form1").attr("action", "/payment/purchase/Prepayments.screen");
				$("#form1").attr("target", "_self");
				$("#form1").attr("method", "post");
				$("#form1").submit();
            }
	        else
           	{
	            $("#purContId").val(cont_mod_id);
				$("#payreqId").val(payreq_id);
				if(pay_div == "1"){
		 			$("#fevent").val("");
					$("#form1").attr("action", "/payment/purchase/PayInstallResult.screen");
					$("#form1").attr("target", "_self");
					$("#form1").attr("method", "post");
					$("#form1").submit();
				}else if(pay_div == "2"){
		 			$("#fevent").val("");
					$("#form1").attr("action", "/payment/purchase/PayItemResult.screen");
					$("#form1").attr("target", "_self");
					$("#form1").attr("method", "post");
					$("#form1").submit();
				}
           	}
        }
	    else
        {
	        $("#selectSubContModId").val(cont_mod_id);	//변경계약ID
			$("#fevent").val("");
			$("#form1").attr("action", "/payment/outside/AdvencePayment.screen");
			$("#form1").attr("target", "_self");
			$("#form1").attr("method", "post");
			$("#form1").submit();
        }
	    
	}
	
	
	function getTaxDetail(job_div)
	{
	    if(job_div == "P")
        {
			$("#fevent").val("FORM_SELECT");
			$("#form1").attr("action", "/payment/purchase/TaxList.screen");
			$("#form1").attr("target", "_self");
			$("#form1").attr("method", "get");
			$("#form1").submit();
        }
	    else if(job_div == "O")
        {
			$("#fevent").val("FORM_SELECT");
			$("#form1").attr("action", "/payment/outside/TaxList.screen");
			$("#form1").attr("target", "_self");
			$("#form1").attr("method", "get");
			$("#form1").submit();
        }
	}
	
	
//-->
</script>

<modular:search id="form1">
	<modular:key id="fevent" />
</modular:search>

<form id="form1" name="form1">
	<input type="hidden" id="fevent" name="fevent" value=""/>
	<input type="hidden" id="seq" name="seq" value=""/>
	
	<input type="hidden" name="PUR_CONT_MOD_ID" value="">
	<input type="hidden" name="SUB_CONT_MOD_ID" value="">
	<input type="hidden" name="TEMPLATE_CD" value="">
	<input type='hidden' name="ChgCont">
	
	<input type='hidden' name="selectSubContModId" id="selectSubContModId" value="" />
	<input type='hidden' name="purContId" id="purContId" value="" />
	<input type='hidden' name="payreqId" id="payreqId" value="" />
	
	<input type='hidden' name="bid_no" id="bid_no" value="" />
	<input type='hidden' name="bid_deg" id="bid_deg" value="" />
	<input type='hidden' name="demanded_id" id="demanded_id" value="" />
	
	<input type='hidden' name="acct_id" value="<%= user.get("acct_id") %>">
</form>

<div id="index_content"> 
 <table width="1100">
  <tr>
    <td >
     <table  width="1100" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="790" align="left" valign="top" >
         <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
           <td>
             <table border="0" cellpadding="0" cellspacing="0" style=" background-color:#4a5562; height:30px; color:#FFFFFF; width:100%">
              <tr>
               <td><img src="/img/buyer/index/n_t00.gif" alt="입찰현황" /></td>
               <td style="text-align:right; padding-right:10px;"><a href="#" id="bid_all"><img src="/img/buyer/index/view_more.png" alt="더보기" width="38" height="10" border="0" id="go_detail"/></a></td>
              </tr>
             </table>
           </td>
          </tr>
          <tr>
            <td height="10"></td>
          </tr>
          <tr>
            <td>
              <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:#c3c3c3 solid 1px;">
              		<col width="19%"/>
              		<col width="24%"/>
              		<col width="9%"/>
              		<col width="9%"/>
              		<col width="9%"/>
              		<col width="10%"/>
              		<col width="9%"/>
              		<col width="10%"/>
				  <tr>
				    <td class="list_title002">현장명</td>
				    <td class="list_title002">발주의뢰명</td>
				    <td class="list_title002">현장설명</td>
				    <td class="list_title002">견적마감</td>
				    <td class="list_title002">기술검토</td>
				    <td class="list_title002">견적서 개찰</td>
				    <td class="list_title002">시행결의</td>
				    <td class="list_title002_R">진행상태</td>
				  </tr>
				  <tr>
				   <td colspan="8" height="1" bgcolor="#c3c3c3"></td>
				  </tr>
				  
				  <%
				  if(getMainBidList.size() != 0)
				  {
				      for(int i=0; i < getMainBidList.size(); i++)
				      {
				 %>
				  <tr onclick="goBidDetail('<%=getMainBidList.getRow(i).get("STATUS_CD")%>', '<%=getMainBidList.getRow(i).get("BID_NO")%>', '<%=getMainBidList.getRow(i).get("BID_DEG")%>', '<%=getMainBidList.getRow(i).get("DEMANDED_ID")%>')" style="cursor: pointer;">
				    <td class="list_field002" style="text-align: left;">&nbsp;<%=getMainBidList.getRow(i).get("DEPT_NM").length() > 13 ?  getMainBidList.getRow(i).get("DEPT_NM").substring(0, 13) + "..." : getMainBidList.getRow(i).get("DEPT_NM")%></td>
				    <td class="list_field002" style="text-align: left;"><div style="text-overflow:ellipsis; overflow:hidden; white-space:nowrap;">&nbsp;<%=getMainBidList.getRow(i).get("DEMANDED_TITLE").length() > 15 ?  getMainBidList.getRow(i).get("DEMANDED_TITLE").substring(0, 15) + "..." : getMainBidList.getRow(i).get("DEMANDED_TITLE")%></div></td>
				    <td class="list_field002"><%=getMainBidList.getRow(i).get("SITEDESCDATE") %></td>
				    <td class="list_field002"><%=getMainBidList.getRow(i).get("BID_TO_DT") %></td>
				    <td class="list_field002"><%=getMainBidList.getRow(i).get("TBE_FIN_DT") %></td>
				    <td class="list_field002"><%=getMainBidList.getRow(i).get("OPEN_DT") %></td>
				    <td class="list_field002"><%=getMainBidList.getRow(i).get("CONT_APP_DATE") %></td>
				    <td class="list_field002_R"><%=getMainBidList.getRow(i).get("STATUS_NM") %></td>
				  </tr>
				  <%if(i < getMainBidList.size()-1){ %>
				  <tr>
				  	<td colspan="8" height="1" bgcolor="#c3c3c3"></td>
			  	  </tr>
			  	  <%} %>
				  <%
				      }
				  %>
				  <%
				  }else{
				  %>
				  <tr>
					    <td class="list_field002" colspan="8">입찰현황 내용이 없습니다.</td>
				  </tr>
				  <tr>
				  	<td colspan="8" height="1" bgcolor="#c3c3c3"></td>
			  	  </tr>
				  <%
				  }
				      %>
				</table>
            </td>
          </tr>
         </table>
        </td>
        <td width="15">&nbsp;</td>
        <td align="right" valign="top">
          <table height="159" width="283" border="0" cellpadding="0" cellspacing="0" style="background-image:url(/img/buyer/index/notice_bg002.gif); background-repeat:no-repeat;">
       <tr>
         <td height="34" colspan="4" style=" padding-left:10px; font-weight:bold; font-size:12px; text-align:left; line-height:34px;">협력업체현황</td>
       </tr>
       <tr>
         <td width="15" align="right" ><img src="/img/buyer/index/icon.gif" /></td>
          <td class="list_title003">총업체수 : <%=getSuppCnt.get("ALL_CNT") %></td>
          <td width="15" align="right" ></td>
          <td class="list_title003"></td>
       </tr>
       <tr>
         <td width="15" align="right" ><img src="/img/buyer/index/icon.gif" /></td>
          <td class="list_title003">가입요청 : <%=getSuppCnt.get("REQUEST_CNT") %></td>
          <td width="15" align="right" ><img src="/img/buyer/index/icon.gif" /></td>
          <td class="list_title003">대&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;기 : <%=getSuppCnt.get("READY_CNT") %></td>
       </tr>
       <tr>
         <td width="15" align="right" ><img src="/img/buyer/index/icon.gif" /></td>
          <td class="list_title003">가&nbsp;&nbsp;등&nbsp;록 : <%=getSuppCnt.get("PROV_CNT") %></td>
          <td width="15" align="right" ><img src="/img/buyer/index/icon.gif" /></td>
          <td class="list_title003">등&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;록 : <%=getSuppCnt.get("REGIST_CNT") %></td>
       </tr>
       <tr>
         <td width="15" align="right"  ><img src="/img/buyer/index/icon.gif" /></td>
          <td class="list_title003">거래중지 : <%=getSuppCnt.get("STOP_CNT") %></td>
          <td width="15" align="right"><img src="/img/buyer/index/icon.gif" /></td>
          <td class="list_title003">거래취소 : <%=getSuppCnt.get("CANCEL_CNT") %> </td>
       </tr>
     </table>
        </td>
      </tr>
    </table></td>
    </tr>
  <tr>
    <td height="20">&nbsp;</td>
  </tr>
  
  
  
  <tr>
    <td>
     <table width="1100" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="540">
        
        
         <table width="540" border="0" cellpadding="0" cellspacing="0">
           <tr>
             <td colspan="3">
             <table border="0" cellpadding="0" cellspacing="0" style=" background-color:#8897aa; height:30px; color:#FFFFFF; width:100%">
              <tr>
               <td align="left"><img src="/img/buyer/index/n_t01.gif" alt="계약현황" /></td>
               <td style="text-align:right; padding-right:10px;"><a href="#" id="cont_all" ><img src="/img/buyer/index/view_more.png" alt="더보기" width="38" height="10" border="0" style="cursor: pointer;" id="contIng_more" /></a></td>
              </tr>              
             </table>
            </td>
           </tr>
           <tr>
            <td colspan="3" height="10"></td>
           </tr>
           <%
           if(getContIngList.size() != 0)
           {
               for(int i = 0; i < getContIngList.size(); i++)
               {
          %>
          <tr>
            <td width="20" style="padding-left:10px;"><img src="/img/buyer/index/n_icon.gif" /></td>
            <td class="list_title003"><a href="#" onclick="getConIngDetail('<%=getContIngList.getRow(i).get("CONT_MOD_ID") %>', '<%=getContIngList.getRow(i).get("TEMPLATE_CD") %>', '<%=getContIngList.getRow(i).get("CHG_CONT_YN")%>');"> <%=getContIngList.getRow(i).get("TITLE").length() > 40 ?  getContIngList.getRow(i).get("TITLE").substring(0, 40) + "..." : getContIngList.getRow(i).get("TITLE")%></a></td>
            <td width="100" align="right"  style="padding-right:10px;"><%=getContIngList.getRow(i).get("NOTI_DATE") %></td>
           </tr>
          <%         
               }
               
               if(getContIngList.size() < 5)
               {
                   for(int i=0; i < 5-getContIngList.size(); i++)
                   {
         	%>
         	<tr>
            <td width="20" style="padding-left:10px;"></td>
            <td class="list_title003"><a href="#"></a>&nbsp;</td>
            <td width="100" align="right"  style="padding-right:10px;">&nbsp;</td>
           </tr>
         	<%              
                   }
               }
           }else{
               for(int i=0; i < 5-getContIngList.size(); i++)
               {
           %>
        	<tr>
	            <td width="20" style="padding-left:10px;"><%=i == 0 ? "<img src=\"/img/buyer/index/n_icon.gif\" />" : "" %></td>
	            <td class="list_title003"><%=i == 0 ? "검색된 내용이 없습니다." : "&nbsp;" %></td>
	            <td width="100" align="right"  style="padding-right:10px;">&nbsp;</td>
           </tr>
        	<%        
               }
           }
           %>
         </table>
        </td>
        
        

        <td>&nbsp;</td>
        
        
        
        <td width="540">
         <table width="540" border="0" cellpadding="0" cellspacing="0">
           <tr>
            <td colspan="3">
             <table border="0" cellpadding="0" cellspacing="0" style=" background-color:#8897aa; height:30px; color:#FFFFFF; width:100%">
              <tr>
               <td align="left"><img src="/img/buyer/index/n_t03.gif" alt="대금현황" /></td>
               <td style="text-align:right; padding-right:10px;"><a href="#" id="pay_all" ><img src="/img/buyer/index/view_more.png" alt="더보기" width="38" height="10" border="0" style="cursor: pointer;" id="PayRequest_more" name="PayRequest_more" /></a></td>
              </tr>              
             </table>
            </td>
           </tr>
           <tr>
            <td colspan="3" height="10"></td>
           </tr>
           <%
           if(PayRequestList.size() != 0)
           {
               for(int i = 0; i < PayRequestList.size(); i++)
               {
          %>
          <tr>
            <td width="20" style="padding-left:10px;"><img src="/img/buyer/index/n_icon.gif" /></td>
            <td class="list_title003"><a href="#" id="go_detail" onclick="goPayDetail('<%=PayRequestList.getRow(i).get("CONT_MOD_ID")%>', '<%=PayRequestList.getRow(i).get("GUBUN")%>',  '<%=PayRequestList.getRow(i).get("PAY_DIV")%>',  '<%=PayRequestList.getRow(i).get("PAYREQ_ID")%>');"><%=PayRequestList.getRow(i).get("TITLE").length() > 40 ?  PayRequestList.getRow(i).get("TITLE").substring(0, 40) + "..." : PayRequestList.getRow(i).get("TITLE")%></a></td>
            <td width="100" align="right"  style="padding-right:10px;"><%=PayRequestList.getRow(i).get("NOTI_DATE") %></td>
           </tr>
          <%         
               }
               
               if(PayRequestList.size() < 5)
               {
                   for(int i=0; i < 5-PayRequestList.size(); i++)
                   {
         	%>
         	<tr>
	            <td width="20" style="padding-left:10px;"><img src="/img/buyer/index/n_icon.gif" /></td>
	            <td class="list_title003"><a href="#"></a>&nbsp;</td>
	            <td width="100" align="right"  style="padding-right:10px;">&nbsp;</td>
           </tr>
         	<%              
                   }
               }
           }else{
               for(int i=0; i < 5-PayRequestList.size(); i++)
               {
           %>
        	<tr>
	            <td width="20" style="padding-left:10px;"><%=i == 0 ? "<img src=\"/img/buyer/index/n_icon.gif\" />" : "" %></td>
	            <td class="list_title003"><%=i == 0 ? "검색된 내용이 없습니다." : "&nbsp;" %></td>
	            <td width="100" align="right"  style="padding-right:10px;">&nbsp;</td>
           </tr>
        	<%        
               }
           }
           %>
         </table>
        </td>
        
        
      </tr>
    </table>
    </td>
  </tr>
  
  
    <tr>
    <td>&nbsp;</td>
  </tr>
  
  
    <tr>
    <td>
     <table width="1100" border="0" cellspacing="0" cellpadding="0">
      <tr>
      
      
        <td width="540" valign="top">
         <table width="540" border="0" cellpadding="0" cellspacing="0">
           <tr>
             <td colspan="3">
             <table border="0" cellpadding="0" cellspacing="0" style=" background-color:#8897aa; height:30px; color:#FFFFFF; width:100%">
              <tr>
               <td align="left"><img src="/img/buyer/index/n_t02.gif" alt="공지사항" /></td>
               <td style="text-align:right; padding-right:10px;"><a href="/center/center/NotiList.screen"><img src="/img/buyer/index/view_more.png" alt="더보기" width="38" height="10" border="0" /></a></td>
              </tr>              
             </table>
            </td>
           </tr>
           <tr>
            <td colspan="3" height="10"></td>
           </tr>
           
           <%
           if(MainNotice.size() != 0)
           {
               for(int i = 0; i < MainNotice.size(); i++)
               {
          %>
          <tr>
            <td width="20" style="padding-left:10px;"><img src="/img/buyer/index/n_icon.gif" /></td>
            <td class="list_title003"><a href="#" onclick="goiDetail('<%=MainNotice.getRow(i).get("SEQ")%>', 'NOTICE');"><%=MainNotice.getRow(i).get("TITLE").length() > 40 ?  MainNotice.getRow(i).get("TITLE").substring(0, 40) + "..." : MainNotice.getRow(i).get("TITLE")%></a></td>
            <td width="100" align="right"  style="padding-right:10px;"><%=MainNotice.getRow(i).get("NOTI_DATE") %></td>
           </tr>
          <%         
               }
               
               if(MainNotice.size() < 5)
               {
                   for(int i=0; i < 5-MainNotice.size(); i++)
                   {
         	%>
         	<tr>
            <td width="20" style="padding-left:10px;"><img src="/img/buyer/index/n_icon.gif" /></td>
            <td class="list_title003"><a href="#"></a>&nbsp;</td>
            <td width="100" align="right"  style="padding-right:10px;">&nbsp;</td>
           </tr>
         	<%              
                   }
               }
           }else{
               for(int i=0; i < 5-MainNotice.size(); i++)
               {
           %>
        	<tr>
           		<td width="20" style="padding-left:10px;"><%=i == 0 ? "<img src=\"/img/buyer/index/n_icon.gif\" />" : "" %></td>
           		<td class="list_title003"><%=i == 0 ? "검색된 내용이 없습니다." : "&nbsp;" %></td>
           		<td width="100" align="right"  style="padding-right:10px;">&nbsp;</td>
       		</tr>
        	<%        
               }
           }
           %>
           
         </table>
        </td>
       <td>&nbsp;</td>
         
        
        
        <%if(params.get("job_div").equals("P")||params.get("job_div").equals("O")||user.get("RIGHT_NAME").equals("ADMIN NEW")){%>
        <td width="540">
         <table width="540" border="0" cellpadding="0" cellspacing="0">
           <tr>
             <td colspan="3">
             <table border="0" cellpadding="0" cellspacing="0" style=" background-color:#8897aa; height:30px; color:#FFFFFF; width:100%">
              <tr>
               <td align="left"><img src="/img/buyer/index/n_t05.gif" alt="국세청미전송" /></td>
               <td style="text-align:right; padding-right:10px;"></td>
              </tr>              
             </table>
            </td>
           </tr>
           <tr>
            <td colspan="3" height="10"></td>
           </tr>
           
           <%
           if(MainTax.size() != 0)
           {
               for(int i = 0; i < MainTax.size(); i++)
               {
          %>
          <tr>
            <td width="20" style="padding-left:10px;"><img src="/img/buyer/index/n_icon.gif" /></td>
            <td class="list_title003"><a href="#" onclick="getTaxDetail('<%=MainTax.getRow(i).get("JOB_DIV")%>');"><%=MainTax.getRow(i).get("CST_DOC_NAME").length() > 40 ?  MainTax.getRow(i).get("CST_DOC_NAME").substring(0, 40) + "..." : MainTax.getRow(i).get("CST_DOC_NAME")%></a></td>
            <td width="100" align="right"  style="padding-right:10px;"><%=MainTax.getRow(i).get("DTI_WDATE") %></td>
           </tr>
          <%         
               }
               
               if(MainTax.size() < 5)
               {
                   for(int i=0; i < 5-MainTax.size(); i++)
                   {
         	%>
         	<tr>
            <td width="20" style="padding-left:10px;"><img src="/img/buyer/index/n_icon.gif" /></td>
            <td class="list_title003"><a href="#"></a>&nbsp;</td>
            <td width="100" align="right"  style="padding-right:10px;">&nbsp;</td>
           </tr>
         	<%              
                   }
               }
           }else{
               for(int i=0; i < 5-MainTax.size(); i++)
               {
           %>
        	<tr>
           		<td width="20" style="padding-left:10px;"><%=i == 0 ? "<img src=\"/img/buyer/index/n_icon.gif\" />" : "" %></td>
           		<td class="list_title003"><%=i == 0 ? "검색된 내용이 없습니다." : "&nbsp;" %></td>
           		<td width="100" align="right"  style="padding-right:10px;">&nbsp;</td>
       		</tr>
        	<%        
               }
           }
           %>
           
         </table>
        
        
        <%}else{%>
        
        
        <td width="540">
         <table width="540" border="0" cellpadding="0" cellspacing="0">
           <tr>
             <td colspan="3">
             <table border="0" cellpadding="0" cellspacing="0" style=" background-color:#8897aa; height:30px; color:#FFFFFF; width:100%">
              <tr>
               <td align="left"><img src="/img/buyer/index/n_t04.gif" alt="자료실" /></td>
               <td style="text-align:right; padding-right:10px;"><a href="/center/center/ReferenceList.screen"><img src="/img/buyer/index/view_more.png" alt="더보기" width="38" height="10" border="0" /></a></td>
              </tr>              
             </table>
            </td>
           </tr>
           <tr>
            <td colspan="3" height="10"></td>
           </tr>
           
           <%
           if(MainBbs.size() != 0)
           {
               for(int i = 0; i < MainBbs.size(); i++)
               {
          %>
          <tr>
            <td width="20" style="padding-left:10px;"><img src="/img/buyer/index/n_icon.gif" /></td>
            <td class="list_title003"><a href="#" onclick="goiDetail('<%=MainBbs.getRow(i).get("SEQ") %>', 'BBS')"><%=MainBbs.getRow(i).get("TITLE").length() > 40 ?  MainBbs.getRow(i).get("TITLE").substring(0, 40) + "..." : MainBbs.getRow(i).get("TITLE")%></a></td>
            <td width="100" align="right"  style="padding-right:10px;"><%=MainBbs.getRow(i).get("NOTI_DATE") %></td>
           </tr>
          <%         
               }
               
               if(MainBbs.size() < 5)
               {
                   for(int i=0; i < 5-MainBbs.size(); i++)
                   {
         	%>
         	<tr>
            <td width="20" style="padding-left:10px;"><img src="/img/buyer/index/n_icon.gif" /></td>
            <td class="list_title003"><a href="#"></a>&nbsp;</td>
            <td width="100" align="right"  style="padding-right:10px;">&nbsp;</td>
           </tr>
         	<%              
                   }
               }
           }else{
               for(int i=0; i < 5-MainBbs.size(); i++)
               {
           %>
        	<tr>
           		<td width="20" style="padding-left:10px;"><%=i == 0 ? "<img src=\"/img/buyer/index/n_icon.gif\" />" : "" %></td>
           		<td class="list_title003"><%=i == 0 ? "검색된 내용이 없습니다." : "&nbsp;" %></td>
           		<td width="100" align="right"  style="padding-right:10px;">&nbsp;</td>
       		</tr>
        	<%        
               }
           }
           %>
           
         		</table>
        <%}%>
      		</tr>
      		<tr>
      		<td>&nbsp;</td>
      		</tr>
      		<tr>
      		<td>&nbsp;</td>
      		</tr>
      		<tr>
      		<td>&nbsp;</td>
      		</tr>
      </table>
    </td>
  </tr>
 </table>
</div>

