250 |
kaklik |
1 |
<?php |
|
|
2 |
/* $Id: server_links.inc.php,v 1.1 2005/11/24 08:29:44 nijel Exp $ */ |
|
|
3 |
// vim: expandtab sw=4 ts=4 sts=4: |
|
|
4 |
|
|
|
5 |
// Check parameters |
|
|
6 |
|
|
|
7 |
require_once('./libraries/common.lib.php'); |
|
|
8 |
require_once('./libraries/server_common.inc.php'); |
|
|
9 |
|
|
|
10 |
PMA_checkParameters(array('is_superuser', 'url_query'), TRUE, FALSE); |
|
|
11 |
|
|
|
12 |
/** |
|
|
13 |
* Counts amount of navigation tabs |
|
|
14 |
*/ |
|
|
15 |
$server_links_count_tabs = 0; |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
/** |
|
|
19 |
* Put something in $sub_part |
|
|
20 |
*/ |
|
|
21 |
if (!isset($sub_part)) { |
|
|
22 |
$sub_part = ''; |
|
|
23 |
} |
|
|
24 |
|
|
|
25 |
|
|
|
26 |
/** |
|
|
27 |
* Displays tab links |
|
|
28 |
*/ |
|
|
29 |
$tabs = array(); |
|
|
30 |
|
|
|
31 |
$tabs['databases']['icon'] = 's_db.png'; |
|
|
32 |
$tabs['databases']['link'] = 'server_databases.php'; |
|
|
33 |
$tabs['databases']['text'] = $strDatabases; |
|
|
34 |
|
|
|
35 |
$tabs['sql']['icon'] = 'b_sql.png'; |
|
|
36 |
$tabs['sql']['link'] = 'server_sql.php'; |
|
|
37 |
$tabs['sql']['text'] = $strSQL; |
|
|
38 |
|
|
|
39 |
$tabs['status']['icon'] = 's_status.png'; |
|
|
40 |
$tabs['status']['link'] = 'server_status.php'; |
|
|
41 |
$tabs['status']['text'] = $strStatus; |
|
|
42 |
|
|
|
43 |
$tabs['vars']['icon'] = 's_vars.png'; |
|
|
44 |
$tabs['vars']['link'] = 'server_variables.php'; |
|
|
45 |
$tabs['vars']['text'] = $strServerTabVariables; |
|
|
46 |
|
|
|
47 |
if (PMA_MYSQL_INT_VERSION >= 40100) { |
|
|
48 |
$tabs['charset']['icon'] = 's_asci.png'; |
|
|
49 |
$tabs['charset']['link'] = 'server_collations.php'; |
|
|
50 |
$tabs['charset']['text'] = $strCharsets; |
|
|
51 |
} |
|
|
52 |
|
|
|
53 |
$tabs['engine']['icon'] = 'b_engine.png'; |
|
|
54 |
$tabs['engine']['link'] = 'server_engines.php'; |
|
|
55 |
$tabs['engine']['text'] = $strEngines; |
|
|
56 |
|
|
|
57 |
if ($is_superuser) { |
|
|
58 |
$tabs['rights']['icon'] = 's_rights.png'; |
|
|
59 |
$tabs['rights']['link'] = 'server_privileges.php'; |
|
|
60 |
$tabs['rights']['text'] = $strPrivileges; |
|
|
61 |
} |
|
|
62 |
if ($has_binlogs) { |
|
|
63 |
$tabs['binlog']['icon'] = 's_tbl.png'; |
|
|
64 |
$tabs['binlog']['link'] = 'server_binlog.php'; |
|
|
65 |
$tabs['binlog']['text'] = $strBinaryLog; |
|
|
66 |
} |
|
|
67 |
$tabs['process']['icon'] = 's_process.png'; |
|
|
68 |
$tabs['process']['link'] = 'server_processlist.php'; |
|
|
69 |
$tabs['process']['text'] = $strServerTabProcesslist; |
|
|
70 |
|
|
|
71 |
$tabs['export']['icon'] = 'b_export.png'; |
|
|
72 |
$tabs['export']['link'] = 'server_export.php'; |
|
|
73 |
$tabs['export']['text'] = $strExport; |
|
|
74 |
|
|
|
75 |
$tabs['import']['icon'] = 'b_import.png'; |
|
|
76 |
$tabs['import']['link'] = 'server_import.php'; |
|
|
77 |
$tabs['import']['text'] = $strImport; |
|
|
78 |
|
|
|
79 |
echo PMA_getTabs( $tabs ); |
|
|
80 |
unset( $tabs ); |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
/** |
|
|
84 |
* Displays a message |
|
|
85 |
*/ |
|
|
86 |
if (!empty($message)) { |
|
|
87 |
PMA_showMessage($message); |
|
|
88 |
unset($message); |
|
|
89 |
} |
|
|
90 |
|
|
|
91 |
?> |
|
|
92 |
<br /> |