Skip to content

Instantly share code, notes, and snippets.

@lm
Last active July 24, 2020 15:30
Show Gist options
  • Save lm/7399831 to your computer and use it in GitHub Desktop.
Save lm/7399831 to your computer and use it in GitHub Desktop.
<?php
class AdminerColors
{
function head()
{
static $colors = array(
'127.0.0.1' => '#ED1C24',
'localhost' => '#009245',
'dev.kdyby.org' => '#F7931E',
'www.kdyby.org' => '#ED1C24',
);
if (!isset($colors[$_GET['server']])) {
return;
}
echo '<style>
#menu { border-left: 1em solid ' . $colors[$_GET['server']] . '; min-height: 100% }
#menu h1 a { color: ' . $colors[$_GET['server']] . ' }
#content { margin-left: 22em }
#breadcrumb { left: 22em }
</style>';
}
}
function adminer_object()
{
// required to run any plugin
include_once __DIR__ . "/plugins/plugin.php";
// autoloader
foreach (glob("plugins/*.php") as $filename) {
include_once "./$filename";
}
$plugins = array(
// specify enabled plugins here
new AdminerTablesFilter,
new AdminerColors,
);
return new AdminerPlugin($plugins);
}
// include original Adminer or Adminer Editor
include __DIR__ . "/adminer.php";
@lm
Copy link
Author

lm commented Nov 10, 2013

adminer colors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment