// Thêm submenu "Nhập lại CSV" function giapha_import_members_page_render_direct() { global $wpdb; $table = $wpdb->prefix . 'giapha_members'; if (!empty($_FILES['csv_file']['tmp_name'])) { $file = fopen($_FILES['csv_file']['tmp_name'], 'r'); $header = fgetcsv($file); $count = 0; while (($data = fgetcsv($file)) !== false) { $row = array_combine($header, $data); $wpdb->insert($table, [ 'fullname' => sanitize_text_field($row['fullname']), 'gender' => sanitize_text_field($row['gender']), 'generation' => intval($row['generation']), 'year_of_birth' => sanitize_text_field($row['year_of_birth']), 'year_of_death' => sanitize_text_field($row['year_of_death']), 'father_name' => sanitize_text_field($row['father_name']), 'mother_name' => sanitize_text_field($row['mother_name']), 'spouse_name' => sanitize_text_field($row['spouse_name']), 'avatar' => sanitize_text_field($row['avatar']), 'father_id' => intval($row['father_id']), ]); $count++; } fclose($file); echo '

Đã nhập thành công ' . $count . ' thành viên.

'; } echo '

Nhập lại thành viên từ CSV

'; echo '
'; echo ''; echo ''; echo '
'; } function giapha_add_csv_import_menu() { add_submenu_page( 'giapha-members-list', 'Nhập lại CSV', 'Nhập lại CSV', 'manage_options', 'giapha-import-direct', 'giapha_import_members_page_render_direct' ); } add_action('admin_menu', 'giapha_add_csv_import_menu');
Warning: include_once(/home/kmecwapyhosting/public_html/wp-content/plugins/giapha-full-update-ready/includes/load-shortcodes.php): failed to open stream: No such file or directory in /home/kmecwapyhosting/public_html/wp-content/plugins/giapha-full-update-ready/giapha.php on line 49152

Warning: include_once(): Failed opening '/home/kmecwapyhosting/public_html/wp-content/plugins/giapha-full-update-ready/includes/load-shortcodes.php' for inclusion (include_path='.:/opt/alt/php74/usr/share/pear') in /home/kmecwapyhosting/public_html/wp-content/plugins/giapha-full-update-ready/giapha.php on line 49152

Lỗi cơ sở dữ liệu WordPress: [Table 'kmecwapyhosting_dongtoc.wp_actionscheduler_actions' doesn't exist]
SELECT a.action_id FROM wp_actionscheduler_actions a LEFT JOIN wp_actionscheduler_groups g ON g.group_id=a.group_id WHERE 1=1 AND g.slug='image-optimization/cleanup' AND a.hook='image-optimization/cleanup/stuck-operation' AND a.args='[]' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

Lỗi cơ sở dữ liệu WordPress: [Table 'kmecwapyhosting_dongtoc.wp_actionscheduler_groups' doesn't exist]
SELECT group_id FROM wp_actionscheduler_groups WHERE slug='image-optimization/cleanup'

Lỗi cơ sở dữ liệu WordPress: [Table 'kmecwapyhosting_dongtoc.wp_actionscheduler_groups' doesn't exist]
SHOW FULL COLUMNS FROM `wp_actionscheduler_groups`

Lỗi cơ sở dữ liệu WordPress: [Table 'kmecwapyhosting_dongtoc.wp_actionscheduler_actions' doesn't exist]
INSERT INTO wp_actionscheduler_actions ( `hook`, `status`, `scheduled_date_gmt`, `scheduled_date_local`, `schedule`, `group_id`, `priority`, `args` ) SELECT 'image-optimization/cleanup/stuck-operation', 'pending', '2025-05-12 07:41:01', '2025-05-12 07:41:01', 'O:32:\"ActionScheduler_IntervalSchedule\":5:{s:22:\"\0*\0scheduled_timestamp\";i:1747035661;s:18:\"\0*\0first_timestamp\";i:1747035661;s:13:\"\0*\0recurrence\";i:300;s:49:\"\0ActionScheduler_IntervalSchedule\0start_timestamp\";i:1747035661;s:53:\"\0ActionScheduler_IntervalSchedule\0interval_in_seconds\";i:300;}', 0, 10, '[]' FROM DUAL WHERE ( SELECT NULL FROM DUAL ) IS NULL

Lỗi cơ sở dữ liệu WordPress: [Table 'kmecwapyhosting_dongtoc.wp_actionscheduler_actions' doesn't exist]
SELECT a.action_id FROM wp_actionscheduler_actions a WHERE 1=1 AND a.hook='action_scheduler/migration_hook' AND a.status IN ('in-progress') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

Lỗi cơ sở dữ liệu WordPress: [Table 'kmecwapyhosting_dongtoc.wp_actionscheduler_actions' doesn't exist]
SELECT a.action_id FROM wp_actionscheduler_actions a WHERE 1=1 AND a.hook='action_scheduler/migration_hook' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1


Warning: Cannot modify header information - headers already sent by (output started at /home/kmecwapyhosting/public_html/wp-includes/class-wpdb.php:1849) in /home/kmecwapyhosting/public_html/wp-includes/pluggable.php on line 1435

Warning: Cannot modify header information - headers already sent by (output started at /home/kmecwapyhosting/public_html/wp-includes/class-wpdb.php:1849) in /home/kmecwapyhosting/public_html/wp-includes/pluggable.php on line 1438