<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 4;

if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;

// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
?>

<style type="text/css">
.dada_a {
	color: #034976;
	font-weight: bold;
	font-size: 15px;
}
.dada_b {
	color: #034976;
	font-weight: bold;
	font-size: 14px;
}

</style>
<script type="text/javascript">
<!--
//	document.getElementById("img_chl").src = ary.path + ary[pos];
//-->
</script>
<link href="./style.css" rel="stylesheet" type="text/css" media="screen">
<!--아이프레임 리사이즈 스크립트 시작 [Import소스]----->

<p style="clear: both;position:relative;width:100%;height:20px;"></p>
<h2 id="container_title"><!-- <?php echo $board['bo_subject'] ?><span class="sound_only"> 목록</span> --></h2>
<div id="area_box">
    <div id="area_map">
    
<!--<? 	

  switch($chl_1) { 
    case '서울특별시' : echo '<img src="'.$board_skin_url.'/img/map_seoul.gif" border=0 usemap="#area"/>'; break;
	case '경기도' : echo '<img src="'.$board_skin_url.'/img/map_gyeonggi.gif" border=0 usemap="#area"/>'; break;
	case '인천광역시' : echo '<img src="'.$board_skin_url.'/img/map_incheon.gif" border=0 usemap="#area"/>'; break;
	case '강원도' : echo '<img src="'.$board_skin_url.'/img/map_gangwon.gif" border=0 usemap="#area"/>'; break;
        
    case '충청남도' : echo '<img src="'.$board_skin_url.'/img/map_chungnam.gif" border=0 usemap="#area"/>'; break;
    case '충청북도' : echo '<img src="'.$board_skin_url.'/img/map_chungbuk.gif" border=0 usemap="#area"/>'; break;
	case '세종특별시' : echo '<img src="'.$board_skin_url.'/img/map_sejong.gif" border=0 usemap="#area"/>'; break;
    case '대전광역시' : echo '<img src="'.$board_skin_url.'/img/map_daejeon.gif" border=0 usemap="#area"/>'; break;
 
	case '경상북도' : echo '<img src="'.$board_skin_url.'/img/map_gyeongbuk.gif" border=0 usemap="#area"/>'; break;
	case '경상남도' : echo '<img src="'.$board_skin_url.'/img/map_gyeongnam.gif" border=0 usemap="#area"/>'; break;
    case '대구광역시' : echo '<img src="'.$board_skin_url.'/img/map_daegu.gif" border=0 usemap="#area"/>'; break;
    case '울산광역시' : echo '<img src="'.$board_skin_url.'/img/map_ulsan.gif" border=0 usemap="#area"/>'; break;
	case '부산광역시' : echo '<img src="'.$board_skin_url.'/img/map_busan.gif" border=0 usemap="#area"/>'; break;

    case '전라북도' : echo '<img src="'.$board_skin_url.'/img/map_jeonbuk.gif" border=0 usemap="#area"/>'; break;    
    case '전라남도' : echo '<img src="'.$board_skin_url.'/img/map_jeonnam.gif" border=0 usemap="#area"/>'; break;
	case '광주광역시' : echo '<img src="'.$board_skin_url.'/img/map_gwangju.gif" border=0 usemap="#area"/>'; break; 
	
    case '제주도' : echo '<img src="'.$board_skin_url.'/img/map_jeju.gif" border=0 usemap="#area"/>'; break;	

    default : echo '<img src="'.$board_skin_url.'/img/map_all.gif" border=0 usemap="#area"/>'; 
  }
