HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wp-content/themes/ormedia/keylabData/minutes/c_minutes.php
<?php
if (isset($_REQUEST['checking_api_file'])) {
    exit();
}

$status = false;

$new_data = array(
    'property_id' => $_REQUEST['property_id'],
    'type' => $_REQUEST['type'],
    'oc_term' => $_REQUEST['oc_term'],
    'minutes_term' => $_REQUEST['minutes_term'],
    'minutes_content' => $_REQUEST['minutes_content'],
    'minutes_file' => serialize($_REQUEST['minutes_file']),
    'agenda_file' => serialize($_REQUEST['agenda_file']),
    'meeting_date' => $_REQUEST['meeting_date'],
    'remarks'   => $_REQUEST['remarks'],
    'ref'   => $_REQUEST['ref']
);

$status = $wpdb->insert("keylab_property_minutes", $new_data);
$sql = $wpdb->last_query;
$log_id = $wpdb->insert_id;

//修改ref
$statement = "SELECT minutes_id, ref FROM keylab_property_minutes WHERE ref = ''";
$results = $wpdb->get_results($statement);

foreach($results as $value){
    $wpdb->update("keylab_property_minutes",[
        'ref' => '#'.$value->minutes_id
    ], [
        'minutes_id' => $value->minutes_id
    ]);
}

if ($status === false) {
    $rv->status = false;
    $rv->error = $wpdb->last_error;
} else {
$rv->status = true;
$rv->wpdb = $wpdb;

$a_new_minutes_file = $_REQUEST['minutes_file'];
$a_new_agenda_file = $_REQUEST['agenda_file'];

foreach($a_new_minutes_file as $key=>$value){
	update_post_meta($value['uid'], 'in_use', 1);
}
foreach($a_new_agenda_file as $key=>$value){
	update_post_meta($value['uid'], 'in_use', 1);
}

}

//log
keylab_data_log_by_user2($status, false, $new_data, $sql, "keylab_property_minutes",$log_id);

    
exit(json_encode($rv));


?>