Subversion Repositories personal-webbase

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 daniel-mar 1
<?php
2
 
3
global $WB_BAK_SESSION;
4
if (!isset($WB_BAK_SESSION)) die('WebBase-Session fehlt!');
5
 
6
global $WBConfig;
7
if (!isset($WBConfig)) die('WebBase-Konfiguration fehlt!');
8
 
9
// TODO: Config minimieren und an PMA 3 Neuerungen anpassen
10
 
11
/**
12
 * phpMyAdmin default configuration, you can copy values from here to your
13
 * config.inc.php
14
 *
15
 * All directives are explained in Documentation.html
16
 */
17
 
18
/**
19
 * Your phpMyAdmin URL.
20
 *
21
 * Complete the variable below with the full url ie
22
 *    http://www.your_web.net/path_to_your_phpMyAdmin_directory/
23
 *
24
 * It must contain characters that are valid for a URL, and the path is
25
 * case sensitive on some Web servers, for example Unix-based servers.
26
 *
27
 * In most cases you can leave this variable empty, as the correct value
28
 * will be detected automatically. However, we recommend that you do
29
 * test to see that the auto-detection code works in your system. A good
30
 * test is to browse a table, then edit a row and save it.  There will be
31
 * an error message if phpMyAdmin cannot auto-detect the correct value.
32
 */
33
 
34
/* $x = $_SERVER['PHP_SELF'];
35
 
36
$ary = explode('/', $x);
37
$y = end($ary);
38
 
39
if (array_key_exists("HTTPS", $_SERVER) && $_SERVER("HTTPS") == 'on')
40
  $protokoll = 'https';
41
else
42
  $protokoll = 'http';
43
 
44
$cfg['PmaAbsoluteUri'] = $protokoll.'://'.$_SERVER['HTTP_HOST'].substr($x, 0, strlen($x)-strlen($y)); */
45
 
46
$cfg['PmaAbsoluteUri'] = '';
47
 
48
/**
49
 * Disable the default warning that is displayed on the DB Details Structure page if
50
 * any of the required Tables for the relationfeatures could not be found
51
 */
52
$cfg['PmaNoRelation_DisableWarning']  = TRUE;
53
 
54
/**
55
 * The 'cookie' auth_type uses blowfish algorithm to encrypt the password. If
56
 * at least one server configuration uses 'cookie' auth_type, enter here a
57
 * passphrase that will be used by blowfish. The maximum length seems to be 46
58
 * characters.
59
 */
60
$cfg['blowfish_secret'] = md5($WBConfig->getMySQLPassword());
61
 
62
/**
63
 * Server(s) configuration
64
 */
65
 
66
$c = @mysql_connect($WBConfig->getMySQLServer(), $WBConfig->getMySQLUsername(), $WBConfig->getMySQLPassword());
67
@mysql_select_db($WBConfig->getMySQLDatabase(), $c);
68
 