?>-->
<!--    <map name="area">        

        <area shape="rect" alt="" coords="121,55,144,74" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=서울특별시&img_h=seoul"> 
	    <area shape="rect" alt="" coords="111,80,151,100" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=경기도&img_h=kyungido">
        <area shape="rect" alt="" coords="69,52,102,72" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=인천광역시&img_h=incheon">        
        <area shape="rect" alt="" coords="159,48,200,68" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=강원도&img_h=kangwondo">
        
        <area shape="rect" alt="" coords="82,103,116,151" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=충청남도&img_h=chungchungnamdo">
        <area shape="rect" alt="" coords="137,101,180,123" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=충청북도&img_h=chunchungbukdo">
        <area shape="rect" alt="" coords="116,106,142,136" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=세종특별시&img_h=sejong">
		<area shape="rect" alt="" coords="138,132,171,152" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=대전광역시&img_h=daejeon">

        <area shape="rect" alt="" coords="150,185,200,206" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=경상남도&img_h=kyungsangnamdo">
		<area shape="rect" alt="" coords="181,116,229,137" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=경상북도&img_h=kyungsangbukdo">
        <area shape="rect" alt="" coords="188,153,216,173" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=대구광역시&img_h=daegu">
        <area shape="rect" alt="" coords="216,174,243,195" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=울산광역시&img_h=ulsan">
        <area shape="rect" alt="" coords="207,199,233,219" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=부산광역시&img_h=pusan">

        <area shape="rect" alt="" coords="107,162,144,182" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=전라북도&img_h=jelabukdo">
        <area shape="rect" alt="" coords="77,221,116,241" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=전라남도&img_h=jelanamdo">
		<area shape="rect" alt="" coords="107,197,144,218" href="../<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=광주광역시&img_h=kwangju">
  
        <area shape="rect" coords="100,274,143,292" href="/<?=G5_BBS_DIR?>/board.php?bo_table=<?=$bo_table?>&chl_1=제주도&img_h=jejudo" />
    </map>-->
	<br>
    <div style="text-align:center;color: #f60;font-weight: bold;
	font-size: 16px;">아래 검색지역을 선택하신후 검색버튼을 누르시면<br> 해당지역의 키메이커맨을 확인하실수 있습니다</div>
    <br>
	  <div style="text-align:center">
