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

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

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

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

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

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

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

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

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

}

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

?>