X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Finstall-inc.php;h=cf051fd03384f6a6329f25f7bb45882ab73bd72a;hp=a6fbd91f2b21ac8c7951b2bc015e29537ec90989;hb=aea4f2a51ffa6f483056c6ce167c8c6fd8ca6129;hpb=d8148e3f1f3a6762b2e786dbe99ada269dcf2ea0
diff --git a/inc/install-inc.php b/inc/install-inc.php
index a6fbd91f2b..cf051fd033 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,16 +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);
}
// 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
@@ -74,7 +79,7 @@ if ((REQUEST_ISSET_GET(('page')) && (REQUEST_GET('page') == 5))) {
} // END - if
// Is MXChange installed or no admin registered so far?
-if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndTrue('admin_registered')))
+if ((!isInstalled()) || (!isAdminRegistered()))
{
// Set URL for FORM actions
define('__BURL_ACTION', constant('URL'));
@@ -96,10 +101,11 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
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['prefix'])) $mysql['prefix'] = "mxchange";
+ if (empty($mysql['type'])) $mysql['type'] = "MyISAM";
if (getTotalFatalErrors() > 0) {
OUTPUT_HTML("");
- foreach ($FATAL as $key => $err) {
+ foreach (getFatalArray() as $key => $err) {
OUTPUT_HTML(" · {--FATAL_NO--}".($key + 1).": ".$err."
");
}
OUTPUT_HTML("
");
@@ -107,6 +113,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
define('__MYSQL_HOST' , $mysql['host']);
define('__MYSQL_DBASE' , $mysql['dbase']);
define('__MYSQL_PREFIX', $mysql['prefix']);
+ define('__TABLE_TYPE' , $mysql['type']);
define('__MYSQL_LOGIN' , $mysql['login']);
define('__SPATH_VALUE' , REQUEST_POST('spath'));
define('__BURL_VALUE' , REQUEST_POST('burl'));
@@ -120,11 +127,11 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
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'));
+ 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');
@@ -137,18 +144,19 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
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']);
+ define('__MYSQL_HOST' , $mysql['host']);
+ define('__MYSQL_DBASE' , $mysql['dbase']);
+ define('__MYSQL_PREFIX', $mysql['prefix']);
+ define('__TABLE_TYPE' , $mysql['type']);
+ 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);
+ define('__SMTP_HOST' , $smtpHost);
+ define('__SMTP_USER' , $smtpUser);
+ define('__SMTP_PASS1', $smtpPass1);
+ define('__SMTP_PASS2', $smtpPass2);
// Load template
LOAD_TEMPLATE("install_page3");
@@ -156,24 +164,25 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
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'));
+ 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']);
+ define('__MYSQL_HOST' , $mysql['host']);
+ define('__MYSQL_DBASE' , $mysql['dbase']);
+ define('__MYSQL_PREFIX', $mysql['prefix']);
+ define('__TABLE_TYPE' , $mysql['type']);
+ 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'));
+ define('__SMTP_HOST', REQUEST_POST('smtp_host'));
+ define('__SMTP_USER', REQUEST_POST('smtp_user'));
+ define('__SMTP_PASS', REQUEST_POST('smtp_pass1'));
OUTPUT_HTML("