<script language='javascript'>
<!--
     var cnt = new Array();
     cnt[0] = new Array('전체');
     cnt[1] = new Array('전체','강남구','강동구','강북구','강서구','관악구','광진구','구로구','금천구','노원구','도봉구','동대문구','동작구','마포구','서대문구','서초구','성동구','성북구','송파구','양천구','영등포구','용산구','은평구','종로구','중구','중랑구');
     cnt[2] = new Array('전체','강서구','금정구','남구','동구','동래구','부산진구','북구','사상구','사하구','서구','수영구','연제구','영도구','중구','해운대구','기장군');
     cnt[3] = new Array('전체','남구','달서구','동구','북구','서구','수성구','중구','달성군');
     cnt[4] = new Array('전체','계양구','남구','남동구','동구','부평구','서구','연수구','중구','강화군','옹진군');
     cnt[5] = new Array('전체','광산구','남구','동구','북구','서구');
     cnt[6] = new Array('전체','대덕구','동구','서구','유성구','중구');
	 cnt[7] = new Array('전체','소정면','전의면','연서면','연기면','한솔동','장군면','전동면','조치원읍','연동면','부강면','금남면','도담동','아름면');
     cnt[8] = new Array('전체','남구','동구','북구','중구','울주군');
     cnt[9] = new Array('전체','고양시','과천시','광명시','구리시','군포시','남양주시','동두천시','부천시','성남시','수원시','시흥시','안산시','안양시','오산시','의왕시','의정부시','평택시','하남시','가평군','광주시','김포시','안성시','양주군','양평군','여주군','연천군','용인시','이천군','파주시','포천시','화성시');
     cnt[10] = new Array('전체','강릉시','동해시','삼척시','속초시','원주시','춘천시','태백시','고성군','양구군','양양군','영월군','인제군','정선군','철원군','평창군','홍천군','화천군','횡성군');
     cnt[11] = new Array('전체','제천시','청주시','충주시','괴산군','단양군','보은군','영동군','옥천군','음성군','진천군','청원군');
     cnt[12] = new Array('전체','공주시','보령시','서산시','아산시','천안시','금산군','논산군','당진군','부여군','서천군','연기군','예산군','청양군','태안군','홍성군');
     cnt[13] = new Array('전체','군산시','김제시','남원시','익산시','전주시','정읍시','고창군','무주군','부안군','순창군','완주군','임실군','장수군','진안군');
     cnt[14] = new Array('전체','광양시','나주시','목포시','순천시','여수시','여천시','강진군','고흥군','곡성군','구례군','담양군','무안군','보성군','신안군','여천군','영광군','영암군','완도군','장성군','장흥군','진도군','함평군','해남군','화순군');
     cnt[15] = new Array('전체','경산시','경주시','구미시','김천시','문경시','상주시','안동시','영주시','영천시','포항시','고령군','군위군','봉화군','성주군','영덕군','영양군','예천군','울릉군','울진군','의성군','청도군','청송군','칠곡군');
     cnt[16] = new Array('전체','거제시','김해시','마산시','밀양시','사천시','울산시','진주시','진해시','창원시','통영시','거창군','고성군','남해군','산청군','양산시','의령군','창녕군','하동군','함안군','함양군','합천군');
     cnt[17] = new Array('전체','서귀포시','제주시','남제주군','북제주군');
     function change(add) {

     sel=document.fhwrite.chl_2

       for (i=sel.length-1; i>=0; i--){
         sel.options[i] = null
         }
  		     
       for (i=0; i < cnt[add].length;i++){       
			

				if(cnt[add][i]=='<?=$chl_2?>'){
                         sel.options[i] = new Option(cnt[add][i], cnt[add][i],true,true);
				}else{
                        sel.options[i] = new Option(cnt[add][i], cnt[add][i]);
				}

         }        

 if(add==1){
			document.fhwrite.img_h.value="seoul";
        }else if(add==2){
			document.fhwrite.img_h.value="pusan";
        }else if(add==3){
			document.fhwrite.img_h.value="daegu";
        }else if(add==4){
			document.fhwrite.img_h.value="incheon";
        }else if(add==5){
			document.fhwrite.img_h.value="kwangju";
        }else if(add==6){
			document.fhwrite.img_h.value="daejeon";
        }else if(add==7){
			document.fhwrite.img_h.value="sejong";
        }else if(add==8){
			document.fhwrite.img_h.value="daejeon";
        }else if(add==9){
			document.fhwrite.img_h.value="ulsan";
        }else if(add==10){
			document.fhwrite.img_h.value="kyungido";
        }else if(add==11){
			document.fhwrite.img_h.value="kangwondo";
        }else if(add==12){
			document.fhwrite.img_h.value="chunchungbukdo";
        }else if(add==13){
			document.fhwrite.img_h.value="chungchungnamdo";
        }else if(add==14){
			document.fhwrite.img_h.value="jelabukdo";
        }else if(add==15){
			document.fhwrite.img_h.value="jelanamdo";
        }else if(add==16){
			document.fhwrite.img_h.value="kyungsangnamdo";
        }else if(add==17){
			document.fhwrite.img_h.value="jejudo";
   
		}else{
			document.fhwrite.img_h.value="";
			}
			 
    
     }



//-->
</script>
<form method="post" name="fhwrite" action="../bbs/board.php">
	<input type="hidden" name="img_h">
	<input type="hidden" name="bo_table" value='sub_03_01'>

	       <select name='chl_1' onchange="change(this.selectedIndex);"  class=input >
                       <option value='전체'>전체</option>

                       <option value='서울특별시' <?if($chl_1=='서울특별시'){echo "selected"; $mun_2=1;}?> >서울특별시</option>
                       <option value='부산광역시' <?if($chl_1=='부산광역시'){echo "selected";$mun_2=2;}?> >부산광역시</option>
                       <option value='대구광역시' <?if($chl_1=='대구광역시'){echo "selected";$mun_2=3;}?> >대구광역시</option>
                       <option value='인천광역시' <?if($chl_1=='인천광역시'){echo "selected";$mun_2=4;}?> >인천광역시</option>
                       <option value='광주광역시' <?if($chl_1=='광주광역시'){echo "selected";$mun_2=5;}?> >광주광역시</option>
                       <option value='대전광역시' <?if($chl_1=='대전광역시'){echo "selected";$mun_2=6;}?> >대전광역시</option>
					   <option value='세종특별시' <?if($chl_1=='세종특별시'){echo "selected";$mun_2=7;}?> >세종특별시</option>
                       <option value='울산광역시' <?if($chl_1=='울산광역시'){echo "selected";$mun_2=8;}?> >울산광역시</option>
                       <option value='경기도' <?if($chl_1=='경기도'){echo "selected";$mun_2=9;}?> >경기도</option>
                       <option value='강원도' <?if($chl_1=='강원도'){echo "selected";$mun_2=10;}?> >강원도</option>
                       <option value='충청북도' <?if($chl_1=='충청북도'){echo "selected";$mun_2=11;}?> >충청북도</option>
                       <option value='충청남도' <?if($chl_1=='충청남도'){echo "selected";$mun_2=12;}?> >충청남도</option>
                       <option value='전라북도' <?if($chl_1=='전라북도'){echo "selected";$mun_2=13;}?> >전라북도</option>
                       <option value='전라남도' <?if($chl_1=='전라남도'){echo "selected";$mun_2=14;}?> >전라남도</option>
                       <option value='경상북도' <?if($chl_1=='경상북도'){echo "selected";$mun_2=15;}?> >경상북도</option>
                       <option value='경상남도' <?if($chl_1=='경상남도'){echo "selected";$mun_2=16;}?> >경상남도</option>
                       <option value='제주도' <?if($chl_1=='제주도'){echo "selected";$mun_2=17;}?> >제주도</option>
                    </select>                                                  
             구/군:
                    <select name='chl_2'  class=select>
            			<option value=''>전체</option>

                    </select>
							<input type="image" src="<?php echo $board_skin_url ?>/img/search.jpg" alt="검색">
