0) { $dbManager = new AFES_DbManager(); $nonce = isset($_REQUEST['_wpnonce']) ? $_REQUEST['_wpnonce'] : null; if ($action === 'delete-table' && wp_verify_nonce( $nonce, 'my-nonce') ) { if ($dbManager->delete_table($id)) { wp_safe_redirect( add_query_arg( array( 'page' => 'affieasy-table', 'deleted' => 1, ), admin_url('admin.php') ) ); exit; } } else if ($action === 'duplicate-table' && wp_verify_nonce( $nonce, 'my-nonce')) { $duplicatedTable = $dbManager->duplicate_table($id); if (is_numeric($duplicatedTable->getId())) { wp_safe_redirect( add_query_arg( array( 'page' => 'affieasy-table', 'duplicated' => 1, ), admin_url('admin.php') ) ); exit; } } } $tableList = new AFES_TableList(); ?>


prepare_items(); $tableList->display(); ?>