diff --git a/src/convert.php b/src/convert.php
index ca3cfad..b8cacfc 100644
--- a/src/convert.php
+++ b/src/convert.php
@@ -34,12 +34,17 @@
// *** Default includes and procedures *** //
define('IN_PHPLOGCON', true);
+define('STEPSCRIPTNAME', "convert.php"); // Helper variable for the STEP helper functions
$gl_root_path = './';
// Now include necessary include files!
include($gl_root_path . 'include/functions_common.php');
include($gl_root_path . 'include/functions_frontendhelpers.php');
+include($gl_root_path . 'include/functions_installhelpers.php');
+// This site can not require LOGIN
+define('IS_NOLOGINPAGE', true);
+$content['IS_NOLOGINPAGE'] = true;
InitPhpLogCon();
InitSourceConfigs();
InitFrontEndDefaults(); // Only in WebFrontEnd
@@ -56,7 +61,7 @@ if (
$content['user_theme'] = "default";
}
else
- DieWithErrorMsg( 'phpLogCon is not allowed to convert your settings into the user database.
If you want to convert your convert your settings, add the variable following into your config.php:
$CFG[\'UserDBConvertAllowed\'] = true;
Click here to return to pgpLogCon start page.');
+ DieWithErrorMsg( $content['LN_CONVERT_ERRORINSTALLED'] );
// ---
// --- CONTENT Vars
@@ -100,6 +105,7 @@ $content['WidthPlusText'] = "Installer Step " . $content['CONVERT_STEP'];
// --- Set Title
$content['TITLE'] = GetAndReplaceLangStr( $content['TITLE'], $content['CONVERT_STEP'] );
+$content['LN_CONVERT_TITLETOP'] = GetAndReplaceLangStr( $content['LN_CONVERT_TITLETOP'], $content['CONVERT_STEP'] );
// ---
// --- Start Setup Processing
@@ -108,18 +114,93 @@ if ( $content['CONVERT_STEP'] == 2 )
// Check the database connect
$link_id = mysql_connect( $CFG['UserDBServer'], $CFG['UserDBUser'], $CFG['UserDBPass']);
if (!$link_id)
- RevertOneStep( $content['INSTALL_STEP']-1, "Connect to " .$CFG['UserDBServer'] . " failed! Check Servername, Port, User and Password!
" . DB_ReturnSimpleErrorMsg() );
+ RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr( $content['LN_INSTALL_ERRORCONNECTFAILED'], $CFG['UserDBServer']) . "
" . DB_ReturnSimpleErrorMsg() );
// Try to select the DB!
$db_selected = mysql_select_db($CFG['UserDBName'], $link_id);
if(!$db_selected)
- RevertOneStep( $content['INSTALL_STEP']-1, "Cannot use database " .$CFG['UserDBName'] . "! If the database does not exists, create it or check access permissions!
" . DB_ReturnSimpleErrorMsg());
+ RevertOneStep( $content['INSTALL_STEP']-1,GetAndReplaceLangStr( $content['LN_INSTALL_ERRORACCESSDENIED'], $CFG['UserDBName']) . "
" . DB_ReturnSimpleErrorMsg());
}
else if ( $content['CONVERT_STEP'] == 3 )
{
+ // Predefine sql helper vars
+ $content['sql_sucess'] = 0;
+ $content['sql_failed'] = 0;
+ // Import default database if user db is enabled!
+ if ( $_SESSION['UserDBEnabled'] == 1 )
+ {
+ // Init $totaldbdefs
+ $totaldbdefs = "";
+
+ // Read the table GLOBAL definitions
+ ImportDataFile( $content['BASEPATH'] . "include/db_template.txt" );
+
+ // Process definitions ^^
+ if ( strlen($totaldbdefs) <= 0 )
+ {
+ $content['failedstatements'][ $content['sql_failed'] ]['myerrmsg'] = GetAndReplaceLangStr( $content['LN_INSTALL_ERRORINVALIDDBFILE'], $content['BASEPATH'] . "include/db_template.txt");
+ $content['failedstatements'][ $content['sql_failed'] ]['mystatement'] = "";
+ $content['sql_failed']++;
+ }
+
+ // Replace stats_ with the custom one ;)
+ $totaldbdefs = str_replace( "`logcon_", "`" . $_SESSION["UserDBPref"], $totaldbdefs );
+
+ // Now split by sql command
+ $mycommands = split( ";\n", $totaldbdefs );
+
+// // check for different linefeed
+// if ( count($mycommands) <= 1 )
+// $mycommands = split( ";\n", $totaldbdefs );
+
+ //Still only one? Abort
+ if ( count($mycommands) <= 1 )
+ {
+ $content['failedstatements'][ $content['sql_failed'] ]['myerrmsg'] = GetAndReplaceLangStr( $content['LN_INSTALL_ERRORINSQLCOMMANDS'], $content['BASEPATH'] . "include/db_template.txt");
+ $content['failedstatements'][ $content['sql_failed'] ]['mystatement'] = "";
+ $content['sql_failed']++;
+ }
+
+ // Append INSERT Statement for Config Table to set the GameVersion and Database Version ^^!
+ $mycommands[count($mycommands)] = "INSERT INTO `" . $_SESSION["UserDBPref"] . "config` (`propname`, `propvalue`, `is_global`) VALUES ('database_installedversion', '1', 1)";
+
+ // --- Now execute all commands
+ ini_set('error_reporting', E_WARNING); // Enable Warnings!
+ InitUserDbSettings();
+
+ // Establish DB Connection
+ DB_Connect();
+
+ for($i = 0; $i < count($mycommands); $i++)
+ {
+ if ( strlen(trim($mycommands[$i])) > 1 )
+ {
+ $result = DB_Query( $mycommands[$i], false );
+ if ($result == FALSE)
+ {
+ $content['failedstatements'][ $content['sql_failed'] ]['myerrmsg'] = DB_ReturnSimpleErrorMsg();
+ $content['failedstatements'][ $content['sql_failed'] ]['mystatement'] = $mycommands[$i];
+
+ // --- Set CSS Class
+ if ( $content['sql_failed'] % 2 == 0 )
+ $content['failedstatements'][ $content['sql_failed'] ]['cssclass'] = "line1";
+ else
+ $content['failedstatements'][ $content['sql_failed'] ]['cssclass'] = "line2";
+ // ---
+
+ $content['sql_failed']++;
+ }
+ else
+ $content['sql_sucess']++;
+
+ // Free result
+ DB_FreeQuery($result);
+ }
+ }
+ }
}
// ---
@@ -130,19 +211,5 @@ $page -> output();
// ---
// --- Helper functions
-
-function RevertOneStep($stepback, $errormsg)
-{
- header("Location: convert.php?step=" . $stepback . "&errormsg=" . urlencode($errormsg) );
- exit;
-}
-
-function ForwardOneStep()
-{
- global $content;
-
- header("Location: convert.php?step=" . ($content['CONVERT_STEP']+1) );
- exit;
-}
// ---
?>
\ No newline at end of file
diff --git a/src/include/functions_common.php b/src/include/functions_common.php
index 4556f5c..68569ec 100644
--- a/src/include/functions_common.php
+++ b/src/include/functions_common.php
@@ -510,7 +510,7 @@ function InitConfigurationValues()
if ( !$content['SESSION_LOGGEDIN'] )
{
// User needs to be logged in, redirect to login page
- if ( !defined("IS_LOGINPAGE") )
+ if ( !defined("IS_NOLOGINPAGE") )
RedirectToUserLogin();
}
}
@@ -536,7 +536,7 @@ function InitConfigurationValues()
}
else
{
- if ( defined('IS_ADMINPAGE') || defined("IS_LOGINPAGE") ) // Language System not initialized yet
+ if ( defined('IS_ADMINPAGE') || defined("IS_NOLOGINPAGE") ) // Language System not initialized yet
DieWithFriendlyErrorMsg( "The phpLogCon user system is currently disabled or not installed." );
}
diff --git a/src/include/functions_installhelpers.php b/src/include/functions_installhelpers.php
new file mode 100644
index 0000000..8f85288
--- /dev/null
+++ b/src/include/functions_installhelpers.php
@@ -0,0 +1,84 @@
+ www.phplogcon.org <- *
+ * ----------------------------------------------------------------- *
+ * Installer needed functions
+ *
+ * -> Functions in this file are only used by the installer
+ * and converter script.
+ *
+ * All directives are explained within this file
+ *
+ * Copyright (C) 2008 Adiscon GmbH.
+ *
+ * This file is part of phpLogCon.
+ *
+ * PhpLogCon is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * PhpLogCon 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpLogCon. If not, see
If you want to reconfigure phpLogCon, either delete the current config.php or replace it with an empty file.
Click here to return to pgpLogCon start page.');
-//InitPhpLogCon();
+ DieWithErrorMsg( $content['LN_INSTALL_ERRORINSTALLED'] );
// Set some static values
define('MAX_STEPS', 8);
@@ -59,7 +60,7 @@ $configsamplefile = $content['BASEPATH'] . "include/config.sample.php";
// *** *** //
// --- CONTENT Vars
-$content['TITLE'] = "phpLogCon :: Installer Step %1";
+$content['TITLE'] = "phpLogCon :: " . $content['LN_INSTALL_TITLE'];
// ---
// --- Read Vars
@@ -102,6 +103,7 @@ else
// --- Set Title
$content['TITLE'] = GetAndReplaceLangStr( $content['TITLE'], $content['INSTALL_STEP'] );
+$content['LN_INSTALL_TITLETOP'] = GetAndReplaceLangStr( $content['LN_INSTALL_TITLETOP'], $content['BUILDNUMBER'], $content['INSTALL_STEP'] );
// ---
// --- Start Setup Processing
@@ -179,7 +181,7 @@ if ( $content['INSTALL_STEP'] == 2 )
$content['NEXT_ENABLED'] = "false";
$content['RECHECK_ENABLED'] = "true";
$content['iserror'] = "true";
- $content['errormsg'] = "One file or directory (or more) are not writeable, please check the file permissions (chmod 777)!";
+ $content['errormsg'] = $content['LN_INSTALL_FILEORDIRNOTWRITEABLE'];
}
// Check if sample config file is available
@@ -188,7 +190,7 @@ if ( $content['INSTALL_STEP'] == 2 )
$content['NEXT_ENABLED'] = "false";
$content['RECHECK_ENABLED'] = "true";
$content['iserror'] = "true";
- $content['errormsg'] = "The sample configuration file '" . $configsamplefile . "' is missing. You have not fully uploaded phplogcon.";
+ $content['errormsg'] = GetAndReplaceLangStr( $content['LN_INSTALL_SAMPLECONFIGMISSING'], $configsamplefile);
}
}
@@ -311,12 +313,12 @@ else if ( $content['INSTALL_STEP'] == 4 )
// Now Check database connect
$link_id = mysql_connect( $_SESSION['UserDBServer'], $_SESSION['UserDBUser'], $_SESSION['UserDBPass']);
if (!$link_id)
- RevertOneStep( $content['INSTALL_STEP']-1, "Connect to " .$_SESSION['UserDBServer'] . " failed! Check Servername, Port, User and Password!
" . DB_ReturnSimpleErrorMsg() );
+ RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr( $content['LN_INSTALL_ERRORCONNECTFAILED'], $_SESSION['UserDBServer']) . "
" . DB_ReturnSimpleErrorMsg() );
// Try to select the DB!
$db_selected = mysql_select_db($_SESSION['UserDBName'], $link_id);
if(!$db_selected)
- RevertOneStep( $content['INSTALL_STEP']-1, "Cannot use database " .$_SESSION['UserDBName'] . "! If the database does not exists, create it or check access permissions!
" . DB_ReturnSimpleErrorMsg());
+ RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr( $content['LN_INSTALL_ERRORACCESSDENIED'], $_SESSION['UserDBName']) . "
" . DB_ReturnSimpleErrorMsg());
}
}
// ---
@@ -373,7 +375,7 @@ else if ( $content['INSTALL_STEP'] == 5 )
// Process definitions ^^
if ( strlen($totaldbdefs) <= 0 )
{
- $content['failedstatements'][ $content['sql_failed'] ]['myerrmsg'] = "Error, invalid Database Defintion File (to short!), file '" . $content['BASEPATH'] . "include/db_template.txt" . "'!
Maybe the file was not correctly uploaded?";
+ $content['failedstatements'][ $content['sql_failed'] ]['myerrmsg'] = GetAndReplaceLangStr( $content['LN_INSTALL_ERRORINVALIDDBFILE'], $content['BASEPATH'] . "include/db_template.txt");
$content['failedstatements'][ $content['sql_failed'] ]['mystatement'] = "";
$content['sql_failed']++;
}
@@ -391,7 +393,7 @@ else if ( $content['INSTALL_STEP'] == 5 )
//Still only one? Abort
if ( count($mycommands) <= 1 )
{
- $content['failedstatements'][ $content['sql_failed'] ]['myerrmsg'] = "Error, invalid Database Defintion File (no statements found!) in '" . $content['BASEPATH'] . "include/db_template.txt" . "'!
Maybe the file was not correctly uploaded, or a strange bug with your system? Contact phpLogCon forums for assistance!";
+ $content['failedstatements'][ $content['sql_failed'] ]['myerrmsg'] = GetAndReplaceLangStr( $content['LN_INSTALL_ERRORINSQLCOMMANDS'], $content['BASEPATH'] . "include/db_template.txt");
$content['failedstatements'][ $content['sql_failed'] ]['mystatement'] = "";
$content['sql_failed']++;
}
@@ -465,7 +467,7 @@ else if ( $content['INSTALL_STEP'] == 7 )
if ( isset($_POST['username']) )
$_SESSION['MAIN_Username'] = DB_RemoveBadChars($_POST['username']);
else
- RevertOneStep( $content['INSTALL_STEP']-1, "Username needs to be specified" );
+ RevertOneStep( $content['INSTALL_STEP']-1, $content['LN_INSTALL_MISSINGUSERNAME'] );
if ( isset($_POST['password1']) )
$_SESSION['MAIN_Password1'] = DB_RemoveBadChars($_POST['password1']);
@@ -481,7 +483,7 @@ else if ( $content['INSTALL_STEP'] == 7 )
strlen($_SESSION['MAIN_Password1']) < 4 ||
$_SESSION['MAIN_Password1'] != $_SESSION['MAIN_Password2']
)
- RevertOneStep( $content['INSTALL_STEP']-1, "Either the password does not match or is to short!" );
+ RevertOneStep( $content['INSTALL_STEP']-1, $content['LN_INSTALL_PASSWORDNOTMATCH'] );
// --- Now execute all commands
ini_set('error_reporting', E_WARNING); // Enable Warnings!
@@ -581,7 +583,7 @@ else if ( $content['INSTALL_STEP'] == 8 )
// Check if access to the configured file is possible
if ( !is_file($_SESSION['SourceDiskFile']) )
- RevertOneStep( $content['INSTALL_STEP']-1, "Failed to open the syslog file " .$_SESSION['SourceDiskFile'] . "! Check if the file exists and phplogcon has sufficient rights to it
" );
+ RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr($content['LN_INSTALL_FAILEDTOOPENSYSLOGFILE'], $_SESSION['SourceDiskFile']) );
}
else if ( $_SESSION['SourceType'] == SOURCE_DB || $_SESSION['SourceType'] == SOURCE_PDO )
{
@@ -724,7 +726,7 @@ else if ( $content['INSTALL_STEP'] == 8 )
// Create file and write config into it!
$handle = fopen( $content['BASEPATH'] . "config.php" , "w");
if ( $handle === false )
- RevertOneStep( $content['INSTALL_STEP']-1, "Coult not create the configuration file " . $content['BASEPATH'] . "config.php" . "! Check File permissions!!!" );
+ RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr($content['LN_INSTALL_FAILEDCREATECFGFILE'], $content['BASEPATH'] . "config.php") );
fwrite($handle, $filebuffer);
fclose($handle);
@@ -742,21 +744,6 @@ $page -> output();
// ---
// --- Helper functions
-
-function RevertOneStep($stepback, $errormsg)
-{
- header("Location: install.php?step=" . $stepback . "&errormsg=" . urlencode($errormsg) );
- exit;
-}
-
-function ForwardOneStep()
-{
- global $content;
-
- header("Location: install.php?step=" . ($content['INSTALL_STEP']+1) );
- exit;
-}
-
function LoadDataFile($szFileName)
{
global $content;
@@ -765,7 +752,7 @@ function LoadDataFile($szFileName)
$buffer = "";
$handle = @fopen($szFileName, "r");
if ($handle === false)
- RevertOneStep( $content['INSTALL_STEP']-1, "Error reading the file " . $szFileName . "! Check if the file exists!" );
+ RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr($content['LN_INSTALL_FAILEDREADINGFILE'], $szFileName) );
else
{
while (!feof($handle))
@@ -779,30 +766,6 @@ function LoadDataFile($szFileName)
return $buffer;
}
-function ImportDataFile($szFileName)
-{
- global $content, $totaldbdefs;
-
- // Lets read the table definitions :)
- $handle = @fopen($szFileName, "r");
- if ($handle === false)
- RevertOneStep( $content['INSTALL_STEP']-1, "Error reading the default database defintion file " . $szFileName . "! Check if the file exists!!!" );
- else
- {
- while (!feof($handle))
- {
- $buffer = fgets($handle, 4096);
-
- $pos = strpos($buffer, "--");
- if ($pos === false)
- $totaldbdefs .= $buffer;
- else if ( $pos > 2 && strlen( trim($buffer) ) > 1 )
- $totaldbdefs .= $buffer;
- }
- fclose($handle);
- }
-}
-
function InitUserDbSettings()
{
global $CFG;
@@ -824,6 +787,5 @@ function InitUserDbSettings()
define('DB_SOURCES', $CFG['UserDBPref'] . "sources");
define('DB_VIEWS', $CFG['UserDBPref'] . "views");
}
-
// ---
?>
\ No newline at end of file
diff --git a/src/lang/en/main.php b/src/lang/en/main.php
index 3309346..83f6cfc 100644
--- a/src/lang/en/main.php
+++ b/src/lang/en/main.php
@@ -175,10 +175,79 @@ $content['LN_LOGIN_SAVEASCOOKIE'] = "Stay logged on";
$content['LN_LOGIN_ERRWRONGPASSWORD'] = "Wrong username or password!";
$content['LN_LOGIN_USERPASSMISSING'] = "Username or password not given";
+// Install Site
+$content['LN_INSTALL_TITLETOP'] = "Installing phpLogCon Version %1 - Step %1";
+$content['LN_INSTALL_TITLE'] = "Installer Step %1";
+$content['LN_INSTALL_ERRORINSTALLED'] = 'phpLogCon is already configured!
If you want to reconfigure phpLogCon, either delete the current config.php or replace it with an empty file.
Click here to return to pgpLogCon start page.';
+$content['LN_INSTALL_FILEORDIRNOTWRITEABLE'] = "At least one file or directory (or more) is not writeable, please check the file permissions (chmod 666)!";
+$content['LN_INSTALL_SAMPLECONFIGMISSING'] = "The sample configuration file '%1' is missing. You have not fully uploaded phplogcon.";
+$content['LN_INSTALL_ERRORCONNECTFAILED'] = "Database connect to '%1' failed! Please check Servername, Port, User and Password!";
+$content['LN_INSTALL_ERRORACCESSDENIED'] = "Cannot use the database '%1'! If the database does not exists, create it or check user access permissions!";
+$content['LN_INSTALL_ERRORINVALIDDBFILE'] = "Error, invalid Database definition file (to short!), the file name is '%1'! Please check if the file was correctly uploaded.";
+$content['LN_INSTALL_ERRORINSQLCOMMANDS'] = "Error, invalid Database definition file (no sql statements found!), the file name is '%1'!
Please check if the file was not correctly uploaded, or contact the phpLogCon forums for assistance!";
+$content['LN_INSTALL_MISSINGUSERNAME'] = "Username needs to be specified";
+$content['LN_INSTALL_PASSWORDNOTMATCH'] = "Either the password does not match or is to short!";
+$content['LN_INSTALL_FAILEDTOOPENSYSLOGFILE'] = "Failed to open the syslog file '%1'! Check if the file exists and phplogcon has sufficient rights to it
";
+$content['LN_INSTALL_FAILEDCREATECFGFILE'] = "Coult not create the configuration file in '%1'! Please verify the file permissions!";
+$content['LN_INSTALL_FAILEDREADINGFILE'] = "Error reading the file '%1'! Please verify if the file exists!";
+$content['LN_INSTALL_ERRORREADINGDBFILE'] = "Error reading the default database definition file in '%1'! Please verify if the file exists!";
+$content['LN_INSTALL_STEP1'] = "Step 1 - Prerequisites";
+$content['LN_INSTALL_STEP2'] = "Step 2 - Verify File Permissions";
+$content['LN_INSTALL_STEP3'] = "Step 3 - Basic Configuration";
+$content['LN_INSTALL_STEP4'] = "Step 4 - Create Tables";
+$content['LN_INSTALL_STEP5'] = "Step 5 - Check SQL Results";
+$content['LN_INSTALL_STEP6'] = "Step 6 - Creating the Main Useraccount";
+$content['LN_INSTALL_STEP7'] = "Step 7 - Create the first source for syslog messages";
+$content['LN_INSTALL_STEP8'] = "Step 8 - Done";
+$content['LN_INSTALL_STEP1_TEXT'] = 'Before you start installing phpLogCon, the Installer setup has to check a few things first.
You may have to correct some file permissions first.
Click on to start the Test!';
+$content['LN_INSTALL_STEP2_TEXT'] = "The following file permissions have been checked. Verify the results below!
You may use the configure.sh script from the contrib folder to set the permissions for you.";
+$content['LN_INSTALL_STEP3_TEXT'] = "In this step, you configure the basic configurations for phpLogCon.";
+$content['LN_INSTALL_STEP4_TEXT'] = 'If you reached this step, the database connection has been successfully verified!
The next step will be to create the necessary database tables used by the phpLogCon User System. This might take a while!
WARNING, if you have an existing phpLogCon installation in this database with the same tableprefix, all your data will be OVERWRITTEN! Make sure you are using a fresh database, or you want to overwrite your old phpLogCon database.
Click on to start the creation of the tables';
+$content['LN_INSTALL_STEP5_TEXT'] = "Tables have been created. Check the List below for possible Error's";
+$content['LN_INSTALL_STEP6_TEXT'] = "You are now about to create the initial phpLogCon User Account.
This will be the first administrative user, which will be needed to login into phpLogCon and access the Admin Center!";
+$content['LN_INSTALL_STEP8_TEXT'] = 'Congratulations! You have successfully installed phpLogCon :)!
Click here to go to your installation.';
+$content['LN_INSTALL_PROGRESS'] = "Install Progress: ";
+$content['LN_INSTALL_FRONTEND'] = "Frontend Options";
+$content['LN_INSTALL_NUMOFSYSLOGS'] = "Number of syslog messages per page";
+$content['LN_INSTALL_MSGCHARLIMIT'] = "Message character limit for the main view";
+$content['LN_INSTALL_SHOWDETAILPOP'] = "Show message details popup";
+$content['LN_INSTALL_AUTORESOLVIP'] = "Automatically resolved IP Addresses (inline)";
+$content['LN_INSTALL_USERDBOPTIONS'] = "User Database Options";
+$content['LN_INSTALL_ENABLEUSERDB'] = "Enable User Database";
+$content['LN_INSTALL_SUCCESSSTATEMENTS'] = "Successfully executed statements:";
+$content['LN_INSTALL_FAILEDSTATEMENTS'] = "Failed statements:";
+$content['LN_INSTALL_STEP5_TEXT_NEXT'] = "You can now proceed to the next step adding the first phpLogCon Admin User!";
+$content['LN_INSTALL_STEP5_TEXT_FAILED'] = "At least one statement failed,see error reasons below";
+$content['LN_INSTALL_ERRORMSG'] = "Error Message";
+$content['LN_INSTALL_SQLSTATEMENT'] = "SQL Statement";
+$content['LN_INSTALL_CREATEUSER'] = "Create User Account";
+$content['LN_INSTALL_PASSWORD'] = "Password";
+$content['LN_INSTALL_PASSWORDREPEAT'] = "Repeat Password";
+$content['LN_INSTALL_SUCCESSCREATED'] = "Successfully created User";
+$content['LN_INSTALL_RECHECK'] = "ReCheck";
+$content['LN_INSTALL_FINISH'] = "Finish!";
+$content['LN_INSTALL_'] = "";
+
// Converter Site
$content['LN_CONVERT_TITLE'] = "Configuration Converter Step %1";
$content['LN_CONVERT_NOTALLOWED'] = "Login";
-
+$content['LN_CONVERT_ERRORINSTALLED'] = 'phpLogCon is not allowed to convert your settings into the user database.
If you want to convert your convert your settings, add the variable following into your config.php:
$CFG[\'UserDBConvertAllowed\'] = true;
Click here to return to pgpLogCon start page.';
+$content['LN_CONVERT_STEP1'] = "Step 1 - Informations";
+$content['LN_CONVERT_STEP2'] = "Step 2 - Create Tables";
+$content['LN_CONVERT_STEP3'] = "Step 3 - Check SQL Results";
+$content['LN_CONVERT_STEP4'] = "Step 4 - Creating the Main Useraccount";
+$content['LN_CONVERT_STEP5'] = "Step 5 - Import Settings into UserDB";
+$content['LN_CONVERT_TITLETOP'] = "Converting phpLogCon configuration settings - Step ";
+$content['LN_CONVERT_STEP1_TEXT'] = 'This script allows you to import your existing configuration from the config.php file. This includes frontend settings, data sources, custom views and custom searches. Do only perform this conversion if you did install phpLogCon without the UserDB System, and decided to enable it now.
ANY EXISTING INSTANCE OF A USERDB WILL BE OVERWRITTEN!
to start the first conversion step!';
+$content['LN_CONVERT_STEP2_TEXT'] = 'The database connection has been successfully verified!
The next step will be to create the necessary database tables for the phpLogCon User System. This might take a while!
WARNING, if you have an existing phpLogCon installation in this database with the same tableprefix, all your data will be OVERWRITTEN!
Make sure you are using a fresh database, or you want to overwrite your old phpLogCon database.
Click on to start the creation of the tables';
+$content['LN_CONVERT_STEP5_TEXT'] = ' to start the last step of the conversion. In this step, your existing configuration from the config.php will be imported into the database.';
+$content['LN_CONVERT_STEP6'] = "Step 8 - Done";
+$content['LN_CONVERT_STEP6_TEXT'] = 'Congratulations! You have successfully converted your existing phpLogCon installation :)!
Important! Don\'t forget to REMOVE THE VARIABLES $CFG[\'UserDBConvertAllowed\'] = true; from your config.php file!
You can click here to get to your phpLogConinstallation.';
+$content['LN_CONVERT_PROCESS'] = "Conversion Progress:";
+$content['LN_CONVERT_'] = "";
+$content['LN_CONVERT_'] = "";
+$content['LN_CONVERT_'] = "";
+$content['LN_CONVERT_'] = "";
?>
\ No newline at end of file
diff --git a/src/login.php b/src/login.php
index a9e4277..81b811b 100644
--- a/src/login.php
+++ b/src/login.php
@@ -41,8 +41,8 @@ include($gl_root_path . 'include/functions_frontendhelpers.php');
//include($gl_root_path . 'include/functions_filters.php');
// To avoid infinite redirects!
-define('IS_LOGINPAGE', true);
-$content['IS_LOGINPAGE'] = true;
+define('IS_NOLOGINPAGE', true);
+$content['IS_NOLOGINPAGE'] = true;
InitPhpLogCon();
// --- //
diff --git a/src/templates/convert.html b/src/templates/convert.html
index 4cf24f9..2a65068 100644
--- a/src/templates/convert.html
+++ b/src/templates/convert.html
@@ -27,7 +27,7 @@
- Converting phpLogCon configuration settings - Step {CONVERT_STEP}+{LN_CONVERT_TITLETOP} |
This script allows you to import your existing configuration from the config.php file. This includes frontend settings, data sources, custom views and custom searches. Do only perform this conversion if you did install phpLogCon without the UserDB System, and decided to enable it now.
-
-
- ANY EXISTING INSTANCE OF A USERDB WILL BE OVERWRITTEN!
-
-
- to start the first conversion step!
+ {LN_CONVERT_STEP1_TEXT} +
@@ -71,13 +67,9 @@
- Step 2 - Create Tables-If you reached this step, the database connection has been successfully verified! {LN_CONVERT_STEP2}++ {LN_CONVERT_STEP2_TEXT}
|
@@ -89,24 +81,26 @@
- Step 3 - Check SQL Results-Tables have been created. Check the List below for possible Error's {LN_CONVERT_STEP3}+
+ {LN_INSTALL_STEP5_TEXT}
+
|