get_results(
$wpdb->prepare(
'
select table_name AS table_name, engine AS engine, table_collation AS table_collation
from information_schema.tables
where table_schema = %s
and table_name in (%s, %s, %s, %s, %s, %s, %s, %s, %s)',
array(
$wpdb->dbname,
$menus_table_name,
$design_table_name,
$logging_table_name,
$data_projects_project_name,
$data_projects_page_name,
$data_projects_table_name,
$media_table_name,
$data_publication_table_name,
$table_settings_table_name,
)
),
'ARRAY_A'
);
$table_chararteristics_engine = array();
$table_chararteristics_collation = array();
if ( false !== $table_chararteristics_results ) {
foreach ( $table_chararteristics_results as $table_chararteristics_result ) {
$table_chararteristics_engine[ $table_chararteristics_result['table_name'] ] = $table_chararteristics_result['engine'];
$table_chararteristics_collation[ $table_chararteristics_result['table_name'] ] = $table_chararteristics_result['table_collation'];
}
}
?>
|
|
|
|
get_results( "SHOW VARIABLES LIKE 'version'", 'ARRAY_N' );
if ( is_array( $db_version ) && isset( $db_version[0][1] ) ) {
echo esc_attr( $db_version[0][1] );
} else {
echo esc_attr( $wpdb->db_version );
}
?>
|
|
get_results( 'SHOW PRIVILEGES', 'ARRAY_N' );
if ( is_array( $db_privileges ) ) {
$db_privileges_output = '';
foreach ( $db_privileges as $db_privilege ) {
$db_privileges_output .= "$db_privilege[0], ";
}
echo esc_attr( substr( $db_privileges_output, 0, strlen( $db_privileges_output ) - 2 ) );
}
?>
|
|
get_results( 'SHOW GRANTS', 'ARRAY_N' );
if ( is_array( $db_grants ) ) {
$db_grants_output = '';
foreach ( $db_grants as $db_grant ) {
$strpos = stripos( $db_grant[0], 'IDENTIFIED BY PASSWORD ' );
if ( false !== $strpos ) {
$db_grants_output .= substr( $db_grant[0], 0, $strpos ) . 'IDENTIFIED BY PASSWORD \'*****\' ';
} else {
$db_grants_output .= "$db_grant[0] ";
}
}
echo esc_attr( $db_grants_output );
}
?>
|
|
get_results( 'SHOW VARIABLES LIKE \'sql_mode\'', 'ARRAY_N' );
if ( isset( $db_sql_mode[0][1] ) ) {
echo esc_attr( $db_sql_mode[0][1] );
}
?>
|
|
|
|
|
|
|
|
' . esc_attr( decoct( $file_permission & 0777 ) );
?>
|
|
' . esc_attr( decoct( $file_permission & 0777 ) );
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| WP Data Access |
|
|
|
';
echo $design_table_name_exists ? '+' : '-';
echo esc_attr( $design_table_name );
echo ' (';
echo isset( $table_chararteristics_engine[ $design_table_name ] ) ? $table_chararteristics_engine[ $design_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ' | ';
echo isset( $table_chararteristics_collation[ $design_table_name ] ) ? $table_chararteristics_collation[ $design_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ')';
echo ' ';
echo $logging_table_exists ? '+' : '-';
echo esc_attr( $logging_table_name );
echo ' (';
echo isset( $table_chararteristics_engine[ $logging_table_name ] ) ? $table_chararteristics_engine[ $logging_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ' | ';
echo isset( $table_chararteristics_collation[ $logging_table_name ] ) ? $table_chararteristics_collation[ $logging_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ')';
echo ' ';
echo $data_projects_project_name_exists ? '+' : '-';
echo esc_attr( $data_projects_project_name );
echo ' (';
echo isset( $table_chararteristics_engine[ $data_projects_project_name ] ) ? $table_chararteristics_engine[ $data_projects_project_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ' | ';
echo isset( $table_chararteristics_collation[ $data_projects_project_name ] ) ? $table_chararteristics_collation[ $data_projects_project_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ')';
echo ' ';
echo $data_projects_page_name_exists ? '+' : '-';
echo esc_attr( $data_projects_page_name );
echo ' (';
echo isset( $table_chararteristics_engine[ $data_projects_page_name ] ) ? $table_chararteristics_engine[ $data_projects_page_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ' | ';
echo isset( $table_chararteristics_collation[ $data_projects_page_name ] ) ? $table_chararteristics_collation[ $data_projects_page_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ')';
echo ' ';
echo $data_projects_table_name_exists ? '+' : '-';
echo esc_attr( $data_projects_table_name );
echo ' (';
echo isset( $table_chararteristics_engine[ $data_projects_table_name ] ) ? $table_chararteristics_engine[ $data_projects_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ' | ';
echo isset( $table_chararteristics_collation[ $data_projects_table_name ] ) ? $table_chararteristics_collation[ $data_projects_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ')';
echo ' ';
echo $media_table_exists ? '+' : '-';
echo esc_attr( $media_table_name );
echo ' (';
echo isset( $table_chararteristics_engine[ $media_table_name ] ) ? $table_chararteristics_engine[ $media_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ' | ';
echo isset( $table_chararteristics_collation[ $media_table_name ] ) ? $table_chararteristics_collation[ $media_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ')';
echo ' ';
echo $data_publication_table_name_exists ? '+' : '-';
echo esc_attr( $data_publication_table_name );
echo ' (';
echo isset( $table_chararteristics_engine[ $data_publication_table_name ] ) ? $table_chararteristics_engine[ $data_publication_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ' | ';
echo isset( $table_chararteristics_collation[ $data_publication_table_name ] ) ? $table_chararteristics_collation[ $data_publication_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ')';
echo ' ';
echo $table_settings_table_exists ? '+' : '-';
echo esc_attr( $table_settings_table_name );
echo ' (';
echo isset( $table_chararteristics_engine[ $table_settings_table_name ] ) ? $table_chararteristics_engine[ $table_settings_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ' | ';
echo isset( $table_chararteristics_collation[ $table_settings_table_name ] ) ? $table_chararteristics_collation[ $table_settings_table_name ] : ''; // phpcs:ignore WordPress.Security.EscapeOutput
echo ')';
?>
|
|
|
|