et('PMA_USR_BROWSER_AGENT', 'SAFARI');
} elseif (preg_match('@Mozilla/([0-9].[0-9]{1,2})@', $HTTP_USER_AGENT, $log_version)) {
$this->set('PMA_USR_BROWSER_VER', $log_version[1]);
$this->set('PMA_USR_BROWSER_AGENT', 'MOZILLA');
} else {
$this->set('PMA_USR_BROWSER_VER', 0);
$this->set('PMA_USR_BROWSER_AGENT', 'OTHER');
}
}
/**
* Whether GD2 is present
*/
function checkGd2()
{
if ( $this->get('GD2Available') == 'yes' ) {
$this->set('PMA_IS_GD2', 1);
} elseif ( $this->get('GD2Available') == 'no' ) {
$this->set('PMA_IS_GD2', 0);
} else {
if (!@extension_loaded('gd')) {
PMA_dl('gd');
}
if (!@function_exists('imagecreatetruecolor')) {
$this->set('PMA_IS_GD2', 0);
} else {
if (@function_exists('gd_info')) {
$gd_nfo = gd_info();
if (strstr($gd_nfo["GD Version"], '2.')) {
$this->set('PMA_IS_GD2', 1);
} else {
$this->set('PMA_IS_GD2', 0);
}
} else {
/* We must do hard way... */
ob_start();
phpinfo(INFO_MODULES); /* Only modules */
$a = strip_tags(ob_get_contents());
ob_end_clean();
/* Get GD version string from phpinfo output */
if (preg_match('@GD Version[[:space:]]*\(.*\)@', $a, $v)) {
if (strstr($v, '2.')) {
$this->set('PMA_IS_GD2', 1);
} else {
$this->set('PMA_IS_GD2', 0);
}
} else {
$this->set('PMA_IS_GD2', 0);
}
}
}
}
}
/**
* Whether the Web server php is running on is IIS
*/
function checkWebServer()
{
if (PMA_getenv('SERVER_SOFTWARE')
// some versions return Microsoft-IIS, some Microsoft/IIS
// we could use a preg_match() but it's slower
&& stristr(PMA_getenv('SERVER_SOFTWARE'), 'Microsoft')
&& stristr(PMA_getenv('SERVER_SOFTWARE'), 'IIS')) {
$this->set('PMA_IS_IIS', 1);
} else {
$this->set('PMA_IS_IIS', 0);
}
}
/**
* Whether the os php is running on is windows or not
*/
function checkWebServerOs()
{
// Default to Unix or Equiv
$this->set('PMA_IS_WINDOWS', 0);
// If PHP_OS is defined then continue
if (defined('
PHP_OS')) {
if (stristr(PHP_OS, 'win') ) {
// Is it