<?php
$sub_menu = "777300";
include_once('./_common.php');
include_once(AMINA_PATH.'/lib/admin.lib.php');

$cnt = count($_POST['m_chk']);

for($i=0;$i<$cnt;$i++) {

	$k = $_POST['m_chk'][$i];

	if($_POST['m_type'][$k] == "gr") {

		$sql_common = " gr_subject		= '{$_POST['m_name'][$k]}'
						, gr_2_subj		= '{$_POST['m_icon'][$k]}'
						, gr_2			= '{$_POST['m_link'][$k]}'
						, gr_9_subj		= '{$_POST['m_view'][$k]}'
						, gr_9			= '{$_POST['m_html'][$k]}'
						, gr_10_subj	= '{$_POST['m_limit'][$k]}'
						";
		if(AMINA) {
			$sql_order = ", gr_order = '{$_POST['m_order'][$k]}' ";
		} else {
			$sql_order = ", gr_10 = '{$_POST['m_order'][$k]}' ";
		}

		sql_query("update {$g5['group_table']} set $sql_common $sql_order where gr_id = '{$_POST['m_id'][$k]}'");

	} else if($_POST['m_type'][$k] == "bo") {

		$sql_common = " bo_subject		= '{$_POST['m_name'][$k]}'
						, bo_2_subj		= '{$_POST['m_icon'][$k]}'
						, bo_2			= '{$_POST['m_link'][$k]}'
						, bo_9_subj		= '{$_POST['m_html'][$k]}'
						, bo_10_subj	= '{$_POST['m_limit'][$k]}'
						";
		if(AMINA) {
			$sql_order = ", bo_order = '{$_POST['m_order'][$k]}' ";
		} else {
			$sql_order = ", bo_10 = '{$_POST['m_view'][$k]}', bo_order_search = '{$_POST['m_order'][$k]}' ";
		}

		sql_query("update {$g5['board_table']} set $sql_common $sql_order where bo_table = '{$_POST['m_id'][$k]}'");
	}

}

goto_url(AMINA_URL."/admin.menu.php");

?>