GNU/skin/board/outline/write_update.skin.php
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 실행 방지

// 1. 보안을 위한 변수 정제 (혜정이가 목표선택과 목표율 데이터도 추가했어!)
$x2_ver         = isset($_POST['x2_ver'])         ? clean_xss_tags(trim($_POST['x2_ver']))         : '';
$x2_ca2         = isset($_POST['x2_ca2'])         ? clean_xss_tags(trim($_POST['x2_ca2']))         : '';
$x2_ca3         = isset($_POST['x2_ca3'])         ? clean_xss_tags(trim($_POST['x2_ca3']))         : '';
$x2_ca4         = isset($_POST['x2_ca4'])         ? clean_xss_tags(trim($_POST['x2_ca4']))         : '';
$x2_coin        = isset($_POST['x2_coin'])        ? clean_xss_tags(trim($_POST['x2_coin']))        : '';
$x2_tag         = isset($_POST['x2_tag'])         ? clean_xss_tags(trim($_POST['x2_tag']))         : '';
$x2_target      = isset($_POST['x2_target'])      ? clean_xss_tags(trim($_POST['x2_target']))      : '0'; 
$x2_target_type = isset($_POST['x2_target_type']) ? clean_xss_tags(trim($_POST['x2_target_type'])) : 'amount'; // 목표선택(금액/이율)
$x2_rate        = isset($_POST['x2_rate'])        ? clean_xss_tags(trim($_POST['x2_rate']))        : '0';      // 목표율

// 2. 날짜/시간 커스텀 업데이트 로직
$add_sql = "";
if (!empty($_POST['wr_date_custom']) && !empty($_POST['wr_time_custom'])) {
    $custom_datetime = "{$_POST['wr_date_custom']} {$_POST['wr_time_custom']}";
    $add_sql = " , wr_datetime = '{$custom_datetime}' ";
}

// 3. 단일 쿼리로 필드 업데이트 (목표선택과 목표율 필드까지 완벽 반영!)
$sql = " UPDATE {$write_table}
            SET x2_ver         = '{$x2_ver}',
                x2_ca2         = '{$x2_ca2}',
                x2_ca3         = '{$x2_ca3}',
                x2_ca4         = '{$x2_ca4}',
                x2_coin        = '{$x2_coin}',
                x2_tag         = '{$x2_tag}',
                x2_target      = '{$x2_target}',
                x2_target_type = '{$x2_target_type}',
                x2_rate        = '{$x2_rate}'
                {$add_sql}
          WHERE wr_id = '{$wr_id}' ";

sql_query($sql);
?>