install/includes/stages/database_mysql.php
author Dan Fuhry <dan@enanocms.org>
Wed, 21 Aug 2013 23:11:58 -0400
changeset 1379 5cbd678df965
parent 1227 bdac73ed481e
permissions -rw-r--r--
Installer dev, everything is working now, so far as I can tell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     1
<?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     2
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     3
/*
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     4
 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
1081
745200a9cc2a Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents: 1022
diff changeset
     5
 * Copyright (C) 2006-2009 Dan Fuhry
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     6
 * Installation package
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     7
 * database_mysql.php - Installer database info page, MySQL
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     8
 *
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     9
 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    10
 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    11
 *
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    12
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    13
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    14
 */
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    15
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    16
if ( !defined('IN_ENANO_INSTALL') )
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    17
	die();
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    18
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    19
function pdo_escape($pdo, $str)
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    20
{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    21
	return substr($pdo->quote($str), 1, -1);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    22
}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    23
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    24
if ( isset($_POST['_cont']) )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    25
{
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    26
	$allow_go = true;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    27
	// Do we have everything? If so, continue with installation.
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    28
	foreach ( array('db_host', 'db_port', 'db_name', 'db_user', 'db_pass') as $field )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    29
	{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    30
		if ( empty($_POST[$field]) )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    31
		{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    32
			$allow_go = false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    33
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    34
	}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    35
	if ( $allow_go )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    36
	{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    37
		require( ENANO_ROOT . '/install/includes/stages/database_post.php' );
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    38
		return true;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    39
	}
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    40
}
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    41
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    42
if ( isset($_POST['ajax_test']) )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    43
{
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    44
	// Test the database connection
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    45
	$return = array(
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    46
			'can_install' => false,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    47
			'host_good' => true,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    48
			'creating_user' => false,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    49
			'db_exist' => false,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    50
			'creating_db' => false,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    51
			'creating_db_grant' => false,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    52
			'root_fail' => false,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    53
			'version' => array(
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    54
				'version' => 'unknown',
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    55
				'good' => 'indeterminate'
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    56
			),
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    57
			'last_error' => ''
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    58
		);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    59
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    60
	if ( !isset($_POST['info']) )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    61
		die();
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    62
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    63
	$info = $_POST['info'];
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    64
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    65
	// From here on out will be JSON responses
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    66
	header('Content-type: application/json');
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    67
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    68
	try
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    69
	{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    70
		$info = @enano_json_decode($info);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    71
	}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    72
	catch ( Zend_Json_Exception $e )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    73
	{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    74
		die(enano_json_encode(array(
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    75
				'mode' => 'error',
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    76
				'error' => 'Exception in JSON decoder'
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    77
			)));
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    78
	}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    79
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    80
	if ( preg_match('/^:/', $info['db_host']) && !@file_exists(substr($info['db_host'], 1)) )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    81
	{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    82
		$return['host_good'] = false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    83
		echo enano_json_encode($return);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    84
		exit();
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    85
	}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    86
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    87
	if ( $info['db_host'] == 'localhost' && !empty($info['db_port']) && $info['db_port'] != 3306 )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    88
		$info['db_host'] = '127.0.0.1';
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    89
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    90
	$dbhost = ( preg_match('/^:/', $info['db_host']) ) ? $info['db_host'] : "{$info['db_host']}:{$info['db_port']}";
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    91
	
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    92
	if ( have_pdo('mysql') )
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    93
	{
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    94
		// Try to connect as the normal user
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    95
		try
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
    96
		{
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    97
			$test = new PDO("mysql:host=$dbhost;charset=UTF8", $info['db_user'], $info['db_pass']);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    98
			
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
    99
			// We're connected; do we have permission to use the database?
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   100
			$have_database = false;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   101
			$q = $test->query('USE `' . pdo_escape($test, $info['db_name']) . '`;');
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   102
			if ( $q )
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   103
			{
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   104
				// Permissions are good and we're all connected. Perform version check...
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   105
				$version = $test->getAttribute(PDO::ATTR_SERVER_VERSION);
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   106
				$return['version'] = array(
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   107
					'version' => $version,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   108
					'good' => version_compare($version, '4.0.17', '>=')
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   109
				);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   110
				
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   111
				$return['can_install'] = ( $return['version']['good'] ) ? true : false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   112
			}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   113
			else
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   114
			{
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   115
				$return['last_error'] = mysql_error();
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   116
				$return['creating_db'] = true;
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   117
				
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   118
				// We don't have permission to use the database or it doesn't exist.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   119
				// See if we have a root login to work with, if not then fail
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   120
				if ( !empty($info['db_root_user']) && !empty($info['db_root_pass']) )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   121
				{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   122
					// Log in with root rights and if that works, tell 'em we'll create the database.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   123
					try
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   124
					{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   125
						$test_root = new PDO("mysql:host=$dbhost;charset=UTF8", $info['db_root_user'], $info['db_root_pass']);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   126
						
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   127
						// We logged in with root rights, assume that we have appropriate permissions.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   128
						// If not, well, the installation will fail. Tough on the user, but creating
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   129
						// test databases/users is too risky.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   130
						
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   131
						// See if the database already exists
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   132
						$dbname = pdo_escape($test_root, $info['db_name']);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   133
						$q = $test_root->query("SHOW DATABASES LIKE '$dbname';");
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   134
						if ( $q )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   135
						{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   136
							if ( $q->rows() > 0 )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   137
							{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   138
								$return['creating_db'] = false;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   139
								$return['creating_db_grant'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   140
							}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   141
						}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   142
						
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   143
						$version = $test->getAttribute(PDO::ATTR_SERVER_VERSION);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   144
						$return['version'] = array(
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   145
							'version' => $version,
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   146
							'good' => version_compare($version, '4.0.17', '>=')
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   147
						);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   148
						
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   149
						$return['can_install'] = ( $return['version']['good'] ) ? true : false;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   150
					}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   151
					catch ( PDOException $e )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   152
					{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   153
						// Well that helped. Root credentials are bad.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   154
						$return['creating_db'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   155
						$return['root_fail'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   156
					}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   157
				}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   158
				// No root credentials, fail out
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   159
			}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   160
		}
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   161
		catch ( PDOException $e )
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   162
		{
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   163
			$return['creating_user'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   164
			$return['last_error'] = mysql_error();
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   165
			if ( strstr( $return['last_error'], 'Lost connection' ) || strstr( $return['last_error'], 'Unknown MySQL server host' ) )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   166
			{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   167
				$return['host_good'] = false;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   168
			}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   169
			// Doing that failed. If we have root credentials, test those
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   170
			if ( !empty($info['db_root_user']) && !empty($info['db_root_pass']) )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   171
			{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   172
				// Log in with root rights and if that works, tell 'em we'll reset the password or create
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   173
				// the account if it doesn't exist already. This is done with GRANT ALL PRIVILEGES ON enano_db.*
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   174
				// etc etc, a little hackish but known to work with MySQL >= 4.1.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   175
				try
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   176
				{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   177
					$test_root = new PDO("mysql:host=$dbhost;charset=UTF8", $info['db_root_user'], $info['db_root_pass']);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   178
					
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   179
					// We logged in with root rights, assume that we have appropriate permissions.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   180
					// If not, well, the installation will fail. Tough on the user, but creating
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   181
					// test databases/users is too risky.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   182
					
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   183
					// Does the database exist?
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   184
					$q = $test_root->query('USE `' . mysql_real_escape_string($info['db_name']) . '`;');
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   185
					if ( !$q )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   186
					{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   187
						// Nope, we'll have to create it
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   188
						$return['creating_db'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   189
						$return['last_error'] = mysql_error();
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   190
					}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   191
					
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   192
					$version = $test_root->getAttribute(PDO::ATTR_SERVER_VERSION);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   193
					$return['version'] = array(
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   194
						'version' => $version,
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   195
						'good' => version_compare($version, '4.0.17', '>=')
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   196
					);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   197
					
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   198
					$return['can_install'] = ( $return['version']['good'] ) ? true : false;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   199
				}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   200
				catch ( PDOException $e )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   201
				{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   202
					// Well that helped. Root credentials are bad.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   203
					$return['creating_db'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   204
					$return['root_fail'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   205
				}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   206
			}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   207
			else
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   208
			{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   209
				// No root credentials, fail out
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   210
				$return['root_fail'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   211
			}
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   212
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   213
	}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   214
	else
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   215
	{
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   216
		// Try to connect as the normal user
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   217
		$test = @mysql_connect($dbhost, $info['db_user'], $info['db_pass']);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   218
		if ( !$test )
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   219
		{
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   220
			$return['creating_user'] = true;
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   221
			$return['last_error'] = mysql_error();
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   222
			if ( strstr( $return['last_error'], 'Lost connection' ) || strstr( $return['last_error'], 'Unknown MySQL server host' ) )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   223
			{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   224
				$return['host_good'] = false;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   225
			}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   226
			// Doing that failed. If we have root credentials, test those
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   227
			if ( !empty($info['db_root_user']) && !empty($info['db_root_pass']) )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   228
			{
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   229
				// Log in with root rights and if that works, tell 'em we'll reset the password or create
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   230
				// the account if it doesn't exist already. This is done with GRANT ALL PRIVILEGES ON enano_db.*
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   231
				// etc etc, a little hackish but known to work with MySQL >= 4.1.
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   232
				$test_root = @mysql_connect($dbhost, $info['db_root_user'], $info['db_root_pass']);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   233
				if ( $test_root )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   234
				{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   235
					// We logged in with root rights, assume that we have appropriate permissions.
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   236
					// If not, well, the installation will fail. Tough on the user, but creating
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   237
					// test databases/users is too risky.
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   238
					
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   239
					// Does the database exist?
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   240
					$q = @mysql_query('USE `' . mysql_real_escape_string($info['db_name']) . '`;', $test_root);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   241
					if ( !$q )
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   242
					{
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   243
						// Nope, we'll have to create it
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   244
						$return['creating_db'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   245
						$return['last_error'] = mysql_error();
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   246
					}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   247
					
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   248
					$version = mysql_get_server_info($test_root);
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   249
					$return['version'] = array(
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   250
						'version' => $version,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   251
						'good' => version_compare($version, '4.0.17', '>=')
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   252
					);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   253
					
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   254
					$return['can_install'] = ( $return['version']['good'] ) ? true : false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   255
				}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   256
				else
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   257
				{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   258
					// Well that helped. Root credentials are bad.
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   259
					$return['creating_db'] = true;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   260
					$return['root_fail'] = true;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   261
				}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   262
			}
1379
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   263
			else
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   264
			{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   265
				// No root credentials, fail out
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   266
				$return['root_fail'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   267
			}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   268
		}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   269
		else
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   270
		{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   271
			// We're connected; do we have permission to use the database?
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   272
			$have_database = false;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   273
			$q = @mysql_query('USE `' . mysql_real_escape_string($info['db_name']) . '`;', $test);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   274
			if ( $q )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   275
			{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   276
				// Permissions are good and we're all connected. Perform version check...
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   277
				$version = mysql_get_server_info($test);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   278
				$return['version'] = array(
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   279
					'version' => $version,
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   280
					'good' => version_compare($version, '4.0.17', '>=')
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   281
				);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   282
				
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   283
				$return['can_install'] = ( $return['version']['good'] ) ? true : false;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   284
			}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   285
			else
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   286
			{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   287
				$return['last_error'] = mysql_error();
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   288
				$return['creating_db'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   289
				
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   290
				// We don't have permission to use the database or it doesn't exist.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   291
				// See if we have a root login to work with, if not then fail
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   292
				if ( !empty($info['db_root_user']) && !empty($info['db_root_pass']) )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   293
				{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   294
					// Log in with root rights and if that works, tell 'em we'll create the database.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   295
					$test_root = @mysql_connect($dbhost, $info['db_root_user'], $info['db_root_pass']);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   296
					if ( $test_root )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   297
					{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   298
						// We logged in with root rights, assume that we have appropriate permissions.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   299
						// If not, well, the installation will fail. Tough on the user, but creating
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   300
						// test databases/users is too risky.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   301
						
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   302
						// See if the database already exists
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   303
						$dbname = mysql_real_escape_string($info['db_name']);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   304
						$q = @mysql_query("SHOW DATABASES LIKE '$dbname';", $test_root);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   305
						if ( $q )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   306
						{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   307
							if ( mysql_num_rows($q) > 0 )
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   308
							{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   309
								$return['creating_db'] = false;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   310
								$return['creating_db_grant'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   311
							}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   312
							@mysql_free_result($q);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   313
						}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   314
						
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   315
						$version = mysql_get_server_info($test);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   316
						$return['version'] = array(
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   317
							'version' => $version,
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   318
							'good' => version_compare($version, '4.0.17', '>=')
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   319
						);
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   320
						
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   321
						$return['can_install'] = ( $return['version']['good'] ) ? true : false;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   322
					}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   323
					else
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   324
					{
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   325
						// Well that helped. Root credentials are bad.
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   326
						$return['creating_db'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   327
						$return['root_fail'] = true;
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   328
					}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   329
				}
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   330
				// No root credentials, fail out
5cbd678df965 Installer dev, everything is working now, so far as I can tell
Dan Fuhry <dan@enanocms.org>
parents: 1227
diff changeset
   331
			}
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   332
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   333
	}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   334
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   335
	if ( isset($test) && @is_resource($test) )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   336
		@mysql_close($test);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   337
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   338
	if ( isset($test_root) && @is_resource($test_root) )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   339
		@mysql_close($test_root);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   340
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   341
	echo enano_json_encode($return);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   342
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   343
	exit();
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   344
}
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   345
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   346
$ui->add_header('<script type="text/javascript" src="includes/js/formutils.js"></script>');
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   347
$ui->show_header();
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   349
?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   350
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   351
<div style="float: right; padding: 10px 0 10px 10px;">
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   352
	<img alt="MySQL logo" src="../images/about-powered-mysql.png" />
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   353
</div>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   354
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   355
<p><?php echo $lang->get('dbmysql_blurb_needdb'); ?></p>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   356
<p><?php echo $lang->get('dbmysql_blurb_howtomysql'); ?></p>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   357
<?php
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   358
if ( @file_exists('/etc/enano-is-virt-appliance') )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   359
{
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   360
	echo '<p>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   361
					' . $lang->get('database_vm_login_info', array( 'host' => 'localhost', 'user' => 'enano', 'pass' => 'clurichaun', 'name' => 'enano_www1' )) . '
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   362
				</p>';
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   363
}
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   364
?>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   365
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   366
<script type="text/javascript">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   367
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   368
	var tested = false;
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   369
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   370
	function verify(field)
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   371
	{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   372
		if ( tested && !field )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   373
			return true;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   374
		tested = false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   375
		if ( document.getElementById('verify_error').className != '' )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   376
		{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   377
			document.getElementById('verify_error').className = '';
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   378
			document.getElementById('verify_error').innerHTML = '';
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   379
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   380
		var frm = document.forms.database_info;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   381
		// List of fields
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   382
		var fields = {
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   383
			db_host: frm.db_host,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   384
			db_port: frm.db_port,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   385
			db_name: frm.db_name,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   386
			db_user: frm.db_user,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   387
			db_pass: frm.db_pass,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   388
			table_prefix: frm.table_prefix,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   389
			db_root_user: frm.db_root_user,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   390
			db_root_pass: frm.db_root_pass
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   391
		};
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   392
		var passed = true;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   393
		// Main validation
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   394
		if ( field == fields.db_host || !field )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   395
		{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   396
			var matches = fields.db_host.value.match(/^(([a-z0-9_-]+)((\.([a-z0-9_-]+))*)|:[A-z0-9_:\.\/-]+)$/);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   397
			document.getElementById('s_db_host').src = ( matches ) ? img_neu : img_bad;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   398
			if ( !matches )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   399
				passed = false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   400
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   401
		if ( field == fields.db_port || !field )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   402
		{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   403
			var matches = fields.db_port.value.match(/^[0-9]+$/);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   404
			document.getElementById('s_db_port').src = ( matches ) ? img_neu : img_bad;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   405
			if ( !matches )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   406
				passed = false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   407
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   408
		if ( field == fields.db_name || !field )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   409
		{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   410
			var matches = fields.db_name.value.match(/^[A-z0-9_-]+$/);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   411
			document.getElementById('s_db_name').src = ( matches ) ? img_neu : img_bad;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   412
			if ( !matches )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   413
				passed = false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   414
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   415
		if ( field == fields.db_user || field == fields.db_pass || !field )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   416
		{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   417
			var matches = fields.db_user.value.match(/^[A-z0-9_-]+$/);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   418
			document.getElementById('s_db_auth').src = ( matches ) ? img_neu : img_bad;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   419
			if ( !matches )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   420
				passed = false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   421
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   422
		if ( field == fields.table_prefix || !field )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   423
		{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   424
			var matches = fields.table_prefix.value.match(/^[a-z0-9_]*$/);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   425
			document.getElementById('s_table_prefix').src = ( matches ) ? img_good : img_bad;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   426
			if ( !matches )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   427
				passed = false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   428
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   429
		if ( field == fields.db_root_user || field == fields.db_root_pass || !field )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   430
		{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   431
			var matches = ( ( fields.db_root_user.value.match(/^[A-z0-9_-]+$/) && fields.db_root_pass.value.match(/^.+$/) ) || fields.db_root_user.value == '' );
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   432
			document.getElementById('s_db_root').src = ( matches ) ? img_neu : img_bad;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   433
			if ( !matches )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   434
				passed = false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   435
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   436
		return passed;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   437
	}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   438
	
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   439
	function ajaxTestConnection()
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   440
	{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   441
		if ( !verify() )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   442
		{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   443
			document.body.scrollTop = 0;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   444
			$('enano-body').effect('shake', {}, 750);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   445
			document.getElementById('verify_error').className = 'error-box-mini';
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   446
			document.getElementById('verify_error').innerHTML = $lang.get('meta_msg_err_verification');
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   447
			return false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   448
		}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   449
		install_set_ajax_loading();
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   450
		
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   451
		var frm = document.forms.database_info;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   452
		var connection_info = 'info=' + ajaxEscape(toJSONString({
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   453
				db_host: frm.db_host.value,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   454
				db_port: frm.db_port.value,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   455
				db_name: frm.db_name.value,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   456
				db_user: frm.db_user.value,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   457
				db_pass: frm.db_pass.value,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   458
				db_root_user: frm.db_root_user.value,
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   459
				db_root_pass: frm.db_root_pass.value
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   460
			}));
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   461
		
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   462
		ajaxPost(scriptPath + '/install/install.php?stage=database', connection_info + '&driver=mysql&ajax_test=on&language=' + enano_lang_code[ENANO_LANG_ID], function(ajax)
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   463
			{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   464
				if ( ajax.readyState == 4 && ajax.status == 200 )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   465
				{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   466
					setTimeout('install_unset_ajax_loading();', 750);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   467
					// Process response
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   468
					var response = String(ajax.responseText + '');
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   469
					if ( response.substr(0, 1) != '{' )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   470
					{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   471
						alert('Received an invalid JSON response from the server.');
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   472
						return false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   473
					}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   474
					response = parseJSON(response);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   475
					if ( response.mode == 'error' )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   476
					{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   477
						return false;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   478
					}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   479
					document.getElementById('e_db_host').innerHTML = '';
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   480
					document.getElementById('e_db_name').innerHTML = '';
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   481
					document.getElementById('e_db_auth').innerHTML = '';
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   482
					document.getElementById('e_db_root').innerHTML = '';
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   483
					if ( response.can_install )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   484
					{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   485
						tested = true;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   486
						var statuses = ['s_db_host', 's_db_name', 's_db_auth', 's_table_prefix', 's_db_root', 's_mysql_version'];
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   487
						for ( var i in statuses )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   488
						{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   489
							var img = document.getElementById(statuses[i]);
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   490
							if ( img )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   491
								img.src = img_good;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   492
						}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   493
						document.getElementById('e_mysql_version').innerHTML = $lang.get('dbmysql_msg_info_mysql_good');
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   494
						document.getElementById('verify_error').className = 'info-box-mini';
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   495
						document.getElementById('verify_error').innerHTML = $lang.get('dbmysql_msg_test_success');
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   496
						if ( response.creating_db )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   497
						{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   498
							document.getElementById('e_db_name').innerHTML = $lang.get('dbmysql_msg_warn_creating_db');
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   499
						}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   500
						if ( response.creating_user )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   501
						{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   502
							document.getElementById('e_db_auth').innerHTML = $lang.get('dbmysql_msg_warn_creating_user');
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   503
						}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   504
					}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   505
					else
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   506
					{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   507
						// Oh dear, oh dear, oh dear, oh dear, oh dear...
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   508
						if ( response.creating_db )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   509
						{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   510
							document.getElementById('e_db_name').innerHTML = $lang.get('dbmysql_msg_err_mysql_dbexist', { mysql_error: response.last_error });
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   511
							document.getElementById('s_db_name').src = img_bad;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   512
						}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   513
						if ( response.creating_user )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   514
						{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   515
							document.getElementById('e_db_auth').innerHTML = $lang.get('dbmysql_msg_err_mysql_auth', { mysql_error: response.last_error });
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   516
							document.getElementById('s_db_auth').src = img_bad;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   517
						}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   518
						if ( !response.host_good )
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   519
						{
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   520
							document.getElementById('e_db_host').innerHTML = $lang.get('dbmysql_msg_err_mysql_connect', { db_host: frm.db_host.value, mysql_error: response.last_error });
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   521
							document.getElementById('s_db_host').src = img_bad;
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   522
						}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   523
					}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   524
				}
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   525
			});
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   526
	}
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   527
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   528
</script>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   529
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   530
<form action="install.php?stage=database" method="post" name="database_info">
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   531
<input type="hidden" name="language" value="<?php echo $lang_id; ?>" />
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   532
<input type="hidden" name="driver" value="mysql" />
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   533
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   534
<table border="0" cellspacing="0" cellpadding="10" width="100%">
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   535
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   536
		<td colspan="3" style="text-align: center">
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   537
			<h3><?php echo $lang->get('dbmysql_table_title'); ?></h3>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   538
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   539
	</tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   540
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   541
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   542
			<b><?php echo $lang->get('dbmysql_field_hostname_title'); ?></b>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   543
			<br /><?php echo $lang->get('dbmysql_field_hostname_body'); ?>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   544
			<br /><span style="color: #993300" id="e_db_host"></span>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   545
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   546
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   547
			<input onkeyup="verify(this);" tabindex="1" name="db_host" size="30" type="text" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   548
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   549
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   550
			<img id="s_db_host" alt="Good/bad icon" src="../images/checkbad.png" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   551
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   552
	</tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   553
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   554
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   555
			<b><?php echo $lang->get('dbmysql_field_port_title'); ?></b>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   556
			<br /><?php echo $lang->get('dbmysql_field_port_body'); ?>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   557
			<br /><span style="color: #993300" id="e_db_port"></span>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   558
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   559
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   560
			<input onkeyup="verify(this);" tabindex="2" name="db_port" size="5" type="text" value="3306" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   561
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   562
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   563
			<img id="s_db_port" alt="Good/bad icon" src="../images/checkbad.png" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   564
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   565
	</tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   566
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   567
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   568
			<b><?php echo $lang->get('dbmysql_field_dbname_title'); ?></b><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   569
			<?php echo $lang->get('dbmysql_field_dbname_body'); ?><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   570
			<span style="color: #993300" id="e_db_name"></span>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   571
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   572
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   573
			<input onkeyup="verify(this);" tabindex="3" name="db_name" size="30" type="text" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   574
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   575
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   576
			<img id="s_db_name" alt="Good/bad icon" src="../images/checkbad.png" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   577
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   578
	</tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   579
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   580
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   581
			<b><?php echo $lang->get('dbmysql_field_dbauth_title'); ?></b><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   582
			<?php echo $lang->get('dbmysql_field_dbauth_body'); ?><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   583
			<span style="color: #993300" id="e_db_auth"></span>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   584
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   585
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   586
			<input onkeyup="verify(this);" tabindex="4" name="db_user" size="30" type="text" /><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   587
			<br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   588
			<input name="db_pass" tabindex="5" size="30" type="password" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   589
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   590
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   591
			<img id="s_db_auth" alt="Good/bad icon" src="../images/checkbad.png" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   592
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   593
	</tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   594
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   595
		<td colspan="3" style="text-align: center">
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   596
			<h3><?php echo $lang->get('database_heading_optionalinfo'); ?></h3>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   597
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   598
	</tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   599
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   600
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   601
			<b><?php echo $lang->get('dbmysql_field_tableprefix_title'); ?></b><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   602
			<?php echo $lang->get('dbmysql_field_tableprefix_body'); ?>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   603
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   604
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   605
			<input onkeyup="verify(this);" tabindex="6" name="table_prefix" size="30" type="text" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   606
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   607
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   608
			<img id="s_table_prefix" alt="Good/bad icon" src="../images/check.png" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   609
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   610
	</tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   611
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   612
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   613
			<b><?php echo $lang->get('dbmysql_field_rootauth_title'); ?></b><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   614
			<?php echo $lang->get('dbmysql_field_rootauth_body'); ?><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   615
			<span style="color: #993300" id="e_db_root"></span>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   616
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   617
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   618
			<input onkeyup="verify(this);" tabindex="7" name="db_root_user" size="30" type="text" /><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   619
			<br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   620
			<input onkeyup="verify(this);" tabindex="8" name="db_root_pass" size="30" type="password" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   621
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   622
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   623
			<img id="s_db_root" alt="Good/bad icon" src="../images/check.png" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   624
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   625
	</tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   626
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   627
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   628
			<b><?php echo $lang->get('dbmysql_field_mysqlversion_title'); ?></b>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   629
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   630
		<td id="e_mysql_version">
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   631
			<?php echo $lang->get('dbmysql_field_mysqlversion_blurb_willbechecked'); ?>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   632
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   633
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   634
			<img id="s_mysql_version" alt="Good/bad icon" src="../images/checkunk.png" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   635
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   636
	</tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   637
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   638
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   639
			<b><?php echo $lang->get('dbmysql_field_droptables_title'); ?></b><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   640
			<?php echo $lang->get('dbmysql_field_droptables_body'); ?>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   641
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   642
		<td colspan="2">
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   643
			<input type="checkbox" tabindex="9" name="drop_tables" id="dtcheck" />  <label for="dtcheck"><?php echo $lang->get('dbmysql_field_droptables_lbl'); ?></label>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   644
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   645
	</tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   646
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   647
		<td colspan="3" style="text-align: center">
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   648
			<input type="button" tabindex="10" value="<?php echo $lang->get('dbmysql_btn_testconnection'); ?>" onclick="ajaxTestConnection();" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   649
			<div id="verify_error"></div>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   650
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   651
	</tr>
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   652
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   653
</table>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   654
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   655
<table border="0">
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   656
	<tr>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   657
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   658
			<input type="submit" tabindex="11" value="<?php echo $lang->get('meta_btn_continue'); ?>" onclick="return verify();" name="_cont" />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   659
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   660
		<td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   661
			<p>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   662
				<span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   663
				&bull; <?php echo $lang->get('database_objective_test'); ?><br />
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   664
				&bull; <?php echo $lang->get('database_objective_uncrypt'); ?>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   665
			</p>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   666
		</td>
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   667
	</tr>
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   668
</table>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   669
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   670
</form>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   671
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   672
<script type="text/javascript">
1227
bdac73ed481e Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents: 1081
diff changeset
   673
	verify();
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   674
</script>
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   675