<!-- #include virtual = "/common/lib/dbcon.asp" -->
<!-- #include virtual = "/common/lib/func.asp" -->
<%
Dim ct_idx, status, ct_ref, ct_codeno
Dim sql, ok_url

'//파라미터정보 *************************************************************************************
ct_idx		= InputValue( request("ct_idx") )
status		= InputValue( request("status") )
ct_ref		= InputValue( request("ct_ref") )
chk			= InputValue( request("chk") )
chk			= Replace(chk, " ", "")
chk			= split(chk, ",")
'//**************************************************************************************************

If status = "totdel" Then	'다중삭제
	
	For z = 0 To UBound(chk)

		sql = "Select ct_codeno from manager_menu where ct_idx=" & chk(z)
		Set rs_3 = dbcon.execute( sql )

		sql = " delete from manager_menu where ct_codeno like '%" & rs_3("ct_codeno") & "%'"
		dbcon.execute sql

		'//자주 쓰는 메뉴부분
		
		sql = " delete from manager_favorites where mm_ct_idx=" & chk(z)
		dbcon.execute sql
		
	next

	Set rs_3 = Nothing
	
Else	'//일반삭제
	
	'//삭제하기
	sql = "Select ct_codeno from manager_menu where ct_idx=" & ct_idx
	Set rs_3 = dbcon.execute( sql )

	ct_codeno = rs_3("ct_codeno")

	sql = " delete from manager_menu where ct_codeno like '%" & rs_3("ct_codeno") & "%'"
	dbcon.execute sql

	'//자주 쓰는 메뉴부분
	sql = " delete from manager_favorites where mm_ct_idx=" & ct_idx
	dbcon.execute sql

End if


If ct_ref = "0" then ct_ref = ""

ok_url = "write.asp?ct_idx=" & ct_ref

Call loding ("0", ok_url)
%>