6 * DEFINES VARIABLES & CONSTANTS
8 * PHPMYADMIN_VERSION (string) - phpMyAdmin version string
9 * PHP_INT_VERSION (int) - eg: 30017 instead of 3.0.17 or
10 * 40006 instead of 4.0.6RC3
11 * PMA_WINDOWS (bool) - mark if phpMyAdmin running on windows
13 * MYSQL_INT_VERSION (int) - eg: 32339 instead of 3.23.39
16 if (!defined('PHPMYADMIN_VERSION')) {
17 define('PHPMYADMIN_VERSION', '2.2.0');
21 if (!defined('PHP_INT_VERSION')) {
22 if (!ereg('([0-9]).([0-9]).([0-9])', phpversion(), $match)) {
23 $result = ereg('([0-9]).([0-9])', phpversion(), $match);
25 if (isset($match) && !empty($match[1])) {
26 if (!isset($match[2])) {
29 if (!isset($match[3])) {
32 define('PHP_INT_VERSION', (int)sprintf('%d%02d%02d', $match[1], $match[2], $match[3]));
35 define('PHP_INT_VERSION', FALSE);
39 // Whether the os php is running on is windows or not
40 if (!defined('PMA_WINDOWS')) {
41 if (defined('PHP_OS') && eregi('win', PHP_OS
)) {
42 define('PMA_WINDOWS', TRUE);
44 define('PMA_WINDOWS', FALSE);
49 if (!defined('MYSQL_MAJOR_VERSION') && isset($link)) {
50 if (!empty($server)) {
51 $result = mysql_query('SELECT VERSION() AS version');
52 if ($result != FALSE && @mysql_num_rows
($result) > 0) {
53 $row = mysql_fetch_array($result);
54 $match = explode('.', $row['version']);
56 $result = @mysql_query
('SHOW VARIABLES LIKE \'version\'');
57 if ($result != FALSE && @mysql_num_rows
($result) > 0){
58 $row = mysql_fetch_row($result);
59 $match = explode('.', $row[1]);
62 } // end server id is defined case
64 if (!isset($match) ||
!isset($match[0])) {
67 if (!isset($match[1])) {
70 if (!isset($match[2])) {
74 define('MYSQL_INT_VERSION', (int)sprintf('%d%02d%02d', $match[0], $match[1], intval($match[2])));