2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Common code for Routines, Triggers and Events.
8 if (! defined('PHPMYADMIN')) {
13 * Include all other files that are common
14 * to routines, triggers and events.
16 require_once './libraries/rte/rte_words.lib.php';
17 require_once './libraries/rte/rte_export.lib.php';
18 require_once './libraries/rte/rte_list.lib.php';
19 require_once './libraries/rte/rte_footer.lib.php';
21 if ($GLOBALS['is_ajax_request'] != true) {
23 * Displays the header and tabs
25 if (! empty($table) && in_array($table, PMA_DBI_get_tables($db))) {
26 require_once './libraries/tbl_common.php';
27 require_once './libraries/tbl_links.inc.php';
30 require_once './libraries/db_common.inc.php';
31 require_once './libraries/db_info.inc.php';
35 * Since we did not include some libraries, we need
36 * to manually select the required database and
37 * create the missing $url_query variable
40 PMA_DBI_select_db($db);
41 if (! isset($url_query)) {
42 $url_query = PMA_generate_common_url($db, $table);
48 * Generate the conditional classes that will
49 * be used to attach jQuery events to links
51 $ajax_class = array('add' => '',
56 if ($GLOBALS['cfg']['AjaxEnable']) {
57 $ajax_class = array('add' => 'class="ajax_add_anchor"',
58 'edit' => 'class="ajax_edit_anchor"',
59 'exec' => 'class="ajax_exec_anchor"',
60 'drop' => 'class="ajax_drop_anchor"',
61 'export' => 'class="ajax_export_anchor"');
65 * Create labels for the list
67 $titles = PMA_buildActionTitles();
70 * Keep a list of errors that occured while
71 * processing an 'Add' or 'Edit' operation.
77 * Call the appropriate main function
92 * Display the footer, if necessary
94 if ($GLOBALS['is_ajax_request'] != true) {
95 require './libraries/footer.inc.php';