<?php
$sub_menu = "400120";
include_once('./_common.php');

auth_check($auth[$sub_menu], 'w');

if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');

$arr = array();
$arr['bc_alevel_useup'] = $_POST['bc_alevel_useup'];
$arr['bc_alevel_usedown'] = $_POST['bc_alevel_usedown'];

$data = array();
for($i=0;$i<count($_POST['level']);$i++){
	$data[] = $_POST['level'][$i].'#'.$_POST['point'][$i];
}

$arr['bc_alevel_data'] = @implode('|', $data);

//$bdb->showQuery(true);
$bdb->update($bt['config_table'], $arr, '1');

alert('적용되었습니다', './autolevel_config.php');