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

check_demo();

auth_check($auth[$sub_menu], "d");

check_token();

for ($i=0; $i<count($chk); $i++) 
{
    // 실제 번호를 넘김
    $k = $_POST['chk'][$i];

    $sql = " delete from {$g5['amina_mileage']} where po_id = '{$_POST['po_id'][$k]}' ";
    sql_query($sql);

    $sql = " select sum(po_point) as sum_po_point from {$g5['amina_mileage']} where mb_id = '{$_POST['mb_id'][$k]}' ";
    $row = sql_fetch($sql);
    $sum_point = $row['sum_po_point'];

    $sql= " update {$g5[member_table]} set mb_7 = '$sum_point' where mb_id = '{$_POST['mb_id'][$k]}' ";
    sql_query($sql);
}

goto_url("./point.list.php?$qstr");
?>
