BMLT Root Server
installer.php
Go to the documentation of this file.
1 <?php
2 /*
3  This file is part of the Basic Meeting List Toolbox (BMLT).
4 
5  Find out more at: https://bmlt.app
6 
7  BMLT is free software: you can redistribute it and/or modify
8  it under the terms of the MIT License.
9 
10  BMLT is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  MIT License for more details.
14 
15  You should have received a copy of the MIT License along with this code.
16  If not, see <https://opensource.org/licenses/MIT>.
17 */
18 defined('BMLT_EXEC') or die('Cannot Execute Directly'); // Makes sure that this file is in the correct context.
19 
20 if (isset($http_vars['ajax_req']) && $http_vars['ajax_req']) {
21  require_once(dirname(__FILE__).'/installer_ajax.php');
22 } else {
23  require_once(dirname(__FILE__).'/../../server/shared/Array2Json.php');
24 
25  // We do everything we can to ensure that the requested language file is loaded.
26  if (file_exists(dirname(__FILE__).'/../server_admin/lang/'.$lang.'/install_wizard_strings.php')) {
27  require_once(dirname(__FILE__).'/../server_admin/lang/'.$lang.'/install_wizard_strings.php');
28  } else {
29  require_once(dirname(__FILE__).'/../server_admin/lang/en/install_wizard_strings.php');
30  }
31 
33 
34  // This is our preferences state array, and contains the hardwired defaults.
35  $prefs_array = array ( 'dbName' => '',
36  'dbUser' => '',
37  'dbPassword' => '',
38 
39  'dbType' => 'mysql',
40  'dbServer' => 'localhost',
41  'dbPrefix' => 'na',
42 
43  'comdef_global_language' => $lang,
44  'min_pw_len' => $comdef_install_wizard_strings['DefaultPasswordLength'],
45  'number_of_meetings_for_auto' => $comdef_install_wizard_strings['DefaultMeetingCount'],
46  'change_depth_for_meetings' => $comdef_install_wizard_strings['DefaultChangeDepth'],
47 
48  'region_bias' => $comdef_install_wizard_strings['DefaultRegionBias'],
49  'search_spec_map_center' => $comdef_install_wizard_strings['search_spec_map_center'],
50  'bmlt_title' => $comdef_install_wizard_strings['TitleTextInitialText'],
51  'banner_text' => $comdef_install_wizard_strings['BannerTextInitialText'],
52  'comdef_distance_units' => $comdef_install_wizard_strings['DefaultDistanceUnits'],
53  'default_duration_time' => $comdef_install_wizard_strings['DefaultDurationTime'],
54  'enable_language_selector' => false,
55 
56  /* These are "hard-coded," and can be changed later. */
57  'default_duration' => $comdef_install_wizard_strings['DurationTextInitialText'],
58  'time_format' => $comdef_install_wizard_strings['time_format'],
59  'change_date_format' => $comdef_install_wizard_strings['change_date_format'],
60  'admin_session_name' => 'BMLT_Admin'
61  );
62 
63  ?>
64  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
65  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
66  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
67  <head>
68  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
69  <meta http-equiv="Content-Script-Type" content="text/javascript" />
70  <title>BMLT Installer</title>
71  <?php
72  $https = (!empty($_SERVER['HTTPS']) && (($_SERVER['HTTPS'] !== 'off') || ($port == 443)));
73  $url_path = 'http'.($https ? 's' : '').'://'.$_SERVER['SERVER_NAME'].((($_SERVER['SERVER_PORT'] != 80) && ($_SERVER['SERVER_PORT'] != 443)) ? ':'.$_SERVER['SERVER_PORT'] : '').'/'.dirname($_SERVER['PHP_SELF']);
74  $shortcut_icon = "$url_path/local_server/server_admin/style/images/shortcut.png";
75  $stylesheet = "$url_path/local_server/server_admin/style/install_wizard_styles.css?v=". time();
76  ?>
77  <link rel="stylesheet" href="<?php echo $stylesheet ?>" />
78  </head>
79  <body>
80  <?php require_once(dirname(__FILE__).'/installer_guts.php'); ?>
81  </body>
82  </html>
83  <?php
84  die(); // We stop all processing here. This prevents the script from continuing to the rest of the admin section.
85 }
86 ?>
if($handler instanceof c_comdef_admin_ajax_handler)
$url_path
Definition: installer.php:73
global $comdef_install_wizard_strings
Definition: installer.php:32
global $http_vars
Definition: index.php:21
$shortcut_icon
Definition: installer.php:74
$stylesheet
Definition: installer.php:75
defined('BMLT_EXEC') or define('BMLT_EXEC'
Definition: index.php:3
$https
Definition: installer.php:72
global $prefs_array
Definition: installer.php:32