mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-25 18:59:12 +02:00
Fully added the install and convert script into the language system
This commit is contained in:
parent
1f5365803a
commit
87bae14900
101
src/convert.php
101
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.<br><br> If you want to convert your convert your settings, add the variable following into your config.php: <br><b>$CFG[\'UserDBConvertAllowed\'] = true;</b><br><br> Click <A HREF="index.php">here</A> 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!<br>" . DB_ReturnSimpleErrorMsg() );
|
||||
RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr( $content['LN_INSTALL_ERRORCONNECTFAILED'], $CFG['UserDBServer']) . "<br>" . 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! <br>" . DB_ReturnSimpleErrorMsg());
|
||||
RevertOneStep( $content['INSTALL_STEP']-1,GetAndReplaceLangStr( $content['LN_INSTALL_ERRORACCESSDENIED'], $CFG['UserDBName']) . "<br>" . 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;
|
||||
}
|
||||
// ---
|
||||
?>
|
@ -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." );
|
||||
}
|
||||
|
||||
|
84
src/include/functions_installhelpers.php
Normal file
84
src/include/functions_installhelpers.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/*
|
||||
*********************************************************************
|
||||
* -> 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* A copy of the GPL can be found in the file "COPYING" in this
|
||||
* distribution.
|
||||
*********************************************************************
|
||||
*/
|
||||
|
||||
// --- Avoid directly accessing this file!
|
||||
if ( !defined('IN_PHPLOGCON') )
|
||||
{
|
||||
die('Hacking attempt');
|
||||
exit;
|
||||
}
|
||||
// ---
|
||||
|
||||
// --- BEGIN Installer Helper Functions ---
|
||||
function ImportDataFile($szFileName)
|
||||
{
|
||||
global $content, $totaldbdefs;
|
||||
|
||||
// Lets read the table definitions :)
|
||||
$handle = @fopen($szFileName, "r");
|
||||
if ($handle === false)
|
||||
RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr($content['LN_INSTALL_ERRORREADINGDBFILE'], $szFileName) );
|
||||
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 RevertOneStep($stepback, $errormsg)
|
||||
{
|
||||
header("Location: " . STEPSCRIPTNAME . "?step=" . $stepback . "&errormsg=" . urlencode($errormsg) );
|
||||
exit;
|
||||
}
|
||||
|
||||
function ForwardOneStep()
|
||||
{
|
||||
global $content;
|
||||
|
||||
header("Location: " . STEPSCRIPTNAME . "?step=" . ($content['INSTALL_STEP']+1) );
|
||||
exit;
|
||||
}
|
||||
|
||||
// ---
|
||||
|
||||
?>
|
@ -34,20 +34,21 @@
|
||||
|
||||
// *** Default includes and procedures *** //
|
||||
define('IN_PHPLOGCON', true);
|
||||
define('IN_PHPLOGCON_INSTALL', true); // Extra for INSTALL Script!
|
||||
define('IN_PHPLOGCON_INSTALL', true); // Extra for INSTALL Script!
|
||||
define('STEPSCRIPTNAME', "install.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');
|
||||
|
||||
// Init Langauge first!
|
||||
IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/main.php' );
|
||||
|
||||
InitBasicPhpLogCon();
|
||||
if ( InitPhpLogConConfigFile(false) )
|
||||
DieWithErrorMsg( 'phpLogCon is already configured!<br><br> If you want to reconfigure phpLogCon, either delete the current <B>config.php</B> or replace it with an empty file.<br><br>Click <A HREF="index.php">here</A> 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!<br>" . DB_ReturnSimpleErrorMsg() );
|
||||
RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr( $content['LN_INSTALL_ERRORCONNECTFAILED'], $_SESSION['UserDBServer']) . "<br>" . 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! <br>" . DB_ReturnSimpleErrorMsg());
|
||||
RevertOneStep( $content['INSTALL_STEP']-1, GetAndReplaceLangStr( $content['LN_INSTALL_ERRORACCESSDENIED'], $_SESSION['UserDBName']) . "<br>" . 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" . "'! <br>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" . "'!<br> 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<br>" );
|
||||
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");
|
||||
}
|
||||
|
||||
// ---
|
||||
?>
|
@ -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!<br><br> If you want to reconfigure phpLogCon, either delete the current <B>config.php</B> or replace it with an empty file.<br><br>Click <A HREF="index.php">here</A> 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'!<br> 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<br>";
|
||||
$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.<br>You may have to correct some file permissions first. <br><br>Click on <input type="submit" value="Next"> to start the Test!';
|
||||
$content['LN_INSTALL_STEP2_TEXT'] = "The following file permissions have been checked. Verify the results below! <br>You may use the <B>configure.sh</B> script from the <B>contrib</B> 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!<br><br> The next step will be to create the necessary database tables used by the phpLogCon User System. This might take a while!<br> <b>WARNING</b>, if you have an existing phpLogCon installation in this database with the same tableprefix, all your data will be <b>OVERWRITTEN</b>! Make sure you are using a fresh database, or you want to overwrite your old phpLogCon database. <br><br><b>Click on <input type="submit" value="Next"> to start the creation of the tables</b>';
|
||||
$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.<br> 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 :)! <br><br>Click <a href="index.php">here</a> 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 <B>next</B> 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.<br><br> If you want to convert your convert your settings, add the variable following into your config.php: <br><b>$CFG[\'UserDBConvertAllowed\'] = true;</b><br><br> Click <A HREF="index.php">here</A> 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 <b>config.php</b> 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. <br><br><b>ANY EXISTING INSTANCE OF A USERDB WILL BE OVERWRITTEN!</b><br><br><input type="submit" value="Click here"> to start the first conversion step!';
|
||||
$content['LN_CONVERT_STEP2_TEXT'] = 'The database connection has been successfully verified! <br><br>The next step will be to create the necessary database tables for the phpLogCon User System. This might take a while! <br><b>WARNING</b>, if you have an existing phpLogCon installation in this database with the same tableprefix, all your data will be <b>OVERWRITTEN</b>!<br> Make sure you are using a fresh database, or you want to overwrite your old phpLogCon database.<br><br><b>Click on <input type="submit" value="Next"> to start the creation of the tables</b>';
|
||||
$content['LN_CONVERT_STEP5_TEXT'] = '<input type="submit" value="Click here"> to start the last step of the conversion. In this step, your existing configuration from the <b>config.php</b> 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 :)!<br><br>Important! Don\'t forget to REMOVE THE VARIABLES <b>$CFG[\'UserDBConvertAllowed\'] = true;</b> from your config.php file! <br><br>You can click <a href="index.php">here</a> to get to your phpLogConinstallation.';
|
||||
$content['LN_CONVERT_PROCESS'] = "Conversion Progress:";
|
||||
$content['LN_CONVERT_'] = "";
|
||||
$content['LN_CONVERT_'] = "";
|
||||
$content['LN_CONVERT_'] = "";
|
||||
$content['LN_CONVERT_'] = "";
|
||||
|
||||
|
||||
?>
|
@ -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();
|
||||
// --- //
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
<table width="100%" cellpadding="2" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="title">
|
||||
<h1 align="center">Converting phpLogCon configuration settings - Step {CONVERT_STEP}</h1>
|
||||
<h1 align="center">{LN_CONVERT_TITLETOP}</h1>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -51,14 +51,10 @@
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
|
||||
<h1>Step 1 - Informations</h1>
|
||||
<p>This script allows you to import your existing configuration from the <b>config.php</b> 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.
|
||||
<br><br>
|
||||
|
||||
<b>ANY EXISTING INSTANCE OF A USERDB WILL BE OVERWRITTEN!</b>
|
||||
|
||||
<br><br>
|
||||
<input type="submit" value="Click here"> to start the first conversion step!</p>
|
||||
<h1>{LN_CONVERT_STEP1}</h1>
|
||||
<p>
|
||||
{LN_CONVERT_STEP1_TEXT}
|
||||
</p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
|
||||
@ -71,13 +67,9 @@
|
||||
<table width="100%" cellpadding="5" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
<h1>Step 2 - Create Tables</h1>
|
||||
<p>If you reached this step, the database connection has been successfully verified! <br><br>
|
||||
The next step will be to create the necessary database tables used by the phpLogCon User System. This might take a while! <br>
|
||||
<b>WARNING</b>, if you have an existing phpLogCon installation in this database with the same tableprefix, all your data will be <b>OVERWRITTEN</b>! Make sure you are using a fresh database, or you want to overwrite your old phpLogCon database.
|
||||
<br><br>
|
||||
<b>Click on <input type="submit" value="Next"> to start the creation of the tables</b>
|
||||
|
||||
<h1>{LN_CONVERT_STEP2}</h1>
|
||||
<p>
|
||||
{LN_CONVERT_STEP2_TEXT}
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
</td>
|
||||
@ -89,24 +81,26 @@
|
||||
<table width="100%" cellpadding="5" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
<h1>Step 3 - Check SQL Results</h1>
|
||||
<p>Tables have been created. Check the List below for possible Error's<br><br>
|
||||
<h1>{LN_CONVERT_STEP3}</h1>
|
||||
<p>
|
||||
{LN_INSTALL_STEP5_TEXT}
|
||||
<br><br>
|
||||
<ul>
|
||||
<li>Successfully executed statements: <B>{sql_sucess}</B><br>
|
||||
<li>Failed statements: <B>{sql_failed}</B> <br>
|
||||
<li>{LN_INSTALL_SUCCESSSTATEMENTS} <B>{sql_sucess}</B><br>
|
||||
<li>{LN_INSTALL_FAILEDSTATEMENTS} <B>{sql_failed}</B> <br>
|
||||
</ul>
|
||||
<!-- IF sql_failed="0" -->
|
||||
You can now proceed to the <B>next</B> step adding the first phpLogCon Admin User!
|
||||
{LN_INSTALL_STEP5_TEXT_NEXT}
|
||||
<p> </p>
|
||||
<!-- ENDIF sql_failed="0" -->
|
||||
<!-- IF sql_failed!="0" -->
|
||||
<table width="700" class="with_border_alternate" cellpadding="2" cellspacing="1" border="0" align="center">
|
||||
<tr>
|
||||
<td colspan="2" nowrap class="cellmenu1" align="center"><B>At least one statement failed,see error reasons below</B></td>
|
||||
<td colspan="2" nowrap class="cellmenu1" align="center"><B>{LN_INSTALL_STEP5_TEXT_FAILED}</B></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="400" class="cellmenu1">Error Message</td>
|
||||
<td width="300" class="cellmenu1" align="center"><B>SQL Statement</B></td>
|
||||
<td width="400" class="cellmenu1">{LN_INSTALL_ERRORMSG}</td>
|
||||
<td width="300" class="cellmenu1" align="center"><B>{LN_INSTALL_SQLSTATEMENT}</B></td>
|
||||
</tr>
|
||||
<!-- BEGIN failedstatements -->
|
||||
<tr>
|
||||
@ -128,23 +122,24 @@
|
||||
<table width="100%" cellpadding="5" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
<h1>Step 4 - Creating the Main Useraccount</h1>
|
||||
<p>You are now about to create the initial phpLogCon User Account. <br>
|
||||
This will be the first administrative user, which will be needed to login into phpLogCon and access the Admin Center!
|
||||
<h1>{LN_CONVERT_STEP4}</h1>
|
||||
<p>
|
||||
{LN_INSTALL_STEP6_TEXT}
|
||||
</p>
|
||||
<br><br>
|
||||
|
||||
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="500" align="center">
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>Create User Account</b></td></tr>
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>{LN_INSTALL_CREATEUSER}</b></td></tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>Username</b></td>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_LOGIN_USERNAME}</b></td>
|
||||
<td align="right" class="line2" width="100%"><input type="text" name="username" size="40" maxlength="255" value="{MAIN_Username}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>Password</b></td>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_INSTALL_PASSWORD}</b></td>
|
||||
<td align="right" class="line1" width="100%"><input type="password" name="password1" size="40" maxlength="255" value="{MAIN_Password1}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>Repeat Password</b></td>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_INSTALL_PASSWORDREPEAT}</b></td>
|
||||
<td align="right" class="line2" width="100%"><input type="password" name="password2" size="40" maxlength="255" value="{MAIN_Password2}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -163,7 +158,7 @@
|
||||
<tr>
|
||||
<td class="line2" align="center">
|
||||
<br>
|
||||
<h3><font color="red">Successfully created User '{MAIN_Username}'.</font></h3>
|
||||
<h3><font color="red">{LN_INSTALL_SUCCESSCREATED} '{MAIN_Username}'.</font></h3>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
@ -173,113 +168,13 @@
|
||||
<table width="100%" cellpadding="5" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
<h1>Step 5 - Create the first source for syslog messages</h1>
|
||||
<p> </p>
|
||||
|
||||
<table border="0" cellpadding="1" cellspacing="1" width="600" align="center" class="with_border">
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>{LN_CFG_FIRSTSYSLOGSOURCE}</b></td></tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="250" nowrap><b>{LN_CFG_NAMEOFTHESOURCE}</b></td>
|
||||
<td align="right" class="line0" width="100%"><input type="text" name="SourceName" size="40" maxlength="255" value="{SourceName}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_CFG_SOURCETYPE}</b></td>
|
||||
<td align="right" class="line1" width="100%">
|
||||
<select id="SourceType" name="SourceType" size="1" OnChange="toggleSourceTypeVisibility('SourceType');">
|
||||
<!-- BEGIN SOURCETYPES -->
|
||||
<option {selected} value="{type}">{DisplayName}</option>
|
||||
<!-- END SOURCETYPES -->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_CFG_VIEW}</b></td>
|
||||
<td align="right" class="line1" width="100%">
|
||||
<select id="SourceViewID" name="SourceViewID" size="1">
|
||||
<!-- BEGIN Views -->
|
||||
<option {selected} value="{ID}">{DisplayName}</option>
|
||||
<!-- END Views -->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="HiddenDiskTypeOptions" class="HiddenContent">
|
||||
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="600" align="center" class="with_border">
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>{LN_CFG_DISKTYPEOPTIONS}</b></td></tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_CFG_LOGLINETYPE}</b></td>
|
||||
<td align="right" class="line0" width="100%">
|
||||
<select name="SourceLogLineType" size="1">
|
||||
<!-- BEGIN LOGLINETYPES -->
|
||||
<option {selected} value="{type}">{DisplayName}</option>
|
||||
<!-- END LOGLINETYPES -->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_CFG_SYSLOGFILE}</b></td>
|
||||
<td align="right" class="line1" width="100%"><input type="text" name="SourceDiskFile" size="60" maxlength="255" value="{SourceDiskFile}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="HiddenDatabaseTypeOptions" class="HiddenContent">
|
||||
<table border="0" cellpadding="1" cellspacing="1" width="600" align="center" class="with_border">
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>{LN_CFG_DATABASETYPEOPTIONS}</b></td></tr>
|
||||
</table>
|
||||
|
||||
<div id="HiddenDBTYpesOptions" class="HiddenContent">
|
||||
<table border="0" cellpadding="1" cellspacing="1" width="600" align="center" class="with_border">
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_CFG_DBSTORAGEENGINE}</b></td>
|
||||
<td align="right" class="line1" width="100%">
|
||||
<select name="SourceDBType" size="1">
|
||||
<!-- BEGIN DBTYPES -->
|
||||
<option {selected} value="{type}">{DisplayName}</option>
|
||||
<!-- END DBTYPES -->
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table border="0" cellpadding="1" cellspacing="1" width="600" align="center" class="with_border">
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_CFG_DBTABLETYPE}</b></td>
|
||||
<td align="right" class="line0" width="100%"><input type="text" name="SourceDBTableType" size="40" maxlength="255" value="{SourceDBTableType}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_CFG_DBSERVER}</b></td>
|
||||
<td align="right" class="line0" width="100%"><input type="text" name="SourceDBServer" size="40" maxlength="255" value="{SourceDBServer}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_CFG_DBNAME}</b></td>
|
||||
<td align="right" class="line1" width="100%"><input type="text" name="SourceDBName" size="40" maxlength="255" value="{SourceDBName}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_CFG_DBTABLENAME}</b></td>
|
||||
<td align="right" class="line0" width="100%"><input type="text" name="SourceDBTableName" size="40" maxlength="255" value="{SourceDBTableName}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_CFG_DBUSER}</b></td>
|
||||
<td align="right" class="line1" width="100%"><input type="text" name="SourceDBUser" size="40" maxlength="255" value="{SourceDBUser}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_CFG_DBPASSWORD}</b></td>
|
||||
<td align="right" class="line0" width="100%"><input type="password" name="SourceDBPassword" size="40" maxlength="255" value="{SourceDBPassword}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_CFG_DBROWCOUNTING}</b></td>
|
||||
<td align="right" class="line1" width="100%">
|
||||
<input type="radio" name="SourceDBEnableRowCounting" value="true" {SourceDBEnableRowCounting_true}> Yes <input type="radio" name="SourceDBEnableRowCounting" value="false" {SourceDBEnableRowCounting_false}> No
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h1>{LN_CONVERT_STEP5}</h1>
|
||||
<p>
|
||||
{LN_CONVERT_STEP5_TEXT}
|
||||
</p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -294,11 +189,9 @@
|
||||
<table width="100%" cellpadding="5" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
<h1>Step 8 - Done</h1>
|
||||
<p>Congratulations! You have successfully installed phpLogCon :D!<br><br>
|
||||
To finish the Installation, remove the file install.php from the main directory!<br><br>
|
||||
|
||||
Click <a href="index.php">here</a> to go to your installation.
|
||||
<h1>{LN_CONVERT_STEP6}</h1>
|
||||
<p>
|
||||
{LN_CONVERT_STEP6_TEXT}
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
</td>
|
||||
@ -311,7 +204,7 @@
|
||||
<tr>
|
||||
<td class="cellmenu1" width="50%">
|
||||
</td>
|
||||
<td class="line0" width="150" align="center" nowrap><B>Conversion Progress: </B></td>
|
||||
<td class="line0" width="150" align="center" nowrap><B>{LN_CONVERT_PROCESS} </B></td>
|
||||
<td class="line0" width="300" nowrap>
|
||||
<table width="100%" bgcolor="#007700" cellpadding="0" cellspacing="0" border="0" align="center">
|
||||
<tr>
|
||||
@ -324,10 +217,10 @@
|
||||
<input type="submit" value="Next">
|
||||
<!-- ENDIF NEXT_ENABLED="true" -->
|
||||
<!-- IF RECHECK_ENABLED="true" -->
|
||||
<a href="?step={CONVERT_STEP}">ReCheck</a>
|
||||
<a href="?step={CONVERT_STEP}">{LN_INSTALL_RECHECK}</a>
|
||||
<!-- ENDIF RECHECK_ENABLED="true" -->
|
||||
<!-- IF FINISH_ENABLED="true" -->
|
||||
<a href="index.php">Finish!</a>
|
||||
<a href="index.php">{LN_INSTALL_FINISH}</a>
|
||||
<!-- ENDIF FINISH_ENABLED="true" -->
|
||||
</td>
|
||||
<td class="cellmenu1" width="50%">
|
||||
|
@ -56,7 +56,7 @@
|
||||
<table width="100%" cellpadding="2" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="title">
|
||||
<h1 align="center">Installing phpLogCon Version <U>{BUILDNUMBER}</U> - Step {INSTALL_STEP}</h1>
|
||||
<h1 align="center">{LN_INSTALL_TITLE}</h1>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -80,10 +80,10 @@
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
|
||||
<h1>Step 1 - Prerequisites</h1>
|
||||
<p>Before you start installing phpLogCon, the Installer setup has to check a few things first.<br>
|
||||
You may have to correct some file permissions first. <br><br>
|
||||
Click on <input type="submit" value="Next"> to start the Test!</p>
|
||||
<h1>{LN_INSTALL_STEP1}</h1>
|
||||
<p>
|
||||
{LN_INSTALL_STEP1_TEXT}
|
||||
</p>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
|
||||
@ -97,9 +97,9 @@
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
|
||||
<h1>Step 2 - Verify File Permissions</h1>
|
||||
<p>The following file permissions have been checked. Verify the results below! <br>
|
||||
You may use the <B>configure.sh</B> script from the <B>contrib</B> folder to set the permissions for you.
|
||||
<h1>{LN_INSTALL_STEP2}</h1>
|
||||
<p>
|
||||
{LN_INSTALL_STEP2_TEXT}
|
||||
</p>
|
||||
<p> </p>
|
||||
|
||||
@ -125,31 +125,31 @@
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
|
||||
<h1>Step 3 - Basic Configuration</h1>
|
||||
<h1>{LN_INSTALL_STEP3}</h1>
|
||||
<p>
|
||||
In this step, you configure the basic configurations for phpLogCon.
|
||||
{LN_INSTALL_STEP3_TEXT}
|
||||
<br><br>
|
||||
</p>
|
||||
<p> </p>
|
||||
|
||||
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="500" align="center">
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>Frontend Options</b></td></tr>
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>{LN_INSTALL_FRONTEND}</b></td></tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="265" nowrap><b>Number of syslog messages per page</b></td>
|
||||
<td align="left" class="cellmenu2" width="265" nowrap><b>{LN_INSTALL_NUMOFSYSLOGS}</b></td>
|
||||
<td align="right" class="line1" width="100%"><input type="text" name="ViewEntriesPerPage" size="40" maxlength="8" value="{ViewEntriesPerPage}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>Message character limit for the main view</b></td>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_INSTALL_MSGCHARLIMIT}</b></td>
|
||||
<td align="right" class="line2" width="100%"><input type="text" name="ViewMessageCharacterLimit" size="40" maxlength="8" value="{ViewMessageCharacterLimit}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>Show message details popup</b></td>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_INSTALL_SHOWDETAILPOP}</b></td>
|
||||
<td align="right" class="line1" width="100%">
|
||||
<input type="radio" name="ViewEnableDetailPopups" value="1" {ViewEnableDetailPopups_true}> Yes <input type="radio" name="ViewEnableDetailPopups" value="0" {ViewEnableDetailPopups_false}> No
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>Automatically resolved IP Addresses (inline)</b></td>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_INSTALL_AUTORESOLVIP}</b></td>
|
||||
<td align="right" class="line2" width="100%">
|
||||
<input type="radio" name="EnableIPAddressResolve" value="1" {EnableIPAddressResolve_true}> Yes <input type="radio" name="EnableIPAddressResolve" value="0" {EnableIPAddressResolve_false}> No
|
||||
</td>
|
||||
@ -157,9 +157,9 @@
|
||||
|
||||
<tr><td align="center" class="line2" colspan="2"> </td></tr>
|
||||
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>User Database Options</b></td></tr>
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>{LN_INSTALL_USERDBOPTIONS}</b></td></tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="265" nowrap><b>Enable User Database</b></td>
|
||||
<td align="left" class="cellmenu2" width="265" nowrap><b>{LN_INSTALL_ENABLEUSERDB}</b></td>
|
||||
<td align="right" class="line1" width="100%">
|
||||
<input type="radio" name="UserDBEnabled" value="1" {UserDBEnabled_true} OnChange="showvisibility('HiddenUserDBOptions');"> Yes
|
||||
<input type="radio" name="UserDBEnabled" value="0" {UserDBEnabled_false} OnChange="hidevisibility('HiddenUserDBOptions');"> No
|
||||
@ -224,13 +224,9 @@
|
||||
<table width="100%" cellpadding="5" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
<h1>Step 4 - Create Tables</h1>
|
||||
<p>If you reached this step, the database connection has been successfully verified! <br><br>
|
||||
The next step will be to create the necessary database tables used by the phpLogCon User System. This might take a while! <br>
|
||||
<b>WARNING</b>, if you have an existing phpLogCon installation in this database with the same tableprefix, all your data will be <b>OVERWRITTEN</b>! Make sure you are using a fresh database, or you want to overwrite your old phpLogCon database.
|
||||
<br><br>
|
||||
<b>Click on <input type="submit" value="Next"> to start the creation of the tables</b>
|
||||
|
||||
<h1>{LN_INSTALL_STEP4}</h1>
|
||||
<p>
|
||||
{LN_INSTALL_STEP4_TEXT}
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
</td>
|
||||
@ -242,24 +238,26 @@
|
||||
<table width="100%" cellpadding="5" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
<h1>Step 5 - Check SQL Results</h1>
|
||||
<p>Tables have been created. Check the List below for possible Error's<br><br>
|
||||
<h1>{LN_INSTALL_STEP5}</h1>
|
||||
<p>
|
||||
{LN_INSTALL_STEP5_TEXT}
|
||||
<br><br>
|
||||
<ul>
|
||||
<li>Successfully executed statements: <B>{sql_sucess}</B><br>
|
||||
<li>Failed statements: <B>{sql_failed}</B> <br>
|
||||
<li>{LN_INSTALL_SUCCESSSTATEMENTS} <B>{sql_sucess}</B><br>
|
||||
<li>{LN_INSTALL_FAILEDSTATEMENTS} <B>{sql_failed}</B> <br>
|
||||
</ul>
|
||||
<!-- IF sql_failed="0" -->
|
||||
You can now proceed to the <B>next</B> step adding the first phpLogCon Admin User!
|
||||
{LN_INSTALL_STEP5_TEXT_NEXT}
|
||||
<p> </p>
|
||||
<!-- ENDIF sql_failed="0" -->
|
||||
<!-- IF sql_failed!="0" -->
|
||||
<table width="700" class="with_border_alternate" cellpadding="2" cellspacing="1" border="0" align="center">
|
||||
<tr>
|
||||
<td colspan="2" nowrap class="cellmenu1" align="center"><B>At least one statement failed,see error reasons below</B></td>
|
||||
<td colspan="2" nowrap class="cellmenu1" align="center"><B>{LN_INSTALL_STEP5_TEXT_FAILED}</B></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="400" class="cellmenu1">Error Message</td>
|
||||
<td width="300" class="cellmenu1" align="center"><B>SQL Statement</B></td>
|
||||
<td width="400" class="cellmenu1">{LN_INSTALL_ERRORMSG}</td>
|
||||
<td width="300" class="cellmenu1" align="center"><B>{LN_INSTALL_SQLSTATEMENT}</B></td>
|
||||
</tr>
|
||||
<!-- BEGIN failedstatements -->
|
||||
<tr>
|
||||
@ -281,23 +279,22 @@
|
||||
<table width="100%" cellpadding="5" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
<h1>Step 6 - Creating the Main Useraccount</h1>
|
||||
<p>You are now about to create the initial phpLogCon User Account. <br>
|
||||
This will be the first administrative user, which will be needed to login into phpLogCon and access the Admin Center!
|
||||
<h1>{LN_INSTALL_STEP6}</h1>
|
||||
<p>
|
||||
{LN_INSTALL_STEP6_TEXT}
|
||||
<br><br>
|
||||
|
||||
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="500" align="center">
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>Create User Account</b></td></tr>
|
||||
<tr><td align="center" class="cellmenu1" colspan="2"><b>{LN_INSTALL_CREATEUSER}</b></td></tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>Username</b></td>
|
||||
<td align="left" class="cellmenu2" width="150" nowrap><b>{LN_LOGIN_USERNAME}</b></td>
|
||||
<td align="right" class="line2" width="100%"><input type="text" name="username" size="40" maxlength="255" value="{MAIN_Username}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>Password</b></td>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_INSTALL_PASSWORD}</b></td>
|
||||
<td align="right" class="line1" width="100%"><input type="password" name="password1" size="40" maxlength="255" value="{MAIN_Password1}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2" nowrap><b>Repeat Password</b></td>
|
||||
<td align="left" class="cellmenu2" nowrap><b>{LN_INSTALL_PASSWORDREPEAT}</b></td>
|
||||
<td align="right" class="line2" width="100%"><input type="password" name="password2" size="40" maxlength="255" value="{MAIN_Password2}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -316,7 +313,7 @@
|
||||
<tr>
|
||||
<td class="line2" align="center">
|
||||
<br>
|
||||
<h3><font color="red">Successfully created User '{MAIN_Username}'.</font></h3>
|
||||
<h3><font color="red">{LN_INSTALL_SUCCESSCREATED} '{MAIN_Username}'.</font></h3>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
@ -326,7 +323,7 @@
|
||||
<table width="100%" cellpadding="5" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
<h1>Step 7 - Create the first source for syslog messages</h1>
|
||||
<h1>{LN_INSTALL_STEP7}</h1>
|
||||
<p> </p>
|
||||
|
||||
<table border="0" cellpadding="1" cellspacing="1" width="600" align="center" class="with_border">
|
||||
@ -447,11 +444,9 @@
|
||||
<table width="100%" cellpadding="5" cellspacing="1" border="0" align="center" class="with_border_alternate">
|
||||
<tr>
|
||||
<td class="tableBackground">
|
||||
<h1>Step 8 - Done</h1>
|
||||
<p>Congratulations! You have successfully installed phpLogCon :D!<br><br>
|
||||
To finish the Installation, remove the file install.php from the main directory!<br><br>
|
||||
|
||||
Click <a href="index.php">here</a> to go to your installation.
|
||||
<h1>{LN_INSTALL_STEP8}</h1>
|
||||
<p>
|
||||
{LN_INSTALL_STEP8_TEXT}
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
</td>
|
||||
@ -464,7 +459,7 @@
|
||||
<tr>
|
||||
<td class="cellmenu1" width="50%">
|
||||
</td>
|
||||
<td class="line0" width="100" nowrap><B>Install Progress: </B></td>
|
||||
<td class="line0" width="100" nowrap><B>{LN_INSTALL_PROGRESS}</B></td>
|
||||
<td class="line0" width="300" nowrap>
|
||||
<table width="100%" bgcolor="#007700" cellpadding="0" cellspacing="0" border="0" align="center">
|
||||
<tr>
|
||||
@ -477,10 +472,10 @@
|
||||
<input type="submit" value="Next">
|
||||
<!-- ENDIF NEXT_ENABLED="true" -->
|
||||
<!-- IF RECHECK_ENABLED="true" -->
|
||||
<a href="?step={INSTALL_STEP}">ReCheck</a>
|
||||
<a href="?step={INSTALL_STEP}">{LN_INSTALL_RECHECK}</a>
|
||||
<!-- ENDIF RECHECK_ENABLED="true" -->
|
||||
<!-- IF FINISH_ENABLED="true" -->
|
||||
<a href="index.php">Finish!</a>
|
||||
<a href="index.php">{LN_INSTALL_FINISH}</a>
|
||||
<!-- ENDIF FINISH_ENABLED="true" -->
|
||||
</td>
|
||||
<td class="cellmenu1" width="50%">
|
||||
|
Loading…
x
Reference in New Issue
Block a user