69
if ($WB_BAK_SESSION['wb_user_type'] == '2')
70
{
71
 
72
$res = @mysql_query("SELECT `wert` FROM `".$WBConfig->getMySQLPrefix()."config` WHERE `name` = 'admin_pwd' AND `modul` = 'main_administration'");
73
$row = @mysql_fetch_array($res);
74
 
75
if (md5($WB_BAK_SESSION['wb_user_password']) == $row['wert'])
76
{
77
 
78
// Wird genutzt für Modul admin_datenbanken
79
$i = 1;
80
$first_id = $i;
81
 
82
$cfg['Servers'][$i]['host']          = $WBConfig->getMySQLServer(); // MySQL hostname or IP address
83
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
84
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
85
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
86
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
87
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
88
                                                    // (requires PHP >= 4.3.0)
89
$cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings
90
                                                    // (this user must have read-only
91
$cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
92
                                                    // and "mysql/db" tables).
93
                                                    // The controluser is also
94
                                                    // used for all relational
95
                                                    // features (pmadb)
96
$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
97
$cfg['Servers'][$i]['user']          = $WBConfig->getMySQLUsername();      // MySQL user
98
$cfg['Servers'][$i]['password']      = $WBConfig->getMySQLPassword();          // MySQL password (only needed
99
                                                    // with 'config' auth_type)
100
$cfg['Servers'][$i]['only_db']       = $WBConfig->getMySQLDatabase();          // If set to a db-name, only
101
                                                    // this db is displayed in left frame
102
                                                    // It may also be an array of db-names, where sorting order is relevant.
103
$cfg['Servers'][$i]['hide_db']       = '';          // Database name to be hidden from listings
104
$cfg['Servers'][$i]['verbose']       = '';          // Verbose name for this host - leave blank to show the hostname
105
 
106
$cfg['Servers'][$i]['pmadb']         = '';          // Database used for Relation, Bookmark and PDF Features
107
                                                    // (see scripts/create_tables.sql)
108
                                                    //   - leave blank for no support
109
                                                    //     DEFAULT: 'phpmyadmin'
110
$cfg['Servers'][$i]['bookmarktable'] = '';          // Bookmark table
111
                                                    //   - leave blank for no bookmark support
112
                                                    //     DEFAULT: 'pma_bookmark'
113
$cfg['Servers'][$i]['relation']      = '';          // table to describe the relation between links (see doc)
114
                                                    //   - leave blank for no relation-links support
115
                                                    //     DEFAULT: 'pma_relation'
116
$cfg['Servers'][$i]['table_info']    = '';          // table to describe the display fields
117
                                                    //   - leave blank for no display fields support
118
                                                    //     DEFAULT: 'pma_table_info'
119
$cfg['Servers'][$i]['table_coords']  = '';          // table to describe the tables position for the PDF schema
120
                                                    //   - leave blank for no PDF schema support
121
                                                    //     DEFAULT: 'pma_table_coords'
122
$cfg['Servers'][$i]['pdf_pages']     = '';          // table to describe pages of relationpdf
123
                                                    //   - leave blank if you don't want to use this
124
                                                    //     DEFAULT: 'pma_pdf_pages'
125
$cfg['Servers'][$i]['column_info']   = '';          // table to store column information
126
                                                    //   - leave blank for no column comments/mime types
127
                                                    //     DEFAULT: 'pma_column_info'
128
$cfg['Servers'][$i]['history']       = '';          // table to store SQL history
129
                                                    //   - leave blank for no SQL query history
130
                                                    //     DEFAULT: 'pma_history'
131
$cfg['Servers'][$i]['verbose_check'] = TRUE;        // set to FALSE if you know that your pma_* tables
132
                                                    // are up to date. This prevents compatibility
133
                                                    // checks and thereby increases performance.
134
$cfg['Servers'][$i]['AllowRoot']     = TRUE;        // whether to allow root login
135
$cfg['Servers'][$i]['AllowDeny']['order']           // Host authentication order, leave blank to not use
136
                                     = '';
137
$cfg['Servers'][$i]['AllowDeny']['rules']           // Host authentication rules, leave blank for defaults
138
                                     = array();
139
 
140
}
141
 
142
}
143
else if (($WB_BAK_SESSION['wb_user_type'] == '0') || ($WB_BAK_SESSION['wb_user_type'] == '1'))
144
{
145
 
146
if ($WB_BAK_SESSION['wb_user_type'] == '0')
147
{
148
  $res = @mysql_query("SELECT `wert` FROM `".$WBConfig->getMySQLPrefix()."config` WHERE `name` = 'gast_username'");
149
  $row = @mysql_fetch_array($res);
150
  $usnm = $row['wert'];
151
}
152
else if ($WB_BAK_SESSION['wb_user_type'] == '1')
153
{
154
  $usnm = $WB_BAK_SESSION['wb_user_username'];
155
}
156
 
157
$res = @mysql_query("SELECT `id` FROM `".$WBConfig->getMySQLPrefix()."users` WHERE `username` = '".mysql_real_escape_string($usnm)."'");
158
$row = @mysql_fetch_array($res);
159
$usid = $row['id'];
160
 
161
$first_id = 0;
162
$qok = false;
163
 
164
$res2 = @mysql_query("SELECT `id`, `server`, `username`, `password`, `onlydb` FROM `".$WBConfig->getMySQLPrefix()."phpmyadmin` WHERE `user_cnid` = '".mysql_real_escape_string($usid)."'");
165
while ($row2 = @mysql_fetch_array($res2))
166
{
167
// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use
168
// $cfg['Servers'][0]. You can disable a server config entry by setting host
169
// to ''. If you want more than one server, just copy following section
170
// (including $i incrementation) serveral times. There is no need to define
171
// full server array, just define values you need to change.
172
 
173
$qok = true;
174
$i = $row2['id'];
175
if ($first_id == 0) $first_id = $i;
176
 
177
$cfg['Servers'][$i]['host']          = $row2['server']; // MySQL hostname or IP address
178
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
179
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
180
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
181
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
182
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
183
                                                    // (requires PHP >= 4.3.0)
184
$cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings
185
                                                    // (this user must have read-only
186
$cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
187
                                                    // and "mysql/db" tables).
188
                                                    // The controluser is also
189
                                                    // used for all relational
190
                                                    // features (pmadb)
191
$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
192
$cfg['Servers'][$i]['user']          = $row2['username'];      // MySQL user
193
$cfg['Servers'][$i]['password']      = $row2['password'];          // MySQL password (only needed
194
                                                    // with 'config' auth_type)
195
$cfg['Servers'][$i]['only_db']       = $row2['onlydb'];          // If set to a db-name, only
196
                                                    // this db is displayed in left frame
197
                                                    // It may also be an array of db-names, where sorting order is relevant.
198
$cfg['Servers'][$i]['hide_db']       = '';          // Database name to be hidden from listings
199
$cfg['Servers'][$i]['verbose']       = '';          // Verbose name for this host - leave blank to show the hostname
200
 
201
$cfg['Servers'][$i]['pmadb']         = '';          // Database used for Relation, Bookmark and PDF Features
202
                                                    // (see scripts/create_tables.sql)
203
                                                    //   - leave blank for no support
204
                                                    //     DEFAULT: 'phpmyadmin'
205
$cfg['Servers'][$i]['bookmarktable'] = '';          // Bookmark table
206
                                                    //   - leave blank for no bookmark support
207
                                                    //     DEFAULT: 'pma_bookmark'
208
$cfg['Servers'][$i]['relation']      = '';          // table to describe the relation between links (see doc)
209
                                                    //   - leave blank for no relation-links support
210
                                                    //     DEFAULT: 'pma_relation'
211
$cfg['Servers'][$i]['table_info']    = '';          // table to describe the display fields
212
                                                    //   - leave blank for no display fields support
213
                                                    //     DEFAULT: 'pma_table_info'
214
$cfg['Servers'][$i]['table_coords']  = '';          // table to describe the tables position for the PDF schema
215
                                                    //   - leave blank for no PDF schema support
216
                                                    //     DEFAULT: 'pma_table_coords'
217
$cfg['Servers'][$i]['pdf_pages']     = '';          // table to describe pages of relationpdf
218
                                                    //   - leave blank if you don't want to use this
219
                                                    //     DEFAULT: 'pma_pdf_pages'
220
$cfg['Servers'][$i]['column_info']   = '';          // table to store column information
221
                                                    //   - leave blank for no column comments/mime types
222
                                                    //     DEFAULT: 'pma_column_info'
223
$cfg['Servers'][$i]['history']       = '';          // table to store SQL history
224
                                                    //   - leave blank for no SQL query history
225
                                                    //     DEFAULT: 'pma_history'
226
$cfg['Servers'][$i]['verbose_check'] = TRUE;        // set to FALSE if you know that your pma_* tables
227
                                                    // are up to date. This prevents compatibility
228
                                                    // checks and thereby increases performance.
229
$cfg['Servers'][$i]['AllowRoot']     = TRUE;        // whether to allow root login
230
$cfg['Servers'][$i]['AllowDeny']['order']           // Host authentication order, leave blank to not use
231
                                     = '';
232
$cfg['Servers'][$i]['AllowDeny']['rules']           // Host authentication rules, leave blank for defaults
233
                                     = array();
234
}
235
 
236
if (!$qok) die();
237
 
238
}
239
 
