Adminer (formerly phpMinAdmin) is a full-featured MySQL management tool written in PHP. This plugin include this tool in WordPress for a fast management of your database. Author: Frank Bültge Version: 0.2.6 Author URI: http://bueltge.de/ Donate URI: http://bueltge.de/wunschliste/ License: Apache License Last change: 20.07.2010 12:10:59 */ /** License: ============================================================================== Copyright 2009/2010 Frank Bueltge (email : frank@bueltge.de) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Requirements: ============================================================================== This plugin requires WordPress >= 2.7 and tested with PHP Interpreter >= 5.2.9 */ //avoid direct calls to this file, because now WP core and framework has been used if ( !function_exists('add_action') ) { header('Status: 403 Forbidden'); header('HTTP/1.1 403 Forbidden'); exit(); } if ( !class_exists('AdminerForWP') ) { if ( function_exists('add_action') ) { //WordPress definitions if ( !defined('WP_CONTENT_URL') ) define('WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); if ( !defined('WP_CONTENT_DIR') ) define('WP_CONTENT_DIR', ABSPATH . 'wp-content'); if ( !defined('WP_PLUGIN_URL') ) define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins'); if ( !defined('WP_PLUGIN_DIR') ) define('WP_PLUGIN_DIR', WP_CONTENT_DIR.'/plugins'); if ( !defined('PLUGINDIR') ) define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat. if ( !defined('WP_LANG_DIR') ) define('WP_LANG_DIR', WP_CONTENT_DIR . '/languages'); // plugin definitions define( 'FB_ADM_BASENAME', plugin_basename(__FILE__) ); define( 'FB_ADM_BASEDIR', dirname( plugin_basename(__FILE__) ) ); define( 'FB_ADM_TEXTDOMAIN', 'adminer' ); } class AdminerForWP { function AdminerForWP() { if ( is_admin() ) { add_action( 'init', array(&$this, 'text_domain') ); add_action( 'admin_menu', array( &$this, 'on_admin_menu' ) ); } } function text_domain() { if ( function_exists('load_plugin_textdomain') ) load_plugin_textdomain( FB_ADM_TEXTDOMAIN, false, FB_ADM_BASEDIR . '/languages' ); } function on_load_page() { add_thickbox(); } function on_admin_menu() { if( current_user_can('unfiltered_html') ) { $this->pagehook = add_management_page( __( 'Adminer', FB_ADM_TEXTDOMAIN ), __( 'Adminer', FB_ADM_TEXTDOMAIN ), 'unfiltered_html', FB_ADM_BASENAME, array(&$this, 'on_show_page'), '' ); add_action( 'load-' . $this->pagehook, array(&$this, 'on_load_page') ); } } function on_show_page() { global $wpdb; if ( DB_USER == '' ) $db_user = __( 'empty', FB_ADM_TEXTDOMAIN ); else $db_user = DB_USER; if ( DB_PASSWORD == '' ) $db_password = __( 'empty', FB_ADM_TEXTDOMAIN ); else $db_password = DB_PASSWORD; ?>

Adminer Logo

Adminer