PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/phpmyadmin/libraries/server_links.inc.php

https://bitbucket.org/adarshj/convenient_website
PHP | 124 lines | 74 code | 25 blank | 25 comment | 11 complexity | 4eb6369aed7ef5933224f560be248ed4 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. *
  5. * @package PhpMyAdmin
  6. */
  7. if (! defined('PHPMYADMIN')) {
  8. exit;
  9. }
  10. /**
  11. * Check parameters
  12. */
  13. require_once './libraries/common.inc.php';
  14. require_once './libraries/server_common.inc.php';
  15. PMA_checkParameters(array('is_superuser', 'url_query'), true, false);
  16. // Don't print all these links if in an Ajax request
  17. if (!$GLOBALS['is_ajax_request']) {
  18. /**
  19. * Counts amount of navigation tabs
  20. */
  21. $server_links_count_tabs = 0;
  22. /**
  23. * Put something in $sub_part
  24. */
  25. if (! isset($sub_part)) {
  26. $sub_part = '';
  27. }
  28. /**
  29. * Displays tab links
  30. * Put the links we assume are used less, towards the end
  31. */
  32. $tabs = array();
  33. $tabs['databases']['icon'] = 's_db.png';
  34. $tabs['databases']['link'] = 'server_databases.php';
  35. $tabs['databases']['text'] = __('Databases');
  36. $tabs['sql']['icon'] = 'b_sql.png';
  37. $tabs['sql']['link'] = 'server_sql.php';
  38. $tabs['sql']['text'] = __('SQL');
  39. $tabs['status']['icon'] = 's_status.png';
  40. $tabs['status']['link'] = 'server_status.php';
  41. $tabs['status']['text'] = __('Status');
  42. /*$tabs['process']['icon'] = 's_process.png';
  43. $tabs['process']['link'] = 'server_processlist.php';
  44. $tabs['process']['text'] = __('Processes');*/
  45. if ($is_superuser && !PMA_DRIZZLE) {
  46. $tabs['rights']['icon'] = 's_rights.png';
  47. $tabs['rights']['link'] = 'server_privileges.php';
  48. $tabs['rights']['text'] = __('Users');
  49. }
  50. $tabs['export']['icon'] = 'b_export.png';
  51. $tabs['export']['link'] = 'server_export.php';
  52. $tabs['export']['text'] = __('Export');
  53. $tabs['import']['icon'] = 'b_import.png';
  54. $tabs['import']['link'] = 'server_import.php';
  55. $tabs['import']['text'] = __('Import');
  56. $tabs['settings']['icon'] = 'b_tblops.png';
  57. $tabs['settings']['link'] = 'prefs_manage.php';
  58. $tabs['settings']['text'] = __('Settings');
  59. $tabs['settings']['active'] = in_array(basename($GLOBALS['PMA_PHP_SELF']),
  60. array('prefs_forms.php', 'prefs_manage.php'));
  61. $tabs['synchronize']['icon'] = 's_sync.png';
  62. $tabs['synchronize']['link'] = 'server_synchronize.php';
  63. $tabs['synchronize']['text'] = __('Synchronize');
  64. if (! empty($binary_logs)) {
  65. $tabs['binlog']['icon'] = 's_tbl.png';
  66. $tabs['binlog']['link'] = 'server_binlog.php';
  67. $tabs['binlog']['text'] = __('Binary log');
  68. }
  69. if ($is_superuser && !PMA_DRIZZLE) {
  70. $tabs['replication']['icon'] = 's_replication.png';
  71. $tabs['replication']['link'] = 'server_replication.php';
  72. $tabs['replication']['text'] = __('Replication');
  73. }
  74. $tabs['vars']['icon'] = 's_vars.png';
  75. $tabs['vars']['link'] = 'server_variables.php';
  76. $tabs['vars']['text'] = __('Variables');
  77. $tabs['charset']['icon'] = 's_asci.png';
  78. $tabs['charset']['link'] = 'server_collations.php';
  79. $tabs['charset']['text'] = __('Charsets');
  80. if (PMA_DRIZZLE) {
  81. $tabs['plugins']['icon'] = 'b_engine.png';
  82. $tabs['plugins']['link'] = 'server_plugins.php';
  83. $tabs['plugins']['text'] = __('Plugins');
  84. } else {
  85. $tabs['engine']['icon'] = 'b_engine.png';
  86. $tabs['engine']['link'] = 'server_engines.php';
  87. $tabs['engine']['text'] = __('Engines');
  88. }
  89. echo PMA_generate_html_tabs($tabs, array());
  90. unset($tabs);
  91. /**
  92. * Displays a message
  93. */
  94. if (!empty($message)) {
  95. PMA_showMessage($message);
  96. unset($message);
  97. }
  98. }// end if ($GLOBALS['is_ajax_request'] == true)
  99. ?>