240
@mysql_close($c);
241
 
242
// If you have more than one server configured, you can set $cfg['ServerDefault']
243
// to any one of them to autoconnect to that server when phpMyAdmin is started,
244
// or set it to 0 to be given a list of servers without logging in
245
// If you have only one server configured, $cfg['ServerDefault'] *MUST* be
246
// set to that server.
247
$cfg['ServerDefault'] = $first_id;              // Default server (0 = no default server)
248
 
249
/**
250
 * Other core phpMyAdmin settings
251
 */
252
$cfg['OBGzip']                  = 'auto'; // use GZIP output buffering if possible (TRUE|FALSE|'auto')
253
$cfg['PersistentConnections']   = FALSE;  // use persistent connections to MySQL database
254
$cfg['ForceSSL']                = $WBConfig->getForceSSLFlag();  // whether to force using https
255
$cfg['ExecTimeLimit']           = 300;    // maximum execution time in seconds (0 for no limit)
256
$cfg['MemoryLimit']             = 0;      // maximum allocated bytes (0 for no limit)
257
$cfg['SkipLockedTables']        = FALSE;  // mark used tables, make possible to show
258
                                          // locked tables (since MySQL 3.23.30)
259
$cfg['ShowSQL']                 = TRUE;   // show SQL queries as run
260
$cfg['AllowUserDropDatabase']   = FALSE;  // show a 'Drop database' link to normal users
261
$cfg['Confirm']                 = TRUE;   // confirm 'DROP TABLE' & 'DROP DATABASE'
262
$cfg['LoginCookieRecall']       = TRUE;   // recall previous login in cookie auth. mode or not
263
$cfg['LoginCookieValidity']     = ini_get('session.gc_maxlifetime');   // validity of cookie login (in seconds)
264
$cfg['UseDbSearch']             = TRUE;   // whether to enable the "database search" feature
265
                                          // or not
266
$cfg['IgnoreMultiSubmitErrors'] = FALSE;  // if set to true, PMA continues computing multiple-statement queries
267
                                          // even if one of the queries failed
268
$cfg['VerboseMultiSubmit']      = TRUE;   // if set to true, PMA will show the affected rows of EACH statement on
269
                                          // multiple-statement queries. See the libraries/import.php file for
270
                                          // hardcoded defaults on how many queries a statement may contain!
271
$cfg['AllowArbitraryServer']    = FALSE;  // allow login to any user entered server in cookie based auth
272
 
273
// Left frame setup
274
$cfg['LeftFrameLight']        = TRUE;    // use a select-based menu and display only the
275
                                         // current tables in the left frame.
276
$cfg['LeftFrameDBTree']       = TRUE;    // turn the select-based light menu into a tree
277
$cfg['LeftFrameDBSeparator']  = '_';     // the separator to sub-tree the select-based light menu tree
278
$cfg['LeftFrameTableSeparator']= '__';   // Which string will be used to generate table prefixes
279
                                         // to split/nest tables into multiple categories
280
$cfg['LeftFrameTableLevel']   = '1';     // How many sublevels should be displayed when splitting
281
                                         // up tables by the above Separator
282
$cfg['ShowTooltip']           = TRUE;    // display table comment as tooltip in left frame
283
$cfg['ShowTooltipAliasDB']    = FALSE;   // if ShowToolTip is enabled, this defines that table/db comments
284
$cfg['ShowTooltipAliasTB']    = FALSE;   // are shown (in the left menu and db_details_structure) instead of
285
                                         // table/db names. Setting ShowTooltipAliasTB to 'nested' will only
286
                                         // use the Aliases for nested descriptors, not the table itself.
287
 
288
$cfg['LeftDisplayLogo']       = TRUE;   // display logo at top of left frame
289
$cfg['LeftDisplayServers']    = FALSE;  // display server choice at top of left frame
290
$cfg['DisplayServersList']    = FALSE;  // server choice as links
291
 
292
// In the main frame, at startup...
293
$cfg['ShowStats']             = TRUE;   // allow to display statistics and space usage in
294
                                        // the pages about database details and table
295
                                        // properties
296
$cfg['ShowPhpInfo']           = FALSE;  // information" and "change password" links for
297
$cfg['ShowChgPassword']       = FALSE;  // simple users or not
298
$cfg['SuggestDBName']         = TRUE;   // suggest a new DB name if possible (false = keep empty)
299
 
300
// In browse mode...
301
$cfg['ShowBlob']              = FALSE;  // display blob field contents
302
$cfg['NavigationBarIconic']   = 'both'; // Use icons instead of text for the navigation bar buttons
303
                                        // and on right panel top menu (server db table) (TRUE|FALSE|'both')
304
$cfg['ShowAll']               = FALSE;  // allows to display all the rows
305
$cfg['MaxRows']               = 30;     // maximum number of rows to display
306
$cfg['Order']                 = 'ASC';  // default for 'ORDER BY' clause (valid
307
                                        // values are 'ASC', 'DESC' or 'SMART' -ie
308
                                        // descending order for fields of type
309
                                        // TIME, DATE, DATETIME & TIMESTAMP,
310
                                        // ascending order else-)
311
 
312
// In edit mode...
313
$cfg['ProtectBinary']         = 'blob'; // disallow editing of binary fields
314
                                        // valid values are:
