PageRenderTime 54ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/phpmyadmin/libraries/server_common.inc.php

https://bitbucket.org/adarshj/convenient_website
PHP | 56 lines | 19 code | 8 blank | 29 comment | 4 complexity | 50aed82f14f8c9816b4425aed718cf55 MD5 | raw file
Possible License(s): Apache-2.0, MPL-2.0-no-copyleft-exception, LGPL-2.1, BSD-2-Clause, GPL-2.0, LGPL-3.0
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * @package PhpMyAdmin
  5. */
  6. if (! defined('PHPMYADMIN')) {
  7. exit;
  8. }
  9. /**
  10. * Gets some core libraries
  11. */
  12. require_once './libraries/common.inc.php';
  13. /**
  14. * Handles some variables that may have been sent by the calling script
  15. * Note: this can be called also from the db panel to get the privileges of
  16. * a db, in which case we want to keep displaying the tabs of
  17. * the Database panel
  18. */
  19. if (empty($viewing_mode)) {
  20. $db = $table = '';
  21. }
  22. /**
  23. * Set parameters for links
  24. */
  25. $url_query = PMA_generate_common_url($db);
  26. /**
  27. * Defines the urls to return to in case of error in a sql statement
  28. */
  29. $err_url = 'main.php' . $url_query;
  30. /**
  31. * Displays the headers
  32. */
  33. require_once './libraries/header.inc.php';
  34. /**
  35. * @global boolean Checks for superuser privileges
  36. */
  37. $is_superuser = PMA_isSuperuser();
  38. // now, select the mysql db
  39. if ($is_superuser && !PMA_DRIZZLE) {
  40. PMA_DBI_select_db('mysql', $userlink);
  41. }
  42. /**
  43. * @global array binary log files
  44. */
  45. $binary_logs = PMA_DRIZZLE
  46. ? null
  47. : PMA_DBI_fetch_result('SHOW MASTER LOGS', 'Log_name', null, null, PMA_DBI_QUERY_STORE);
  48. ?>