<?
include_once('./_common.php');
include_once(AMINA_PATH.'/lib/admin.lib.php');

//스킨타입설정
if($loc == "m") {
	if($sca) {
		$skin_type = 3;
	} else {
		$skin_type = 2;
	}
} else {
	if($sca) { 
		$skin_type = 1;
	} else {
		$skin_type = 0;
	}
}

//관리모드
if($loc == "ma" && $id) {
	if($type == "func") {
	    sql_query(" delete from {$g4['amina']} where id = '$id' ");
	} else {
	    sql_query(" delete from {$g4['amina_skin']} where id = '$id' ");
	}
	goto_url(G4_ADMIN_URL."/amina.admin.php?bo_table=".$bo_table."&loc=".$loc);
}

//삭제시
if($mode == "d" && $id) {
    sql_query(" delete from {$g4['amina_skin']} where id = '$id' ");
	goto_url(G4_ADMIN_URL."/amina.admin.php?bo_table=".$bo_table."&loc=".$loc);
}

//배열키값 생성
$amina_keys = array();
$amina_keys = array_keys($amina);

// 기능저장
if($loc == "func") {
	include(AMINA_PATH.'/admin.update.func.php');
} else {
	include(AMINA_PATH.'/admin.update.skin.php');
}

goto_url(G4_ADMIN_URL."/amina.admin.php?bo_table=".$bo_table."&loc=".$loc."&sca=".urlencode($sca));

?>
