<?
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 skin_item = '".$_POST['skin_item']."' ";

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

// common
$sql_common = "";
$sql_common .= " set buy_use1 = '".$_POST['buy_use1']."' ";
$sql_common .= ", buy_use2 = '".$_POST['buy_use2']."' ";
$sql_common .= ", buy_use3 = '".$_POST['buy_use3']."' ";
$sql_common .= ", buy_use4 = '".$_POST['buy_use4']."' ";
$sql_common .= ", buy_use5 = '".$_POST['buy_use5']."' ";
$sql_common .= ", buy_use6 = '".$_POST['buy_use6']."' ";
$sql_common .= ", sns_use1 = '".$_POST['sns_use1']."' ";
$sql_common .= ", sns_use2 = '".$_POST['sns_use2']."' ";
$sql_common .= ", sns_use3 = '".$_POST['sns_use3']."' ";
$sql_common .= ", sns_use4 = '".$_POST['sns_use4']."' ";
$sql_common .= ", sns_use5 = '".$_POST['sns_use5']."' ";
$sql_common .= ", sns_use6 = '".$_POST['sns_use6']."' ";
$sql_common .= ", item_gallery = '".$_POST['item_gallery']."' ";
$sql_common .= ", item_relation = '".$_POST['item_relation']."' ";
$sql_common .= ", tab_use1 = '".$_POST['tab_use1']."' ";
$sql_common .= ", tab_use2 = '".$_POST['tab_use2']."' ";
$sql_common .= ", tab_use3 = '".$_POST['tab_use3']."' ";
$sql_common .= ", tab_use4 = '".$_POST['tab_use4']."' ";
$sql_common .= ", tab_use5 = '".$_POST['tab_use5']."' ";
$sql_common .= ", item_option1 = '".$_POST['item_option1']."' ";
$sql_common .= ", item_option2 = '".$_POST['item_option2']."' ";
$sql_common .= ", item_option3 = '".$_POST['item_option3']."' ";
$sql_common .= ", item_option4 = '".$_POST['item_option4']."' ";
$sql_common .= ", item_option5 = '".$_POST['item_option5']."' ";
$sql_common .= ", item_option6 = '".$_POST['item_option6']."' ";
$sql_common .= ", item_option7 = '".$_POST['item_option7']."' ";
$sql_common .= ", item_option8 = '".$_POST['item_option8']."' ";
$sql_common .= ", item_option9 = '".$_POST['item_option9']."' ";
$sql_common .= ", item_option10 = '".$_POST['item_option10']."' ";
$sql_common .= ", thumb_type = '".$_POST['thumb_type']."' ";
$sql_common .= ", smart_zoom = '".$_POST['smart_zoom']."' ";
$sql_common .= ", image_default_use = '".$_POST['image_default_use']."' ";
$sql_common .= ", image_default = '".$_POST['image_default']."' ";
$sql_common .= ", image_default_width = '".$_POST['image_default_width']."' ";
$sql_common .= ", image_default_height = '".$_POST['image_default_height']."' ";
$sql_common .= ", image_default1_border = '".$_POST['image_default1_border']."' ";
$sql_common .= ", image_default1_border_color = '".$_POST['image_default1_border_color']."' ";
$sql_common .= ", image_default2_border = '".$_POST['image_default2_border']."' ";
$sql_common .= ", image_default2_border_color = '".$_POST['image_default2_border_color']."' ";
$sql_common .= ", image_gallery_thumb_use = '".$_POST['image_gallery_thumb_use']."' ";
$sql_common .= ", image_gallery_thumb = '".$_POST['image_gallery_thumb']."' ";
$sql_common .= ", image_gallery_thumb_width = '".$_POST['image_gallery_thumb_width']."' ";
$sql_common .= ", image_gallery_thumb_height = '".$_POST['image_gallery_thumb_height']."' ";
$sql_common .= ", image_gallery1_border = '".$_POST['image_gallery1_border']."' ";
$sql_common .= ", image_gallery1_border_color = '".$_POST['image_gallery1_border_color']."' ";
$sql_common .= ", image_gallery2_border = '".$_POST['image_gallery2_border']."' ";
$sql_common .= ", image_gallery2_border_color = '".$_POST['image_gallery2_border_color']."' ";
$sql_common .= ", image_relation_use = '".$_POST['image_relation_use']."' ";
$sql_common .= ", image_relation = '".$_POST['image_relation']."' ";
$sql_common .= ", image_relation_width = '".$_POST['image_relation_width']."' ";
$sql_common .= ", image_relation_height = '".$_POST['image_relation_height']."' ";
$sql_common .= ", image_relation1_border = '".$_POST['image_relation1_border']."' ";
$sql_common .= ", image_relation1_border_color = '".$_POST['image_relation1_border_color']."' ";
$sql_common .= ", image_relation2_border = '".$_POST['image_relation2_border']."' ";
$sql_common .= ", image_relation2_border_color = '".$_POST['image_relation2_border_color']."' ";
$sql_common .= ", item_image_width = '".$_POST['item_image_width']."' ";
$sql_common .= ", item_title_font_family = '".$_POST['item_title_font_family']."' ";
$sql_common .= ", item_title_font_size = '".$_POST['item_title_font_size']."' ";
$sql_common .= ", item_title_font_color = '".$_POST['item_title_font_color']."' ";
$sql_common .= ", item_title_font_bold = '".$_POST['item_title_font_bold']."' ";
$sql_common .= ", item_title_font_italic = '".$_POST['item_title_font_italic']."' ";
$sql_common .= ", item_title_font_underline = '".$_POST['item_title_font_underline']."' ";
$sql_common .= ", item_subtitle_font_family = '".$_POST['item_subtitle_font_family']."' ";
$sql_common .= ", item_subtitle_font_size = '".$_POST['item_subtitle_font_size']."' ";
$sql_common .= ", item_subtitle_font_color = '".$_POST['item_subtitle_font_color']."' ";
$sql_common .= ", item_subtitle_font_bold = '".$_POST['item_subtitle_font_bold']."' ";
$sql_common .= ", item_subtitle_font_italic = '".$_POST['item_subtitle_font_italic']."' ";
$sql_common .= ", item_subtitle_font_underline = '".$_POST['item_subtitle_font_underline']."' ";
$sql_common .= ", item_price_font_family = '".$_POST['item_price_font_family']."' ";
$sql_common .= ", item_price_font_size = '".$_POST['item_price_font_size']."' ";
$sql_common .= ", item_price_font_color = '".$_POST['item_price_font_color']."' ";
$sql_common .= ", item_price_font_bold = '".$_POST['item_price_font_bold']."' ";
$sql_common .= ", item_price_font_italic = '".$_POST['item_price_font_italic']."' ";
$sql_common .= ", item_price_font_through = '".$_POST['item_price_font_through']."' ";
$sql_common .= ", item_money_font_family = '".$_POST['item_money_font_family']."' ";
$sql_common .= ", item_money_font_size = '".$_POST['item_money_font_size']."' ";
$sql_common .= ", item_money_font_color = '".$_POST['item_money_font_color']."' ";
$sql_common .= ", item_money_font_bold = '".$_POST['item_money_font_bold']."' ";
$sql_common .= ", item_money_font_italic = '".$_POST['item_money_font_italic']."' ";
$sql_common .= ", item_money_font_underline = '".$_POST['item_money_font_underline']."' ";
$sql_common .= ", item_cash_font_family = '".$_POST['item_cash_font_family']."' ";
$sql_common .= ", item_cash_font_size = '".$_POST['item_cash_font_size']."' ";
$sql_common .= ", item_cash_font_color = '".$_POST['item_cash_font_color']."' ";
$sql_common .= ", item_cash_font_bold = '".$_POST['item_cash_font_bold']."' ";
$sql_common .= ", item_cash_font_italic = '".$_POST['item_cash_font_italic']."' ";
$sql_common .= ", item_cash_font_underline = '".$_POST['item_cash_font_underline']."' ";
$sql_common .= ", item_limit_font_family = '".$_POST['item_limit_font_family']."' ";
$sql_common .= ", item_limit_font_size = '".$_POST['item_limit_font_size']."' ";
$sql_common .= ", item_limit_font_color = '".$_POST['item_limit_font_color']."' ";
$sql_common .= ", item_limit_font_bold = '".$_POST['item_limit_font_bold']."' ";
$sql_common .= ", item_limit_font_italic = '".$_POST['item_limit_font_italic']."' ";
$sql_common .= ", item_limit_font_underline = '".$_POST['item_limit_font_underline']."' ";
$sql_common .= ", item_sale_limit_font_family = '".$_POST['item_sale_limit_font_family']."' ";
$sql_common .= ", item_sale_limit_font_size = '".$_POST['item_sale_limit_font_size']."' ";
$sql_common .= ", item_sale_limit_font_color = '".$_POST['item_sale_limit_font_color']."' ";
$sql_common .= ", item_sale_limit_font_bold = '".$_POST['item_sale_limit_font_bold']."' ";
$sql_common .= ", item_sale_limit_font_italic = '".$_POST['item_sale_limit_font_italic']."' ";
$sql_common .= ", item_sale_limit_font_underline = '".$_POST['item_sale_limit_font_underline']."' ";
$sql_common .= ", item_delivery_money_font_family = '".$_POST['item_delivery_money_font_family']."' ";
$sql_common .= ", item_delivery_money_font_size = '".$_POST['item_delivery_money_font_size']."' ";
$sql_common .= ", item_delivery_money_font_color = '".$_POST['item_delivery_money_font_color']."' ";
$sql_common .= ", item_delivery_money_font_bold = '".$_POST['item_delivery_money_font_bold']."' ";
$sql_common .= ", item_delivery_money_font_italic = '".$_POST['item_delivery_money_font_italic']."' ";
$sql_common .= ", item_delivery_money_font_underline = '".$_POST['item_delivery_money_font_underline']."' ";
$sql_common .= ", item_total_money_font_family = '".$_POST['item_total_money_font_family']."' ";
$sql_common .= ", item_total_money_font_size = '".$_POST['item_total_money_font_size']."' ";
$sql_common .= ", item_total_money_font_color = '".$_POST['item_total_money_font_color']."' ";
$sql_common .= ", item_total_money_font_bold = '".$_POST['item_total_money_font_bold']."' ";
$sql_common .= ", item_total_money_font_italic = '".$_POST['item_total_money_font_italic']."' ";
$sql_common .= ", item_total_money_font_underline = '".$_POST['item_total_money_font_underline']."' ";
$sql_common .= ", item_relation_title_font_family = '".$_POST['item_relation_title_font_family']."' ";
$sql_common .= ", item_relation_title_font_size = '".$_POST['item_relation_title_font_size']."' ";
$sql_common .= ", item_relation_title_font_color = '".$_POST['item_relation_title_font_color']."' ";
$sql_common .= ", item_relation_title_font_bold = '".$_POST['item_relation_title_font_bold']."' ";
$sql_common .= ", item_relation_title_font_italic = '".$_POST['item_relation_title_font_italic']."' ";
$sql_common .= ", item_relation_title_font_underline = '".$_POST['item_relation_title_font_underline']."' ";
$sql_common .= ", item_relation_money_font_family = '".$_POST['item_relation_money_font_family']."' ";
$sql_common .= ", item_relation_money_font_size = '".$_POST['item_relation_money_font_size']."' ";
$sql_common .= ", item_relation_money_font_color = '".$_POST['item_relation_money_font_color']."' ";
$sql_common .= ", item_relation_money_font_bold = '".$_POST['item_relation_money_font_bold']."' ";
$sql_common .= ", item_relation_money_font_italic = '".$_POST['item_relation_money_font_italic']."' ";
$sql_common .= ", item_relation_money_font_underline = '".$_POST['item_relation_money_font_underline']."' ";
$sql_common .= ", item_optiontitle_font_family = '".$_POST['item_optiontitle_font_family']."' ";
$sql_common .= ", item_optiontitle_font_size = '".$_POST['item_optiontitle_font_size']."' ";
$sql_common .= ", item_optiontitle_font_color = '".$_POST['item_optiontitle_font_color']."' ";
$sql_common .= ", item_optiontitle_font_bold = '".$_POST['item_optiontitle_font_bold']."' ";
$sql_common .= ", item_optiontitle_font_italic = '".$_POST['item_optiontitle_font_italic']."' ";
$sql_common .= ", item_optiontitle_font_underline = '".$_POST['item_optiontitle_font_underline']."' ";
$sql_common .= ", item_optioncontent_font_family = '".$_POST['item_optioncontent_font_family']."' ";
$sql_common .= ", item_optioncontent_font_size = '".$_POST['item_optioncontent_font_size']."' ";
$sql_common .= ", item_optioncontent_font_color = '".$_POST['item_optioncontent_font_color']."' ";
$sql_common .= ", item_optioncontent_font_bold = '".$_POST['item_optioncontent_font_bold']."' ";
$sql_common .= ", item_optioncontent_font_italic = '".$_POST['item_optioncontent_font_italic']."' ";
$sql_common .= ", item_optioncontent_font_underline = '".$_POST['item_optioncontent_font_underline']."' ";
$sql_common .= ", help_font_family = '".$_POST['help_font_family']."' ";
$sql_common .= ", help_font_size = '".$_POST['help_font_size']."' ";
$sql_common .= ", help_font_color = '".$_POST['help_font_color']."' ";
$sql_common .= ", help_font_bold = '".$_POST['help_font_bold']."' ";
$sql_common .= ", help_font_italic = '".$_POST['help_font_italic']."' ";
$sql_common .= ", help_font_underline = '".$_POST['help_font_underline']."' ";

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

// 썸네일 폴더 삭제
shop_delete("{$shop['path']}/data/thumb/item");

if ($url) {

    $urlencode = urldecode($url);

} else {

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

}

shop_url($urlencode);
?>