@@ -20,57 +20,57 @@ |
||
| 20 | 20 | include_once __DIR__ . '/admin_header.php'; |
| 21 | 21 | |
| 22 | 22 | if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { |
| 23 | - exit(_NOPERM); |
|
| 23 | + exit(_NOPERM); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | function adminer_object() |
| 27 | 27 | { |
| 28 | - // required to run any plugin |
|
| 29 | - include_once dirname(__DIR__) . '/include/plugins/plugin.php'; |
|
| 30 | - // include_once dirname(__DIR__) . "/include/plugins/plugin.php"; |
|
| 31 | - include_once dirname(__DIR__) . '/include/plugins/frames.php'; |
|
| 28 | + // required to run any plugin |
|
| 29 | + include_once dirname(__DIR__) . '/include/plugins/plugin.php'; |
|
| 30 | + // include_once dirname(__DIR__) . "/include/plugins/plugin.php"; |
|
| 31 | + include_once dirname(__DIR__) . '/include/plugins/frames.php'; |
|
| 32 | 32 | |
| 33 | - // autoloader |
|
| 34 | - // foreach (glob("plugins/*.php") as $filename) { |
|
| 35 | - // include_once "./$filename"; |
|
| 36 | - // } |
|
| 33 | + // autoloader |
|
| 34 | + // foreach (glob("plugins/*.php") as $filename) { |
|
| 35 | + // include_once "./$filename"; |
|
| 36 | + // } |
|
| 37 | 37 | |
| 38 | - $plugins = array( |
|
| 39 | - // specify enabled plugins here |
|
| 40 | - // new AdminerDumpXml, |
|
| 41 | - // new AdminerTinymce, |
|
| 42 | - // new AdminerFileUpload("data/"), |
|
| 43 | - // new AdminerSlugify, |
|
| 44 | - // new AdminerTranslation, |
|
| 45 | - // new AdminerForeignSystem, |
|
| 46 | - new AdminerFrames, |
|
| 47 | - ); |
|
| 38 | + $plugins = array( |
|
| 39 | + // specify enabled plugins here |
|
| 40 | + // new AdminerDumpXml, |
|
| 41 | + // new AdminerTinymce, |
|
| 42 | + // new AdminerFileUpload("data/"), |
|
| 43 | + // new AdminerSlugify, |
|
| 44 | + // new AdminerTranslation, |
|
| 45 | + // new AdminerForeignSystem, |
|
| 46 | + new AdminerFrames, |
|
| 47 | + ); |
|
| 48 | 48 | |
| 49 | - // It is possible to combine customization and plugins: |
|
| 50 | - class AdminerCustomization extends AdminerPlugin |
|
| 51 | - { |
|
| 52 | - public function name() |
|
| 53 | - { |
|
| 54 | - return 'XOOPS Admin'; |
|
| 55 | - } |
|
| 49 | + // It is possible to combine customization and plugins: |
|
| 50 | + class AdminerCustomization extends AdminerPlugin |
|
| 51 | + { |
|
| 52 | + public function name() |
|
| 53 | + { |
|
| 54 | + return 'XOOPS Admin'; |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - public function credentials() |
|
| 58 | - { |
|
| 59 | - return array(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS); |
|
| 60 | - } |
|
| 57 | + public function credentials() |
|
| 58 | + { |
|
| 59 | + return array(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS); |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - public function database() |
|
| 63 | - { |
|
| 64 | - return XOOPS_DB_NAME; |
|
| 65 | - } |
|
| 62 | + public function database() |
|
| 63 | + { |
|
| 64 | + return XOOPS_DB_NAME; |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - public function login($login, $password) |
|
| 68 | - { |
|
| 69 | - return ($login == XOOPS_DB_USER); |
|
| 70 | - } |
|
| 71 | - } |
|
| 67 | + public function login($login, $password) |
|
| 68 | + { |
|
| 69 | + return ($login == XOOPS_DB_USER); |
|
| 70 | + } |
|
| 71 | + } |
|
| 72 | 72 | |
| 73 | - return new AdminerCustomization($plugins); |
|
| 73 | + return new AdminerCustomization($plugins); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | // include original Adminer or Adminer Editor |
@@ -34,31 +34,31 @@ |
||
| 34 | 34 | include_once $xoopsModuleAdminPath . '/language/english/main.php'; |
| 35 | 35 | |
| 36 | 36 | $adminmenu[] = array( |
| 37 | - 'title' => _AM_MODULEADMIN_HOME, |
|
| 38 | - 'link' => 'admin/index.php', |
|
| 39 | - 'icon' => $pathIcon32 . '/home.png' |
|
| 37 | + 'title' => _AM_MODULEADMIN_HOME, |
|
| 38 | + 'link' => 'admin/index.php', |
|
| 39 | + 'icon' => $pathIcon32 . '/home.png' |
|
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | 42 | $adminmenu[] = array( |
| 43 | - 'title' => _MI_ADMINER_MENU_01, |
|
| 44 | - 'link' => 'admin/mysql.php', |
|
| 45 | - 'icon' => $pathIcon32 . '/database_go.png' |
|
| 43 | + 'title' => _MI_ADMINER_MENU_01, |
|
| 44 | + 'link' => 'admin/mysql.php', |
|
| 45 | + 'icon' => $pathIcon32 . '/database_go.png' |
|
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | 48 | $adminmenu[] = array( |
| 49 | - 'title' => _MI_ADMINER_MENU_02, |
|
| 50 | - 'link' => 'admin/editor.php', |
|
| 51 | - 'icon' => $pathIcon32 . '/translations.png' |
|
| 49 | + 'title' => _MI_ADMINER_MENU_02, |
|
| 50 | + 'link' => 'admin/editor.php', |
|
| 51 | + 'icon' => $pathIcon32 . '/translations.png' |
|
| 52 | 52 | ); |
| 53 | 53 | |
| 54 | 54 | $adminmenu[] = array( |
| 55 | - 'title' => _MI_ADMINER_MENU_03, |
|
| 56 | - 'link' => 'admin/dump.php', |
|
| 57 | - 'icon' => $pathIcon32 . '/upload.png' |
|
| 55 | + 'title' => _MI_ADMINER_MENU_03, |
|
| 56 | + 'link' => 'admin/dump.php', |
|
| 57 | + 'icon' => $pathIcon32 . '/upload.png' |
|
| 58 | 58 | ); |
| 59 | 59 | |
| 60 | 60 | $adminmenu[] = array( |
| 61 | - 'title' => _AM_MODULEADMIN_ABOUT, |
|
| 62 | - 'link' => 'admin/about.php', |
|
| 63 | - 'icon' => $pathIcon32 . '/about.png' |
|
| 61 | + 'title' => _AM_MODULEADMIN_ABOUT, |
|
| 62 | + 'link' => 'admin/about.php', |
|
| 63 | + 'icon' => $pathIcon32 . '/about.png' |
|
| 64 | 64 | ); |
@@ -22,35 +22,35 @@ |
||
| 22 | 22 | $moduleDirName = basename(__DIR__); |
| 23 | 23 | include(XOOPS_ROOT_PATH . '/header.php'); |
| 24 | 24 | if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { |
| 25 | - exit(_NOPERM); |
|
| 25 | + exit(_NOPERM); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | function adminer_object() |
| 29 | 29 | { |
| 30 | - class AdminerKfr extends Adminer |
|
| 31 | - { |
|
| 32 | - public function name() |
|
| 33 | - { |
|
| 34 | - return 'XOOPS Admin'; |
|
| 35 | - } |
|
| 30 | + class AdminerKfr extends Adminer |
|
| 31 | + { |
|
| 32 | + public function name() |
|
| 33 | + { |
|
| 34 | + return 'XOOPS Admin'; |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - public function credentials() |
|
| 38 | - { |
|
| 39 | - return array(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS); |
|
| 40 | - } |
|
| 37 | + public function credentials() |
|
| 38 | + { |
|
| 39 | + return array(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS); |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - public function database() |
|
| 43 | - { |
|
| 44 | - return XOOPS_DB_NAME; |
|
| 45 | - } |
|
| 42 | + public function database() |
|
| 43 | + { |
|
| 44 | + return XOOPS_DB_NAME; |
|
| 45 | + } |
|
| 46 | 46 | |
| 47 | - public function login($login, $password) |
|
| 48 | - { |
|
| 49 | - return ($login == XOOPS_DB_USER); |
|
| 50 | - } |
|
| 51 | - } |
|
| 47 | + public function login($login, $password) |
|
| 48 | + { |
|
| 49 | + return ($login == XOOPS_DB_USER); |
|
| 50 | + } |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - return new AdminerKfr; |
|
| 53 | + return new AdminerKfr; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /* |
@@ -13,11 +13,11 @@ |
||
| 13 | 13 | var $prepend, $langPath; |
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | - * @param string text to append before first calendar usage |
|
| 17 | - * @param string path to language file, %s stands for language code |
|
| 18 | - */ |
|
| 16 | + * @param string text to append before first calendar usage |
|
| 17 | + * @param string path to language file, %s stands for language code |
|
| 18 | + */ |
|
| 19 | 19 | function __construct($prepend = "<script type='text/javascript' src='jquery-ui/jquery.js'></script>\n<script type='text/javascript' src='jquery-ui/jquery-ui.js'></script>\n<script type='text/javascript' src='jquery-ui/jquery-ui-timepicker-addon.js'></script>\n<link rel='stylesheet' type='text/css' href='jquery-ui/jquery-ui.css'>\n", $langPath = 'jquery-ui/i18n/jquery.ui.datepicker-%s.js' |
| 20 | - ) { |
|
| 20 | + ) { |
|
| 21 | 21 | $this->prepend = $prepend; |
| 22 | 22 | $this->langPath = $langPath; |
| 23 | 23 | } |
@@ -51,11 +51,11 @@ discard block |
||
| 51 | 51 | tableDiv.appendChild(fragment); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - var tables = [<?php foreach($tables as $table => $type) { echo "'".urlencode($table) ."'" . ',';}?>]; |
|
| 54 | + var tables = [<?php foreach ($tables as $table => $type) { echo "'" . urlencode($table) . "'" . ','; }?>]; |
|
| 55 | 55 | var tempTables = tables; |
| 56 | 56 | var hMe = "<?php echo h(ME) ?>"; |
| 57 | 57 | hMe = hMe.replace(/&/g, '&'); |
| 58 | - var langSelect = "<?php echo lang('select');?>"; |
|
| 58 | + var langSelect = "<?php echo lang('select'); ?>"; |
|
| 59 | 59 | |
| 60 | 60 | |
| 61 | 61 | var filter = document.getElementById("filter-field"); |
@@ -82,4 +82,4 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | filterf(); |
| 84 | 84 | </script> |
| 85 | -<?php return true;}} ?> |
|
| 85 | +<?php return true; }} ?> |
|
@@ -20,10 +20,10 @@ discard block |
||
| 20 | 20 | case 'tables_priv': return array(array('table' => 'user', 'source' => array('Host', 'User'), 'target' => array('Host', 'User'))); |
| 21 | 21 | case 'time_zone_name': return array(array('table' => 'time_zone', 'source' => array('Time_zone_id'), 'target' => array('Time_zone_id'))); |
| 22 | 22 | case 'time_zone_transition': return array(array('table' => 'time_zone', 'source' => array('Time_zone_id'), 'target' => array('Time_zone_id')), array( |
| 23 | - 'table' => 'time_zone_transition_type', 'source' => array('Time_zone_id', 'Transition_type_id'), 'target' => array( |
|
| 24 | - 'Time_zone_id', |
|
| 25 | - 'Transition_type_id' |
|
| 26 | - ))); |
|
| 23 | + 'table' => 'time_zone_transition_type', 'source' => array('Time_zone_id', 'Transition_type_id'), 'target' => array( |
|
| 24 | + 'Time_zone_id', |
|
| 25 | + 'Transition_type_id' |
|
| 26 | + ))); |
|
| 27 | 27 | case 'time_zone_transition_type': return array(array('table' => 'time_zone', 'source' => array('Time_zone_id'), 'target' => array('Time_zone_id'))); |
| 28 | 28 | } |
| 29 | 29 | } elseif (DB == 'information_schema') { |
@@ -44,40 +44,40 @@ discard block |
||
| 44 | 44 | case 'EVENTS': return array_merge(array(array('source' => array('EVENT_CATALOG', 'EVENT_SCHEMA')) + $schemata), $routine_charsets); |
| 45 | 45 | case 'FILES': return array($schemata, $tables); |
| 46 | 46 | case 'KEY_COLUMN_USAGE': return array(array('source' => array('CONSTRAINT_CATALOG', 'CONSTRAINT_SCHEMA')) + $schemata, $schemata, $tables, $columns, array('source' => array('TABLE_CATALOG', 'REFERENCED_TABLE_SCHEMA')) + $schemata, array( |
| 47 | - 'source' => array( |
|
| 48 | - 'TABLE_CATALOG', |
|
| 49 | - 'REFERENCED_TABLE_SCHEMA', |
|
| 50 | - 'REFERENCED_TABLE_NAME' |
|
| 51 | - )) + $tables, array( |
|
| 52 | - 'source' => array( |
|
| 53 | - 'TABLE_CATALOG', |
|
| 54 | - 'REFERENCED_TABLE_SCHEMA', |
|
| 55 | - 'REFERENCED_TABLE_NAME', |
|
| 56 | - 'REFERENCED_COLUMN_NAME' |
|
| 57 | - )) + $columns); |
|
| 47 | + 'source' => array( |
|
| 48 | + 'TABLE_CATALOG', |
|
| 49 | + 'REFERENCED_TABLE_SCHEMA', |
|
| 50 | + 'REFERENCED_TABLE_NAME' |
|
| 51 | + )) + $tables, array( |
|
| 52 | + 'source' => array( |
|
| 53 | + 'TABLE_CATALOG', |
|
| 54 | + 'REFERENCED_TABLE_SCHEMA', |
|
| 55 | + 'REFERENCED_TABLE_NAME', |
|
| 56 | + 'REFERENCED_COLUMN_NAME' |
|
| 57 | + )) + $columns); |
|
| 58 | 58 | case 'PARTITIONS': return array($schemata, $tables); |
| 59 | 59 | case 'REFERENTIAL_CONSTRAINTS': return array(array('source' => array('CONSTRAINT_CATALOG', 'CONSTRAINT_SCHEMA')) + $schemata, array('source' => array('UNIQUE_CONSTRAINT_CATALOG', 'UNIQUE_CONSTRAINT_SCHEMA')) + $schemata, array( |
| 60 | - 'source' => array( |
|
| 61 | - 'CONSTRAINT_CATALOG', |
|
| 62 | - 'CONSTRAINT_SCHEMA', |
|
| 63 | - 'TABLE_NAME' |
|
| 64 | - )) + $tables, array( |
|
| 65 | - 'source' => array( |
|
| 66 | - 'CONSTRAINT_CATALOG', |
|
| 67 | - 'CONSTRAINT_SCHEMA', |
|
| 68 | - 'REFERENCED_TABLE_NAME' |
|
| 69 | - )) + $tables); |
|
| 60 | + 'source' => array( |
|
| 61 | + 'CONSTRAINT_CATALOG', |
|
| 62 | + 'CONSTRAINT_SCHEMA', |
|
| 63 | + 'TABLE_NAME' |
|
| 64 | + )) + $tables, array( |
|
| 65 | + 'source' => array( |
|
| 66 | + 'CONSTRAINT_CATALOG', |
|
| 67 | + 'CONSTRAINT_SCHEMA', |
|
| 68 | + 'REFERENCED_TABLE_NAME' |
|
| 69 | + )) + $tables); |
|
| 70 | 70 | case 'ROUTINES': return array_merge(array(array('source' => array('ROUTINE_CATALOG', 'ROUTINE_SCHEMA')) + $schemata), $routine_charsets); |
| 71 | 71 | case 'SCHEMA_PRIVILEGES': return array($schemata); |
| 72 | 72 | case 'STATISTICS': return array($schemata, $tables, $columns, array('source' => array('TABLE_CATALOG', 'INDEX_SCHEMA')) + $schemata); |
| 73 | 73 | case 'TABLE_CONSTRAINTS': return array(array('source' => array('CONSTRAINT_CATALOG', 'CONSTRAINT_SCHEMA')) + $schemata, array('source' => array('CONSTRAINT_CATALOG', 'TABLE_SCHEMA')) + $schemata, array('source' => array('CONSTRAINT_CATALOG', 'TABLE_SCHEMA', 'TABLE_NAME')) + $tables); |
| 74 | 74 | case 'TABLE_PRIVILEGES': return array($schemata, $tables); |
| 75 | 75 | case 'TRIGGERS': return array_merge(array(array('source' => array('TRIGGER_CATALOG', 'TRIGGER_SCHEMA')) + $schemata, array('source' => array('EVENT_OBJECT_CATALOG', 'EVENT_OBJECT_SCHEMA')) + $schemata, array( |
| 76 | - 'source' => array( |
|
| 77 | - 'EVENT_OBJECT_CATALOG', |
|
| 78 | - 'EVENT_OBJECT_SCHEMA', |
|
| 79 | - 'EVENT_OBJECT_TABLE' |
|
| 80 | - )) + $tables), $routine_charsets); |
|
| 76 | + 'source' => array( |
|
| 77 | + 'EVENT_OBJECT_CATALOG', |
|
| 78 | + 'EVENT_OBJECT_SCHEMA', |
|
| 79 | + 'EVENT_OBJECT_TABLE' |
|
| 80 | + )) + $tables), $routine_charsets); |
|
| 81 | 81 | case 'VIEWS': return array($schemata); |
| 82 | 82 | } |
| 83 | 83 | } |
@@ -39,11 +39,11 @@ |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | function tableName(&$tableStatus) { |
| 42 | - $tableStatus['Comment'] = $this->_translate($tableStatus['Comment']); |
|
| 42 | + $tableStatus['Comment'] = $this->_translate($tableStatus['Comment']); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | function fieldName(&$field, $order = 0) { |
| 46 | - $field['comment'] = $this->_translate($field['comment']); |
|
| 46 | + $field['comment'] = $this->_translate($field['comment']); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | function editVal(&$val, $field) { |
@@ -11,9 +11,9 @@ |
||
| 11 | 11 | var $servers, $driver; |
| 12 | 12 | |
| 13 | 13 | /** Set supported servers |
| 14 | - * @param array array($domain) or array($domain => $description) or array($category => array()) |
|
| 15 | - * @param string |
|
| 16 | - */ |
|
| 14 | + * @param array array($domain) or array($domain => $description) or array($category => array()) |
|
| 15 | + * @param string |
|
| 16 | + */ |
|
| 17 | 17 | function __construct($servers, $driver = 'server') { |
| 18 | 18 | $this->servers = $servers; |
| 19 | 19 | $this->driver = $driver; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | ?> |
| 40 | 40 | <table cellspacing="0"> |
| 41 | 41 | <tr><th><?php echo lang('Server'); ?><td><input type="hidden" name="auth[driver]" value="<?php echo $this->driver; ?>"><select name="auth[server]"><?php echo optionlist($this->servers, SERVER); ?></select> |
| 42 | -<tr><th><?php echo lang('Username'); ?><td><input id="username" name="auth[username]" value="<?php echo h($_GET['username']); ?>"> |
|
| 42 | +<tr><th><?php echo lang('Username'); ?><td><input id="username" name="auth[username]" value="<?php echo h($_GET['username']); ?>"> |
|
| 43 | 43 | <tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]"> |
| 44 | 44 | </table> |
| 45 | 45 | <p><input type="submit" value="<?php echo lang('Login'); ?>"> |
@@ -12,10 +12,10 @@ |
||
| 12 | 12 | var $uploadPath, $displayPath, $extensions; |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | - * @param string prefix for uploading data (create writable subdirectory for each table containing uploadable fields) |
|
| 16 | - * @param string prefix for displaying data, null stands for $uploadPath |
|
| 17 | - * @param string regular expression with allowed file extensions |
|
| 18 | - */ |
|
| 15 | + * @param string prefix for uploading data (create writable subdirectory for each table containing uploadable fields) |
|
| 16 | + * @param string prefix for displaying data, null stands for $uploadPath |
|
| 17 | + * @param string regular expression with allowed file extensions |
|
| 18 | + */ |
|
| 19 | 19 | function __construct($uploadPath = '../static/data/', $displayPath = null, $extensions = '[a-zA-Z0-9]+') { |
| 20 | 20 | $this->uploadPath = $uploadPath; |
| 21 | 21 | $this->displayPath = ($displayPath !== null ? $displayPath : $uploadPath); |