<?
include_once("./_common.php");

if ($is_admin != "super")
  alert("관리자만 실행가능합니다.", $g4[path]);





    //빌더정보 호출[메인상단]
    $mct          =  "po_cnt6  = '1'"; // 1 설정 메뉴[상단메뉴]
    $sql          = " select * from $g4[site_bill] where $mct order by po_cnt7 , po_poll1"; 
    $result      = sql_query($sql); 
	$total_count  = mysql_num_rows($result);


    for($k=0;$k<count($list = sql_fetch_array($result));$k++) 
    {

	   $u_d     = "m_".$k;
	   $u_data  = $$u_d;

	   $u_s     = "s_".$k;
	   $u_ss    = $$u_s;

       $sql_r   =  "  po_subject = '$u_data', po_cnt7 = '$u_ss' ";

	   $po_t_name = "po_poll1_".$k;

	   $u_m       =  $$po_t_name;


	   $mct     =  "po_cnt6  = '1'";
	   $mct    .=  " and po_poll1 = '$u_m' ";

       sql_query(" update $g4[site_bill] set $sql_r where  $mct ");


	}



if($bo_table){
$url_path = $g4[bbs_path]."/board.php?bo_table=".$bo_table."&act=".$act;
}
elseif(!$bo_table && $gr_id){
$url_path = $g4[path]."/index.php?gr_id=".$gr_id."&act=".$act;
}
else{
$url_path = $g4[path]."?act=".$act;
}

goto_url($url_path);

?>
