<?php

/*
 *  배너 등록 저장
 */
include_once './_common.php';
include_once './index.php';

if (!defined('_GNUBOARD_')) {
    exit;
}

if (!$_POST) {
    exit;
}
if (!$w) {
    $sql = "insert into ask_plugin_sidemenu set as_status = '{$as_status}', as_gr_id = '{$as_gr_id}', as_me_code = '{$as_me_code}'";
    sql_query($sql);
    $idx = sql_insert_id();
} else if ($w == 'u' && $as_idx) {
    $sql = "update ask_plugin_sidemenu set as_status = '{$as_status}', as_gr_id = '{$as_gr_id}', as_me_code = '{$as_me_code}' where as_idx = '{$as_idx}' limit 1";
    sql_query($sql);
    $idx = $as_idx;
}

goto_url('./sidemenu_add.php?w=u&idx=' . $idx);
