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_general.lib.php';
17 require_once './libraries/rte/rte_words.lib.php';
18 require_once './libraries/rte/rte_export.lib.php';
19 require_once './libraries/rte/rte_list.lib.php';
20 require_once './libraries/rte/rte_footer.lib.php';
22 if ($GLOBALS['is_ajax_request'] != true) {
24 * Displays the header and tabs
26 if (! empty($table) && in_array($table, $GLOBALS['dbi']->getTables($db))) {
27 include_once './libraries/tbl_common.inc.php';
30 include_once './libraries/db_common.inc.php';
31 include_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
39 if (/*overload*/mb_strlen($db)) {
40 $GLOBALS['dbi']->selectDb($db);
41 if (! isset($url_query)) {
42 $url_query = PMA_URL_getCommon(
44 'db' => $db, 'table' => $table
52 * Generate the conditional classes that will
53 * be used to attach jQuery events to links
56 'add' => 'class="ajax add_anchor"',
57 'edit' => 'class="ajax edit_anchor"',
58 'exec' => 'class="ajax exec_anchor"',
59 'drop' => 'class="ajax drop_anchor"',
60 'export' => 'class="ajax export_anchor"'
64 * Create labels for the list
66 $titles = PMA_Util
::buildActionTitles();
69 * Keep a list of errors that occurred while
70 * processing an 'Add' or 'Edit' operation.
76 * Call the appropriate main function
81 if (isset($_REQUEST['type'])) {
82 $type = $_REQUEST['type'];