X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Finstall-inc.php;h=d2fb295a77c7c02fc72edc60713ca5a9048b37d4;hb=ccc4a69ce9b17aa8d7b1554a3b2b017db091821b;hp=ed5a6b131790eba626ae51a68422122d2366666f;hpb=0ee25da287821512e09137a752465f09b6e1a799;p=mailer.git
diff --git a/inc/install-inc.php b/inc/install-inc.php
index ed5a6b1317..d2fb295a77 100644
--- a/inc/install-inc.php
+++ b/inc/install-inc.php
@@ -10,7 +10,12 @@
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Funktionen fuer die Installationsroutine *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
@@ -37,19 +42,16 @@
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-}
-
-// Load sql_patches here
-LOAD_EXTENSION("sql_patches");
+} // END - if
// Init variables
-$mysql = "";
+$mysql = array();
if ((REQUEST_ISSET_POST(('mysql'))) && (is_array(REQUEST_POST('mysql')))) $mysql = REQUEST_POST('mysql');
// Check if both passwords from SMTP are matching
-if ((REQUEST_ISSET_GET(('page')) && (REQUEST_GET('page') == 5))) {
+if ((REQUEST_ISSET_GET('page') && (REQUEST_GET('page') == 5))) {
// Okay, we have to check it
if (REQUEST_ISSET_POST(('smtp_user')) && (!REQUEST_ISSET_POST(('smtp_host')))) {
// Hostname not set
@@ -77,106 +79,113 @@ if ((REQUEST_ISSET_GET(('page')) && (REQUEST_GET('page') == 5))) {
} // END - if
// Is MXChange installed or no admin registered so far?
-if ((!isInstalled()) || (!isAdminRegistered()))
-{
+if ((!isInstalled()) || (!isAdminRegistered())) {
// Set URL for FORM actions
define('__BURL_ACTION', constant('URL'));
// Output page for entered value
switch (REQUEST_GET('page'))
{
- case "welcome": // Welcome to the installation!
- LOAD_TEMPLATE("install_welcome");
- break;
-
- case "1": // Server path, base URL
- // @Profi-Concept: Hab meine Meinung doch geaendert! :-)
- // Load template
- LOAD_TEMPLATE("install_page1");
- break;
-
- case "2": // MySQL data (alone!)
- if (empty($mysql['dbase'])) $mysql['dbase'] = "your_database";
- if (empty($mysql['login'])) $mysql['login'] = "your_login";
- if (empty($mysql['host'])) $mysql['host'] = "localhost";
- if (empty($mysql['prefix'])) $mysql['prefix'] = "mxchange_";
- if (getTotalFatalErrors() > 0) {
- OUTPUT_HTML("");
- foreach (getFatalArray() as $key => $err) {
- OUTPUT_HTML(" · {--FATAL_NO--}".($key + 1).": ".$err."
");
+ case 'welcome': // Welcome to the installation!
+ LOAD_TEMPLATE('install_welcome');
+ break;
+
+ case '1': // Server path, base URL
+ // @Profi-Concept: Hab meine Meinung doch geaendert! :-)
+ // Load template
+ LOAD_TEMPLATE('install_page1');
+ break;
+
+ case '2': // MySQL data (alone!)
+ if (empty($mysql['dbase'])) $mysql['dbase'] = 'your_database';
+ if (empty($mysql['login'])) $mysql['login'] = 'your_login';
+ if (empty($mysql['host'])) $mysql['host'] = 'localhost';
+ if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange';
+ if (empty($mysql['type'])) $mysql['type'] = 'MyISAM';
+ if (getTotalFatalErrors() > 0) {
+ OUTPUT_HTML("");
+ foreach (getFatalArray() as $key => $err) {
+ OUTPUT_HTML(" · {--FATAL_NO--}".($key + 1).": ".$err."
");
+ }
+ OUTPUT_HTML("
");
}
- OUTPUT_HTML("
");
- }
- define('__MYSQL_HOST' , $mysql['host']);
- define('__MYSQL_DBASE' , $mysql['dbase']);
- define('__MYSQL_PREFIX', $mysql['prefix']);
- define('__MYSQL_LOGIN' , $mysql['login']);
- define('__SPATH_VALUE' , REQUEST_POST('spath'));
- define('__BURL_VALUE' , REQUEST_POST('burl'));
- define('__TITLE_VALUE' , REQUEST_POST('title'));
- define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
- define('__EMAIL_VALUE' , REQUEST_POST('email'));
-
- // Load template
- LOAD_TEMPLATE("install_page2");
- break;
-
- case "3":
- // Set more values
- define('__SPATH_VALUE' , REQUEST_POST('spath'));
- define('__BURL_VALUE' , REQUEST_POST('burl'));
- define('__TITLE_VALUE' , REQUEST_POST('title'));
- define('__SLOGAN_VALUE' , REQUEST_POST('slogan'));
- define('__EMAIL_VALUE' , REQUEST_POST('email'));
-
- // Use default SMTP data
- $smtpHost = constant('SMTP_HOSTNAME');
- $smtpUser = constant('SMTP_USER');
- $smtpPass1 = constant('SMTP_PASSWORD');
- $smtpPass2 = constant('SMTP_PASSWORD');
-
- // Overwrite it with the data from sent (failed) form
- if (REQUEST_ISSET_POST(('smtp_host'))) $smtpHost = REQUEST_POST('smtp_host');
- if (REQUEST_ISSET_POST(('smtp_user'))) $smtpUser = REQUEST_POST('smtp_user');
-
- // MySQL settings
- define('__MYSQL_HOST' , $mysql['host']);
- define('__MYSQL_DBASE' , $mysql['dbase']);
- define('__MYSQL_PREFIX' , $mysql['prefix']);
- define('__MYSQL_LOGIN' , $mysql['login']);
- define('__MYSQL_PASS1' , $mysql['pass1']);
- define('__MYSQL_PASS2' , $mysql['pass2']);
-
- // Set constants for SMTP data
- define('__SMTP_HOST' , $smtpHost);
- define('__SMTP_USER' , $smtpUser);
- define('__SMTP_PASS1' , $smtpPass1);
- define('__SMTP_PASS2' , $smtpPass2);
-
- // Load template
- LOAD_TEMPLATE("install_page3");
- break;
-
- case "5": // Misc settings
- // General settings
- define('__SPATH_VALUE' , REQUEST_POST('spath'));
- define('__BURL_VALUE' , REQUEST_POST('burl'));
- define('__TITLE_VALUE' , REQUEST_POST('title'));
- define('__SLOGAN_VALUE' , REQUEST_POST('slogan'));
- define('__EMAIL_VALUE' , REQUEST_POST('email'));
-
- // MySQL settings
- define('__MYSQL_HOST' , $mysql['host']);
- define('__MYSQL_DBASE' , $mysql['dbase']);
- define('__MYSQL_PREFIX' , $mysql['prefix']);
- define('__MYSQL_LOGIN' , $mysql['login']);
-
- // SMTP settings
- define('__SMTP_HOST' , REQUEST_POST('smtp_host'));
- define('__SMTP_USER' , REQUEST_POST('smtp_user'));
- define('__SMTP_PASS' , REQUEST_POST('smtp_pass1'));
- OUTPUT_HTML("