*.php3 NOT tbl_*.php, Documentation.*: $cfg system changes.

This commit is contained in:
Robin Johnson
2002-04-24 18:31:26 +00:00
parent cbdce71516
commit a80446dd11
16 changed files with 747 additions and 1026 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2004-04-24 Robin Johnson <robbat2@users.sourceforge.net>
* *.php3 NOT tbl_*.php, Documentation.*: $cfg system changes.
2002-04-23 Marc Delisle <lem9@users.sourceforge.net> 2002-04-23 Marc Delisle <lem9@users.sourceforge.net>
* tbl_printview.php3, lang/*.php3: Relation links in printview, * tbl_printview.php3, lang/*.php3: Relation links in printview,
thanks to Mike Beck (mike.beck at ibmiller.de) thanks to Mike Beck (mike.beck at ibmiller.de)

View File

@@ -226,7 +226,7 @@
<li> Open the file config.inc.php3 in your favourite editor and change <li> Open the file config.inc.php3 in your favourite editor and change
the values for host, user, password and authentication mode to fit the values for host, user, password and authentication mode to fit
your environment. your environment.
Also insert the correct value for <tt>$cfgPmaAbsoluteUri</tt>. Also insert the correct value for <tt>$cfg['PmaAbsoluteUri']</tt>.
Have a look at Have a look at
<a class="navigation" href="#config">Configuration section</a> for an <a class="navigation" href="#config">Configuration section</a> for an
explanation of all values.</li> explanation of all values.</li>
@@ -277,8 +277,8 @@
&amp; &quot;Timestamp&quot;) </i>tables.<br /> &amp; &quot;Timestamp&quot;) </i>tables.<br />
You must specify the details for the controluser in the You must specify the details for the controluser in the
<i>config.inc.php3</i> file under the <i>config.inc.php3</i> file under the
<tt>$cfgServers[$i]['controluser']</tt>&amp; <tt>$cfg['Servers'][$i]['controluser']</tt>&amp;
<tt>$cfgServers[$i]['controlpass']</tt> settings.<br /> <tt>$cfg['Servers'][$i]['controlpass']</tt> settings.<br />
This example assumes you want to use <tt>pma</tt> as the controluser This example assumes you want to use <tt>pma</tt> as the controluser
and <tt>pmapass</tt> as the controlpass:<br /> and <tt>pmapass</tt> as the controlpass:<br />
<table border="0"> <table border="0">
@@ -315,7 +315,7 @@
What the user may now do is controlled entirely by the MySQL user What the user may now do is controlled entirely by the MySQL user
management system.<br /> management system.<br />
With http or cookie auth mode, you don't need to fill the user/password With http or cookie auth mode, you don't need to fill the user/password
fields inside the <tt>$cfgServers</tt> array.<br /> fields inside the <tt>$cfg['Servers']</tt> array.<br />
</li> </li>
</ul> </ul>
@@ -340,10 +340,10 @@
<p><b>'config' authentication mode:</b></p> <p><b>'config' authentication mode:</b></p>
<ul> <ul>
<li>This mode is the less secure one because it requires you to fill the <li>This mode is the less secure one because it requires you to fill the
<tt>$cfgServers[$i]['user']</tt> and <tt>$cfg['Servers'][$i]['user']</tt> and
<tt>$cfgServers[$i]['password']</tt> fields.<br /> <tt>$cfg['Servers'][$i]['password']</tt> fields.<br />
But you don't need to setup a &quot;controluser&quot; here: But you don't need to setup a &quot;controluser&quot; here:
using the <tt>$cfgServers[$i]['only_db']</tt> might be enough.<br /> using the <tt>$cfg['Servers'][$i]['only_db']</tt> might be enough.<br />
In the ISP FAQ section, there is an entry explaining how to protect In the ISP FAQ section, there is an entry explaining how to protect
your configuration file.<br /></li> your configuration file.<br /></li>
</ul> </ul>
@@ -376,7 +376,7 @@
<p>All configurable data is placed in <i>config.inc.php3</i>.</p> <p>All configurable data is placed in <i>config.inc.php3</i>.</p>
<dl> <dl>
<dt><b>$cfgPmaAbsoluteUri</b> string</dt> <dt><b>$cfg['PmaAbsoluteUri']</b> string</dt>
<dd> <dd>
Sets here the complete url (with full path) to your phpMyAdmin version. Sets here the complete url (with full path) to your phpMyAdmin version.
E.g. <tt>http://www.your_web.net/path_to_your_phpMyAdmin_directory/</tt>. E.g. <tt>http://www.your_web.net/path_to_your_phpMyAdmin_directory/</tt>.
@@ -388,53 +388,53 @@
This setting can be dynamically completed. For example, you can try to This setting can be dynamically completed. For example, you can try to
use such a kind of code: use such a kind of code:
<pre> <pre>
$cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://' $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
. $HTTP_HOST . (!empty($SERVER_PORT) ? ':' . $SERVER_PORT : '') . $HTTP_HOST . (!empty($SERVER_PORT) ? ':' . $SERVER_PORT : '')
. substr($PHP_SELF, 0, strrpos($PHP_SELF, '/')+1); . substr($PHP_SELF, 0, strrpos($PHP_SELF, '/')+1);
or or
$cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://' $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
. $SERVER_NAME . (!empty($SERVER_PORT) ? ':' . $SERVER_PORT : '') . $SERVER_NAME . (!empty($SERVER_PORT) ? ':' . $SERVER_PORT : '')
. substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')+1); . substr($SCRIPT_NAME, 0, strrpos($SCRIPT_NAME, '/')+1);
</pre> </pre>
</dd> </dd>
<dt><b>$cfgServers</b> array</dt> <dt><b>$cfg['Servers']</b> array</dt>
<dd> <dd>
Since version 1.4.2, phpMyAdmin supports the administration of multiple Since version 1.4.2, phpMyAdmin supports the administration of multiple
MySQL servers. MySQL servers.
Therefore, a $cfgServers-array has been added which contains the login Therefore, a $cfg['Servers']-array has been added which contains the login
information for the different servers. The first information for the different servers. The first
<tt>$cfgServers[$i]['host']</tt> contains the hostname of the first <tt>$cfg['Servers'][$i]['host']</tt> contains the hostname of the first
server, the second <tt>$cfgServers[$i]['host']</tt> the hostname of the server, the second <tt>$cfg['Servers'][$i]['host']</tt> the hostname of the
second server, etc. second server, etc.
If you have only one server to administer, simply leave free the If you have only one server to administer, simply leave free the
hostname of the other $cfgServer-entries. hostname of the other $cfg['Server']-entries.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgServers[$i]['host']</b> string</dt> <dt><b>$cfg['Servers'][$i]['host']</b> string</dt>
<dd> <dd>
The hostname of your $i-th MySQL-server. E.g. localhost. The hostname of your $i-th MySQL-server. E.g. localhost.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgServers[$i]['port']</b> string</dt> <dt><b>$cfg['Servers'][$i]['port']</b> string</dt>
<dd> <dd>
The port-number of your $i-th MySQL-server. Default is 3306 (leave The port-number of your $i-th MySQL-server. Default is 3306 (leave
blank). blank).
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgServers[$i]['socket']</b> string</dt> <dt><b>$cfg['Servers'][$i]['socket']</b> string</dt>
<dd> <dd>
The path to the socket to use. Leave blank for default.<br /> The path to the socket to use. Leave blank for default.<br />
To use the socket feature you must run php 3.0.10 or more. To use the socket feature you must run php 3.0.10 or more.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgServers[$i]['connect_type']</b> string</dt> <dt><b>$cfg['Servers'][$i]['connect_type']</b> string</dt>
<dd> <dd>
What type connection to use with the MySQL server. Your options are What type connection to use with the MySQL server. Your options are
'socket' &amp; 'tcp'. It defaults to 'tcp' as that is nearly guarenteed 'socket' &amp; 'tcp'. It defaults to 'tcp' as that is nearly guarenteed
@@ -444,8 +444,8 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</dd> </dd>
<dt> <dt>
<b>$cfgServers[$i]['controluser']</b> string<br /> <b>$cfg['Servers'][$i]['controluser']</b> string<br />
<b>$cfgServers[$i]['controlpass']</b> string <b>$cfg['Servers'][$i]['controlpass']</b> string
</dt> </dt>
<dd> <dd>
When using http or cookie authentication modes (or 'config' When using http or cookie authentication modes (or 'config'
@@ -469,7 +469,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgServers[$i]['auth_type']</b> string <tt>['http'|'cookie'|'config']</tt> </dt> <dt><b>$cfg['Servers'][$i]['auth_type']</b> string <tt>['http'|'cookie'|'config']</tt> </dt>
<dd> <dd>
Whether config or cookie or http authentication should be used for this Whether config or cookie or http authentication should be used for this
server. server.
@@ -502,8 +502,8 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</dd> </dd>
<dt> <dt>
<b>$cfgServers[$i]['user']</b> string<br /> <b>$cfg['Servers'][$i]['user']</b> string<br />
<b>$cfgServers[$i]['password']</b> string <b>$cfg['Servers'][$i]['password']</b> string
</dt> </dt>
<dd> <dd>
The user/password-pair which phpMyAdmin will use to connect to this The user/password-pair which phpMyAdmin will use to connect to this
@@ -511,7 +511,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
authentication is used, and should be empty.<br /><br /> authentication is used, and should be empty.<br /><br />
</dd> </dd>
<dt><b>$cfgServers[$i]['only_db']</b> string or array</dt> <dt><b>$cfg['Servers'][$i]['only_db']</b> string or array</dt>
<dd> <dd>
If set to a(an array of) database name(s), only this(these) database(s) If set to a(an array of) database name(s), only this(these) database(s)
will be shown to the user. Since phpMyAdmin 2.2.1, this/these will be shown to the user. Since phpMyAdmin 2.2.1, this/these
@@ -528,7 +528,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgServers[$i]['verbose']</b> string</dt> <dt><b>$cfg['Servers'][$i]['verbose']</b> string</dt>
<dd> <dd>
Only useful when using phpMyAdmin with multiple server entries. If set, Only useful when using phpMyAdmin with multiple server entries. If set,
this string will be displayed instead of the hostname in the pulldown this string will be displayed instead of the hostname in the pulldown
@@ -538,8 +538,8 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</dd> </dd>
<dt> <dt>
<b>$cfgServers[$i]['bookmarkdb']</b> string<br /> <b>$cfg['Servers'][$i]['bookmarkdb']</b> string<br />
<b>$cfgServers[$i]['bookmarktable']</b> string <b>$cfg['Servers'][$i]['bookmarktable']</b> string
</dt> </dt>
<dd> <dd>
Since release 2.2.0 phpMyAdmin allows to bookmark queries. This can be Since release 2.2.0 phpMyAdmin allows to bookmark queries. This can be
@@ -562,8 +562,8 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</li> </li>
<li> <li>
then complete the two variables then complete the two variables
<tt>$cfgServers[$i]['bookmarkdb']</tt> and <tt>$cfg['Servers'][$i]['bookmarkdb']</tt> and
<tt>$cfgServers[$i]['bookmarktable']</tt> with the database and <tt>$cfg['Servers'][$i]['bookmarktable']</tt> with the database and
table names you've choosen so phpMyAdmin will be able to find table names you've choosen so phpMyAdmin will be able to find
the bookmarks. the bookmarks.
</li> </li>
@@ -578,7 +578,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</dd> </dd>
<dt> <dt>
<b>$cfgServers[$i]['relation']</b> string <b>$cfg['Servers'][$i]['relation']</b> string
</dt> </dt>
<dd> <dd>
Since release 2.2.4 you can describe, in a special 'relation' table, Since release 2.2.4 you can describe, in a special 'relation' table,
@@ -616,7 +616,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</li> </li>
<li> <li>
put the relation table name in put the relation table name in
<tt>$cfgServers[$i]['relation']</tt> <tt>$cfg['Servers'][$i]['relation']</tt>
</li> </li>
<li> <li>
then manually fill the relation table with information about then manually fill the relation table with information about
@@ -625,32 +625,32 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</ul><br /> </ul><br />
</dd> </dd>
<dt><b>$cfgServerDefault</b> integer</dt> <dt><b>$cfg['ServerDefault']</b> integer</dt>
<dd> <dd>
If you have more than one server configured, you can set If you have more than one server configured, you can set
<tt>$cfgServerDefault</tt> to any one of them to autoconnect to that <tt>$cfg['ServerDefault']</tt> to any one of them to autoconnect to that
server when phpMyAdmin is started, or set it to 0 to be given a list of server when phpMyAdmin is started, or set it to 0 to be given a list of
servers without logging in.<br /> servers without logging in.<br />
If you have only one server configured, <tt>$cfgServerDefault</tt> MUST If you have only one server configured, <tt>$cfg['ServerDefault']</tt> MUST
be set to that server. be set to that server.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgOBGzip </b>boolean</dt> <dt><b>$cfg['OBGzip'] </b>boolean</dt>
<dd> <dd>
Defines whether to use gzip output buffering for increased Defines whether to use gzip output buffering for increased
speed in HTTP transfers. speed in HTTP transfers.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgPersistentConnections </b>boolean</dt> <dt><b>$cfg['PersistentConnections'] </b>boolean</dt>
<dd> <dd>
Whether persistent connections should be used or not (mysql_connect or Whether persistent connections should be used or not (mysql_connect or
mysql_pconnect). mysql_pconnect).
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgExecTimeLimit </b>integer [number of seconds]</dt> <dt><b>$cfg['ExecTimeLimit'] </b>integer [number of seconds]</dt>
<dd> <dd>
Set the number of seconds a script is allowed to run. If seconds is set Set the number of seconds a script is allowed to run. If seconds is set
to zero, no time limit is imposed.<br /> to zero, no time limit is imposed.<br />
@@ -659,21 +659,21 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgSkipLockedTables </b>boolean</dt> <dt><b>$cfg['SkipLockedTables'] </b>boolean</dt>
<dd> <dd>
Mark used tables and make it possible to show databases with locked Mark used tables and make it possible to show databases with locked
tables (since 3.23.30). tables (since 3.23.30).
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgShowSQL </b>boolean</dt> <dt><b>$cfg['ShowSQL'] </b>boolean</dt>
<dd> <dd>
Defines whether sql-queries generated by phpMyAdmin should be displayed Defines whether sql-queries generated by phpMyAdmin should be displayed
or not. or not.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgAllowUserDropDatabase </b>boolean</dt> <dt><b>$cfg['AllowUserDropDatabase'] </b>boolean</dt>
<dd> <dd>
Defines whether normal users (non-administrator) are allowed to Defines whether normal users (non-administrator) are allowed to
delete their own database or not. If set as FALSE, the link &quot;Drop delete their own database or not. If set as FALSE, the link &quot;Drop
@@ -683,21 +683,21 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgConfirm </b>boolean</dt> <dt><b>$cfg['Confirm'] </b>boolean</dt>
<dd> <dd>
Whether a warning (&quot;Are your really sure..&quot;) should be Whether a warning (&quot;Are your really sure..&quot;) should be
displayed when you're about to loose data. displayed when you're about to loose data.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgShowTooltip </b>boolean</dt> <dt><b>$cfg['ShowTooltip'] </b>boolean</dt>
<dd> <dd>
Defines whether to display table comment as tooltip in left frame or Defines whether to display table comment as tooltip in left frame or
not. not.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgLeftFrameLight</b> boolean</dt> <dt><b>$cfg['LeftFrameLight']</b> boolean</dt>
<dd> <dd>
Defines whether to use select-based menu and display only the current Defines whether to use select-based menu and display only the current
tables in the left frame (smaller page). tables in the left frame (smaller page).
@@ -705,10 +705,10 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</dd> </dd>
<dt> <dt>
<b>$cfgShowMysqlInfo </b>boolean<br /> <b>$cfg['ShowMysqlInfo'] </b>boolean<br />
<b>$cfgShowMysqlVars </b>boolean<br /> <b>$cfg['ShowMysqlVars'] </b>boolean<br />
<b>$cfgShowPhpInfo </b>boolean<br /> <b>$cfg['ShowPhpInfo'] </b>boolean<br />
<b>$cfgShowChgPassword </b>boolean <b>$cfg['ShowChgPassword'] </b>boolean
</dt> </dt>
<dd> <dd>
Defines whether to display the &quot;MySQL runtime information&quot;, Defines whether to display the &quot;MySQL runtime information&quot;,
@@ -730,14 +730,14 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgLoginCookieRecall </b>boolean</dt> <dt><b>$cfg['LoginCookieRecall'] </b>boolean</dt>
<dd> <dd>
Define whether the previous login should be recalled or not in cookie Define whether the previous login should be recalled or not in cookie
authentication mode. authentication mode.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgShowStats </b>boolean</dt> <dt><b>$cfg['ShowStats'] </b>boolean</dt>
<dd> <dd>
Defines whether to display space usage and statistics about databases Defines whether to display space usage and statistics about databases
and tables or not.<br /> and tables or not.<br />
@@ -746,34 +746,34 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgShowBlob </b>boolean</dt> <dt><b>$cfg['ShowBlob'] </b>boolean</dt>
<dd> <dd>
Defines whether <tt>BLOB</tt> fields are shown when browsing a table's Defines whether <tt>BLOB</tt> fields are shown when browsing a table's
content or not. content or not.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgNavigationBarIconic </b>boolean</dt> <dt><b>$cfg['NavigationBarIconic'] </b>boolean</dt>
<dd> <dd>
Defines whether navigation bar buttons contain text or symbols only. Defines whether navigation bar buttons contain text or symbols only.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgShowAll </b>boolean</dt> <dt><b>$cfg['ShowAll'] </b>boolean</dt>
<dd> <dd>
Defines whether an user should be displayed a Defines whether an user should be displayed a
&quot;show all (records)&quot; button in browse mode or not. &quot;show all (records)&quot; button in browse mode or not.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgMaxRows </b>integer</dt> <dt><b>$cfg['MaxRows'] </b>integer</dt>
<dd> <dd>
Number of rows displayed when browsing a resultset. If the resultset Number of rows displayed when browsing a resultset. If the resultset
contains more rows, Previous/Next links will be shown. contains more rows, Previous/Next links will be shown.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgOrder </b>string [<tt>DESC</tt>|<tt>ASC</tt>|<tt>SMART</tt>]</dt> <dt><b>$cfg['Order'] </b>string [<tt>DESC</tt>|<tt>ASC</tt>|<tt>SMART</tt>]</dt>
<dd> <dd>
Defines whether fields are displayed in ascending (<tt>ASC</tt>) order, Defines whether fields are displayed in ascending (<tt>ASC</tt>) order,
in descending (<tt>DESC</tt>) order or in a &quot;smart&quot; in descending (<tt>DESC</tt>) order or in a &quot;smart&quot;
@@ -782,7 +782,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgProtectBinary </b>boolean or string</dt> <dt><b>$cfg['ProtectBinary'] </b>boolean or string</dt>
<dd> <dd>
Defines whether <tt>BLOB</tt> or <tt>BINARY</tt> fields are protected Defines whether <tt>BLOB</tt> or <tt>BINARY</tt> fields are protected
from edition when browsing a table's content or not. from edition when browsing a table's content or not.
@@ -793,7 +793,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgShowFunctionFields </b>boolean</dt> <dt><b>$cfg['ShowFunctionFields'] </b>boolean</dt>
<dd> <dd>
Defines whether MySQL functions fields should be displayed or not in edit/insert Defines whether MySQL functions fields should be displayed or not in edit/insert
mode. mode.
@@ -801,9 +801,9 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</dd> </dd>
<dt> <dt>
<b>$cfgZipDump </b>boolean<br /> <b>$cfg['ZipDump'] </b>boolean<br />
<b>$cfgGZipDump </b>boolean<br /> <b>$cfg['GZipDump'] </b>boolean<br />
<b>$cfgBZipDump </b>boolean <b>$cfg['BZipDump'] </b>boolean
</dt> </dt>
<dd> <dd>
Defines whether to allow the use of zip/gzip/bzip compression when Defines whether to allow the use of zip/gzip/bzip compression when
@@ -811,14 +811,14 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgManualBaseShort</b> string</dt> <dt><b>$cfg['ManualBaseShort']</b> string</dt>
<dd> <dd>
If set to an URL which points to the MySQL documentation (on short If set to an URL which points to the MySQL documentation (on short
pages), appropriate help links are generated. pages), appropriate help links are generated.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgDefaultLang </b>string</dt> <dt><b>$cfg['DefaultLang'] </b>string</dt>
<dd> <dd>
Defines the default language to use, if not browser-defined or Defines the default language to use, if not browser-defined or
user-defined.<br /> user-defined.<br />
@@ -827,62 +827,62 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgLang </b>string</dt> <dt><b>$cfg['Lang'] </b>string</dt>
<dd> <dd>
Force: always use this language (must be defined in the Force: always use this language (must be defined in the
<i>select_lang.inc.php3</i> script). <i>select_lang.inc.php3</i> script).
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgLeftWidth </b>integer</dt> <dt><b>$cfg['LeftWidth'] </b>integer</dt>
<dd> <dd>
Left frame width in pixel. Left frame width in pixel.
<br /><br /> <br /><br />
</dd> </dd>
<dt> <dt>
<b>$cfgLeftBgColor </b>string [HTML color]<br /> <b>$cfg['LeftBgColor'] </b>string [HTML color]<br />
<b>$cfgRightBgColor </b>string [HTML color] <b>$cfg['RightBgColor'] </b>string [HTML color]
</dt> </dt>
<dd> <dd>
The background colors (HTML) used for both the frames. The background colors (HTML) used for both the frames.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgLeftPointerColor </b>string [HTML color]</dt> <dt><b>$cfg['LeftPointerColor'] </b>string [HTML color]</dt>
<dd> <dd>
The color (HTML) used for the pointer in the left frame (does not work The color (HTML) used for the pointer in the left frame (does not work
with NS4). with NS4).
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgBorder </b>integer</dt> <dt><b>$cfg['Border'] </b>integer</dt>
<dd> <dd>
The size of a table's border. The size of a table's border.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgThBgcolor </b>string [HTML color]</dt> <dt><b>$cfg['ThBgcolor'] </b>string [HTML color]</dt>
<dd> <dd>
The color (HTML) used for table headers. The color (HTML) used for table headers.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgBgcolorOne </b>string [HTML color]</dt> <dt><b>$cfg['BgcolorOne'] </b>string [HTML color]</dt>
<dd> <dd>
The color (HTML) #1 for table rows. The color (HTML) #1 for table rows.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgBgcolorTwo </b>string [HTML color]</dt> <dt><b>$cfg['BgcolorTwo'] </b>string [HTML color]</dt>
<dd> <dd>
The color (HTML) #2 for table rows. The color (HTML) #2 for table rows.
<br /><br /> <br /><br />
</dd> </dd>
<dt> <dt>
<b>$cfgBrowsePointerColor </b>string [HTML color]<br /> <b>$cfg['BrowsePointerColor'] </b>string [HTML color]<br />
<b>$cfgBrowseMarkerColor </b>string [HTML color] <b>$cfg['BrowseMarkerColor'] </b>string [HTML color]
</dt> </dt>
<dd> <dd>
The colors (HTML) uses for the pointer and the marker in browse mode The colors (HTML) uses for the pointer and the marker in browse mode
@@ -896,15 +896,15 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</dd> </dd>
<dt> <dt>
<b>$cfgTextareaCols </b>integer<br /> <b>$cfg['TextareaCols'] </b>integer<br />
<b>$cfgTextareaRows </b>integer <b>$cfg['TextareaRows'] </b>integer
</dt> </dt>
<dd> <dd>
Number of columns and rows for the textareas. Number of columns and rows for the textareas.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgLimitChars </b>integer</dt> <dt><b>$cfg['LimitChars'] </b>integer</dt>
<dd> <dd>
Maximal number of Chars showed in a <tt>TEXT</tt> OR a <tt>BLOB</tt> Maximal number of Chars showed in a <tt>TEXT</tt> OR a <tt>BLOB</tt>
field on browse view. Can be turned off by a toggle button on the field on browse view. Can be turned off by a toggle button on the
@@ -913,8 +913,8 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</dd> </dd>
<dt> <dt>
<b>$cfgModifyDeleteAtLeft </b>boolean<br /> <b>$cfg['ModifyDeleteAtLeft'] </b>boolean<br />
<b>$cfgModifyDeleteAtRight </b>boolean <b>$cfg['ModifyDeleteAtRight'] </b>boolean
</dt> </dt>
<dd> <dd>
Defines the place where modify and delete links would be put when Defines the place where modify and delete links would be put when
@@ -925,33 +925,33 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgDefaultDisplay </b>string</dt> <dt><b>$cfg['DefaultDisplay'] </b>string</dt>
<dd> <dd>
There are 2 display modes: horizontal and vertical. Define which one is There are 2 display modes: horizontal and vertical. Define which one is
displayed by default. displayed by default.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgRepeatCells </b>integer</dt> <dt><b>$cfg['RepeatCells'] </b>integer</dt>
<dd> <dd>
Repeat the headers every X cells, or 0 to deactivate. Repeat the headers every X cells, or 0 to deactivate.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgColumnTypes </b>array</dt> <dt><b>$cfg['ColumnTypes'] </b>array</dt>
<dd> <dd>
All possible types of a MySQL column. In most cases you don't need to All possible types of a MySQL column. In most cases you don't need to
edit this. edit this.
<br /><br /> <br /><br />
</dd> </dd>
<dt><b>$cfgAttributeTypes </b>array</dt> <dt><b>$cfg['AttributeTypes'] </b>array</dt>
<dd> <dd>
Possible attributes for fields. In most cases you don't need to edit Possible attributes for fields. In most cases you don't need to edit
this. this.
</dd> </dd>
<dt><b>$cfgFunctions </b>array</dt> <dt><b>$cfg['Functions'] </b>array</dt>
<dd> <dd>
A list of functions MySQL supports. In most cases you don't need to A list of functions MySQL supports. In most cases you don't need to
edit this. edit this.
@@ -993,7 +993,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
characters to my browser, what can I do?</b> characters to my browser, what can I do?</b>
<br /> <br />
There are some known php bugs with output buffering and compression.<br /> There are some known php bugs with output buffering and compression.<br />
Try to set the <tt>$cfgOBGzip</tt> directive to <tt>FALSE</tt> in your Try to set the <tt>$cfg['OBGzip']</tt> directive to <tt>FALSE</tt> in your
<i>config.inc.php or .php3</i> file and the <i>config.inc.php or .php3</i> file and the
<tt>zlib.output_compression</tt> directive to <tt>Off</tt> in your php <tt>zlib.output_compression</tt> directive to <tt>Off</tt> in your php
configuration file.<br /> configuration file.<br />
@@ -1255,7 +1255,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
open the connection. To do this in phpMyAdmin, you need to complete the open the connection. To do this in phpMyAdmin, you need to complete the
socket information in the config.inc.php3.<br /> socket information in the config.inc.php3.<br />
For example: For example:
<tt>$cfgServers[$i]['socket']&nbsp;=&nbsp;'/tmp/mysql.sock';</tt> <tt>$cfg['Servers'][$i]['socket']&nbsp;=&nbsp;'/tmp/mysql.sock';</tt>
</li> </li>
</ul> </ul>
<p> <p>
@@ -1268,7 +1268,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
<b>Nothing is displayed by my browser when I try to run phpMyAdmin, what <b>Nothing is displayed by my browser when I try to run phpMyAdmin, what
can I do?</b> can I do?</b>
<br /> <br />
Try to set the <tt>$cfgOBGZip</tt> directive to <tt>FALSE</tt> in the Try to set the <tt>$cfg['OBGZip']</tt> directive to <tt>FALSE</tt> in the
phpMyAdmin configuration file. It helps sometime.<br /> phpMyAdmin configuration file. It helps sometime.<br />
Also have a look at your php version number: if it contains Also have a look at your php version number: if it contains
&quot;4.0b...&quot; it means you're running a beta version of PHP. That's &quot;4.0b...&quot; it means you're running a beta version of PHP. That's
@@ -1280,7 +1280,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
table, an error 404 (page not found) is displayed or, with http or table, an error 404 (page not found) is displayed or, with http or
cookie authentication, I'm asked to login again. What's wrong?</b> cookie authentication, I'm asked to login again. What's wrong?</b>
<br /> <br />
Check the value you set for the <tt>$cfgPmaAbsoluteUri</tt> directive in Check the value you set for the <tt>$cfg['PmaAbsoluteUri']</tt> directive in
the phpMyAdmin configuration file. the phpMyAdmin configuration file.
</p> </p>
@@ -1367,8 +1367,8 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
</p> </p>
<ul> <ul>
<li> <li>
<tt>$cfgServers[$i]['controluser']</tt> and/or <tt>$cfg['Servers'][$i]['controluser']</tt> and/or
<tt>$cfgServers[$i]['controlpass']</tt> are wrong. <tt>$cfg['Servers'][$i]['controlpass']</tt> are wrong.
</li> </li>
<li> <li>
The username/password you specify in the login-dialog are invalid. The username/password you specify in the login-dialog are invalid.
@@ -1516,7 +1516,7 @@ $cfgPmaAbsoluteUri = (!empty($HTTPS) ? 'https' : 'http') . '://'
You will need to choose &quot;Save as file&quot;, so that phpMyAdmin can You will need to choose &quot;Save as file&quot;, so that phpMyAdmin can
transmit the resulting dump to your station. Depending on your PHP transmit the resulting dump to your station. Depending on your PHP
configuration, you will see options to compress the dump. See also the configuration, you will see options to compress the dump. See also the
<tt>$cfgExecTimeLimit</tt> configuration variable. <tt>$cfg['ExecTimeLimit']</tt> configuration variable.
<br /><br /> <br /><br />
For additional help on this subject, look for the word &quot;dump&quot; in For additional help on this subject, look for the word &quot;dump&quot; in
this document. this document.

File diff suppressed because it is too large Load Diff

View File

@@ -33,148 +33,148 @@
* It must contain characters that are valid for a URL, and the path is * It must contain characters that are valid for a URL, and the path is
* case sensitive on some Web servers, for example Unix-based servers. * case sensitive on some Web servers, for example Unix-based servers.
*/ */
$cfgPmaAbsoluteUri = ''; $cfg['PmaAbsoluteUri'] = '';
/** /**
* Server(s) configuration * Server(s) configuration
*/ */
$i = 0; $i = 0;
// The $cfgServers array starts with $cfgServers[1]. Do not use $cfgServers[0]. // The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''. // You can disable a server config entry by setting host to ''.
$i++; $i++;
$cfgServers[$i]['host'] = 'localhost'; // MySQL hostname $cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname
$cfgServers[$i]['port'] = ''; // MySQL port - leave blank for default port $cfg['Servers']$i]['port'] = ''; // MySQL port - leave blank for default port
$cfgServers[$i]['socket'] = ''; // Path to the socket - leave blank for default socket $cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfgServers[$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket') $cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfgServers[$i]['controluser'] = ''; // MySQL control user settings $cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
// (this user must have read-only // (this user must have read-only
$cfgServers[$i]['controlpass'] = ''; // access to the "mysql/user" $cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
// and "mysql/db" tables) // and "mysql/db" tables)
$cfgServers[$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)? $cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfgServers[$i]['user'] = 'root'; // MySQL user $cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfgServers[$i]['password'] = ''; // MySQL password (only needed $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
// with 'config' auth_type) // with 'config' auth_type)
$cfgServers[$i]['only_db'] = ''; // If set to a db-name, only $cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only
// this db is displayed // this db is displayed
// at left frame // at left frame
// It may also be an array // It may also be an array
// of db-names // of db-names
$cfgServers[$i]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname $cfg['Servers'][$i]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname
$cfgServers[$i]['bookmarkdb'] = ''; // Bookmark db - leave blank for no bookmark support $cfg['Servers'][$i]['bookmarkdb'] = ''; // Bookmark db - leave blank for no bookmark support
$cfgServers[$i]['bookmarktable'] = ''; // Bookmark table - leave blank for no bookmark support $cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table - leave blank for no bookmark support
$cfgServers[$i]['relation'] = ''; // table to describe the relation between links (see doc) $cfg['Servers'][$i]['relation'] = ''; // table to describe the relation between links (see doc)
// - leave blank for no relation-links support // - leave blank for no relation-links support
$i++; $i++;
$cfgServers[$i]['host'] = ''; $cfg['Servers'][$i]['host'] = '';
$cfgServers[$i]['port'] = ''; $cfg['Servers'][$i]['port'] = '';
$cfgServers[$i]['socket'] = ''; $cfg['Servers'][$i]['socket'] = '';
$cfgServers[$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfgServers[$i]['controluser'] = ''; $cfg['Servers'][$i]['controluser'] = '';
$cfgServers[$i]['controlpass'] = ''; $cfg['Servers'][$i]['controlpass'] = '';
$cfgServers[$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['auth_type'] = 'config';
$cfgServers[$i]['user'] = 'root'; $cfg['Servers'][$i]['user'] = 'root';
$cfgServers[$i]['password'] = ''; $cfg['Servers'][$i]['password'] = '';
$cfgServers[$i]['only_db'] = ''; $cfg['Servers'][$i]['only_db'] = '';
$cfgServers[$i]['verbose'] = ''; $cfg['Servers'][$i]['verbose'] = '';
$cfgServers[$i]['bookmarkdb'] = ''; $cfg['Servers'][$i]['bookmarkdb'] = '';
$cfgServers[$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['bookmarktable'] = '';
$cfgServers[$i]['relation'] = ''; $cfg['Servers'][$i]['relation'] = '';
$i++; $i++;
$cfgServers[$i]['host'] = ''; $cfg['Servers'][$i]['host'] = '';
$cfgServers[$i]['port'] = ''; $cfg['Servers'][$i]['port'] = '';
$cfgServers[$i]['socket'] = ''; $cfg['Servers'][$i]['socket'] = '';
$cfgServers[$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfgServers[$i]['controluser'] = ''; $cfg['Servers'][$i]['controluser'] = '';
$cfgServers[$i]['controlpass'] = ''; $cfg['Servers'][$i]['controlpass'] = '';
$cfgServers[$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['auth_type'] = 'config';
$cfgServers[$i]['user'] = 'root'; $cfg['Servers'][$i]['user'] = 'root';
$cfgServers[$i]['password'] = ''; $cfg['Servers'][$i]['password'] = '';
$cfgServers[$i]['only_db'] = ''; $cfg['Servers'][$i]['only_db'] = '';
$cfgServers[$i]['verbose'] = ''; $cfg['Servers'][$i]['verbose'] = '';
$cfgServers[$i]['bookmarkdb'] = ''; $cfg['Servers'][$i]['bookmarkdb'] = '';
$cfgServers[$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['bookmarktable'] = '';
$cfgServers[$i]['relation'] = ''; $cfg['Servers'][$i]['relation'] = '';
// If you have more than one server configured, you can set $cfgServerDefault // If you have more than one server configured, you can set $cfg['ServerDefault']
// to any one of them to autoconnect to that server when phpMyAdmin is started, // to any one of them to autoconnect to that server when phpMyAdmin is started,
// or set it to 0 to be given a list of servers without logging in // or set it to 0 to be given a list of servers without logging in
// If you have only one server configured, $cfgServerDefault *MUST* be // If you have only one server configured, $cfg['ServerDefault'] *MUST* be
// set to that server. // set to that server.
$cfgServerDefault = 1; // Default server (0 = no default server) $cfg['ServerDefault'] = 1; // Default server (0 = no default server)
$cfgServer = ''; $cfg['Server'] = '';
unset($cfgServers[0]); unset($cfg['Servers'][0]);
/** /**
* Other core phpMyAdmin settings * Other core phpMyAdmin settings
*/ */
$cfgOBGzip = TRUE; // use GZIP output buffering if possible $cfg['OBGzip'] = TRUE; // use GZIP output buffering if possible
$cfgPersistentConnections = FALSE; // use persistent connections to MySQL database $cfg['PersistentConnections'] = FALSE; // use persistent connections to MySQL database
$cfgExecTimeLimit = 300; // maximum execution time in seconds (0 for no limit) $cfg['ExecTimeLimit'] = 300; // maximum execution time in seconds (0 for no limit)
$cfgSkipLockedTables = FALSE; // mark used tables, make possible to show $cfg['SkipLockedTables'] = FALSE; // mark used tables, make possible to show
// locked tables (since MySQL 3.23.30) // locked tables (since MySQL 3.23.30)
$cfgShowSQL = TRUE; // show SQL queries as run $cfg['ShowSQL'] = TRUE; // show SQL queries as run
$cfgAllowUserDropDatabase = FALSE; // show a 'Drop database' link to normal users $cfg['AllowUserDropDatabase'] = FALSE; // show a 'Drop database' link to normal users
$cfgConfirm = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE' $cfg['Confirm'] = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE'
$cfgLoginCookieRecall = TRUE; // recall previous login in cookie auth. mode or not $cfg['LoginCookieRecall'] = TRUE; // recall previous login in cookie auth. mode or not
// Left frame setup // Left frame setup
$cfgLeftFrameLight = TRUE; // use a select-based menu and display only the $cfg['LeftFrameLight'] = TRUE; // use a select-based menu and display only the
// current tables in the left frame. // current tables in the left frame.
$cfgShowTooltip = TRUE; // display table comment as tooltip in left frame $cfg['ShowTooltip'] = TRUE; // display table comment as tooltip in left frame
// In the main frame, at startup... // In the main frame, at startup...
$cfgShowStats = TRUE; // allow to display statistics and space usage in $cfg['ShowStats'] = TRUE; // allow to display statistics and space usage in
// the pages about database details and table // the pages about database details and table
// properties // properties
$cfgShowMysqlInfo = FALSE; // whether to display the "MySQL runtime $cfg['ShowMysqlInfo'] = FALSE; // whether to display the "MySQL runtime
$cfgShowMysqlVars = FALSE; // information", "MySQL system variables", "PHP $cfg['ShowMysqlVars'] = FALSE; // information", "MySQL system variables", "PHP
$cfgShowPhpInfo = FALSE; // information" and "change password" links for $cfg['ShowPhpInfo'] = FALSE; // information" and "change password" links for
$cfgShowChgPassword = FALSE; // simple users or not $cfg['ShowChgPassword'] = FALSE; // simple users or not
// In browse mode... // In browse mode...
$cfgShowBlob = FALSE; // display blob field contents $cfg['ShowBlob'] = FALSE; // display blob field contents
$cfgNavigationBarIconic = TRUE; // do not display text inside navigation bar buttons $cfg['NavigationBarIconic'] = TRUE; // do not display text inside navigation bar buttons
$cfgShowAll = FALSE; // allows to display all the rows $cfg['ShowAll'] = FALSE; // allows to display all the rows
$cfgMaxRows = 30; // maximum number of rows to display $cfg['MaxRows'] = 30; // maximum number of rows to display
$cfgOrder = 'ASC'; // default for 'ORDER BY' clause (valid $cfg['Order'] = 'ASC'; // default for 'ORDER BY' clause (valid
// values are 'ASC', 'DESC' or 'SMART' -ie // values are 'ASC', 'DESC' or 'SMART' -ie
// descending order for fields of type // descending order for fields of type
// TIME, DATE, DATETIME & TIMESTAMP, // TIME, DATE, DATETIME & TIMESTAMP,
// ascending order else-) // ascending order else-)
// In edit mode... // In edit mode...
$cfgProtectBinary = 'blob'; // disallow editing of binary fields $cfg['ProtectBinary'] = 'blob'; // disallow editing of binary fields
// valid values are: // valid values are:
// FALSE allow editing // FALSE allow editing
// 'blob' allow editing except for BLOB fields // 'blob' allow editing except for BLOB fields
// 'all' disallow editing // 'all' disallow editing
$cfgShowFunctionFields = TRUE; // Display the function fields in edit/insert mode $cfg['ShowFunctionFields'] = TRUE; // Display the function fields in edit/insert mode
// For the export features... // For the export features...
$cfgZipDump = TRUE; // Allow the use of zip/gzip/bzip $cfg['ZipDump'] = TRUE; // Allow the use of zip/gzip/bzip
$cfgGZipDump = TRUE; // compression for $cfg['GZipDump'] = TRUE; // compression for
$cfgBZipDump = TRUE; // dump files $cfg['BZipDump'] = TRUE; // dump files
/** /**
* Link to the official MySQL documentation * Link to the official MySQL documentation
* Be sure to include no trailing slash on the path * Be sure to include no trailing slash on the path
*/ */
$cfgManualBaseShort = 'http://www.mysql.com/doc'; $cfg['ManualBaseShort'] = 'http://www.mysql.com/doc';
/** /**
* Language settings * Language settings
*/ */
// Default language to use, if not browser-defined or user-defined // Default language to use, if not browser-defined or user-defined
$cfgDefaultLang = 'en'; $cfg['DefaultLang'] = 'en';
// Force: always use this language - must be defined in // Force: always use this language - must be defined in
// libraries/select_lang.lib.php3 // libraries/select_lang.lib.php3
// $cfgLang = 'en'; // $cfg['Lang'] = 'en';
// Loads language file // Loads language file
require('./libraries/select_lang.lib.php3'); require('./libraries/select_lang.lib.php3');
@@ -182,29 +182,29 @@ require('./libraries/select_lang.lib.php3');
/** /**
* Customization & design * Customization & design
*/ */
$cfgLeftWidth = 150; // left frame width $cfg['LeftWidth'] = 150; // left frame width
$cfgLeftBgColor = '#D0DCE0'; // background color for the left frame $cfg['LeftBgColor'] = '#D0DCE0'; // background color for the left frame
$cfgLeftPointerColor = '#CCFFCC'; // color of the pointer in left frame $cfg['LeftPointerColor'] = '#CCFFCC'; // color of the pointer in left frame
// (blank for no pointer) // (blank for no pointer)
$cfgRightBgColor = '#F5F5F5'; // background color for the right frame $cfg['RightBgColor'] = '#F5F5F5'; // background color for the right frame
$cfgBorder = 0; // border width on tables $cfg['Border'] = 0; // border width on tables
$cfgThBgcolor = '#D3DCE3'; // table header row colour $cfg['ThBgcolor'] = '#D3DCE3'; // table header row colour
$cfgBgcolorOne = '#CCCCCC'; // table data row colour $cfg['BgcolorOne'] = '#CCCCCC'; // table data row colour
$cfgBgcolorTwo = '#DDDDDD'; // table data row colour, alternate $cfg['BgcolorTwo'] = '#DDDDDD'; // table data row colour, alternate
$cfgBrowsePointerColor = '#CCFFCC'; // color of the pointer in browse mode $cfg['BrowsePointerColor'] = '#CCFFCC'; // color of the pointer in browse mode
// (blank for no pointer) // (blank for no pointer)
$cfgBrowseMarkerColor = '#FFCC99'; // color of the marker (visually marks row $cfg['BrowseMarkerColor'] = '#FFCC99'; // color of the marker (visually marks row
// by clicking on it) in browse mode // by clicking on it) in browse mode
// (blank for no marker) // (blank for no marker)
$cfgTextareaCols = 40; // textarea size (columns) in edit mode $cfg['TextareaCols'] = 40; // textarea size (columns) in edit mode
$cfgTextareaRows = 7; // textarea size (rows) in edit mode $cfg['TextareaRows'] = 7; // textarea size (rows) in edit mode
$cfgLimitChars = 50; // max field data length in browse mode $cfg['LimitChars'] = 50; // max field data length in browse mode
$cfgModifyDeleteAtLeft = TRUE; // show edit/delete links on left side of browse $cfg['ModifyDeleteAtLeft'] = TRUE; // show edit/delete links on left side of browse
// (or at the top with vertical browse) // (or at the top with vertical browse)
$cfgModifyDeleteAtRight = FALSE; // show edit/delete links on right side of browse $cfg['ModifyDeleteAtRight'] = FALSE; // show edit/delete links on right side of browse
// (or at the bottom with vertical browse) // (or at the bottom with vertical browse)
$cfgDefaultDisplay = 'horizontal'; // default display direction (horizontal|vertical) $cfg['DefaultDisplay'] = 'horizontal'; // default display direction (horizontal|vertical)
$cfgRepeatCells = 100; // repeat header names every X cells? (0 = deactivate) $cfg['RepeatCells'] = 100; // repeat header names every X cells? (0 = deactivate)
/** /**
@@ -212,7 +212,7 @@ $cfgRepeatCells = 100; // repeat header names every X cells? (0
*/ */
// Column types; // Column types;
// varchar, tinyint, text and date are listed first, based on estimated popularity // varchar, tinyint, text and date are listed first, based on estimated popularity
$cfgColumnTypes = array( $cfg['ColumnTypes'] = array(
'VARCHAR', 'VARCHAR',
'TINYINT', 'TINYINT',
'TEXT', 'TEXT',
@@ -241,7 +241,7 @@ $cfgColumnTypes = array(
); );
// Atributes // Atributes
$cfgAttributeTypes = array( $cfg['AttributeTypes'] = array(
'', '',
'BINARY', 'BINARY',
'UNSIGNED', 'UNSIGNED',
@@ -249,8 +249,8 @@ $cfgAttributeTypes = array(
); );
// Available functions // Available functions
if ($cfgShowFunctionFields) { if ($cfg['ShowFunctionFields']) {
$cfgFunctions = array( $cfg['Functions'] = array(
'ASCII', 'ASCII',
'CHAR', 'CHAR',
'SOUNDEX', 'SOUNDEX',

View File

@@ -31,7 +31,7 @@ if (!isset($is_db) || !$is_db) {
$is_db = @mysql_select_db($db); $is_db = @mysql_select_db($db);
} }
if (empty($db) || !$is_db) { if (empty($db) || !$is_db) {
header('Location: ' . $cfgPmaAbsoluteUri . 'main.php3?lang=' . $lang . '&server=' . $server . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'); header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?lang=' . $lang . '&server=' . $server . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
exit(); exit();
} }
} // end if (ensures db exists) } // end if (ensures db exists)
@@ -74,7 +74,7 @@ if ((!empty($submit_mult) && isset($selected_tbl))
// staybyte: speedup view on locked tables - 11 June 2001 // staybyte: speedup view on locked tables - 11 June 2001
if (PMA_MYSQL_INT_VERSION >= 32303) { if (PMA_MYSQL_INT_VERSION >= 32303) {
// Special speedup for newer MySQL Versions (in 4.0 format changed) // Special speedup for newer MySQL Versions (in 4.0 format changed)
if ($cfgSkipLockedTables == TRUE && PMA_MYSQL_INT_VERSION >= 32330) { if ($cfg['SkipLockedTables'] == TRUE && PMA_MYSQL_INT_VERSION >= 32330) {
$local_query = 'SHOW OPEN TABLES FROM ' . PMA_backquote($db); $local_query = 'SHOW OPEN TABLES FROM ' . PMA_backquote($db);
$result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); $result = mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
// Blending out tables in use // Blending out tables in use
@@ -151,7 +151,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" /> <input type="hidden" name="db" value="<?php echo $db; ?>" />
<table border="<?php echo $cfgBorder; ?>"> <table border="<?php echo $cfg['Border']; ?>">
<tr> <tr>
<td></td> <td></td>
<th>&nbsp;<?php echo ucfirst($strTable); ?>&nbsp;</th> <th>&nbsp;<?php echo ucfirst($strTable); ?>&nbsp;</th>
@@ -159,7 +159,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
<th><?php echo ucfirst($strRecords); ?></th> <th><?php echo ucfirst($strRecords); ?></th>
<th><?php echo ucfirst($strType); ?></th> <th><?php echo ucfirst($strType); ?></th>
<?php <?php
if ($cfgShowStats) { if ($cfg['ShowStats']) {
echo '<th>' . ucfirst($strSize) . '</th>'; echo '<th>' . ucfirst($strSize) . '</th>';
} }
echo "\n"; echo "\n";
@@ -176,7 +176,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
. '&amp;db=' . urlencode($db) . '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($table) . '&amp;table=' . urlencode($table)
. '&amp;goto=db_details.php3'; . '&amp;goto=db_details.php3';
$bgcolor = ($i++ % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo; $bgcolor = ($i++ % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
echo "\n"; echo "\n";
?> ?>
<tr> <tr>
@@ -251,7 +251,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
// MyISAM, ISAM or Heap table: Row count, data size and index size // MyISAM, ISAM or Heap table: Row count, data size and index size
// is accurate. // is accurate.
if (isset($sts_data['Type']) && ereg('^(MyISAM|ISAM|HEAP)$', $sts_data['Type'])) { if (isset($sts_data['Type']) && ereg('^(MyISAM|ISAM|HEAP)$', $sts_data['Type'])) {
if ($cfgShowStats) { if ($cfg['ShowStats']) {
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length']; $tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
$sum_size += $tblsize; $sum_size += $tblsize;
list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0); list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
@@ -263,7 +263,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
// InnoDB table: Row count is not accurate but data and index // InnoDB table: Row count is not accurate but data and index
// sizes are. // sizes are.
else if (isset($sts_data['Type']) && $sts_data['Type'] == 'InnoDB') { else if (isset($sts_data['Type']) && $sts_data['Type'] == 'InnoDB') {
if ($cfgShowStats) { if ($cfg['ShowStats']) {
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length']; $tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
$sum_size += $tblsize; $sum_size += $tblsize;
list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0); list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
@@ -273,7 +273,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
// Merge or BerkleyDB table: Only row count is accurate. // Merge or BerkleyDB table: Only row count is accurate.
else if (isset($sts_data['Type']) && ereg('^(MRG_MyISAM|BerkeleyDB)$', $sts_data['Type'])) { else if (isset($sts_data['Type']) && ereg('^(MRG_MyISAM|BerkeleyDB)$', $sts_data['Type'])) {
if ($cfgShowStats) { if ($cfg['ShowStats']) {
$formated_size = '&nbsp;-&nbsp;'; $formated_size = '&nbsp;-&nbsp;';
$unit = ''; $unit = '';
} }
@@ -283,7 +283,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
// Unknown table type. // Unknown table type.
else { else {
if ($cfgShowStats) { if ($cfg['ShowStats']) {
$formated_size = 'unknown'; $formated_size = 'unknown';
$unit = ''; $unit = '';
} }
@@ -299,7 +299,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
&nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp; &nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp;
</td> </td>
<?php <?php
if ($cfgShowStats) { if ($cfg['ShowStats']) {
echo "\n"; echo "\n";
?> ?>
<td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"> <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
@@ -322,7 +322,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
<?php <?php
} }
// Show Summary // Show Summary
if ($cfgShowStats) { if ($cfg['ShowStats']) {
list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1); list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1);
} }
echo "\n"; echo "\n";
@@ -342,7 +342,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
<b>--</b> <b>--</b>
</th> </th>
<?php <?php
if ($cfgShowStats) { if ($cfg['ShowStats']) {
echo "\n"; echo "\n";
?> ?>
<th align="right" nowrap="nowrap"> <th align="right" nowrap="nowrap">
@@ -364,7 +364,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
echo "\n"; echo "\n";
?> ?>
<tr> <tr>
<td colspan="<?php echo (($cfgShowStats) ? '11' : '10'); ?>" valign="bottom"> <td colspan="<?php echo (($cfg['ShowStats']) ? '11' : '10'); ?>" valign="bottom">
<img src="./images/arrow_<?php echo $text_dir; ?>.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" /> <img src="./images/arrow_<?php echo $text_dir; ?>.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
<a href="<?php echo $checkall_url; ?>&amp;checkall=1" onclick="setCheckboxes('tablesForm', true); return false;"> <a href="<?php echo $checkall_url; ?>&amp;checkall=1" onclick="setCheckboxes('tablesForm', true); return false;">
<?php echo $strCheckAll; ?></a> <?php echo $strCheckAll; ?></a>
@@ -414,7 +414,7 @@ else {
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" /> <input type="hidden" name="db" value="<?php echo $db; ?>" />
<table border="<?php echo $cfgBorder; ?>"> <table border="<?php echo $cfg['Border']; ?>">
<tr> <tr>
<td></td> <td></td>
<th>&nbsp;<?php echo ucfirst($strTable); ?>&nbsp;</th> <th>&nbsp;<?php echo ucfirst($strTable); ?>&nbsp;</th>
@@ -430,7 +430,7 @@ else {
. '&amp;db=' . urlencode($db) . '&amp;db=' . urlencode($db)
. '&amp;table=' . urlencode($tables[$i]) . '&amp;table=' . urlencode($tables[$i])
. '&amp;goto=db_details.php3'; . '&amp;goto=db_details.php3';
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo; $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
echo "\n"; echo "\n";
?> ?>
<tr> <tr>
@@ -562,7 +562,7 @@ $is_upload = (PMA_PHP_INT_VERSION >= 40000 && function_exists('ini_get'))
<input type="hidden" name="prev_sql_query" value="<?php echo ((!empty($query_to_display)) ? urlencode($query_to_display) : ''); ?>" /> <input type="hidden" name="prev_sql_query" value="<?php echo ((!empty($query_to_display)) ? urlencode($query_to_display) : ''); ?>" />
<?php echo sprintf($strRunSQLQuery, $db) . ' ' . PMA_showDocuShort('S/E/SELECT.html'); ?>&nbsp;:<br /> <?php echo sprintf($strRunSQLQuery, $db) . ' ' . PMA_showDocuShort('S/E/SELECT.html'); ?>&nbsp;:<br />
<div style="margin-bottom: 5px"> <div style="margin-bottom: 5px">
<textarea name="sql_query" cols="<?php echo $cfgTextareaCols; ?>" rows="<?php echo $cfgTextareaRows; ?>" wrap="virtual" <textarea name="sql_query" cols="<?php echo $cfg['TextareaCols']; ?>" rows="<?php echo $cfg['TextareaRows']; ?>" wrap="virtual"
onfocus="if (typeof(document.layers) == 'undefined' || typeof(textarea_selected) == 'undefined') {textarea_selected = 1; this.form.elements['sql_query'].select();}"> onfocus="if (typeof(document.layers) == 'undefined' || typeof(textarea_selected) == 'undefined') {textarea_selected = 1; this.form.elements['sql_query'].select();}">
<?php echo ((!empty($query_to_display)) ? htmlspecialchars($query_to_display) : ''); ?> <?php echo ((!empty($query_to_display)) ? htmlspecialchars($query_to_display) : ''); ?>
</textarea><br /> </textarea><br />
@@ -582,8 +582,8 @@ if ($is_upload) {
echo "\n"; echo "\n";
// Bookmark Support // Bookmark Support
if ($cfgBookmark['db'] && $cfgBookmark['table']) { if ($cfg['Bookmark']['db'] && $cfg['Bookmark']['table']) {
if (($bookmark_list = PMA_listBookmarks($db, $cfgBookmark)) && count($bookmark_list) > 0) { if (($bookmark_list = PMA_listBookmarks($db, $cfg['Bookmark'])) && count($bookmark_list) > 0) {
echo " <i>$strOr</i> $strBookmarkQuery&nbsp;:<br />\n"; echo " <i>$strOr</i> $strBookmarkQuery&nbsp;:<br />\n";
echo ' <div style="margin-bottom: 5px">' . "\n"; echo ' <div style="margin-bottom: 5px">' . "\n";
echo ' <select name="id_bookmark">' . "\n"; echo ' <select name="id_bookmark">' . "\n";
@@ -717,9 +717,9 @@ if ($num_tables > 0) {
<?php <?php
// gzip and bzip2 encode features // gzip and bzip2 encode features
if (PMA_PHP_INT_VERSION >= 40004) { if (PMA_PHP_INT_VERSION >= 40004) {
$is_zip = (isset($cfgZipDump) && $cfgZipDump && @function_exists('gzcompress')); $is_zip = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress'));
$is_gzip = (isset($cfgGZipDump) && $cfgGZipDump && @function_exists('gzencode')); $is_gzip = (isset($cfg['GZipDump']) && $cfg['GZipDump'] && @function_exists('gzencode'));
$is_bzip = (isset($cfgBZipDump) && $cfgBZipDump && @function_exists('bzcompress')); $is_bzip = (isset($cfg['BZipDump']) && $cfg['BZipDump'] && @function_exists('bzcompress'));
if ($is_zip || $is_gzip || $is_bzip) { if ($is_zip || $is_gzip || $is_bzip) {
echo "\n" . ' (' . "\n"; echo "\n" . ' (' . "\n";
if ($is_zip) { if ($is_zip) {
@@ -797,7 +797,7 @@ $result = @mysql_query('USE mysql');
$is_superuser = (!mysql_error()); $is_superuser = (!mysql_error());
// Display the DROP DATABASE link only if allowed to do so // Display the DROP DATABASE link only if allowed to do so
if ($cfgAllowUserDropDatabase || $is_superuser) { if ($cfg['AllowUserDropDatabase'] || $is_superuser) {
?> ?>
<!-- Drop database --> <!-- Drop database -->
<li> <li>

View File

@@ -25,7 +25,7 @@ $err_url = 'db_details.php3'
// staybyte: speedup view on locked tables - 11 June 2001 // staybyte: speedup view on locked tables - 11 June 2001
if (PMA_MYSQL_INT_VERSION >= 32303) { if (PMA_MYSQL_INT_VERSION >= 32303) {
// Special speedup for newer MySQL Versions (in 4.0 format changed) // Special speedup for newer MySQL Versions (in 4.0 format changed)
if ($cfgSkipLockedTables == TRUE && PMA_MYSQL_INT_VERSION >= 32330) { if ($cfg['SkipLockedTables'] == TRUE && PMA_MYSQL_INT_VERSION >= 32330) {
$local_query = 'SHOW OPEN TABLES FROM ' . PMA_backquote($db); $local_query = 'SHOW OPEN TABLES FROM ' . PMA_backquote($db);
$result = mysql_query($query) or PMA_mysqlDie('', $local_query, '', $err_url); $result = mysql_query($query) or PMA_mysqlDie('', $local_query, '', $err_url);
// Blending out tables in use // Blending out tables in use
@@ -93,13 +93,13 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
?> ?>
<!-- The tables list --> <!-- The tables list -->
<table border="<?php echo $cfgBorder; ?>"> <table border="<?php echo $cfg['Border']; ?>">
<tr> <tr>
<th>&nbsp;<?php echo ucfirst($strTable); ?>&nbsp;</th> <th>&nbsp;<?php echo ucfirst($strTable); ?>&nbsp;</th>
<th><?php echo ucfirst($strRecords); ?></th> <th><?php echo ucfirst($strRecords); ?></th>
<th><?php echo ucfirst($strType); ?></th> <th><?php echo ucfirst($strType); ?></th>
<?php <?php
if ($cfgShowStats) { if ($cfg['ShowStats']) {
echo '<th>' . ucfirst($strSize) . '</th>'; echo '<th>' . ucfirst($strSize) . '</th>';
} }
echo "\n"; echo "\n";
@@ -109,7 +109,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
$i = $sum_entries = $sum_size = 0; $i = $sum_entries = $sum_size = 0;
while (list($keyname, $sts_data) = each($tables)) { while (list($keyname, $sts_data) = each($tables)) {
$table = $sts_data['Name']; $table = $sts_data['Name'];
$bgcolor = ($i++ % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo; $bgcolor = ($i++ % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
echo "\n"; echo "\n";
?> ?>
<tr> <tr>
@@ -130,7 +130,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
if (isset($sts_data['Rows'])) { if (isset($sts_data['Rows'])) {
if ($mergetable == FALSE) { if ($mergetable == FALSE) {
if ($cfgShowStats && $nonisam == FALSE) { if ($cfg['ShowStats'] && $nonisam == FALSE) {
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length']; $tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
$sum_size += $tblsize; $sum_size += $tblsize;
if ($tblsize > 0) { if ($tblsize > 0) {
@@ -138,18 +138,18 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
} else { } else {
list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, 0); list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, 0);
} }
} else if ($cfgShowStats) { } else if ($cfg['ShowStats']) {
$formated_size = '&nbsp;-&nbsp;'; $formated_size = '&nbsp;-&nbsp;';
$unit = ''; $unit = '';
} }
$sum_entries += $sts_data['Rows']; $sum_entries += $sts_data['Rows'];
} }
// MyISAM MERGE Table // MyISAM MERGE Table
else if ($cfgShowStats && $mergetable == TRUE) { else if ($cfg['ShowStats'] && $mergetable == TRUE) {
$formated_size = '&nbsp;-&nbsp;'; $formated_size = '&nbsp;-&nbsp;';
$unit = ''; $unit = '';
} }
else if ($cfgShowStats) { else if ($cfg['ShowStats']) {
$formated_size = 'unknown'; $formated_size = 'unknown';
$unit = ''; $unit = '';
} }
@@ -168,7 +168,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
&nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp; &nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp;
</td> </td>
<?php <?php
if ($cfgShowStats) { if ($cfg['ShowStats']) {
echo "\n"; echo "\n";
?> ?>
<td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"> <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
@@ -190,7 +190,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
<?php <?php
} }
// Show Summary // Show Summary
if ($cfgShowStats) { if ($cfg['ShowStats']) {
list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1); list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1);
} }
echo "\n"; echo "\n";
@@ -206,7 +206,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
<b>--</b> <b>--</b>
</th> </th>
<?php <?php
if ($cfgShowStats) { if ($cfg['ShowStats']) {
echo "\n"; echo "\n";
?> ?>
<th align="right" nowrap="nowrap"> <th align="right" nowrap="nowrap">
@@ -228,14 +228,14 @@ else {
?> ?>
<!-- The tables list --> <!-- The tables list -->
<table border="<?php echo $cfgBorder; ?>"> <table border="<?php echo $cfg['Border']; ?>">
<tr> <tr>
<th>&nbsp;<?php echo ucfirst($strTable); ?>&nbsp;</th> <th>&nbsp;<?php echo ucfirst($strTable); ?>&nbsp;</th>
<th><?php echo ucfirst($strRecords); ?></th> <th><?php echo ucfirst($strRecords); ?></th>
</tr> </tr>
<?php <?php
while ($i < $num_tables) { while ($i < $num_tables) {
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $bgcolor = $cfgBgcolorTwo; $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $bgcolor = $cfg['BgcolorTwo'];
echo "\n"; echo "\n";
?> ?>
<tr> <tr>

View File

@@ -109,10 +109,10 @@ if ($server > 0) {
<h1 align="center"> <h1 align="center">
<?php echo ucfirst($strDatabasesStats); ?> <?php echo ucfirst($strDatabasesStats); ?>
</h1> </h1>
<table align="center" border="<?php echo $cfgBorder; ?>" cellpadding="5"> <table align="center" border="<?php echo $cfg['Border']; ?>" cellpadding="5">
<tr> <tr>
<th align="<?php echo $cell_align_left; ?>"><big><?php echo $strHost . ' :'; ?></big></th> <th align="<?php echo $cell_align_left; ?>"><big><?php echo $strHost . ' :'; ?></big></th>
<th align="<?php echo $cell_align_left; ?>"><big><?php echo $cfgServer['host']; ?></big></th> <th align="<?php echo $cell_align_left; ?>"><big><?php echo $cfg['Server']['host']; ?></big></th>
</tr> </tr>
<tr> <tr>
<th align="<?php echo $cell_align_left; ?>"><big><?php echo $strGenTime . ' :'; ?></big></th> <th align="<?php echo $cell_align_left; ?>"><big><?php echo $strGenTime . ' :'; ?></big></th>
@@ -172,7 +172,7 @@ if ($num_dbs > 0) {
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <input type="hidden" name="server" value="<?php echo $server; ?>" />
<table align="center" border="<?php echo $cfgBorder; ?>"> <table align="center" border="<?php echo $cfg['Border']; ?>">
<tr> <tr>
<th>&nbsp;</th> <th>&nbsp;</th>
<th> <th>
@@ -252,7 +252,7 @@ if ($num_dbs > 0) {
// Displays the tables stats per database // Displays the tables stats per database
$i = 0; $i = 0;
while (list($db_name, $db_prop) = each($dbs_array)) { while (list($db_name, $db_prop) = each($dbs_array)) {
$bgcolor = ($i % 2) ? $cfgBgcolorOne : $cfgBgcolorTwo; $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
list($data_size, $data_unit) = PMA_formatByteDown($dbs_array[$db_name][1], 3, 1); list($data_size, $data_unit) = PMA_formatByteDown($dbs_array[$db_name][1], 3, 1);
list($idx_size, $idx_unit) = PMA_formatByteDown($dbs_array[$db_name][2], 3, 1); list($idx_size, $idx_unit) = PMA_formatByteDown($dbs_array[$db_name][2], 3, 1);

View File

@@ -24,7 +24,7 @@ if (isset($userlink) && $userlink) {
/** /**
* Sends bufferized data * Sends bufferized data
*/ */
if (isset($cfgOBGzip) && $cfgOBGzip if (isset($cfg['OBGzip']) && $cfg['OBGzip']
&& isset($ob_mode) && $ob_mode) { && isset($ob_mode) && $ob_mode) {
PMA_outBufferPost($ob_mode); PMA_outBufferPost($ob_mode);
} }

View File

@@ -7,7 +7,7 @@
*/ */
require('./libraries/common.lib.php3'); require('./libraries/common.lib.php3');
require('./libraries/ob.lib.php3'); require('./libraries/ob.lib.php3');
if ($cfgOBGzip) { if ($cfg['OBGzip']) {
$ob_mode = PMA_outBufferModeGet(); $ob_mode = PMA_outBufferModeGet();
if ($ob_mode) { if ($ob_mode) {
PMA_outBufferPre($ob_mode); PMA_outBufferPre($ob_mode);
@@ -50,15 +50,15 @@ if ($text_dir == 'ltr') {
<head> <head>
<title>phpMyAdmin</title> <title>phpMyAdmin</title>
<?php <?php
if (!empty($cfgPmaAbsoluteUri)) { if (!empty($cfg['PmaAbsoluteUri'])) {
echo '<base href="' . $cfgPmaAbsoluteUri . '" />' . "\n"; echo '<base href="' . $cfg['PmaAbsoluteUri'] . '" />' . "\n";
} }
?> ?>
<style type="text/css"> <style type="text/css">
<!-- <!--
body {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: <?php echo $cfgRightBgColor; ?>} body {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: <?php echo $cfg['RightBgColor']; ?>}
pre, tt {font-size: <?php echo $font_size; ?>} pre, tt {font-size: <?php echo $font_size; ?>}
th {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #000000; background-color: <?php echo $cfgThBgcolor; ?>} th {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #000000; background-color: <?php echo $cfg['ThBgcolor']; ?>}
td {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>} td {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
form {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>} form {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
input {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>} input {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
@@ -85,9 +85,9 @@ if (isset($db)) {
if (isset($table)) { if (isset($table)) {
$title .= (empty($title) ? '' : '.') . str_replace('\'', '\\\'', $table); $title .= (empty($title) ? '' : '.') . str_replace('\'', '\\\'', $table);
} }
if (!empty($cfgServer) && isset($cfgServer['host'])) { if (!empty($cfg['Server']) && isset($cfg['Server']['host'])) {
$title .= (empty($title) ? 'phpMyAdmin ' : ' ') $title .= (empty($title) ? 'phpMyAdmin ' : ' ')
. sprintf($strRunning, (empty($cfgServer['verbose']) ? str_replace('\'', '\\\'', $cfgServer['host']) : str_replace('\'', '\\\'', $cfgServer['verbose']))); . sprintf($strRunning, (empty($cfg['Server']['verbose']) ? str_replace('\'', '\\\'', $cfg['Server']['host']) : str_replace('\'', '\\\'', $cfg['Server']['verbose'])));
} }
$title .= (empty($title) ? '' : ' - ') . 'phpMyAdmin ' . PMA_VERSION; $title .= (empty($title) ? '' : ' - ') . 'phpMyAdmin ' . PMA_VERSION;
?> ?>
@@ -106,8 +106,8 @@ if (isset($js_to_run) && $js_to_run == 'functions.js') {
var errorMsg0 = '<?php echo str_replace('\'', '\\\'', $strFormEmpty); ?>'; var errorMsg0 = '<?php echo str_replace('\'', '\\\'', $strFormEmpty); ?>';
var errorMsg1 = '<?php echo str_replace('\'', '\\\'', $strNotNumber); ?>'; var errorMsg1 = '<?php echo str_replace('\'', '\\\'', $strNotNumber); ?>';
var errorMsg2 = '<?php echo str_replace('\'', '\\\'', $strNotValidNumber); ?>'; var errorMsg2 = '<?php echo str_replace('\'', '\\\'', $strNotValidNumber); ?>';
var noDropDbMsg = '<?php echo((!$cfgAllowUserDropDatabase) ? str_replace('\'', '\\\'', $strNoDropDatabases) : ''); ?>'; var noDropDbMsg = '<?php echo((!$cfg['AllowUserDropDatabase']) ? str_replace('\'', '\\\'', $strNoDropDatabases) : ''); ?>';
var confirmMsg = '<?php echo(($cfgConfirm) ? str_replace('\'', '\\\'', $strDoYouReally) : ''); ?>'; var confirmMsg = '<?php echo(($cfg['Confirm']) ? str_replace('\'', '\\\'', $strDoYouReally) : ''); ?>';
//--> //-->
</script> </script>
<script src="libraries/functions.js" type="text/javascript" language="javascript"></script> <script src="libraries/functions.js" type="text/javascript" language="javascript"></script>
@@ -154,14 +154,14 @@ echo "\n";
</head> </head>
<body bgcolor="<?php echo $cfgRightBgColor; ?>" background="images/bkg.gif"> <body bgcolor="<?php echo $cfg['RightBgColor']; ?>" background="images/bkg.gif">
<?php <?php
if (isset($db)) { if (isset($db)) {
echo '<h1>' . $strDatabase . ' <i>' . htmlspecialchars($db) . '</i>'; echo '<h1>' . $strDatabase . ' <i>' . htmlspecialchars($db) . '</i>';
if (!empty($table)) { if (!empty($table)) {
echo ' - ' . $strTable . ' <i>' . htmlspecialchars($table) . '</i>'; echo ' - ' . $strTable . ' <i>' . htmlspecialchars($table) . '</i>';
} }
echo ' ' . sprintf($strRunning, ' <i>' . (($cfgServer['verbose']) ? $cfgServer['verbose'] : $cfgServer['host']) . '</i>'); echo ' ' . sprintf($strRunning, ' <i>' . (($cfg['Server']['verbose']) ? $cfg['Server']['verbose'] : $cfg['Server']['host']) . '</i>');
echo '</h1>' . "\n"; echo '</h1>' . "\n";
} }
echo "\n"; echo "\n";

View File

@@ -53,7 +53,7 @@ body {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $fo
</style> </style>
</head> </head>
<frameset cols="<?php echo $cfgLeftWidth; ?>,*" rows="*"> <frameset cols="<?php echo $cfg['LeftWidth']; ?>,*" rows="*">
<frame src="left.php3?<?php echo $url_query; ?>" name="nav" frameborder="1" /> <frame src="left.php3?<?php echo $url_query; ?>" name="nav" frameborder="1" />
<frame src="<?php echo (empty($db)) ? 'main.php3' : 'db_details.php3'; ?>?<?php echo $url_query; ?>" name="phpmain" /> <frame src="<?php echo (empty($db)) ? 'main.php3' : 'db_details.php3'; ?>?<?php echo $url_query; ?>" name="phpmain" />

View File

@@ -17,7 +17,7 @@ if (!empty($db)) {
*/ */
require('./libraries/common.lib.php3'); require('./libraries/common.lib.php3');
require('./libraries/ob.lib.php3'); require('./libraries/ob.lib.php3');
if ($cfgOBGzip) { if ($cfg['OBGzip']) {
$ob_mode = PMA_outBufferModeGet(); $ob_mode = PMA_outBufferModeGet();
if ($ob_mode) { if ($ob_mode) {
PMA_outBufferPre($ob_mode); PMA_outBufferPre($ob_mode);
@@ -63,11 +63,11 @@ PMA_setFontSizes();
<head> <head>
<title>phpMyAdmin</title> <title>phpMyAdmin</title>
<base<?php if (!empty($cfgPmaAbsoluteUri)) echo ' href="' . $cfgPmaAbsoluteUri . '"'; ?> target="phpmain" /> <base<?php if (!empty($cfg['PmaAbsoluteUri'])) echo ' href="' . $cfg['PmaAbsoluteUri'] . '"'; ?> target="phpmain" />
<?php <?php
// Expandable/collapsible databases list is only used if there is more than one // Expandable/collapsible databases list is only used if there is more than one
// database to display // database to display
if ($num_dbs > 1 && !$cfgLeftFrameLight) { if ($num_dbs > 1 && !$cfg['LeftFrameLight']) {
echo "\n"; echo "\n";
?> ?>
<!-- Collapsible tables list scripts --> <!-- Collapsible tables list scripts -->
@@ -165,7 +165,7 @@ echo "\n";
?> ?>
</head> </head>
<body bgcolor="<?php echo $cfgLeftBgColor; ?>"> <body bgcolor="<?php echo $cfg['LeftBgColor']; ?>">
<!-- Link to the welcome page --> <!-- Link to the welcome page -->
<div id="el1Parent" class="parent" style="margin-bottom: 5px"> <div id="el1Parent" class="parent" style="margin-bottom: 5px">
<nobr><a class="item" href="main.php3?lang=<?php echo $lang; ?>&amp;server=<?php echo $server; ?>"> <nobr><a class="item" href="main.php3?lang=<?php echo $lang; ?>&amp;server=<?php echo $server; ?>">
@@ -178,15 +178,15 @@ echo "\n";
// Don't display expansible/collapsible database info if: // Don't display expansible/collapsible database info if:
// 1. $server == 0 (no server selected) // 1. $server == 0 (no server selected)
// This is the case when there are multiple servers and // This is the case when there are multiple servers and
// '$cfgServerDefault = 0' is set. In that case, we want the welcome screen // '$cfg['ServerDefault'] = 0' is set. In that case, we want the welcome screen
// to appear with no database info displayed. // to appear with no database info displayed.
// 2. there is only one database available (ie either only one database exists // 2. there is only one database available (ie either only one database exists
// or $cfgServers['only_db'] is defined and is not an array) // or $cfg['Servers']['only_db'] is defined and is not an array)
// In this case, the database should not be collapsible/expandable // In this case, the database should not be collapsible/expandable
if ($num_dbs > 1) { if ($num_dbs > 1) {
// Light mode -> beginning of the select combo for databases // Light mode -> beginning of the select combo for databases
if ($cfgLeftFrameLight) { if ($cfg['LeftFrameLight']) {
echo ' <form method="post" action="index.php3" name="left" target="_parent">' . "\n"; echo ' <form method="post" action="index.php3" name="left" target="_parent">' . "\n";
echo ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n"; echo ' <input type="hidden" name="lang" value="' . $lang . '" />' . "\n";
echo ' <input type="hidden" name="server" value="' . $server . '" />' . "\n"; echo ' <input type="hidden" name="server" value="' . $server . '" />' . "\n";
@@ -218,9 +218,9 @@ if ($num_dbs > 1) {
} }
// Get additional infomation about tables for tooltip // Get additional infomation about tables for tooltip
if ($cfgShowTooltip && PMA_MYSQL_INT_VERSION >= 32303 if ($cfg['ShowTooltip'] && PMA_MYSQL_INT_VERSION >= 32303
&& $num_tables && $num_tables
&& (!$cfgLeftFrameLight || $selected_db == $j)) { && (!$cfg['LeftFrameLight'] || $selected_db == $j)) {
$tooltip = array(); $tooltip = array();
$result = mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db)); $result = mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db));
while ($tmp = mysql_fetch_array($result)) { while ($tmp = mysql_fetch_array($result)) {
@@ -230,10 +230,10 @@ if ($num_dbs > 1) {
} // end if } // end if
// No light mode -> displays the expandible/collapsible db list // No light mode -> displays the expandible/collapsible db list
if ($cfgLeftFrameLight == FALSE) { if ($cfg['LeftFrameLight'] == FALSE) {
// Displays the database name // Displays the database name
$on_mouse = (($cfgLeftPointerColor == '') ? '' : ' onmouseover="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftPointerColor . '\')}" onmouseout="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftBgColor . '\')}"'); $on_mouse = (($cfg['LeftPointerColor'] == '') ? '' : ' onmouseover="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfg['LeftPointerColor'] . '\')}" onmouseout="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfg['LeftBgColor'] . '\')}"');
echo "\n"; echo "\n";
echo ' <div id="el' . $j . 'Parent" class="parent"' . $on_mouse . '>'; echo ' <div id="el' . $j . 'Parent" class="parent"' . $on_mouse . '>';
@@ -328,7 +328,7 @@ if ($num_dbs > 1) {
// Light mode -> end of the select combo for databases and table list for // Light mode -> end of the select combo for databases and table list for
// the current database // the current database
if ($cfgLeftFrameLight) { if ($cfg['LeftFrameLight']) {
echo ' </select>' . "\n"; echo ' </select>' . "\n";
echo ' <noscript><input type="submit" name="Go" value="' . $strGo . '" /></noscript>' . "\n"; echo ' <noscript><input type="submit" name="Go" value="' . $strGo . '" /></noscript>' . "\n";
echo ' </form>' . "\n"; echo ' </form>' . "\n";
@@ -385,7 +385,7 @@ else if ($num_dbs == 1) {
} }
// Get additional infomation about tables for tooltip // Get additional infomation about tables for tooltip
if ($cfgShowTooltip && PMA_MYSQL_INT_VERSION >= 32303 if ($cfg['ShowTooltip'] && PMA_MYSQL_INT_VERSION >= 32303
&& $num_tables) { && $num_tables) {
$tooltip = array(); $tooltip = array();
$result = mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db)); $result = mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db));
@@ -451,7 +451,7 @@ if (isset($userlink) && $userlink) {
/** /**
* Sends bufferized data * Sends bufferized data
*/ */
if (isset($cfgOBGzip) && $cfgOBGzip if (isset($cfg['OBGzip']) && $cfg['OBGzip']
&& isset($ob_mode) && $ob_mode) { && isset($ob_mode) && $ob_mode) {
PMA_outBufferPost($ob_mode); PMA_outBufferPost($ob_mode);
} }

View File

@@ -9,7 +9,7 @@ require('./libraries/grab_globals.lib.php3');
require('./libraries/common.lib.php3'); require('./libraries/common.lib.php3');
// Puts the language to use in a cookie that will expire in 30 days // Puts the language to use in a cookie that will expire in 30 days
if (!isset($pma_uri_parts)) { if (!isset($pma_uri_parts)) {
$pma_uri_parts = parse_url($cfgPmaAbsoluteUri); $pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']);
$cookie_path = substr($pma_uri_parts['path'], 0, strrpos($pma_uri_parts['path'], '/')); $cookie_path = substr($pma_uri_parts['path'], 0, strrpos($pma_uri_parts['path'], '/'));
$is_https = ($pma_uri_parts['scheme'] == 'https') ? 1 : 0; $is_https = ($pma_uri_parts['scheme'] == 'https') ? 1 : 0;
} }
@@ -53,12 +53,12 @@ echo "\n";
// loic1: modified in order to have a valid words order whatever is the // loic1: modified in order to have a valid words order whatever is the
// language used // language used
if ($server > 0) { if ($server > 0) {
$server_info = $cfgServer['host'] $server_info = $cfg['Server']['host']
. (empty($cfgServer['port']) ? '' : ':' . $cfgServer['port']); . (empty($cfg['Server']['port']) ? '' : ':' . $cfg['Server']['port']);
// loic1: skip this because it's not a so good idea to display sockets // loic1: skip this because it's not a so good idea to display sockets
// used to everybody // used to everybody
// if (!empty($cfgServer['socket']) && PMA_PHP_INT_VERSION >= 30010) { // if (!empty($cfg['Server']['socket']) && PMA_PHP_INT_VERSION >= 30010) {
// $server_info .= ':' . $cfgServer['socket']; // $server_info .= ':' . $cfg['Server']['socket'];
// } // }
$local_query = 'SELECT VERSION() as version, USER() as user'; $local_query = 'SELECT VERSION() as version, USER() as user';
$res = mysql_query($local_query) or PMA_mysqlDie('', $local_query, FALSE, ''); $res = mysql_query($local_query) or PMA_mysqlDie('', $local_query, FALSE, '');
@@ -91,7 +91,7 @@ if (($server > 0) && isset($mode) && ($mode == 'reload')) {
/** /**
* Displays the MySQL servers choice form * Displays the MySQL servers choice form
*/ */
if ($server == 0 || count($cfgServers) > 1) { if ($server == 0 || count($cfg['Servers']) > 1) {
?> ?>
<!-- MySQL servers choice form --> <!-- MySQL servers choice form -->
<table> <table>
@@ -104,8 +104,8 @@ if ($server == 0 || count($cfgServers) > 1) {
<select name="server"> <select name="server">
<?php <?php
echo "\n"; echo "\n";
reset($cfgServers); reset($cfg['Servers']);
while (list($key, $val) = each($cfgServers)) { while (list($key, $val) = each($cfg['Servers'])) {
if (!empty($val['host'])) { if (!empty($val['host'])) {
echo ' <option value="' . $key . '"'; echo ' <option value="' . $key . '"';
if (!empty($server) && ($server == $key)) { if (!empty($server) && ($server == $key)) {
@@ -249,19 +249,19 @@ if ($server > 0) {
$common_url_query = 'lang=' . $lang . '&amp;server=' . $server; $common_url_query = 'lang=' . $lang . '&amp;server=' . $server;
if ($is_superuser) { if ($is_superuser) {
$cfgShowMysqlInfo = TRUE; $cfg['ShowMysqlInfo'] = TRUE;
$cfgShowMysqlVars = TRUE; $cfg['ShowMysqlVars'] = TRUE;
$cfgShowChgPassword = TRUE; $cfg['ShowChgPassword'] = TRUE;
} }
if ($cfgServer['auth_type'] == 'config') { if ($cfg['Server']['auth_type'] == 'config') {
$cfgShowChgPassword = FALSE; $cfg['ShowChgPassword'] = FALSE;
} }
// loic1: Displays the MySQL column only if at least one feature has to be // loic1: Displays the MySQL column only if at least one feature has to be
// displayed // displayed
if ($is_superuser || $is_create_priv || $is_process_priv || $is_reload_priv if ($is_superuser || $is_create_priv || $is_process_priv || $is_reload_priv
|| $cfgShowMysqlInfo || $cfgShowMysqlVars || $cfgShowChgPassword || $cfg['ShowMysqlInfo'] || $cfg['ShowMysqlVars'] || $cfg['ShowChgPassword']
|| $cfgServer['auth_type'] != 'config') { || $cfg['Server']['auth_type'] != 'config') {
?> ?>
<!-- MySQL server related links --> <!-- MySQL server related links -->
<td valign="top" align="<?php echo $cell_align_left; ?>"> <td valign="top" align="<?php echo $cell_align_left; ?>">
@@ -296,7 +296,7 @@ if ($server > 0) {
?> ?>
<!-- server-related links --> <!-- server-related links -->
<?php <?php
if ($cfgShowMysqlInfo) { if ($cfg['ShowMysqlInfo']) {
echo "\n"; echo "\n";
?> ?>
<tr> <tr>
@@ -309,7 +309,7 @@ if ($server > 0) {
</tr> </tr>
<?php <?php
} // end if } // end if
if ($cfgShowMysqlVars) { if ($cfg['ShowMysqlVars']) {
echo "\n"; echo "\n";
?> ?>
<tr> <tr>
@@ -378,7 +378,7 @@ if ($server > 0) {
} }
// Change password (needs another message) // Change password (needs another message)
if ($cfgShowChgPassword) { if ($cfg['ShowChgPassword']) {
echo "\n"; echo "\n";
?> ?>
<tr> <tr>
@@ -392,9 +392,9 @@ if ($server > 0) {
} // end if } // end if
// Logout for advanced authentication // Logout for advanced authentication
if ($cfgServer['auth_type'] != 'config') { if ($cfg['Server']['auth_type'] != 'config') {
$http_logout = ($cfgServer['auth_type'] == 'http') $http_logout = ($cfg['Server']['auth_type'] == 'http')
? "\n" . ' <a href="' . $cfgPmaAbsoluteUri . 'Documentation.html#login_bug" target="documentation">(*)</a>' ? "\n" . ' <a href="' . $cfg['PmaAbsoluteUri'] . 'Documentation.html#login_bug" target="documentation">(*)</a>'
: ''; : '';
echo "\n"; echo "\n";
?> ?>
@@ -433,7 +433,7 @@ echo "\n";
<?php <?php
// Displays language selection combo // Displays language selection combo
if (empty($cfgLang)) { if (empty($cfg['Lang'])) {
?> ?>
<!-- Language Selection --> <!-- Language Selection -->
<tr> <tr>
@@ -493,7 +493,7 @@ echo "\n";
</tr> </tr>
<?php <?php
if ($is_superuser || $cfgShowPhpInfo) { if ($is_superuser || $cfg['ShowPhpInfo']) {
?> ?>
<!-- PHP Information --> <!-- PHP Information -->
<tr> <tr>

View File

@@ -13,7 +13,7 @@ require('./libraries/common.lib.php3');
* Displays PHP information * Displays PHP information
*/ */
$is_superuser = @mysql_query('USE mysql', $userlink); $is_superuser = @mysql_query('USE mysql', $userlink);
if ($is_superuser || $cfgShowPhpInfo) { if ($is_superuser || $cfg['ShowPhpInfo']) {
phpinfo(); phpinfo();
} }
?> ?>

View File

@@ -168,7 +168,7 @@ if (!function_exists('is_uploaded_file')) {
/** /**
* Increases the max. allowed time to run a script * Increases the max. allowed time to run a script
*/ */
@set_time_limit($cfgExecTimeLimit); @set_time_limit($cfg['ExecTimeLimit']);
/** /**
@@ -208,14 +208,14 @@ if (!empty($id_bookmark)) {
include('./libraries/bookmark.lib.php3'); include('./libraries/bookmark.lib.php3');
switch($action_bookmark) { switch($action_bookmark) {
case 0: // bookmarked query that have to be run case 0: // bookmarked query that have to be run
$sql_query = PMA_queryBookmarks($db, $cfgBookmark, $id_bookmark); $sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], $id_bookmark);
break; break;
case 1: // bookmarked query that have to be displayed case 1: // bookmarked query that have to be displayed
$sql_query = PMA_queryBookmarks($db, $cfgBookmark, $id_bookmark); $sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], $id_bookmark);
$view_bookmark = 1; $view_bookmark = 1;
break; break;
case 2: // bookmarked query that have to be deleted case 2: // bookmarked query that have to be deleted
$sql_query = PMA_deleteBookmarks($db, $cfgBookmark, $id_bookmark); $sql_query = PMA_deleteBookmarks($db, $cfg['Bookmark'], $id_bookmark);
break; break;
} }
} // end if } // end if
@@ -296,7 +296,7 @@ if (!empty($prev_sql_query)) {
} }
// Drop database is not allowed -> ensure the query can be run // Drop database is not allowed -> ensure the query can be run
if (!$cfgAllowUserDropDatabase if (!$cfg['AllowUserDropDatabase']
&& eregi('DROP[[:space:]]+(IF EXISTS[[:space:]]+)?DATABASE ', $sql_query)) { && eregi('DROP[[:space:]]+(IF EXISTS[[:space:]]+)?DATABASE ', $sql_query)) {
// Checks if the user is a Superuser // Checks if the user is a Superuser
// TODO: set a global variable with this information // TODO: set a global variable with this information

View File

@@ -32,7 +32,7 @@ if (!isset($err_url)) {
* into account this case. * into account this case.
*/ */
if (!defined('PMA_CHK_DROP') if (!defined('PMA_CHK_DROP')
&& !$cfgAllowUserDropDatabase && !$cfg['AllowUserDropDatabase']
&& eregi('DROP[[:space:]]+(IF EXISTS[[:space:]]+)?DATABASE[[:space:]]', $sql_query)) { && eregi('DROP[[:space:]]+(IF EXISTS[[:space:]]+)?DATABASE[[:space:]]', $sql_query)) {
// Checks if the user is a Superuser // Checks if the user is a Superuser
// TODO: set a global variable with this information // TODO: set a global variable with this information
@@ -53,8 +53,8 @@ if (isset($store_bkm)) {
$fields['label'] = stripslashes($fields['label']); $fields['label'] = stripslashes($fields['label']);
} }
include('./libraries/bookmark.lib.php3'); include('./libraries/bookmark.lib.php3');
PMA_addBookmarks($fields, $cfgBookmark); PMA_addBookmarks($fields, $cfg['Bookmark']);
header('Location: ' . $cfgPmaAbsoluteUri . $goto); header('Location: ' . $cfg['PmaAbsoluteUri'] . $goto);
} }
@@ -116,7 +116,7 @@ if (isset($btnDrop) && $btnDrop == $strNo) {
} }
include('./' . ereg_replace('\.\.*', '.', $goto)); include('./' . ereg_replace('\.\.*', '.', $goto));
} else { } else {
header('Location: ' . $cfgPmaAbsoluteUri . str_replace('&amp;', '&', $goto)); header('Location: ' . $cfg['PmaAbsoluteUri'] . str_replace('&amp;', '&', $goto));
} }
exit(); exit();
} // end if } // end if
@@ -129,7 +129,7 @@ if (isset($btnDrop) && $btnDrop == $strNo) {
* with js) because possible security issue is not so important here: at most, * with js) because possible security issue is not so important here: at most,
* the confirm message isn't displayed. * the confirm message isn't displayed.
*/ */
if (!$cfgConfirm if (!$cfg['Confirm']
|| (isset($is_js_confirmed) && $is_js_confirmed) || (isset($is_js_confirmed) && $is_js_confirmed)
|| isset($btnDrop)) { || isset($btnDrop)) {
$do_confirm = FALSE; $do_confirm = FALSE;
@@ -183,16 +183,16 @@ else {
} }
// Gets the number of rows per page // Gets the number of rows per page
if (!isset($session_max_rows)) { if (!isset($session_max_rows)) {
$session_max_rows = $cfgMaxRows; $session_max_rows = $cfg['MaxRows'];
} else if ($session_max_rows != 'all') { } else if ($session_max_rows != 'all') {
$cfgMaxRows = $session_max_rows; $cfg['MaxRows'] = $session_max_rows;
} }
// Defines the display mode (horizontal/vertical) and header "frequency" // Defines the display mode (horizontal/vertical) and header "frequency"
if (empty($disp_direction)) { if (empty($disp_direction)) {
$disp_direction = $cfgDefaultDisplay; $disp_direction = $cfg['DefaultDisplay'];
} }
if (empty($repeat_cells)) { if (empty($repeat_cells)) {
$repeat_cells = $cfgRepeatCells; $repeat_cells = $cfg['RepeatCells'];
} }
$is_explain = $is_count = $is_export = $is_delete = $is_insert = $is_affected = $is_show = $is_maint = FALSE; $is_explain = $is_count = $is_export = $is_delete = $is_insert = $is_affected = $is_show = $is_maint = FALSE;
@@ -217,13 +217,13 @@ else {
// Do append a "LIMIT" clause? // Do append a "LIMIT" clause?
if (isset($pos) if (isset($pos)
&& (!$cfgShowAll || $session_max_rows != 'all') && (!$cfg['ShowAll'] || $session_max_rows != 'all')
&& $is_select && $is_select
&& !($is_count || $is_export) && !($is_count || $is_export)
&& eregi('[[:space:]]FROM[[:space:]]', $sql_query) && eregi('[[:space:]]FROM[[:space:]]', $sql_query)
&& !eregi('[[:space:]]LIMIT[[:space:]0-9,]+$', $sql_query)) { && !eregi('[[:space:]]LIMIT[[:space:]0-9,]+$', $sql_query)) {
$sql_limit_to_append = " LIMIT $pos, $cfgMaxRows"; $sql_limit_to_append = " LIMIT $pos, ".$cfg['MaxRows'];
if (eregi('(.*)([[:space:]](PROCEDURE[[:space:]](.*)|FOR[[:space:]]+UPDATE|LOCK[[:space:]]+IN[[:space:]]+SHARE[[:space:]]+MODE))$', $sql_query, $regs)) { if (eregi('(.*)([[:space:]](PROCEDURE[[:space:]](.*)|FOR[[:space:]]+UPDATE|LOCK[[:space:]]+IN[[:space:]]+SHARE[[:space:]]+MODE))$', $sql_query, $regs)) {
$full_sql_query = $regs[1] . $sql_limit_to_append . $regs[2]; $full_sql_query = $regs[1] . $sql_limit_to_append . $regs[2];
} else { } else {
@@ -364,7 +364,7 @@ else {
include('./' . $goto); include('./' . $goto);
} // end if file_exist } // end if file_exist
else { else {
header('Location: ' . $cfgPmaAbsoluteUri . str_replace('&amp;', '&', $goto) . '&message=' . urlencode($message)); header('Location: ' . $cfg['PmaAbsoluteUri'] . str_replace('&amp;', '&', $goto) . '&message=' . urlencode($message));
} // end else } // end else
exit(); exit();
} // end no rows returned } // end no rows returned
@@ -427,7 +427,7 @@ else {
// Bookmark Support if required // Bookmark Support if required
if ($disp_mode[7] == '1' if ($disp_mode[7] == '1'
&& ($cfgBookmark['db'] && $cfgBookmark['table'] && empty($id_bookmark)) && ($cfg['Bookmark']['db'] && $cfg['Bookmark']['table'] && empty($id_bookmark))
&& !empty($sql_query)) { && !empty($sql_query)) {
echo "\n"; echo "\n";
@@ -456,7 +456,7 @@ else {
<input type="hidden" name="server" value="<?php echo $server; ?>" /> <input type="hidden" name="server" value="<?php echo $server; ?>" />
<input type="hidden" name="goto" value="<?php echo $goto; ?>" /> <input type="hidden" name="goto" value="<?php echo $goto; ?>" />
<input type="hidden" name="fields[dbase]" value="<?php echo $db; ?>" /> <input type="hidden" name="fields[dbase]" value="<?php echo $db; ?>" />
<input type="hidden" name="fields[user]" value="<?php echo $cfgBookmark['user']; ?>" /> <input type="hidden" name="fields[user]" value="<?php echo $cfg['Bookmark']['user']; ?>" />
<input type="hidden" name="fields[query]" value="<?php echo urlencode($sql_query); ?>" /> <input type="hidden" name="fields[query]" value="<?php echo urlencode($sql_query); ?>" />
<input type="text" name="fields[label]" value="" /> <input type="text" name="fields[label]" value="" />
<input type="submit" name="store_bkm" value="<?php echo $strBookmarkThis; ?>" /> <input type="submit" name="store_bkm" value="<?php echo $strBookmarkThis; ?>" />

View File

@@ -13,10 +13,10 @@ require('./libraries/common.lib.php3');
* Displays an error message and exits if the user isn't allowed to use this * Displays an error message and exits if the user isn't allowed to use this
* script * script
*/ */
if (!$cfgShowChgPassword) { if (!$cfg['ShowChgPassword']) {
$cfgShowChgPassword = @mysql_query('USE mysql', $userlink); $cfg['ShowChgPassword'] = @mysql_query('USE mysql', $userlink);
} }
if ($cfgServer['auth_type'] == 'config' || !$cfgShowChgPassword) { if ($cfg['Server']['auth_type'] == 'config' || !$cfg['ShowChgPassword']) {
include('./header.inc.php3'); include('./header.inc.php3');
echo '<p><b>' . $strError . '</b></p>' . "\n"; echo '<p><b>' . $strError . '</b></p>' . "\n";
echo '<p>&nbsp;&nbsp;&nbsp;&nbsp;' . $strNoRights . '</p>' . "\n"; echo '<p>&nbsp;&nbsp;&nbsp;&nbsp;' . $strNoRights . '</p>' . "\n";
@@ -57,12 +57,12 @@ if (isset($nopass)) {
$result = @mysql_query($local_query) or PMA_mysqlDie('', '', FALSE, $err_url); $result = @mysql_query($local_query) or PMA_mysqlDie('', '', FALSE, $err_url);
// Changes password cookie if required // Changes password cookie if required
if ($cfgServer['auth_type'] == 'cookie') { if ($cfg['Server']['auth_type'] == 'cookie') {
setcookie('pma_cookie_password', $pma_pw, 0, $cookie_path, '', $is_https); setcookie('pma_cookie_password', $pma_pw, 0, $cookie_path, '', $is_https);
} // end if } // end if
// For http auth. mode, the "back" link will also enforce new // For http auth. mode, the "back" link will also enforce new
// authentication // authentication
$http_logout = ($cfgServer['auth_type'] == 'http') $http_logout = ($cfg['Server']['auth_type'] == 'http')
? '&amp;old_usr=relog' ? '&amp;old_usr=relog'
: ''; : '';