315
                                        //   FALSE  allow editing
316
                                        //   'blob' allow editing except for BLOB fields
317
                                        //   'all'  disallow editing
318
$cfg['ShowFunctionFields']    = TRUE;   // Display the function fields in edit/insert mode
319
$cfg['CharEditing']           = 'input';
320
                                        // Which editor should be used for CHAR/VARCHAR fields:
321
                                        //  input - allows limiting of input length
322
                                        //  textarea - allows newlines in fields
323
$cfg['InsertRows']            = 2;      // How many rows can be inserted at one time
324
 
325
$cfg['ForeignKeyDropdownOrder'] =       // Sort order for items in a foreign-key dropdown box.
326
    array( 'content-id', 'id-content'); // 'content' is the referenced data, 'id' is the key value.
327
$cfg['ForeignKeyMaxLimit'] = 100;       // A dropdown will be used if fewer items are present
328
 
329
 
330
// For the export features...
331
$cfg['ZipDump']               = TRUE;   // Allow the use of zip/gzip/bzip
332
$cfg['GZipDump']              = TRUE;   // compression for
333
$cfg['BZipDump']              = TRUE;   // dump files
334
$cfg['CompressOnFly']         = TRUE;   // Will compress gzip/bzip2 exports on
335
                                        // fly without need for much memory.
336
                                        // If you encounter problems with
337
                                        // created gzip/bzip2 files disable
338
                                        // this feature.
339
 
340
// Tabs display settings
341
$cfg['LightTabs']             = FALSE;  // use graphically less intense menu tabs
342
$cfg['PropertiesIconic']      = TRUE;   // Use icons instead of text for the table display of a database (TRUE|FALSE|'both')
343
$cfg['PropertiesNumColumns']  = 1;      // How many columns should be used for table display of a database?
344
                                        // (a value larger than 1 results in some information being hidden)
345
 
346
$cfg['DefaultTabServer']      = 'main.php';
347
                                   // Possible values:
348
                                   // 'main.php' = the welcome page
349
                                   // (recommended for multiuser setups)
350
                                   // 'server_databases.php' = list of databases
351
                                   // 'server_status.php' = runtime information
352
                                   // 'server_variables.php' = MySQL server variables
353
                                   // 'server_privileges.php' = user management
354
                                   // 'server_processlist.php' = process list
355
$cfg['DefaultTabDatabase']    = 'db_details_structure.php';
356
                                   // Possible values:
357
                                   // 'db_details_structure.php' = tables list
358
                                   // 'db_details.php' = sql form
359
                                   // 'db_search.php' = search query
360
                                   // 'db_operations.php' = operations on database
361
$cfg['DefaultTabTable']       = 'tbl_properties_structure.php';
362
                                   // Possible values:
363
                                   // 'tbl_properties_structure.php' = fields list
364
                                   // 'tbl_properties.php' = sql form
365
                                   // 'tbl_select.php' = select page
366
                                   // 'tbl_change.php' = insert row page
367
                                   // 'sql.php' = browse page
368
 
369
/**
370
 * Export defaults
371
 */
372
 
373
$cfg['Export']['format']                    = 'sql';  // sql/latex/excel/csv/xml/xls/htmlexcel/htmlword
374
$cfg['Export']['compression']               = 'none'; // none/zip/gzip/bzip2
375
 
376
$cfg['Export']['asfile']                    = FALSE;
377
$cfg['Export']['charset']                   = '';
378
$cfg['Export']['onserver']                  = FALSE;
379
$cfg['Export']['onserver_overwrite']        = FALSE;
380
$cfg['Export']['remember_file_template']    = TRUE;
381
$cfg['Export']['file_template_table']       = '__TABLE__';
382
$cfg['Export']['file_template_database']    = '__DB__';
383
$cfg['Export']['file_template_server']      = '__SERVER__';
384
 
385
$cfg['Export']['htmlexcel_columns']         = FALSE;
386
$cfg['Export']['htmlexcel_null']            = 'NULL';
387
 
388
$cfg['Export']['htmlword_structure']        = TRUE;
389
$cfg['Export']['htmlword_data']             = TRUE;
390
$cfg['Export']['htmlword_columns']          = FALSE;
391
$cfg['Export']['htmlword_null']             = 'NULL';
392
 
393
$cfg['Export']['xls_columns']               = FALSE;
394
$cfg['Export']['xls_null']                  = 'NULL';
395
 
396
$cfg['Export']['csv_columns']               = FALSE;
397
$cfg['Export']['csv_null']                  = 'NULL';
398
$cfg['Export']['csv_separator']             = ';';
399
$cfg['Export']['csv_enclosed']              = '&quot;';
400
$cfg['Export']['csv_escaped']               = '\\';
401
$cfg['Export']['csv_terminated']            = 'AUTO';
402
$cfg['Export']['excel_columns']             = FALSE;
403
$cfg['Export']['excel_null']                = 'NULL';
404
$cfg['Export']['excel_edition']             = 'win'; // win/mac
405
 
406
$cfg['Export']['latex_structure']           = TRUE;
407
$cfg['Export']['latex_data']                = TRUE;
408
$cfg['Export']['latex_columns']             = TRUE;
409
$cfg['Export']['latex_relation']            = TRUE;
410
$cfg['Export']['latex_comments']            = TRUE;
411
$cfg['Export']['latex_mime']                = TRUE;
412
$cfg['Export']['latex_null']                = '\textit{NULL}';
413
$cfg['Export']['latex_caption']             = TRUE;
414
$cfg['Export']['latex_data_label']          = 'tab:__TABLE__-data';
415
$cfg['Export']['latex_structure_label']     = 'tab:__TABLE__-structure';
416
 
