tbl_common.inc.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Common includes for the table level views
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. if (! defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. /**
  12. * Gets some core libraries
  13. */
  14. require_once './libraries/bookmark.lib.php';
  15. // Check parameters
  16. PMA_Util::checkParameters(array('db', 'table'));
  17. $db_is_information_schema = PMA_is_system_schema($db);
  18. /**
  19. * Set parameters for links
  20. * @deprecated
  21. */
  22. $url_query = PMA_generate_common_url($db, $table);
  23. /**
  24. * Set parameters for links
  25. */
  26. $url_params = array();
  27. $url_params['db'] = $db;
  28. $url_params['table'] = $table;
  29. /**
  30. * Defines the urls to return to in case of error in a sql statement
  31. */
  32. $err_url_0 = $cfg['DefaultTabDatabase']
  33. . PMA_generate_common_url(array('db' => $db,));
  34. $err_url = $cfg['DefaultTabTable'] . PMA_generate_common_url($url_params);
  35. /**
  36. * Ensures the database and the table exist (else move to the "parent" script)
  37. */
  38. require_once './libraries/db_table_exists.lib.php';
  39. if (PMA_Tracker::isActive()
  40. && PMA_Tracker::isTracked($GLOBALS["db"], $GLOBALS["table"])
  41. && ! isset($_REQUEST['submit_deactivate_now'])
  42. ) {
  43. $temp_msg = '<a href="tbl_tracking.php?' . $url_query . '">';
  44. $temp_msg .= sprintf(
  45. __('Tracking of %s is activated.'),
  46. htmlspecialchars($GLOBALS["db"] . '.' . $GLOBALS["table"])
  47. );
  48. $temp_msg .= '</a>';
  49. $msg = PMA_Message::notice($temp_msg);
  50. $msg->display();
  51. }
  52. ?>