<?
include_once("./_dmshop.php");

// 폼 체크
if (!$_POST['form_check']) {

    alert("요청하신 서비스를 찾을 수 없습니다.\\n\\n확인하신 후 다시 이용하시기 바랍니다.");

}

if ($dmshop_user['datetime'] != $_POST['form_check']) {

    alert("요청하신 서비스를 찾을 수 없습니다.\\n\\n확인하신 후 다시 이용하시기 바랍니다.");

}

// common
$sql_common = "";
$sql_common .= " set company_name = '".$_POST['company_name']."' ";
$sql_common .= ", company_number1 = '".$_POST['company_number1']."' ";
$sql_common .= ", company_number2 = '".$_POST['company_number2']."' ";
$sql_common .= ", shop_name = '".$_POST['shop_name']."' ";
$sql_common .= ", domain_type = '".$_POST['domain_type']."' ";
$sql_common .= ", ssl_use = '".$_POST['ssl_use']."' ";
$sql_common .= ", number1 = '".$_POST['number1']."' ";
$sql_common .= ", number2 = '".$_POST['number2']."' ";
$sql_common .= ", number3 = '".$_POST['number3']."' ";
$sql_common .= ", fax1 = '".$_POST['fax1']."' ";
$sql_common .= ", fax2 = '".$_POST['fax2']."' ";
$sql_common .= ", fax3 = '".$_POST['fax3']."' ";
$sql_common .= ", zip1 = '".$_POST['zip1']."' ";
$sql_common .= ", zip2 = '".$_POST['zip2']."' ";
$sql_common .= ", addr1 = '".$_POST['addr1']."' ";
$sql_common .= ", addr2 = '".$_POST['addr2']."' ";
$sql_common .= ", ceo_name = '".$_POST['ceo_name']."' ";
$sql_common .= ", ceo_email = '".$_POST['ceo_email']."' ";
$sql_common .= ", admin_name = '".$_POST['admin_name']."' ";
$sql_common .= ", admin_email = '".$_POST['admin_email']."' ";
$sql_common .= ", order_guest_use = '".$_POST['order_guest_use']."' ";
$sql_common .= ", order_receive_day = '".$_POST['order_receive_day']."' ";
$sql_common .= ", order_exchange_day = '".$_POST['order_exchange_day']."' ";
$sql_common .= ", cart_day = '".$_POST['cart_day']."' ";
$sql_common .= ", view_day = '".$_POST['view_day']."' ";
$sql_common .= ", order_cash_min = '".$_POST['order_cash_min']."' ";
$sql_common .= ", payment_type6 = '".$_POST['payment_type6']."' ";
$sql_common .= ", delivery_money = '".$_POST['delivery_money']."' ";
$sql_common .= ", delivery_money_free = '".$_POST['delivery_money_free']."' ";
$sql_common .= ", domain = '".$_POST['domain']."' ";
if ($_POST['cookie_domain']) {
$sql_common .= ", cookie_domain = '.".$_POST['cookie_domain']."' ";
}
$sql_common .= ", reply_write_level = '".$_POST['reply_write_level']."' ";
$sql_common .= ", qna_write_level = '".$_POST['qna_write_level']."' ";
$sql_common .= ", serial_key = '".$_POST['serial_key']."' ";
$sql_common .= ", agency_name = '".$_POST['agency_name']."' ";
$sql_common .= ", agency_url = '".$_POST['agency_url']."' ";
$sql_common .= ", agency_tel = '".$_POST['agency_tel']."' ";
$sql_common .= ", block_ip = '".$_POST['block_ip']."' ";
$sql_common .= ", block_keyword = '".$_POST['block_keyword']."' ";
$sql_common .= ", mouse_event = '".$_POST['mouse_event']."' ";
$sql_common .= ", dm_user_id = '".$_POST['dm_user_id']."' ";
$sql_common .= ", dm_user_pw = '".$_POST['dm_user_pw']."' ";

// update
sql_query(" update $shop[config_table] $sql_common ");

if ($url) {

    $urlencode = urldecode($url);

} else {

    $urlencode = urldecode($_SERVER[REQUEST_URI]);

}

shop_url($urlencode);
?>