2 /* vim: set expandtab sw=4 ts=4 sts=4: */
8 declare(strict_types
=1);
10 use PhpMyAdmin\Controllers\Database\EventsController
;
11 use PhpMyAdmin\DatabaseInterface
;
12 use PhpMyAdmin\Di\Container
;
13 use PhpMyAdmin\Response
;
17 if (! defined('ROOT_PATH')) {
18 define('ROOT_PATH', __DIR__
. DIRECTORY_SEPARATOR
);
21 require_once ROOT_PATH
. 'libraries/common.inc.php';
23 $container = Container
::getDefaultContainer();
24 $container->set(Response
::class, Response
::getInstance());
26 /** @var Response $response */
27 $response = $container->get(Response
::class);
29 /** @var DatabaseInterface $dbi */
30 $dbi = $container->get(DatabaseInterface
::class);
34 $controller = new EventsController(
40 if (! $response->isAjax()) {
42 * Displays the header and tabs
44 if (! empty($table) && in_array($table, $dbi->getTables($db))) {
45 include_once ROOT_PATH
. 'libraries/tbl_common.inc.php';
48 include_once ROOT_PATH
. 'libraries/db_common.inc.php';
60 ) = Util
::getDbInfo($db, isset($sub_part) ?
$sub_part : '');
64 * Since we did not include some libraries, we need
65 * to manually select the required database and
66 * create the missing $url_query variable
68 if (strlen($db) > 0) {
70 if (! isset($url_query)) {
71 $url_query = Url
::getCommon(