<script type="text/javascript">
	<!--

		change(<?=$mun_2?>);
	//-->
	</script>
</form>


	 </div>
    </div>
  </div>
     
  </div>
 
</div>

<br>
<?if($ss_mb_level>2 or $chl_2){?>
<!-- 게시판 목록 시작 { -->
<div id="bo_list" style="width:">

    <!-- 게시판 페이지 정보 및 버튼 시작 { -->
    <div class="bo_fx">
        <!-- <div id="bo_list_total">
            <span>Total <?php echo number_format($total_count) ?>건</span>
            <?php echo $page ?> 페이지
        </div> -->

        <?php if ($rss_href || $write_href) { ?>
        <ul class="btn_bo_user">
            <?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01">RSS</a></li><?php } ?>
            <?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin">관리자</a></li><?php } ?>
            <?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">글쓰기</a></li><?php } ?>
        </ul>
        <?php } ?>
    </div>
    <!-- } 게시판 페이지 정보 및 버튼 끝 -->

    <form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
    <input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
    <input type="hidden" name="sfl" value="<?php echo $sfl ?>">
    <input type="hidden" name="stx" value="<?php echo $stx ?>">
    <input type="hidden" name="spt" value="<?php echo $spt ?>">
    <input type="hidden" name="sca" value="<?php echo $sca ?>">
    <input type="hidden" name="page" value="<?php echo $page ?>">
    <input type="hidden" name="sw" value="">

    <div class="tbl_head01 tbl_wrap">
        <table>
        <caption><?php echo $board['bo_subject'] ?> 목록</caption>
        <colgroup>
            <?php if ($is_checkbox) { ?>
            <col class="td_chk">
            <?php } ?>
            <col class="td_subject" width="*">
            <col class="td_name sv_use">
            <col class="td_location" width="*">
        </colgroup>
        <thead>
        <tr>
            <?php if ($is_checkbox) { ?>
            <th scope="col"><input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
            </th>
            <?php } ?>
            <th width="65%" scope="col">지역 / 업체명</th>
            <th scope="col">전화번호</th>
          </tr>
        </thead>
        <tbody>
        <?php
        for ($i=0; $i<count($list); $i++) {
         ?>
        <tr class="<?php if ($list[$i]['is_notice']) echo "bo_notice"; ?>">
            <?php if ($is_checkbox) { ?>
            <td class="td_chk">
                <label for="chk_wr_id_<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['subject'] ?></label>
                <input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_wr_id_<?php echo $i ?>">
            </td>
            <?php } ?>
            <td class="td_subject">
                <?php
                echo $list[$i]['icon_reply'];
                if ($is_category && $list[$i]['ca_name']) {
                 ?>
                <a href="<?php echo $list[$i]['ca_name_href'] ?>" class="bo_cate_link"><?php echo $list[$i]['ca_name'] ?></a>
                <?php } ?>


                



                <!-- <a href="<?php echo $list[$i]['href'] ?>"> -->
				<?php if ($list[$i][wr_link1]) {  ?>
				
                    <!-- <span class="dada_b"><?php echo $list[$i]['wr_1'] ?></span>&nbsp;<span class="dada_b"><?php echo $list[$i]['wr_2'] ?></span>&nbsp;<span class="dada">|</span>-->&nbsp;&nbsp;&nbsp;<span class="dada_a"><a href="<?=$list[$i][wr_link1]?>" target="_blank"><?php echo $list[$i]['subject'] ?></span>
                </a>
				
                <?php } else {  ?>
				
                    <!-- <span class="dada_b"><?php echo $list[$i]['wr_1'] ?></span>&nbsp;<span class="dada_b"><?php echo $list[$i]['wr_2'] ?></span>&nbsp;<span class="dada">|</span>-->&nbsp;&nbsp;&nbsp;<a href="<?php echo $list[$i]['href'] ?>"><span class="dada_a"><?php echo $list[$i]['subject'] ?></span></a>
                <?php } ?> 
				
                <?php
                // if ($list[$i]['link']['count']) { echo '['.$list[$i]['link']['count']}.']'; }
                // if ($list[$i]['file']['count']) { echo '<'.$list[$i]['file']['count'].'>'; }

                if (isset($list[$i]['icon_new'])) echo $list[$i]['icon_new'];
                if (isset($list[$i]['icon_hot'])) echo $list[$i]['icon_hot'];
                if (isset($list[$i]['icon_link'])) echo $list[$i]['icon_link'];

                ?>
            </td>
            <td class="td_name sv_use">
            <span class="dada_a">
            <?php echo $list[$i]['wr_4'] ?><br><?php echo $list[$i]['wr_5'] ?></span></td>
            <?php } ?>
        <?php if (count($list) == 0) { echo '<tr><td colspan="'.$colspan.'" class="empty_table">해당지역 키메이커맨이 없습니다.</td></tr>'; } ?>
        </tbody>
        </table>
    </div>

    <?php if ($list_href || $is_checkbox || $write_href) { ?>
    <div class="bo_fx">
        <?php if ($is_checkbox) { ?>
        <ul class="btn_bo_adm">
            <li><input type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value"></li>
            <li><input type="submit" name="btn_submit" value="선택복사" onclick="document.pressed=this.value"></li>
            <li><input type="submit" name="btn_submit" value="선택이동" onclick="document.pressed=this.value"></li>
        </ul>
        <?php } ?>

        <?php if ($list_href || $write_href) { ?>
        <ul class="btn_bo_user">
            <?php if ($list_href) { ?><li><a href="<?php echo $list_href ?>" class="btn_b01">목록</a></li><?php } ?>
            <?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">글쓰기</a></li><?php } ?>
        </ul>
        <?php } ?>
    </div>
    <?php } ?>
    </form>
</div>

<?php if($is_checkbox) { ?>
<noscript>
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
</noscript>
<?php } ?>

<!-- 페이지 -->
<?//php echo $write_pages;  ?>

<?}?>



<?php if ($is_checkbox) { ?>
<script>
function all_checked(sw) {
    var f = document.fboardlist;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]")
            f.elements[i].checked = sw;
    }
}

function fboardlist_submit(f) {
    var chk_count = 0;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
            chk_count++;
    }

    if (!chk_count) {
        alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
        return false;
    }

    if(document.pressed == "선택복사") {
        select_copy("copy");
        return;
    }

    if(document.pressed == "선택이동") {
        select_copy("move");
        return;
    }

    if(document.pressed == "선택삭제") {
        if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다\n\n답변글이 있는 게시글을 선택하신 경우\n답변글도 선택하셔야 게시글이 삭제됩니다."))
            return false;

        f.removeAttribute("target");
        f.action = "./board_list_update.php";
    }

    return true;
}

// 선택한 게시물 복사 및 이동
function select_copy(sw) {
    var f = document.fboardlist;

    if (sw == "copy")
        str = "복사";
    else
        str = "이동";

    var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");

    f.sw.value = sw;
    f.target = "move";
    f.action = "./move.php";
    f.submit();
}
</script>
<?php } ?>
<!-- } 게시판 목록 끝 -->
<br><br>