<!--#include virtual = "/common/lib/dbcon.asp" -->
<!--#include virtual = "/common/lib/func.asp" -->
<%


' 파라미터정보 *************************************************************************************
g_num		= InputValue(request("g_num"))
status		= InputValue(request("status"))
' **************************************************************************************************



If status = "totdel" then ' 다중삭제

	chk = InputValue(Replace(request("chk")," ",""))
	arr_chk = Split(chk, ",")

	For i=0 To UBound(arr_chk)

		' 게시판 권한 삭제
		sql = " delete from board_access where g_num = "&arr_chk(i)
		Dbcon.execute sql

		' 관리메뉴권한 삭제
		sql = " delete from manager_menu_access where g_num = "&arr_chk(i)
		Dbcon.execute sql

		' 삭제하기
		sql = " delete from member_group where g_num = "&arr_chk(i)
		Dbcon.execute sql


		' 비회원으로 변경
		sql = "UPDATE member SET m_level = '2' WHERE m_level='"&arr_chk(i)&"'"
		Dbcon.execute sql
		
	next




Else ' 일반삭제
	
	' 게시판 권한 삭제
	sql = " delete from board_access where g_num = "&g_num
	Dbcon.execute sql

	' 관리메뉴권한 삭제
	sql = " delete from manager_menu_access where g_num = "&g_num
	Dbcon.execute sql

	' 삭제하기
	sql = " delete from member_group where g_num = "&g_num
	Dbcon.execute sql

	' 비회원으로 변경
	sql = "UPDATE member SET m_level = '2' WHERE m_level='"&g_num&"'"
	Dbcon.execute sql

End if


Dbcon.close : Set Dbcon = Nothing

ok_url = "write.asp"

Call loding ("0",ok_url)


%>