417
$cfg['Export']['sql_structure']             = TRUE;
418
$cfg['Export']['sql_data']                  = TRUE;
419
$cfg['Export']['sql_compat']                = 'NONE';
420
$cfg['Export']['sql_disable_fk']            = FALSE;
421
$cfg['Export']['sql_use_transaction']       = FALSE;
422
$cfg['Export']['sql_drop_database']         = FALSE;
423
$cfg['Export']['sql_drop_table']            = FALSE;
424
$cfg['Export']['sql_if_not_exists']         = FALSE;
425
$cfg['Export']['sql_auto_increment']        = TRUE;
426
$cfg['Export']['sql_backquotes']            = TRUE;
427
$cfg['Export']['sql_dates']                 = FALSE;
428
$cfg['Export']['sql_relation']              = FALSE;
429
$cfg['Export']['sql_columns']               = TRUE;
430
$cfg['Export']['sql_delayed']               = FALSE;
431
$cfg['Export']['sql_ignore']                = FALSE;
432
$cfg['Export']['sql_hex_for_binary']        = TRUE;
433
$cfg['Export']['sql_type']                  = 'insert'; // insert/update/replace
434
$cfg['Export']['sql_extended']              = TRUE;
435
$cfg['Export']['sql_max_query_size']        = 50000;
436
$cfg['Export']['sql_comments']              = FALSE;
437
$cfg['Export']['sql_mime']                  = FALSE;
438
$cfg['Export']['sql_header_comment']        = ''; // \n is replaced by new line
439
 
440
$cfg['Export']['pdf_structure']             = FALSE;
441
$cfg['Export']['pdf_data']                  = TRUE;
442
$cfg['Export']['pdf_report_title']          = '';
443
 
444
/**
445
 * Import defaults
446
 */
447
$cfg['Import']['format'] = 'sql';
448
$cfg['Import']['allow_interrupt'] = TRUE;
449
$cfg['Import']['skip_queries'] = '0';
450
$cfg['Import']['csv_replace'] = FALSE;
451
$cfg['Import']['csv_terminated'] = ';';
452
$cfg['Import']['csv_enclosed'] = '"';
453
$cfg['Import']['csv_escaped'] = '\\';
454
$cfg['Import']['csv_new_line'] = 'auto';
455
$cfg['Import']['csv_columns'] = '';
456
$cfg['Import']['ldi_replace'] = FALSE;
457
$cfg['Import']['ldi_terminated'] = ';';
458
$cfg['Import']['ldi_enclosed'] = '"';
459
$cfg['Import']['ldi_escaped'] = '\\';
460
$cfg['Import']['ldi_new_line'] = 'auto';
461
$cfg['Import']['ldi_columns'] = '';
462
$cfg['Import']['ldi_local_option'] = 'auto'; // 'auto' for autodetection, TRUE or FALSE for forcing
463
 
464
 
465
/**
466
 * Link to the official MySQL documentation.
467
 * Be sure to include no trailing slash on the path.
468
 * See http://dev.mysql.com/doc/ for more information
469
 * about MySQL manuals and their types.
470
 */
471
$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman';
472
 
473
/**
474
 * Type of MySQL documentation:
475
 *   viewable   - "viewable online", current one used on MySQL website
476
 *   searchable - "Searchable, with user comments"
477
 *   chapters   - "HTML, one page per chapter"
478
 *   chapters_old - "HTML, one page per chapter", format used prior to MySQL 5.0 release
479
 *   big        - "HTML, all on one page"
480
 *   old        - old style used in phpMyAdmin 2.3.0 and sooner
481
 *   none       - do not show documentation links
482
 */
483
$cfg['MySQLManualType'] = 'viewable';
484
 
485
 
486
/**
487
 * PDF options
488
 */
489
$cfg['PDFPageSizes']        = array('A3', 'A4', 'A5', 'letter', 'legal');
490
$cfg['PDFDefaultPageSize']  = 'A4';
491
 
492
 
493
/**
494
 * Language and charset conversion settings
495
 */
496
// Default language to use, if not browser-defined or user-defined
497
$cfg['DefaultLang'] = 'de-utf-8';
498
 
499
// Default connection collation (used for MySQL >= 4.1)
500
$cfg['DefaultConnectionCollation'] = 'latin1_swedish_ci';
501
 
502
// Force: always use this language - must be defined in
503
//        libraries/select_lang.lib.php
504
// $cfg['Lang']     = 'de-iso-8859-1';
505
 
506
// Regullar expression to limit listed languages, eg. '^(cs|en)' for Czech and
507
// English only
508
$cfg['FilterLanguages'] = '';
509
 
510
// Default charset to use for recoding of MySQL queries, does not take
511
// any effect when charsets recoding is switched off by
512
// $cfg['AllowAnywhereRecoding'] or in language file
513
// (see $cfg['AvailableCharsets'] to possible choices, you can add your own)
514
$cfg['DefaultCharset'] = 'iso-8859-1';
515
 
516
// Allow charset recoding of MySQL queries, must be also enabled in language
517
// file to make harder using other language files than unicode.
518
// Default value is FALSE to avoid problems on servers without the iconv
519
// extension and where dl() is not supported
520
$cfg['AllowAnywhereRecoding'] = FALSE;
521
 
522
// You can select here which functions will be used for charset conversion.
523
// Possible values are:
524
//      auto   - automatically use available one (first is tested iconv, then
525
//               recode)
526
//      iconv  - use iconv or libiconv functions
527
//      recode - use recode_string function
528
$cfg['RecodingEngine'] = 'auto';
529
 
530
// Specify some parameters for iconv used in charset conversion. See iconv
531
// documentation for details:
532
// http://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html
533
$cfg['IconvExtraParams'] = '//TRANSLIT';
534
 
