First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View file

@ -0,0 +1,361 @@
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
* $Id$
* @param $filesDirectory
*/
function civicrm_setup($filesDirectory) {
global $crmPath, $sqlPath, $pkgPath, $tplPath;
global $compileDir;
// Setup classloader
// This is needed to allow CiviCRM to be installed by drush.
// TODO: move to civicrm.drush.inc drush_civicrm_install()
global $crmPath;
require_once $crmPath . '/CRM/Core/ClassLoader.php';
CRM_Core_ClassLoader::singleton()->register();
$sqlPath = $crmPath . DIRECTORY_SEPARATOR . 'sql';
$tplPath = $crmPath . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'CRM' . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR;
if (!is_dir($filesDirectory)) {
mkdir($filesDirectory, 0777);
chmod($filesDirectory, 0777);
}
$scratchDir = $filesDirectory . DIRECTORY_SEPARATOR . 'civicrm';
if (!is_dir($scratchDir)) {
mkdir($scratchDir, 0777);
}
$compileDir = $scratchDir . DIRECTORY_SEPARATOR . 'templates_c' . DIRECTORY_SEPARATOR;
if (!is_dir($compileDir)) {
mkdir($compileDir, 0777);
}
$compileDir = addslashes($compileDir);
}
/**
* @param string $name
* @param $buffer
*/
function civicrm_write_file($name, &$buffer) {
$fd = fopen($name, "w");
if (!$fd) {
die("Cannot open $name");
}
fwrite($fd, $buffer);
fclose($fd);
}
/**
* @param $config
*/
function civicrm_main(&$config) {
global $sqlPath, $crmPath, $cmsPath, $installType;
if ($installType == 'drupal') {
$siteDir = isset($config['site_dir']) ? $config['site_dir'] : getSiteDir($cmsPath, $_SERVER['SCRIPT_FILENAME']);
civicrm_setup($cmsPath . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . $siteDir . DIRECTORY_SEPARATOR . 'files'
);
}
elseif ($installType == 'backdrop') {
civicrm_setup($cmsPath . DIRECTORY_SEPARATOR . 'files');
}
elseif ($installType == 'wordpress') {
$upload_dir = wp_upload_dir();
$files_dirname = $upload_dir['basedir'];
civicrm_setup($files_dirname);
}
$parts = explode(':', $config['mysql']['server']);
if (empty($parts[1])) {
$parts[1] = 3306;
}
$config['mysql']['server'] = implode(':', $parts);
$dsn = "mysql://{$config['mysql']['username']}:{$config['mysql']['password']}@{$config['mysql']['server']}/{$config['mysql']['database']}?new_link=true";
civicrm_source($dsn, $sqlPath . DIRECTORY_SEPARATOR . 'civicrm.mysql');
if (!empty($config['loadGenerated'])) {
civicrm_source($dsn, $sqlPath . DIRECTORY_SEPARATOR . 'civicrm_generated.mysql', TRUE);
}
else {
if (isset($config['seedLanguage'])
and preg_match('/^[a-z][a-z]_[A-Z][A-Z]$/', $config['seedLanguage'])
and file_exists($sqlPath . DIRECTORY_SEPARATOR . "civicrm_data.{$config['seedLanguage']}.mysql")
and file_exists($sqlPath . DIRECTORY_SEPARATOR . "civicrm_acl.{$config['seedLanguage']}.mysql")
) {
civicrm_source($dsn, $sqlPath . DIRECTORY_SEPARATOR . "civicrm_data.{$config['seedLanguage']}.mysql");
civicrm_source($dsn, $sqlPath . DIRECTORY_SEPARATOR . "civicrm_acl.{$config['seedLanguage']}.mysql");
}
else {
civicrm_source($dsn, $sqlPath . DIRECTORY_SEPARATOR . 'civicrm_data.mysql');
civicrm_source($dsn, $sqlPath . DIRECTORY_SEPARATOR . 'civicrm_acl.mysql');
}
}
// generate backend settings file
if ($installType == 'drupal') {
$configFile = $cmsPath . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . $siteDir . DIRECTORY_SEPARATOR . 'civicrm.settings.php';
}
elseif ($installType == 'backdrop') {
$configFile = $cmsPath . DIRECTORY_SEPARATOR . 'civicrm.settings.php';
}
elseif ($installType == 'wordpress') {
$configFile = $files_dirname . DIRECTORY_SEPARATOR . 'civicrm' . DIRECTORY_SEPARATOR . 'civicrm.settings.php';
}
$string = civicrm_config($config);
civicrm_write_file($configFile,
$string
);
}
/**
* @param $dsn
* @param string $fileName
* @param bool $lineMode
*/
function civicrm_source($dsn, $fileName, $lineMode = FALSE) {
global $crmPath;
require_once "$crmPath/packages/DB.php";
// CRM-19699 See also CRM_Core_DAO for PHP7 mysqli compatiblity.
// Duplicated here because this is not using CRM_Core_DAO directly
// and this function may be called directly from Drush.
if (!defined('DB_DSN_MODE')) {
define('DB_DSN_MODE', 'auto');
}
$db = DB::connect($dsn);
if (PEAR::isError($db)) {
die("Cannot open $dsn: " . $db->getMessage());
}
$db->query("SET NAMES utf8");
$db->query("SET NAMES utf8");
if (!$lineMode) {
$string = file_get_contents($fileName);
// change \r\n to fix windows issues
$string = str_replace("\r\n", "\n", $string);
//get rid of comments starting with # and --
$string = preg_replace("/^#[^\n]*$/m", "\n", $string);
$string = preg_replace("/^(--[^-]).*/m", "\n", $string);
$queries = preg_split('/;\s*$/m', $string);
foreach ($queries as $query) {
$query = trim($query);
if (!empty($query)) {
$res = &$db->query($query);
if (PEAR::isError($res)) {
print_r($res);
die("Cannot execute $query: " . $res->getMessage());
}
}
}
}
else {
$fd = fopen($fileName, "r");
while ($string = fgets($fd)) {
$string = preg_replace("/^#[^\n]*$/m", "\n", $string);
$string = preg_replace("/^(--[^-]).*/m", "\n", $string);
$string = trim($string);
if (!empty($string)) {
$res = &$db->query($string);
if (PEAR::isError($res)) {
die("Cannot execute $string: " . $res->getMessage());
}
}
}
}
}
/**
* @param $config
*
* @return string
*/
function civicrm_config(&$config) {
global $crmPath, $comPath;
global $compileDir;
global $tplPath, $installType;
// Ex: $extraSettings[] = '$civicrm_settings["domain"]["foo"] = "bar";';
$extraSettings = array();
$params = array(
'crmRoot' => $crmPath,
'templateCompileDir' => $compileDir,
'frontEnd' => 0,
'dbUser' => addslashes($config['mysql']['username']),
'dbPass' => addslashes($config['mysql']['password']),
'dbHost' => $config['mysql']['server'],
'dbName' => addslashes($config['mysql']['database']),
);
$params['baseURL'] = isset($config['base_url']) ? $config['base_url'] : civicrm_cms_base();
if ($installType == 'drupal' && defined('VERSION')) {
if (version_compare(VERSION, '8.0') >= 0) {
$params['cms'] = 'Drupal';
$params['CMSdbUser'] = addslashes($config['drupal']['username']);
$params['CMSdbPass'] = addslashes($config['drupal']['password']);
$params['CMSdbHost'] = $config['drupal']['host'] . ":" . !empty($config['drupal']['port']) ? $config['drupal']['port'] : "3306";
$params['CMSdbName'] = addslashes($config['drupal']['database']);
}
elseif (version_compare(VERSION, '7.0-rc1') >= 0) {
$params['cms'] = 'Drupal';
$params['CMSdbUser'] = addslashes($config['drupal']['username']);
$params['CMSdbPass'] = addslashes($config['drupal']['password']);
$params['CMSdbHost'] = $config['drupal']['server'];
$params['CMSdbName'] = addslashes($config['drupal']['database']);
}
elseif (version_compare(VERSION, '6.0') >= 0) {
$params['cms'] = 'Drupal6';
$params['CMSdbUser'] = addslashes($config['drupal']['username']);
$params['CMSdbPass'] = addslashes($config['drupal']['password']);
$params['CMSdbHost'] = $config['drupal']['server'];
$params['CMSdbName'] = addslashes($config['drupal']['database']);
}
}
elseif ($installType == 'drupal') {
$params['cms'] = $config['cms'];
$params['CMSdbUser'] = addslashes($config['cmsdb']['username']);
$params['CMSdbPass'] = addslashes($config['cmsdb']['password']);
$params['CMSdbHost'] = $config['cmsdb']['server'];
$params['CMSdbName'] = addslashes($config['cmsdb']['database']);
}
elseif ($installType == 'backdrop') {
$params['cms'] = 'Backdrop';
$params['CMSdbUser'] = addslashes($config['backdrop']['username']);
$params['CMSdbPass'] = addslashes($config['backdrop']['password']);
$params['CMSdbHost'] = $config['backdrop']['server'];
$params['CMSdbName'] = addslashes($config['backdrop']['database']);
}
else {
$params['cms'] = 'WordPress';
$params['CMSdbUser'] = addslashes(DB_USER);
$params['CMSdbPass'] = addslashes(DB_PASSWORD);
$params['CMSdbHost'] = DB_HOST;
$params['CMSdbName'] = addslashes(DB_NAME);
// CRM-12386
$params['crmRoot'] = addslashes($params['crmRoot']);
//CRM-16421
$extraSettings[] = sprintf('$civicrm_paths[\'wp.frontend.base\'][\'url\'] = %s;', var_export(home_url() . '/', 1));
$extraSettings[] = sprintf('$civicrm_paths[\'wp.backend.base\'][\'url\'] = %s;', var_export(admin_url(), 1));
$extraSettings[] = sprintf('$civicrm_setting[\'URL Preferences\'][\'userFrameworkResourceURL\'] = %s;', var_export(plugin_dir_url(CIVICRM_PLUGIN_FILE) . 'civicrm', 1));
}
if ($extraSettings) {
$params['extraSettings'] = "Additional settings generated by installer:\n" . implode("\n", $extraSettings);
}
else {
$params['extraSettings'] = "";
}
$params['siteKey'] = md5(rand() . mt_rand() . rand() . uniqid('', TRUE) . $params['baseURL']);
// Would prefer openssl_random_pseudo_bytes(), but I don't think it's universally available.
$str = file_get_contents($tplPath . 'civicrm.settings.php.template');
foreach ($params as $key => $value) {
$str = str_replace('%%' . $key . '%%', $value, $str);
}
return trim($str);
}
/**
* @return string
*/
function civicrm_cms_base() {
global $installType;
// for drupal
$numPrevious = 6;
if (isset($_SERVER['HTTPS']) &&
!empty($_SERVER['HTTPS']) &&
strtolower($_SERVER['HTTPS']) != 'off'
) {
$url = 'https://' . $_SERVER['HTTP_HOST'];
}
else {
$url = 'http://' . $_SERVER['HTTP_HOST'];
}
$baseURL = $_SERVER['SCRIPT_NAME'];
if ($installType == 'drupal' || $installType == 'backdrop') {
//don't assume 6 dir levels, as civicrm
//may or may not be in sites/all/modules/
//lets allow to install in custom dir. CRM-6840
global $cmsPath;
$crmDirLevels = str_replace($cmsPath, '', str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME']));
$baseURL = str_replace($crmDirLevels, '', str_replace('\\', '/', $baseURL));
}
elseif ($installType == 'wordpress') {
$baseURL = str_replace($url, '', site_url());
}
else {
for ($i = 1; $i <= $numPrevious; $i++) {
$baseURL = dirname($baseURL);
}
}
// remove the last directory separator string from the directory
if (substr($baseURL, -1, 1) == DIRECTORY_SEPARATOR) {
$baseURL = substr($baseURL, 0, -1);
}
// also convert all DIRECTORY_SEPARATOR to the forward slash for windoze
$baseURL = str_replace(DIRECTORY_SEPARATOR, '/', $baseURL);
if ($baseURL != '/') {
$baseURL .= '/';
}
return $url . $baseURL;
}
/**
* @return string
*/
function civicrm_home_url() {
$drupalURL = civicrm_cms_base();
return $drupalURL . 'index.php?q=civicrm';
}

View file

@ -0,0 +1,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo $errorTitle ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href=<?php global
$installURLPath; echo $installURLPath . "template.css"?> />
</head>
<body>
<div id="All">
<h1><?php echo $errorTitle ?></h1>
<?php echo $errorMsg ?>
</div>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,50 @@
<?php $langs = array (
'af_ZA' => 'Afrikaans',
'sq_AL' => 'Albanian',
'ar_EG' => 'Arabic',
'bg_BG' => 'Bulgarian',
'ca_ES' => 'Catalan; Valencian',
'zh_CN' => 'Chinese (China)',
'zh_TW' => 'Chinese (Taiwan)',
'cs_CZ' => 'Czech',
'da_DK' => 'Danish',
'nl_NL' => 'Dutch',
'en_AU' => 'English (Australia)',
'en_CA' => 'English (Canada)',
'en_GB' => 'English (United Kingdom)',
'en_US' => 'English (United States)',
'et_EE' => 'Estonian',
'fi_FI' => 'Finnish',
'fr_CA' => 'French (Canada)',
'fr_FR' => 'French (France)',
'de_DE' => 'German',
'de_CH' => 'German (Swiss)',
'el_GR' => 'Greek, Modern',
'he_IL' => 'Hebrew (modern)',
'hi_IN' => 'Hindi',
'hu_HU' => 'Hungarian',
'id_ID' => 'Indonesian',
'it_IT' => 'Italian',
'ja_JP' => 'Japanese',
'km_KH' => 'Khmer',
'lt_LT' => 'Lithuanian',
'nb_NO' => 'Norwegian Bokmål',
'fa_IR' => 'Persian (Iran)',
'pl_PL' => 'Polish',
'pt_BR' => 'Portuguese (Brazil)',
'pt_PT' => 'Portuguese (Portugal)',
'ro_RO' => 'Romanian, Moldavian, Moldovan',
'ru_RU' => 'Russian',
'sr_RS' => 'Serbian',
'sk_SK' => 'Slovak',
'sl_SI' => 'Slovene',
'es_ES' => 'Spanish; Castilian (Spain)',
'es_MX' => 'Spanish; Castilian (Mexico)',
'es_PR' => 'Spanish; Castilian (Puerto Rico)',
'sv_SE' => 'Swedish',
'te_IN' => 'Telugu',
'th_TH' => 'Thai',
'tr_TR' => 'Turkish',
'uk_UA' => 'Ukrainian',
'vi_VN' => 'Vietnamese',
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,89 @@
body {
background: #eee;
}
#All {
font-family: Arial, sans-serif;
width: auto;
margin: 0.5em auto;
padding: 1em;
border: 1px #ccc solid;
border-radius: 10px;
background: #fff;
max-width: 1200px;
}
.civicrm-logo {
float: right;
}
form {
margin: 0;
}
h1 {
margin-top: 0;
}
li {
padding-bottom: 1.5em;
}
label span {
float: left;
width: 14em;
}
.good td {
color: green;
}
.warning td {
color: orange;
}
.testResults .error td {
background-color: #c00;
border: 1px #700 solid;
color: white;
}
p.error {
padding: 0.5em;
background-color: #c00;
border: 1px #700 solid;
color: white;
clear: both;
}
p.warning {
padding: 0.5em;
background-color: #e70;
border: 1px #a70 solid;
color: white;
clear: both;
}
p.good {
padding: 0.5em;
background-color: #0c0;
border: 1px #070 solid;
color: white;
clear: both;
}
p.error a {
color: #FFF;
font-weight: bold;
}
.testResults {
border-collapse: collapse;
font-size: 80%;
}
.testResults td {
border: 1px #ccc solid;
width: 400px;
padding: 0.2em;
}

View file

@ -0,0 +1,166 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $short_lang_code; ?>" lang="<?php echo $short_lang_code; ?>" dir="<?php echo $text_direction; ?>">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title><?php echo ts('CiviCRM Installer'); ?></title>
<link rel="stylesheet" type="text/css" href=<?php echo $installURLPath . "template.css"?> />
<?php
if ($text_direction == 'rtl') {
echo " <link rel='stylesheet' type='text/css' href='{$installURLPath}template-rtl.css' />\n";
}
?>
</head>
<body>
<div id="All">
<div class="civicrm-logo"><strong><?php echo ts('Version %1', array(1 => "{$civicrm_version['version']} {$civicrm_version['cms']}")); ?></strong><br/>
<span><img src=<?php echo $installURLPath . "block_small.png"?> /></span>
</div>
<h1><?php echo ts("CiviCRM Installer"); ?></h1>
<p><?php echo ts("Thanks for choosing CiviCRM! Please follow the instructions below to install CiviCRM."); ?></p>
<form name="civicrm_form" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
<input type="hidden" name="civicrm_install_type" value="<?php echo $installType; ?>" />
<?php if (isset($hasErrorOtherThanDatabase)) { ?>
<p class="error"><?php echo ts('We are not able to install the software. Please <a href="#requirements">see below</a> for details.'); ?></p>
<?php } else { ?>
<?php if ($req->hasWarnings()) { ?>
<p class="warning"><?php echo ts('There are some issues that we recommend you look at before installing, however, you are still able to install the software. Please see below for details.'); ?></p>
<?php } elseif (!$dbReq->hasErrors()) { ?>
<p class="good"><?php echo ts("You're ready to install!"); ?></p>
<?php } ?>
<p>
<input id="install_button" type="submit" name="go" value="<?php echo ts('Check Requirements and Install CiviCRM', array('escape' => 'js')); ?>" onclick="document.getElementById('saving_top').style.display = ''; this.value = '<?php echo ts('Installing CiviCRM...', array('escape' => 'js')); ?>'" />
<span id="saving_top" style="display: none">
&nbsp;
<img src=<?php echo $installURLPath . "network-save.gif"?> />
<?php echo ts('(this will take a few minutes)'); ?>
</span>
</p>
<?php } ?>
<h4><?php echo ts('Language and Region Settings'); ?></h4>
<p><?php echo ts('CiviCRM has been translated to many languages, thanks to its community of translators. By selecting another language, the installer may be available in that language. The initial configuration of the basic data will also be set to that language (ex: individual prefixes, suffixes, activity types, etc.). <a href="%1">Learn more about using CiviCRM in other languages.</a>', array(1 => 'http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=88408149')); ?></p>
<script>
function civicrmInstallerSetLanguage(language) {
var location = window.location.toString();
if (location.match(/seedLanguage=.._../)) {
location = location.replace(/seedLanguage=.._../, 'seedLanguage=' + language);
window.location = location;
}
else {
window.location += (location.indexOf('?') < 0 ? '?' : '&') + 'seedLanguage=' + language;
}
}
</script>
<p style="margin-left: 2em" id="locale">
<label for="seedLanguage"><span><?php echo ts('Language of basic data:'); ?></span></label>
<select id="seedLanguage" name="seedLanguage" onchange="civicrmInstallerSetLanguage(this.value);">
<?php
foreach ($langs as $locale => $language) {
$selected = ($locale == $seedLanguage) ? 'selected="selected"' : '';
echo "<option value='$locale' $selected>$language</option>";
}
?>
</select>
<noscript>
<input type="submit" name="setlanguage" value="<?php echo ts('Change language', array('escape' => 'js')); ?>" />
</noscript>
<span class="testResults">
<?php
if (count($langs) < 2) {
echo "(download the civicrm-{$civicrm_version['version']}-l10n.tar.gz file and unzip into CiviCRMs directory to add languages here)";
}
?>
</span>
</p>
<input type="hidden" name="database" value="MySQLDatabase" />
<h2><?php echo ts('Database Version and Connection Settings'); ?></h2>
<p>
<?php echo ts('CiviCRM stores its content in a MySQL database. Please provide the username and password to connect to the server here. If this account has permission to create databases, then we will create the database for you; otherwise, you must give the name of a database that already exists.'); ?>
</p>
<?php if ($dbReq->hasErrors()) { ?>
<p class="error"><?php echo ts("Your database settings don't appear to be correct. Please check the <a href='%1'>Database Details</a> below for specific errors.", array(1 => '#dbDetails')); ?></p>
<?php } else { ?>
<p class="good"><?php echo ts("Database version and connection settings have been verified and look correct!"); ?></p>
<?php } ?>
<h4><?php echo ts('CiviCRM Database Settings'); ?></h4>
<p style="margin-left: 2em" id="mysql_credentials">
<label for="mysql_server"> <span><?php echo ts('MySQL server:'); ?></span> <input id="mysql_server" type="text" name="mysql[server]" value="<?php echo $databaseConfig['server']; ?>" /></label>
<span class="testResults"> <?php echo ts('If your mysql server is running on other port than default 3306, provide server info as server:port (i.e. localhost:1234) ') ?> </span> </br>
<label for="mysql_username"> <span><?php echo ts('MySQL username:'); ?></span> <input id="mysql_username" type="text" name="mysql[username]" value="<?php echo $databaseConfig['username']; ?>" /></label> <br />
<label for="mysql_password"> <span><?php echo ts('MySQL password:'); ?></span> <input id="mysql_password" type="password" name="mysql[password]" value="<?php echo $databaseConfig['password']; ?>" /></label> <br />
<label for="mysql_database"><span><?php echo ts('MySQL database:'); ?></span> <input id="mysql_database" type="text" name="mysql[database]" value="<?php echo $databaseConfig['database']; ?>" /></label> <br />
</p>
<?php if ($installType == 'drupal') { ?>
<h4><?php echo ts('Drupal Database Settings'); ?></h4>
<p style="margin-left: 2em" id="drupal_credentials" > <!--style="display: none"-->
<label for="drupal_server"> <span><?php echo ts('MySQL server:'); ?></span> <input id="drupal_server" type="text" name="drupal[server]" value="<?php echo $drupalConfig['server']; ?>" /></label>
<span class="testResults"> <?php echo ts('If your mysql server is running on other port than default 3306, provide server info as server:port (i.e. localhost:1234) ') ?> </span> </br>
<label for="drupal_username"> <span><?php echo ts('MySQL username:'); ?></span> <input id="drupal_username" type="text" name="drupal[username]" value="<?php echo $drupalConfig['username']; ?>" /></label> <br />
<label for="drupal_password"> <span><?php echo ts('MySQL password:'); ?></span> <input id="drupal_password" type="password" name="drupal[password]" value="<?php echo $drupalConfig['password']; ?>" /></label> <br />
<label for="drupal_database"><span><?php echo ts('MySQL database:'); ?></span> <input id="drupal_database" type="text" name="drupal[database]" value="<?php echo $drupalConfig['database']; ?>" /></label> <br />
</p>
<?php } ?>
<?php if ($installType == 'backdrop') { ?>
<h4><?php echo ts('Backdrop Database Settings'); ?></h4>
<p style="margin-left: 2em" id="backdrop_credentials" > <!--style="display: none"-->
<label for="backdrop_server"> <span><?php echo ts('MySQL server:'); ?></span> <input id="backdrop_server" type="text" name="backdrop[server]" value="<?php echo $backdropConfig['server'] ?>" /></label>
<span class="testResults"> <?php echo ts('If your mysql server is running on other port than default 3306, provide server info as server:port (i.e. localhost:1234) ') ?> </span> </br>
<label for="backdrop_username"> <span><?php echo ts('MySQL username:'); ?></span> <input id="backdrop_username" type="text" name="backdrop[username]" value="<?php echo $backdropConfig['username'] ?>" /></label> <br />
<label for="backdrop_password"> <span><?php echo ts('MySQL password:'); ?></span> <input id="backdrop_password" type="password" name="backdrop[password]" value="<?php echo $backdropConfig['password'] ?>" /></label> <br />
<label for="backdrop_database"><span><?php echo ts('MySQL database:'); ?></span> <input id="backdrop_database" type="text" name="backdrop[database]" value="<?php echo $backdropConfig['database'] ?>" /></label> <br />
</p>
<?php } ?>
<h4><?php echo ts('Other Settings'); ?></h4>
<p>
<label for="loadGenerated"><span>Load sample data:</span><input id="loadGenerated" type="checkbox" name="loadGenerated" value=1 <?php if ( $loadGenerated == 1 ) { echo "checked='checked'"; } ?> /></label> <br />
<span class="testResults">Check this box to pre-populate CiviCRM with sample English contact records, online contribution pages, profile forms, etc. These examples can help you learn about CiviCRM features.</span><br />
</p>
<p style="margin-left: 2em"><input type="submit" value="<?php echo ts('Re-check requirements', array('escape' => 'js')); ?>" /></p>
<a name="dbDetails">
<?php
echo '<h4>' . ts('CiviCRM Database Details') . '</h4>';
$dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'CiviCRM')));
?>
<?php if ($installType == 'drupal') {
echo "<h4>" . ts('Drupal Database Details') . "</h4>";
$dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'Drupal')));
}?>
<?php if ($installType == 'backdrop') {
echo "<h4>" . ts('Backdrop Database Details') . "</h4>";
$dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'Backdrop')));
}?>
<br /><hr />
<h2 id="requirements"><?php echo ts('Requirements'); ?></h2>
<?php
$req->showTable();
?>
</form>
</div>
</body>
</html>