<?php

/*
 *  컨텐츠 슬라이더 등록 저장
 */
include_once './_common.php';
include_once './index.php';

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

if (!$_POST) {
    exit;
}

if (!$w) {

    $sql = "insert into ask_plugin_cslider_parent set acp_bg = '{$acp_bg}', acp_area = '{$acp_area}', acp_status = '{$acp_status}'";
    sql_query($sql);
    $idx = sql_insert_id();
} elseif ($w == 'u' && $acp_idx) {

    $sql = "update ask_plugin_cslider_parent set acp_bg = '{$acp_bg}', acp_area = '{$acp_area}', acp_status = '{$acp_status}' where acp_idx='{$acp_idx}' limit 1";
    sql_query($sql);
    $idx = $acp_idx;
}

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