535
// Available charsets for MySQL conversion. currently contains all which could
536
// be found in lang/* files and few more.
537
// Charsets will be shown in same order as here listed, so if you frequently
538
// use some of these move them to the top.
539
$cfg['AvailableCharsets'] = array(
540
    'iso-8859-1',
541
    'iso-8859-2',
542
    'iso-8859-3',
543
    'iso-8859-4',
544
    'iso-8859-5',
545
    'iso-8859-6',
546
    'iso-8859-7',
547
    'iso-8859-8',
548
    'iso-8859-9',
549
    'iso-8859-10',
550
    'iso-8859-11',
551
    'iso-8859-12',
552
    'iso-8859-13',
553
    'iso-8859-14',
554
    'iso-8859-15',
555
    'windows-1250',
556
    'windows-1251',
557
    'windows-1252',
558
    'windows-1256',
559
    'windows-1257',
560
    'koi8-r',
561
    'big5',
562
    'gb2312',
563
    'utf-16',
564
    'utf-8',
565
    'utf-7',
566
    'x-user-defined',
567
    'euc-jp',
568
    'ks_c_5601-1987',
569
    'tis-620',
570
    'SHIFT_JIS'
571
);
572
 
573
/**
574
 * Customization & design
575
 *
576
 * The graphical settings are now located in themes/themename/layout.inc.php
577
 */
578
 
579
$cfg['LeftPointerEnable']   = TRUE;         // enable the left panel pointer
580
                                            // (used when LeftFrameLight is FALSE)
581
                                            // see also LeftPointerColor
582
                                            // in layout.inc.php
583
 
584
$cfg['BrowsePointerEnable'] = TRUE;        // enable the browse pointer
585
                                            // see also BrowsePointerColor
586
                                            // in layout.inc.php
587
 
588
$cfg['BrowseMarkerEnable'] = TRUE;         // enable the browse marker
589
                                            // see also BrowseMarkerColor
590
                                            // in layout.inc.php
591
 
592
$cfg['TextareaCols']        = 40;           // textarea size (columns) in edit mode
593
                                            // (this value will be emphasized (*2) for sql
594
                                            // query textareas and (*1.25) for query window)
595
$cfg['TextareaRows']        = 7;            // textarea size (rows) in edit mode
596
$cfg['LongtextDoubleTextarea'] = TRUE;      // double size of textarea size for longtext fields
597
$cfg['TextareaAutoSelect']  = TRUE;         // autoselect when clicking in the textarea of the querybox
598
$cfg['CharTextareaCols']    = 40;           // textarea size (columns) for CHAR/VARCHAR
599
$cfg['CharTextareaRows']    = 2;            // textarea size (rows) for CHAR/VARCHAR
600
$cfg['CtrlArrowsMoving']    = TRUE;         // Enable Ctrl+Arrows moving between fields when editing?
601
$cfg['LimitChars']          = 50;           // Max field data length in browse mode for all non-numeric fields
602
$cfg['ModifyDeleteAtLeft']  = TRUE;         // show edit/delete links on left side of browse
603
                                            // (or at the top with vertical browse)
604
$cfg['ModifyDeleteAtRight'] = FALSE;        // show edit/delete links on right side of browse
605
                                            // (or at the bottom with vertical browse)
606
$cfg['DefaultDisplay']      = 'horizontal'; // default display direction
607
                                            // (horizontal|vertical|horizontalflipped)
608
$cfg['DefaultPropDisplay']  = 'horizontal'; // default display direction for altering/
609
                                            // creating columns (tbl_properties)
610
                                            // (horizontal|vertical)
611
 
612
$cfg['HeaderFlipType']      = 'css';        // table-header rotation via faking or css? (css|fake)
613
                                            // NOTE: CSS only works in IE browsers!
614
$cfg['ShowBrowseComments']  = TRUE;         // shows stored relation-comments in 'browse' mode.
615
$cfg['ShowPropertyComments']= TRUE;         // shows stored relation-comments in 'table property' mode.
616
$cfg['RepeatCells']         = 100;          // repeat header names every X cells? (0 = deactivate)
617
 
618
$cfg['EditInWindow']        = TRUE;         // Set to TRUE if Edit link should open the query to edit in the query window (assuming Javascript is enabled), and to FALSE if we should edit in the right panel
619
$cfg['QueryWindowWidth']    = 550;          // Width of Query window
620
$cfg['QueryWindowHeight']   = 310;          // Height of Query window
621
$cfg['QueryHistoryDB']      = FALSE;         // Set to TRUE if you want DB-based query history.
622
                                            // If FALSE, this utilizes JS-routines to display
623
                                            // query history (lost by window close)
624
$cfg['QueryWindowDefTab']   = 'sql';        // which tab to display in the querywindow on startup
625
                                            // (sql|files|history|full)
626
$cfg['QueryHistoryMax']     = 25;           // When using DB-based query history, how many entries
627
                                            // should be kept?
628
$cfg['BrowseMIME']          = TRUE;         // Use MIME-Types (stored in column comments table) for
629
$cfg['MaxExactCount']       = 20000;        // When approximate count < this, PMA will get exact count for
630
                                            // table rows.
631
$cfg['WYSIWYG-PDF']         = TRUE;         // Utilize DHTML/JS capabilities to allow WYSIWYG editing of
632
                                            // the PDF page editor. Requires an IE6/Mozilla based browser.
633
 
634
$cfg['NaturalOrder']        = TRUE;         // Sort table and database in natural order
635
 
636
 
637
//-----------------------------------------------------------------------------
638
// custom-setup by mkkeck: 2004-05-04
639
//    some specials for new icons and scrollings
640
// FIXME:
641
// 2004-05-08 rabus: We need to rearrange these variables.
642
 
643
$cfg['ShowHttpHostTitle']   = TRUE;            // show HttpHost in browsers window title (true|false)?
644
$cfg['SetHttpHostTitle']    = '';              // if ShowHttpHostTitle=true, please set your host (server)
645
                                             // or an other string, wich should be shown in browsers window title.
646
                                             // If not set (or empty), the PMA will get your real Host-Adress.
647
 
648
$cfg['ErrorIconic']          = TRUE;    // show some icons for warning, error and information messages (true|false)?
649
$cfg['MainPageIconic']       = TRUE;    // show icons in list on main page and on menu tabs (true|false)?
650
$cfg['ReplaceHelpImg']       = TRUE;    // show help button instead of strDocu (true|false)?
651
 
652
// theme manager
653
$cfg['ThemePath']           = './themes';    // using themes manager please set up here the path to 'themes'
654
                                             // else leave empty
655
$cfg['ThemeManager']        = TRUE;          // if you want to use selectable themes and if ThemesPath not empty
656
                                             // set it to true, else set it to false (default is false);
657
$cfg['ThemeDefault']        = 'original';         // set up default theme, if ThemePath not empty
658
                                             // you can set up here an valid path to themes or 'original' for
659
                                             // the original pma-theme
660
$cfg['ThemePerServer']      = FALSE;         // allow diferent theme for each configured server
661
 
662
//-----------------------------------------------------------------------------
663
 
664
 
665
/**
666
 * Default queries
667
 * %d will be replaced by the database name.
668
 * %t will be replaced by the table name.
669
 * %f will be replaced by a list of field names.
670
 * (%t and %f only applies to DefaultQueryTable)
671
 */
672
$cfg['DefaultQueryTable']    = 'SELECT * FROM %t WHERE 1';
673
$cfg['DefaultQueryDatabase'] = '';
674
 
675
/**
676
 * SQL Query box settings
677
 * These are the links display in all of the SQL Query boxes
678
 */
679
$cfg['SQLQuery']['Edit']      = TRUE;       // Edit link to change a query
680
$cfg['SQLQuery']['Explain']   = TRUE;       // EXPLAIN on SELECT queries
681
$cfg['SQLQuery']['ShowAsPHP'] = TRUE;       // Wrap a query in PHP
682
$cfg['SQLQuery']['Validate']  = FALSE;      // Validate a query (see $cfg['SQLValidator'] as well)
683
$cfg['SQLQuery']['Refresh']   = TRUE;       // Refresh the results page
684
 
685
 
686
/**
687
 * Webserver upload/save/import directories
688
 */
689
$cfg['UploadDir']             = '';         // Directory for uploaded files that can be executed by
690
                                            // phpMyAdmin. For example './upload'. Leave empty for
691
                                            // no upload directory support. Use %u for username
692
                                            // inclusion.
693
$cfg['SaveDir']               = '';         // Directory where phpMyAdmin can save exported data on
694
                                            // server. For example './save'. Leave empty for no save
695
                                            // directory support. Use %u for username inclusion.
696
$cfg['docSQLDir']             = '';         // Directory for docSQL imports, phpMyAdmin can import
697
                                            // docSQL files from that directory. For example
698
                                            // './docSQL'. Leave empty for no docSQL import support.
699
$cfg['TempDir']               = '';         // Directory where phpMyAdmin can save temporary files.
700
                                            // This is needed for MS Excel export, see documentation
701
                                            // how to enable that.
702
 
703
 
704
/**
705
 * Misc. settings
706
 */
707
$cfg['GD2Available']          = 'auto';     // Is GD >= 2 available? Set to yes/no/auto. 'auto'
708
                                            // does autodetection, which is a bit expensive for
709
                                            // php < 4.3.0, but it is the only safe vay how to
710
                                            // determine GD version.
711
/**
712
 * SQL Parser Settings
713
 */
714
$cfg['SQP']['fmtType']      = 'html';       // Pretty-printing style to use on queries (html, text, none)
715
$cfg['SQP']['fmtInd']       = '1';          // Amount to indent each level (floats ok)
716
$cfg['SQP']['fmtIndUnit']   = 'em';         // Units for indenting each level (CSS Types - {em,px,pt})
717
// The graphical settings are now located in themes/themename/layout.inc.php
718
 
719
/**
720
 * If you wish to use the SQL Validator service, you should be
721
 * aware of the following:
722
 * All SQL statements are stored anonymously for statistical purposes.
723
 * Mimer SQL Validator, Copyright 2002 Upright Database Technology.
724
 * All rights reserved.
725
 */
726
$cfg['SQLValidator']['use']      = FALSE;   // Make the SQL Validator available
727
$cfg['SQLValidator']['username'] = '';      // If you have a custom username, specify it here (defaults to anonymous)
728
$cfg['SQLValidator']['password'] = '';      // Password for username
729
 
730
/**
731
 * Developers ONLY!
732
 * To use the following, please install the DBG extension from http://dd.cron.ru/dbg/
733
 */
734
$cfg['DBG']['enable'] = FALSE;              // Make the DBG stuff available
735
$cfg['DBG']['profile']['enable'] = FALSE;   // Produce profiling results of PHP
736
$cfg['DBG']['profile']['threshold'] = 0.5;  // Threshold of long running code to display
737
                                            // Anything below the threshold is not displayed
738
 
739
 
740
/**
741
 * MySQL settings
742
 */
743
// Column types;
744
// varchar, tinyint, text and date are listed first, based on estimated popularity
745
$cfg['ColumnTypes'] = array(
746
   'VARCHAR',
747
   'TINYINT',
748
   'TEXT',
749
   'DATE',
750
   'SMALLINT',
751
   'MEDIUMINT',
752
   'INT',
753
   'BIGINT',
754
   'FLOAT',
755
   'DOUBLE',
756
   'DECIMAL',
757
   'DATETIME',
758
   'TIMESTAMP',
759
   'TIME',
760
   'YEAR',
761
   'CHAR',
762
   'TINYBLOB',
763
   'TINYTEXT',
764
   'BLOB',
765
   'MEDIUMBLOB',
766
   'MEDIUMTEXT',
767
   'LONGBLOB',
768
   'LONGTEXT',
769
   'ENUM',
770
   'SET',
771
   'BOOL'
772
);
773
 
774
// Attributes
775
// Note: the "ON UPDATE CURRENT_TIMESTAMP" attribute is added dynamically
776
// for MySQL >= 4.1.2, in libraries/tbl_properties.inc.php
777
 
778
$cfg['AttributeTypes'] = array(
779
   '',
780
   'BINARY',
781
   'UNSIGNED',
782
   'UNSIGNED ZEROFILL'
783
);
784
 
785
// Available functions
786
if ($cfg['ShowFunctionFields']) {
787
    $cfg['Functions'] = array(
788
       'ASCII',
789
       'CHAR',
790
       'SOUNDEX',
791
       'LCASE',
792
       'UCASE',
793
       'NOW',
794
       'PASSWORD',
795
       'OLD_PASSWORD',
796
       'MD5',
797
       'SHA1',
798
       'ENCRYPT',
799
       'COMPRESS',
800
       'UNCOMPRESS',
801
       'RAND',
802
       'LAST_INSERT_ID',
803
       'COUNT',
804
       'AVG',
805
       'SUM',
806
       'CURDATE',
807
       'CURTIME',
808
       'FROM_DAYS',
809
       'FROM_UNIXTIME',
810
       'PERIOD_ADD',
811
       'PERIOD_DIFF',
812
       'TO_DAYS',
813
       'UNIX_TIMESTAMP',
814
       'USER',
815
       'WEEKDAY',
816
       'CONCAT'
817
    );
818
 
819
    // Which column types will be mapped to which Group?
820
    $cfg['RestrictColumnTypes'] = array(
821
       'VARCHAR'      => 'FUNC_CHAR',
822
       'TINYINT'      => 'FUNC_NUMBER',
823
       'TEXT'         => 'FUNC_CHAR',
824
       'DATE'         => 'FUNC_DATE',
825
       'SMALLINT'     => 'FUNC_NUMBER',
826
       'MEDIUMINT'    => 'FUNC_NUMBER',
827
       'INT'          => 'FUNC_NUMBER',
828
       'BIGINT'       => 'FUNC_NUMBER',
829
       'FLOAT'        => 'FUNC_NUMBER',
830
       'DOUBLE'       => 'FUNC_NUMBER',
831
       'DECIMAL'      => 'FUNC_NUMBER',
832
       'DATETIME'     => 'FUNC_DATE',
833
       'TIMESTAMP'    => 'FUNC_DATE',
834
       'TIME'         => 'FUNC_DATE',
835
       'YEAR'         => 'FUNC_DATE',
836
       'CHAR'         => 'FUNC_CHAR',
837
       'TINYBLOB'     => 'FUNC_CHAR',
838
       'TINYTEXT'     => 'FUNC_CHAR',
839
       'BLOB'         => 'FUNC_CHAR',
840
       'MEDIUMBLOB'   => 'FUNC_CHAR',
841
       'MEDIUMTEXT'   => 'FUNC_CHAR',
842
       'LONGBLOB'     => 'FUNC_CHAR',
843
       'LONGTEXT'     => 'FUNC_CHAR',
844
       'ENUM'         => '',
845
       'SET'          => ''
846
    );
847
 
848
    // Map above defined groups to any function
849
    $cfg['RestrictFunctions'] = array(
850
        'FUNC_CHAR'   => array(
851
            'ASCII',
852
            'CHAR',
853
            'SOUNDEX',
854
            'LCASE',
855
            'UCASE',
856
            'PASSWORD',
857
            'OLD_PASSWORD',
858
            'MD5',
859
            'SHA1',
860
            'ENCRYPT',
861
            'COMPRESS',
862
            'UNCOMPRESS',
863
            'LAST_INSERT_ID',
864
            'USER',
865
            'CONCAT'
866
        ),
867
 
868
        'FUNC_DATE'   => array(
869
            'NOW',
870
            'CURDATE',
871
            'CURTIME',
872
            'FROM_DAYS',
873
            'FROM_UNIXTIME',
874
            'PERIOD_ADD',
875
            'PERIOD_DIFF',
876
            'TO_DAYS',
877
            'UNIX_TIMESTAMP',
878
            'WEEKDAY'
879
        ),
880
 
881
        'FUNC_NUMBER' => array(
882
            'ASCII',
883
            'CHAR',
884
            'MD5',
885
            'SHA1',
886
            'ENCRYPT',
887
            'RAND',
888
            'LAST_INSERT_ID',
889
            'UNIX_TIMESTAMP',
890
            'COUNT',
891
            'AVG',
892
            'SUM'
893
        )
894
    );
895
 
896
    // Default functions for above defined groups
897
    $cfg['DefaultFunctions'] = array(
898
        'FUNC_CHAR'         => '',
899
        'FUNC_DATE'         => '',
900
        'FUNC_NUMBER'       => '',
901
        'first_timestamp'   => 'NOW'
902
    );
903
 
904
 
905
} // end if
906
 
907
// Search operators
908
$cfg['NumOperators'] = array(
909
   '=',
910
   '>',
911
   '>=',
912
   '<',
913
   '<=',
914
   '!=',
915
   'LIKE',
916
   'NOT LIKE'
917
);
918
 
919
$cfg['TextOperators'] = array(
920
   'LIKE',
921
   'LIKE %...%',
922
   'NOT LIKE',
923
   '=',
924
   '!=',
925
   'REGEXP',
926
   'NOT REGEXP'
927
);
928
 
929
$cfg['EnumOperators'] = array(
930
   '=',
931
   '!='
932
);
933
 
934
$cfg['SetOperators'] = array(
935
   'IN',
936
   'NOT IN'
937
);
938
 
939
$cfg['NullOperators'] = array(
940
   'IS NULL',
941
   'IS NOT NULL'
942
);
943
 
944
$cfg['UnaryOperators'] = array(
945
   'IS NULL'     => 1,
946
   'IS NOT NULL' => 1
947
);
948
 
949
?>