Merge branch 'master' of git://github.com/Froxlor/Froxlor

This commit is contained in:
BNoiZe
2013-10-13 10:55:50 +02:00
26 changed files with 1563 additions and 1591 deletions

View File

@@ -149,6 +149,10 @@ elseif($page == 'phpinfo'
eval("\$phpinfoentries .= \"" . getTemplate("settings/phpinfo/phpinfo_1") . "\";"); eval("\$phpinfoentries .= \"" . getTemplate("settings/phpinfo/phpinfo_1") . "\";");
} }
} }
// first header -> show actual php version
if (strtolower($name) == "phpinfo") {
$name = "PHP ".PHP_VERSION;
}
eval("\$phpinfohtml .= \"" . getTemplate("settings/phpinfo/phpinfo_table") . "\";"); eval("\$phpinfohtml .= \"" . getTemplate("settings/phpinfo/phpinfo_table") . "\";");
} }
$phpinfo = $phpinfohtml; $phpinfo = $phpinfohtml;

View File

@@ -92,7 +92,6 @@ CREATE TABLE `panel_admins` (
`domains_see_all` tinyint(1) NOT NULL default '0', `domains_see_all` tinyint(1) NOT NULL default '0',
`caneditphpsettings` tinyint(1) NOT NULL default '0', `caneditphpsettings` tinyint(1) NOT NULL default '0',
`change_serversettings` tinyint(1) NOT NULL default '0', `change_serversettings` tinyint(1) NOT NULL default '0',
`edit_billingdata` tinyint(1) NOT NULL DEFAULT '0',
`diskspace` int(15) NOT NULL default '0', `diskspace` int(15) NOT NULL default '0',
`diskspace_used` int(15) NOT NULL default '0', `diskspace_used` int(15) NOT NULL default '0',
`mysqls` int(15) NOT NULL default '0', `mysqls` int(15) NOT NULL default '0',
@@ -124,7 +123,7 @@ CREATE TABLE `panel_admins` (
`aps_packages_used` int(5) NOT NULL default '0', `aps_packages_used` int(5) NOT NULL default '0',
`email_autoresponder` int(5) NOT NULL default '0', `email_autoresponder` int(5) NOT NULL default '0',
`email_autoresponder_used` int(5) NOT NULL default '0', `email_autoresponder_used` int(5) NOT NULL default '0',
`theme` varchar(255) NOT NULL default 'Froxlor', `theme` varchar(255) NOT NULL default 'Sparkle',
PRIMARY KEY (`adminid`), PRIMARY KEY (`adminid`),
UNIQUE KEY `loginname` (`loginname`) UNIQUE KEY `loginname` (`loginname`)
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci; ) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;
@@ -187,7 +186,7 @@ CREATE TABLE `panel_customers` (
`perlenabled` tinyint(1) NOT NULL default '0', `perlenabled` tinyint(1) NOT NULL default '0',
`email_autoresponder` int(5) NOT NULL default '0', `email_autoresponder` int(5) NOT NULL default '0',
`email_autoresponder_used` int(5) NOT NULL default '0', `email_autoresponder_used` int(5) NOT NULL default '0',
`theme` varchar(255) NOT NULL default 'Froxlor', `theme` varchar(255) NOT NULL default 'Sparkle',
`backup_allowed` TINYINT( 1 ) NOT NULL DEFAULT '1', `backup_allowed` TINYINT( 1 ) NOT NULL DEFAULT '1',
`backup_enabled` TINYINT( 1 ) NOT NULL DEFAULT '0', `backup_enabled` TINYINT( 1 ) NOT NULL DEFAULT '0',
PRIMARY KEY (`customerid`), PRIMARY KEY (`customerid`),
@@ -495,10 +494,6 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('system', 'diskquota_repquota_path', '/usr/sbin/repquota'), ('system', 'diskquota_repquota_path', '/usr/sbin/repquota'),
('system', 'diskquota_quotatool_path', '/usr/bin/quotatool'), ('system', 'diskquota_quotatool_path', '/usr/bin/quotatool'),
('system', 'diskquota_customer_partition', '/dev/root'), ('system', 'diskquota_customer_partition', '/dev/root'),
('system', 'logrotate_enabled', '0'),
('system', 'logrotate_binary', '/usr/sbin/logrotate'),
('system', 'logrotate_interval', 'weekly'),
('system', 'logrotate_keep', '4'),
('system', 'mod_fcgid_idle_timeout', '30'), ('system', 'mod_fcgid_idle_timeout', '30'),
('system', 'perl_path', '/usr/bin/perl'), ('system', 'perl_path', '/usr/bin/perl'),
('system', 'mod_fcgid_ownvhost', '0'), ('system', 'mod_fcgid_ownvhost', '0'),
@@ -530,7 +525,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('panel', 'allow_domain_change_admin', '0'), ('panel', 'allow_domain_change_admin', '0'),
('panel', 'allow_domain_change_customer', '0'), ('panel', 'allow_domain_change_customer', '0'),
('panel', 'frontend', 'froxlor'), ('panel', 'frontend', 'froxlor'),
('panel', 'default_theme', 'Froxlor'), ('panel', 'default_theme', 'Sparkle'),
('panel', 'password_min_length', '0'), ('panel', 'password_min_length', '0'),
('panel', 'adminmail_defname', 'Froxlor Administrator'), ('panel', 'adminmail_defname', 'Froxlor Administrator'),
('panel', 'adminmail_return', ''), ('panel', 'adminmail_return', ''),
@@ -543,7 +538,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('panel', 'phpconfigs_hidestdsubdomain', '0'), ('panel', 'phpconfigs_hidestdsubdomain', '0'),
('panel', 'allow_theme_change_admin', '1'), ('panel', 'allow_theme_change_admin', '1'),
('panel', 'allow_theme_change_customer', '1'), ('panel', 'allow_theme_change_customer', '1'),
('panel', 'version', '0.9.29.1-dev2'); ('panel', 'version', '0.9.29.1-dev4');
DROP TABLE IF EXISTS `panel_tasks`; DROP TABLE IF EXISTS `panel_tasks`;

View File

@@ -2,7 +2,6 @@
/** /**
* This file is part of the Froxlor project. * This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors). * Copyright (c) 2010 the Froxlor Team (see authors).
* *
* For the full copyright and license information, please view the COPYING * For the full copyright and license information, please view the COPYING
@@ -10,957 +9,14 @@
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt * COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* *
* @copyright (c) the authors * @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009) * @author Michael Kaufmann <mkaufmann@nutime.de>
* @author Froxlor team <team@froxlor.org> (2010-) * @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install * @package Install
* *
*/ */
/** require 'lib/class.FroxlorInstall.php';
* Most elements are taken from the phpBB (www.phpbb.com)
* installer, (c) 1999 - 2004 phpBB Group.
*/
// ensure that default timezone is set $frxinstall = new FroxlorInstall();
if(function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get")) $frxinstall->run();
{
@date_default_timezone_set(@date_default_timezone_get());
}
if(file_exists('../lib/userdata.inc.php'))
{
/**
* Includes the Usersettings eg. MySQL-Username/Passwort etc. to test if Froxlor is already installed
*/
require ('../lib/userdata.inc.php');
if(isset($sql)
&& is_array($sql)
) {
$installed_hint = file_get_contents('../templates/Froxlor/misc/alreadyinstalledhint.tpl');
die($installed_hint);
}
}
/**
* Include the functions
*/
require ('../lib/functions.php');
/**
* Include the MySQL-Table-Definitions
*/
require ('../lib/tables.inc.php');
/**
* Language Managament
*/
$languages = Array(
'german' => 'Deutsch',
'english' => 'English',
'french' => 'Francais'
);
$standardlanguage = 'english';
if(isset($_GET['language'])
&& isset($languages[$_GET['language']]))
{
$language = $_GET['language'];
}
elseif(isset($_POST['language'])
&& isset($languages[$_POST['language']]))
{
$language = $_POST['language'];
}
else
{
$language = $standardlanguage;
}
if(file_exists('./lng/' . $language . '.lng.php'))
{
/**
* Includes file /lng/$language.lng.php if it exists
*/
require ('./lng/' . $language . '.lng.php');
}
/**
* BEGIN FUNCTIONS -----------------------------------------------
*/
function page_header() {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Default-Style" content="text/css" />
<link rel="stylesheet" href="../templates/Froxlor/assets/css/main.css" />
<!--[if IE]><link rel="stylesheet" href="../templates/Froxlor/assets/css/main_ie.css" /><![endif]-->
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../templates/Froxlor/assets/js/main.js"></script>
<link href="../templates/Froxlor/assets/img/favicon.ico" rel="icon" type="image/x-icon" />
<title>Froxlor Server Management Panel - Installation</title>
<style>
body {
font-family: Verdana, Geneva, sans-serif;
}
input {
background: #dae7ee url('../templates/Froxlor/assets/img/icons/text_align_left.png') no-repeat 5px 4px;
}
input[type="password"] {
background: #dae7ee url('../templates/Froxlor/assets/img/icons/password.png') no-repeat 4px 4px;
}
input[type="submit"] {
background: #ccc url('../templates/Froxlor/assets/img/icons/button_ok.png') no-repeat 4px 8px;
}
</style>
</head>
<body>
<div class="loginpage">
<?php
}
function page_footer() {
?>
</div>
<footer>
<span>
Froxlor &copy; 2009-<?php echo date('Y', time()); ?> by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
</span>
</footer>
</body>
</html>
<?php
}
function status_message($case, $text)
{
if($case == 'begin')
{
echo '<tr><td>'.$text;
}
else
{
echo '</td><td class="installstatus">
<span style="color:'.$case.';">'.$text.'</span>
</td></tr>';
}
}
function requirement_checks() {
global $lng, $theme;
page_header();
?>
<article class="install bradius">
<header class="dark">
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2>Requirements</h2>
<table class="noborder">
<?php
$_die = false;
// check for correct php version
status_message('begin', $lng['install']['phpversion']);
if(version_compare("5.2.0", PHP_VERSION, ">="))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// Check if magic_quotes_runtime is active
status_message('begin', $lng['install']['phpmagic_quotes_runtime']);
if(get_magic_quotes_runtime())
{
// Deactivate
set_magic_quotes_runtime(false);
status_message('orange', $lng['install']['active'] . '<br />' . $lng['install']['phpmagic_quotes_runtime_description']);
}
else
{
status_message('green', 'OK');
}
// check for mysql-extension
status_message('begin', $lng['install']['phpmysql']);
if(!extension_loaded('mysql') && !extension_loaded('mysqlnd'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// check for xml-extension
status_message('begin', $lng['install']['phpxml']);
if(!extension_loaded('xml'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// check for filter-extension
status_message('begin', $lng['install']['phpfilter']);
if(!extension_loaded('filter'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// check for posix-extension
status_message('begin', $lng['install']['phpposix']);
if(!extension_loaded('posix'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// check for bcmath extension
status_message('begin', $lng['install']['phpbcmath']);
if(!extension_loaded('bcmath'))
{
status_message('orange', $lng['install']['notinstalled'] . '<br />' . $lng['install']['bcmathdescription']);
}
else
{
status_message('green', 'OK');
}
// check for open_basedir
status_message('begin', $lng['install']['openbasedir']);
$php_ob = @ini_get("open_basedir");
if(!empty($php_ob)
&& $php_ob != '')
{
status_message('orange', $lng['install']['openbasedirenabled']);
}
else
{
status_message('green', 'OK');
}
?>
</table>
<?php
if($_die)
{
?>
<p style="padding-left:15px;">
<strong><?php echo $lng['install']['diedbecauseofrequirements']; ?></strong>
</p>
<p class="submit">
<a href="install.php"><?php echo $lng['install']['click_here_to_refresh']; ?></a>
</p>
<?php
} else {
?>
<p style="padding-left:15px;">
<strong><?php echo $lng['install']['froxlor_succ_checks']; ?></strong>
</p>
<p class="submit">
<a href="install.php?check=1"><?php echo $lng['install']['click_here_to_continue']; ?></a>
</p>
<?php
}
?>
</section>
</article>
<?php
page_footer();
}
/**
* END FUNCTIONS ---------------------------------------------------
*/
/**
* BEGIN VARIABLES ---------------------------------------------------
*/
//guess Servername
if(!empty($_POST['servername']))
{
$servername = $_POST['servername'];
}
else
{
if(!empty($_SERVER['SERVER_NAME']))
{
if(preg_match('/^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$/', $_SERVER['SERVER_NAME']) == false)
{
$servername = $_SERVER['SERVER_NAME'];
}
else
{
$servername = '';
}
}
else
{
$servername = '';
}
}
//guess serverip
if(!empty($_POST['serverip']))
{
$serverip = $_POST['serverip'];
}
else
{
if(!empty($_SERVER['SERVER_ADDR']))
{
$serverip = $_SERVER['SERVER_ADDR'];
}
else
{
$serverip = '';
}
}
if(!empty($_POST['mysql_host']))
{
$mysql_host = $_POST['mysql_host'];
}
else
{
$mysql_host = '127.0.0.1';
}
if(!empty($_POST['mysql_database']))
{
$mysql_database = $_POST['mysql_database'];
}
else
{
$mysql_database = 'froxlor';
}
if(!empty($_POST['mysql_unpriv_user']))
{
$mysql_unpriv_user = $_POST['mysql_unpriv_user'];
}
else
{
$mysql_unpriv_user = 'froxlor';
}
if(!empty($_POST['mysql_unpriv_pass']))
{
$mysql_unpriv_pass = $_POST['mysql_unpriv_pass'];
}
else
{
$mysql_unpriv_pass = '';
}
if(!empty($_POST['mysql_root_user']))
{
$mysql_root_user = $_POST['mysql_root_user'];
}
else
{
$mysql_root_user = 'root';
}
if(!empty($_POST['mysql_root_pass']))
{
$mysql_root_pass = $_POST['mysql_root_pass'];
}
else
{
$mysql_root_pass = '';
}
if(!empty($_POST['admin_user']))
{
$admin_user = $_POST['admin_user'];
}
else
{
$admin_user = 'admin';
}
if(!empty($_POST['admin_pass1']))
{
$admin_pass1 = $_POST['admin_pass1'];
}
else
{
$admin_pass1 = '';
}
if(!empty($_POST['admin_pass2']))
{
$admin_pass2 = $_POST['admin_pass2'];
}
else
{
$admin_pass2 = '';
}
if($mysql_host == 'localhost'
|| $mysql_host == '127.0.0.1')
{
$mysql_access_host = $mysql_host;
}
else
{
$mysql_access_host = $serverip;
}
// gues http software
if(!empty($_POST['webserver']))
{
$webserver = $_POST['webserver'];
}
else
{
if(strtoupper(@php_sapi_name()) == "APACHE2HANDLER"
|| stristr($_SERVER['SERVER_SOFTWARE'], "apache/2"))
{
$webserver = 'apache2';
}
elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "LIGHTTPD"
|| stristr($_SERVER['SERVER_SOFTWARE'], "lighttpd"))
{
$webserver = 'lighttpd';
}
elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "NGINX"
|| stristr($_SERVER['SERVER_SOFTWARE'], "nginx"))
{
$webserver = 'nginx';
}
else
{
// we don't need to bail out, since unknown does not affect any critical installation routines
$webserver = 'unknown';
}
}
if(!empty($_POST['httpuser']))
{
$httpuser = $_POST['httpuser'];
}
else
{
$httpuser = '';
}
if(!empty($_POST['httpgroup']))
{
$httpgroup = $_POST['httpgroup'];
}
else
{
$httpgroup = '';
}
/**
* END VARIABLES ---------------------------------------------------
*/
/**
* BEGIN INSTALL ---------------------------------------------------
*/
if(isset($_POST['installstep'])
&& $_POST['installstep'] == '1'
&& $admin_pass1 == $admin_pass2
&& $admin_pass1 != ''
&& $admin_pass2 != ''
&& $mysql_unpriv_pass != ''
&& $mysql_root_pass != ''
&& $servername != ''
&& $serverip != ''
&& $httpuser != ''
&& $httpgroup != ''
&& $mysql_unpriv_user != $mysql_root_user)
{
page_header();
?>
<article class="install bradius">
<header class="dark">
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2>Installation</h2>
<table class="noborder">
<?php
//first test if we can access the database server with the given root user and password
status_message('begin', $lng['install']['testing_mysql']);
$db_root = new db($mysql_host, $mysql_root_user, $mysql_root_pass, '');
//ok, if we are here, the database class is build up (otherwise it would have already die'd this script)
status_message('green', 'OK');
//first we make a backup of the old DB if it exists
status_message('begin', $lng['install']['backup_old_db']);
$tables_exist = false;
$sql = "SHOW TABLES FROM $mysql_database";
$result = mysql_query($sql);
// check the first row
if($result !== false)
{
$row = mysql_num_rows($result);
if($row > 0)
{
$tables_exist = true;
}
}
if($tables_exist)
{
$filename = "/tmp/froxlor_backup_" . date('YmdHi') . ".sql";
if(is_file("/usr/bin/mysqldump"))
{
$do_backup = true;
$mysql_dump = '/usr/bin/mysqldump';
}
elseif(is_file("/usr/local/bin/mysqldump"))
{
$do_backup = true;
$mysql_dump = '/usr/local/bin/mysqldump';
}
else
{
$do_backup = false;
status_message('red', $lng['install']['backing_up_binary_missing']);
}
if($do_backup) {
$command = $mysql_dump . " " . $mysql_database . " -u " . $mysql_root_user . " --password='" . $mysql_root_pass . "' --result-file=" . $filename;
$output = exec($command);
if(stristr($output, "error"))
{
status_message('red', $lng['install']['backing_up_failed']);
}
else
{
status_message('green', 'OK');
}
}
}
//so first we have to delete the database and the user given for the unpriv-user if they exit
status_message('begin', $lng['install']['erasing_old_db']);
$db_root->query("DELETE FROM `mysql`.`user` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
$db_root->query("DELETE FROM `mysql`.`db` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
$db_root->query("DELETE FROM `mysql`.`tables_priv` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
$db_root->query("DELETE FROM `mysql`.`columns_priv` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
$db_root->query("DROP DATABASE IF EXISTS `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "` ;");
$db_root->query("FLUSH PRIVILEGES;");
status_message('green', 'OK');
//then we have to create a new user and database for the froxlor unprivileged mysql access
status_message('begin', $lng['install']['create_mysqluser_and_db']);
$db_root->query("CREATE DATABASE `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`");
$mysql_access_host_array = array_map('trim', explode(',', $mysql_access_host));
if(in_array('127.0.0.1', $mysql_access_host_array)
&& !in_array('localhost', $mysql_access_host_array))
{
$mysql_access_host_array[] = 'localhost';
}
if(!in_array('127.0.0.1', $mysql_access_host_array)
&& in_array('localhost', $mysql_access_host_array))
{
$mysql_access_host_array[] = '127.0.0.1';
}
$mysql_access_host_array[] = $serverip;
foreach($mysql_access_host_array as $mysql_access_host)
{
$db_root->query("GRANT ALL PRIVILEGES ON `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`.* TO '" . $db_root->escape($mysql_unpriv_user) . "'@'" . $db_root->escape($mysql_access_host) . "' IDENTIFIED BY 'password'");
$db_root->query("SET PASSWORD FOR '" . $db_root->escape($mysql_unpriv_user) . "'@'" . $db_root->escape($mysql_access_host) . "' = PASSWORD('" . $db_root->escape($mysql_unpriv_pass) . "')");
}
$db_root->query("FLUSH PRIVILEGES;");
$mysql_access_host = implode(',', $mysql_access_host_array);
status_message('green', 'OK');
//now a new database and the new froxlor-unprivileged-mysql-account have been created and we can fill it now with the data.
status_message('begin', $lng['install']['testing_new_db']);
$db = new db($mysql_host, $mysql_unpriv_user, $mysql_unpriv_pass, $mysql_database);
status_message('green', 'OK');
status_message('begin', $lng['install']['importing_data']);
$db_schema = './froxlor.sql';
$sql_query = @file_get_contents($db_schema, 'r');
$sql_query = remove_remarks($sql_query);
$sql_query = split_sql_file($sql_query, ';');
for ($i = 0;$i < sizeof($sql_query);$i++)
{
if(trim($sql_query[$i]) != '')
{
$result = $db->query($sql_query[$i]);
}
}
status_message('green', 'OK');
status_message('begin', 'System Servername...');
if(validate_ip($_SERVER['SERVER_NAME'], true) !== false)
{
status_message('red', $lng['install']['servername_should_be_fqdn']);
}
else
{
status_message('green', 'OK');
}
//now let's change the settings in our settings-table
status_message('begin', $lng['install']['changing_data']);
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = 'admin@" . $db->escape($servername) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'adminmail'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($serverip) . "' WHERE `settinggroup` = 'system' AND `varname` = 'ipaddress'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($servername) . "' WHERE `settinggroup` = 'system' AND `varname` = 'hostname'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($version) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'version'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($languages[$language]) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'standardlanguage'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($mysql_access_host) . "' WHERE `settinggroup` = 'system' AND `varname` = 'mysql_access_host'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpuser) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
if($webserver == "apache2")
{
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/apache2 reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
}
elseif($webserver == "lighttpd")
{
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/conf-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-diroptions/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/lighttpd reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/lighttpd.pem' WHERE `settinggroup` = 'system' AND `varname` = 'ssl_cert_file'");
}
elseif($webserver == "nginx")
{
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/nginx/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/nginx/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/nginx/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/nginx reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
}
// insert the lastcronrun to be the installation date
$query = 'UPDATE `%s` SET `value` = UNIX_TIMESTAMP() WHERE `settinggroup` = \'system\' AND `varname` = \'lastcronrun\'';
$query = sprintf($query, TABLE_PANEL_SETTINGS);
$db->query($query);
// set specific times for some crons (traffic only at night, etc.)
$ts = mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_traffic.php';");
$ts = mktime(1, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_used_tickets_reset.php';");
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_ticketarchive.php';");
// and lets insert the default ip and port
$query = "INSERT INTO `".TABLE_PANEL_IPSANDPORTS."`
SET `ip`= '".$db->escape($serverip)."',
`port` = '80',
`namevirtualhost_statement` = '1',
`vhostcontainer` = '1',
`vhostcontainer_servername_statement` = '1'";
$db->query($query);
$defaultip = $db->insert_id();
// insert the defaultip
$query = 'UPDATE `%s` SET `value` = \'%s\' WHERE `settinggroup` = \'system\' AND `varname` = \'defaultip\'';
$query = sprintf($query, TABLE_PANEL_SETTINGS, $db->escape($defaultip));
$db->query($query);
status_message('green', 'OK');
//last but not least create the main admin
status_message('begin', $lng['install']['adding_admin_user']);
$db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET
`loginname` = '" . $db->escape($admin_user) . "',
`password` = '" . md5($admin_pass1) . "',
`name` = 'Siteadmin',
`email` = 'admin@" . $db->escape($servername) . "',
`def_language` = '". $db->escape($languages[$language]) . "',
`customers` = -1,
`customers_used` = 0,
`customers_see_all` = 1,
`caneditphpsettings` = 1,
`domains` = -1,
`domains_used` = 0,
`domains_see_all` = 1,
`change_serversettings` = 1,
`diskspace` = -1024,
`diskspace_used` = 0,
`mysqls` = -1,
`mysqls_used` = 0,
`emails` = -1,
`emails_used` = 0,
`email_accounts` = -1,
`email_accounts_used` = 0,
`email_forwarders` = -1,
`email_forwarders_used` = 0,
`email_quota` = -1,
`email_quota_used` = 0,
`ftps` = -1,
`ftps_used` = 0,
`tickets` = -1,
`tickets_used` = 0,
`tickets_see_all` = 1,
`subdomains` = -1,
`subdomains_used` = 0,
`traffic` = -1048576,
`traffic_used` = 0,
`deactivated` = 0,
`aps_packages` = -1,
`aps_packages_used` = 0,
`email_autoresponder` = -1,
`email_autoresponder_used` = 0");
status_message('green', 'OK');
//now we create the userdata.inc.php with the mysql-accounts
status_message('begin', $lng['install']['creating_configfile']);
$userdata = "<?php\n";
$userdata.= "//automatically generated userdata.inc.php for Froxlor\n";
$userdata.= "\$sql['host']='" . addcslashes($mysql_host, "'\\") . "';\n";
$userdata.= "\$sql['user']='" . addcslashes($mysql_unpriv_user, "'\\") . "';\n";
$userdata.= "\$sql['password']='" . addcslashes($mysql_unpriv_pass, "'\\") . "';\n";
$userdata.= "\$sql['db']='" . addcslashes($mysql_database, "'\\") . "';\n";
$userdata.= "\$sql_root[0]['caption']='Default';\n";
$userdata.= "\$sql_root[0]['host']='" . addcslashes($mysql_host, "'\\") . "';\n";
$userdata.= "\$sql_root[0]['user']='" . addcslashes($mysql_root_user, "'\\") . "';\n";
$userdata.= "\$sql_root[0]['password']='" . addcslashes($mysql_root_pass, "'\\") . "';\n";
$userdata.= "?>";
//we test now if we can store the userdata.inc.php in ../lib
if($fp = @fopen('../lib/userdata.inc.php', 'w'))
{
$result = @fputs($fp, $userdata, strlen($userdata));
@fclose($fp);
status_message('green', $lng['install']['creating_configfile_succ']);
chmod('../lib/userdata.inc.php', 0440);
}
elseif($fp = @fopen('/tmp/userdata.inc.php', 'w'))
{
$result = @fputs($fp, $userdata, strlen($userdata));
@fclose($fp);
status_message('orange', $lng['install']['creating_configfile_temp']);
chmod('/tmp/userdata.inc.php', 0440);
}
else
{
status_message('red', $lng['install']['creating_configfile_failed']);
echo "\t\t<tr>\n\t\t\t<td class=\"main_field_name\"><p>" . nl2br(htmlspecialchars($userdata)) . "</p></td>\n\t\t</tr>\n";
}
?>
</table>
<p style="padding-left: 15px;">
<strong><?php echo $lng['install']['froxlor_succ_installed']; ?></strong>
</p>
<p class="submit">
<a href="../index.php"><?php echo $lng['install']['click_here_to_login']; ?></a>
</p>
</section>
</article>
<?php
page_footer();
}
else
{
if((isset($_GET['check'])
&& $_GET['check'] == '1')
|| (isset($_POST['installstep'])
&& $_POST['installstep'] == '1')
) {
page_header();
?>
<article class="install bradius">
<header class="dark">
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2><?php echo $lng['install']['language']; ?></h2>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;Install</legend>
<p>
<label for="language"><?php echo $lng['install']['language']; ?>:</label>&nbsp;
<select name="language" id="language">
<?php
$language_options = '';
while(list($language_file, $language_name) = each($languages)) {
$language_options.= makeoption($language_name, $language_file, $language, true, true);
}
echo $language_options;
?>
</select>
</p>
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="submit" name="chooselang" value="Go" />
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>
</section>
<section class="installsec">
<h2><?php echo $lng['install']['installdata']; ?></h2>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;Install</legend>
<p>
<strong><?php echo $lng['install']['database']; ?></strong>
</p>
<p>
<label for="mysql_host"><?php echo $lng['install']['mysql_hostname']; ?>:</label>&nbsp;
<input type="text" name="mysql_host" id="mysql_host" value="<?php echo htmlspecialchars($mysql_host); ?>" required/>
</p>
<p>
<label for="mysql_database"><?php echo $lng['install']['mysql_database']; ?>:</label>&nbsp;
<input type="text" name="mysql_database" id="mysql_database" value="<?php echo htmlspecialchars($mysql_database); ?>" required/>
</p>
<p>
<label for="mysql_unpriv_user"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_user']; ?>:</label>&nbsp;
<input type="text" name="mysql_unpriv_user" id="mysql_unpriv_user" value="<?php echo htmlspecialchars($mysql_unpriv_user); ?>" required/>
</p>
<p>
<label for="mysql_unpriv_pass"<?php echo ((!empty($_POST['installstep']) && $mysql_unpriv_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_pass']; ?>:</label>&nbsp;
<input type="password" name="mysql_unpriv_pass" id="mysql_unpriv_pass" value="<?php echo htmlspecialchars($mysql_unpriv_pass); ?>" required/>
</p>
<p>
<label for="mysql_root_user"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_root_user']; ?>:</label>&nbsp;
<input type="text" name="mysql_root_user" id="mysql_root_user" value="<?php echo htmlspecialchars($mysql_root_user); ?>" required/>
</p>
<p>
<label for="mysql_root_pass"<?php echo ((!empty($_POST['installstep']) && $mysql_root_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_root_pass']; ?>:</label>&nbsp;
<input type="password" name="mysql_root_pass" id="mysql_root_pass" value="<?php echo htmlspecialchars($mysql_root_pass); ?>" required/>
</p>
<p>
<strong><?php echo $lng['install']['admin_account']; ?></strong>
</p>
<p>
<label for="admin_user"><?php echo $lng['install']['admin_user']; ?>:</label>&nbsp;
<input type="text" name="admin_user" id="admin_user" value="<?php echo htmlspecialchars($admin_user); ?>" required/>
</p>
<p>
<label for="admin_pass1"<?php echo ((!empty($_POST['installstep']) && ($admin_pass1 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass']; ?>:</label>&nbsp;
<input type="password" name="admin_pass1" id="admin_pass1" value="<?php echo htmlspecialchars($admin_pass1); ?>" required/>
</p>
<p>
<label for="admin_pass2"<?php echo ((!empty($_POST['installstep']) && ($admin_pass2 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass_confirm']; ?>:</label>&nbsp;
<input type="password" name="admin_pass2" id="admin_pass2" value="<?php echo htmlspecialchars($admin_pass2); ?>" required/>
</p>
<p>
<strong><?php echo $lng['install']['serversettings']; ?></strong>
</p>
<p>
<label for="servername"<?php echo ((!empty($_POST['installstep']) && $servername == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['servername']; ?>:</label>&nbsp;
<input type="text" name="servername" id="servername" value="<?php echo htmlspecialchars($servername); ?>" required/>
</p>
<p>
<label for="serverip"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['serverip']; ?>:</label>&nbsp;
<input type="text" name="serverip" id="serverip" value="<?php echo htmlspecialchars($serverip); ?>" required/>
</p>
<p>
<label for="apache"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> Apache:</label>&nbsp;
<input type="radio" name="webserver" id="apache" value="apache2" <?php echo $webserver == "apache2" ? 'checked="checked"' : "" ?>/>Apache2
</p>
<p>
<label for="lighty"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> LigHTTPd:</label>&nbsp;
<input type="radio" name="webserver" id="lighty" value="lighttpd" <?php echo $webserver == "lighttpd" ? 'checked="checked"' : "" ?>/>LigHTTPd
</p>
<p>
<label for="nginx"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> Nginx:</label>&nbsp;
<input type="radio" name="webserver" id="nginx" value="nginx" <?php echo $webserver == "nginx" ? 'checked="checked"' : "" ?>/>Nginx
</p>
<p>
<label for="httpuser"<?php echo ((!empty($_POST['installstep']) && $httpuser == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpuser']; ?>:</label>&nbsp;
<input type="text" name="httpuser" id="httpuser" value="<?php $posixusername = posix_getpwuid(posix_getuid()); echo $posixusername['name']; ?>" required/>
</p>
<p>
<label for="httpgroup"<?php echo ((!empty($_POST['installstep']) && $httpgroup == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpgroup']; ?>:</label>&nbsp;
<input type="text" name="httpgroup" id="httpgroup" value="<?php $posixgroup = posix_getgrgid(posix_getgid()); echo $posixgroup['name']; ?>" required/>
</p>
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="hidden" name="language" value="<?php echo htmlspecialchars($language); ?>"/>
<input type="hidden" name="installstep" value="1"/>
<input class="bottom" type="submit" name="submitbutton" value="<?php echo $lng['install']['next']; ?>"/>
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>
</section>
</article>
<?php
page_footer();
}
else
{
requirement_checks();
}
}
/**
* END INSTALL ---------------------------------------------------
*/

File diff suppressed because it is too large Load Diff

View File

@@ -17,92 +17,70 @@
* *
*/ */
/** $lng['requirements']['title'] = 'Checking system requirements...';
* Begin $lng['requirements']['installed'] = 'installed';
*/ $lng['requirements']['not_true'] = 'no';
$lng['requirements']['notfound'] = 'not found';
$lng['requirements']['notinstalled'] = 'not installed';
$lng['requirements']['activated'] = 'enabled';
$lng['requirements']['phpversion'] = 'PHP version >= 5.2';
$lng['requirements']['phpmagic_quotes_runtime'] = 'magic_quotes_runtime...';
$lng['requirements']['phpmagic_quotes_runtime_description'] = 'PHP setting "magic_quotes_runtime" must be set to "Off". We have disabled it temporary for now please fix the coresponding php.ini.';
$lng['requirements']['phpmysql'] = 'MySQL-extension...';
$lng['requirements']['phpxml'] = 'PHP XML-extension...';
$lng['requirements']['phpfilter'] = 'PHP filter-extension...';
$lng['requirements']['phpposix'] = 'PHP posix-extension...';
$lng['requirements']['phpbcmath'] = 'PHP bcmath-extension...';
$lng['requirements']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
$lng['requirements']['openbasedir'] = 'open_basedir...';
$lng['requirements']['openbasedirenabled'] = 'Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor in the coresponding php.ini';
$lng['requirements']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Try to fix them and retry.';
$lng['requirements']['froxlor_succ_checks'] = 'All requirements are satisfied';
$lng['install']['language'] = 'Installation - Language'; $lng['install']['title'] = 'Froxlor install - chose language';
$lng['install']['welcome'] = 'Welcome to Froxlor Installation'; $lng['install']['language'] = 'Installation language';
$lng['install']['lngbtn_go'] = 'Change language';
$lng['install']['title'] = 'Froxlor install - setup';
$lng['install']['welcometext'] = 'Thank you for choosing Froxlor. Please fill out the following fields with the required information to start the installation.<br /><b>Attention:</b> If the database you chose for Froxlor already exists on your System, it will be erased with all containing data!'; $lng['install']['welcometext'] = 'Thank you for choosing Froxlor. Please fill out the following fields with the required information to start the installation.<br /><b>Attention:</b> If the database you chose for Froxlor already exists on your System, it will be erased with all containing data!';
$lng['install']['database'] = 'Database'; $lng['install']['database'] = 'Database connection';
$lng['install']['mysql_hostname'] = 'MySQL-Hostname'; $lng['install']['mysql_host'] = 'MySQL-Hostname';
$lng['install']['mysql_database'] = 'MySQL-Database'; $lng['install']['mysql_database'] = 'Database name';
$lng['install']['mysql_unpriv_user'] = 'Username for the unprivileged MySQL-account'; $lng['install']['mysql_unpriv_user'] = 'Username for the unprivileged MySQL-account';
$lng['install']['mysql_unpriv_pass'] = 'Password for the unprivileged MySQL-account'; $lng['install']['mysql_unpriv_pass'] = 'Password for the unprivileged MySQL-account';
$lng['install']['mysql_root_user'] = 'Username for the MySQL-root-account'; $lng['install']['mysql_root_user'] = 'Username for the MySQL-root-account';
$lng['install']['mysql_root_pass'] = 'Password for the MySQL-root-account'; $lng['install']['mysql_root_pass'] = 'Password for the MySQL-root-account';
$lng['install']['admin_account'] = 'Administrator Account'; $lng['install']['admin_account'] = 'Administrator Account';
$lng['install']['admin_user'] = 'Administrator Username'; $lng['install']['admin_user'] = 'Administrator Username';
$lng['install']['admin_pass'] = 'Administrator Password'; $lng['install']['admin_pass1'] = 'Administrator Password';
$lng['install']['admin_pass_confirm'] = 'Administrator-Password (confirm)'; $lng['install']['admin_pass2'] = 'Administrator-Password (confirm)';
$lng['install']['serversettings'] = 'Server settings'; $lng['install']['serversettings'] = 'Server settings';
$lng['install']['servername'] = 'Server name (FQDN)'; $lng['install']['servername'] = 'Server name (FQDN)';
$lng['install']['serverip'] = 'Server IP'; $lng['install']['serverip'] = 'Server IP';
$lng['install']['webserver'] = 'Webserver';
$lng['install']['apache2'] = 'Apache 2';
$lng['install']['lighttpd'] = 'LigHTTPd';
$lng['install']['nginx'] = 'NGINX';
$lng['install']['httpuser'] = 'HTTP username'; $lng['install']['httpuser'] = 'HTTP username';
$lng['install']['httpgroup'] = 'HTTP groupname'; $lng['install']['httpgroup'] = 'HTTP groupname';
$lng['install']['apacheversion'] = 'Apacheversion';
$lng['install']['next'] = 'Next';
$lng['install']['installdata'] = 'Installation - Data';
/**
* Progress
*/
$lng['install']['testing_mysql'] = 'Testing if MySQL-root-username and password are correct...';
$lng['install']['erasing_old_db'] = 'Erasing old Database...';
$lng['install']['backup_old_db'] = 'Create backup of the old Database...';
$lng['install']['backing_up'] = 'Backing up';
$lng['install']['backing_up_binary_missing'] = '/usr/bin/mysqldump is missing';
$lng['install']['create_mysqluser_and_db'] = 'Creating MySQL-database and username...';
$lng['install']['testing_new_db'] = 'Testing if MySQL-database and username have been created correctly...';
$lng['install']['importing_data'] = 'Importing data into MySQL-database...';
$lng['install']['changing_data'] = 'Changing imported data...';
$lng['install']['adding_admin_user'] = 'Adding Administrator Account...';
$lng['install']['creating_configfile'] = 'Creating configfile...';
$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php was saved in lib/.';
$lng['install']['creating_configfile_temp'] = 'File was saved in /tmp/userdata.inc.php, please move to lib/.';
$lng['install']['creating_configfile_failed'] = 'Cannot create lib/userdata.inc.php, please create it manually with the following data:';
$lng['install']['froxlor_succ_installed'] = 'Froxlor was installed successfully.';
$lng['install']['click_here_to_login'] = 'Click here to login.';
$lng['install']['phpmysql'] = 'Testing if PHP MySQL-extension is installed...';
$lng['install']['phpfilter'] = 'Testing if PHP filter-extension is installed...';
$lng['install']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Aborting...';
$lng['install']['notinstalled'] = 'not installed!';
$lng['install']['phpbcmath'] = 'Testing if PHP bcmath-extension is installed...';
$lng['install']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
$lng['install']['openbasedir'] = 'Testing if open_basedir is enabled...';
$lng['install']['openbasedirenabled'] = 'enabled. Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor';
/**
* ADDED IN 1.2.19-svn7
*/
$lng['install']['system_servername'] = 'System ServerName';
$lng['install']['servername_should_be_fqdn'] = 'The servername should be a FQDN and not an IP address'; $lng['install']['servername_should_be_fqdn'] = 'The servername should be a FQDN and not an IP address';
$lng['install']['testing_mysql'] = 'Checking MySQL-root access...';
$lng['install']['backup_old_db'] = 'Creating backup of old database...';
$lng['install']['backup_binary_missing'] = 'Could not find mysqldump';
$lng['install']['backup_failed'] = 'Could not backup database';
$lng['install']['prepare_db'] = 'Preparing database...';
$lng['install']['create_mysqluser_and_db'] = 'Creating database and username...';
$lng['install']['testing_new_db'] = 'Testing if database and user have been created correctly...';
$lng['install']['importing_data'] = 'Importing data...';
$lng['install']['changing_data'] = 'Adjusting settings...';
$lng['install']['creating_entries'] = 'Inserting new values...';
$lng['install']['adding_admin_user'] = 'Creating admin-account...';
$lng['install']['creating_configfile'] = 'Creating configfile...';
$lng['install']['creating_configfile_temp'] = 'File was saved in /tmp/userdata.inc.php, please move to lib/.';
$lng['install']['creating_configfile_failed'] = 'Could not create lib/userdata.inc.php, please create it manually with the following content:';
$lng['install']['froxlor_succ_installed'] = 'Froxlor was installed successfully.';
/** $lng['click_here_to_refresh'] = 'Click here to check again';
* Renamed in 1.2.19-svn40 $lng['click_here_to_continue'] = 'Click here to continue';
*/ $lng['click_here_to_login'] = 'Click here to login.';
$lng['install']['webserver'] = 'Webserver';
/*
* Added in Froxlor 0.9
*/
$lng['install']['phpversion'] = 'Checking for PHP version >= 5.2';
$lng['install']['phpposix'] = 'Testing if PHP posix-extension is installed...';
/*
* Added in Froxlor 0.9.4
*/
$lng['install']['click_here_to_refresh'] = 'Re-check';
$lng['install']['click_here_to_continue'] = 'Continue installation';
$lng['install']['froxlor_succ_checks'] = 'All requirements are satisfied';
/*
* Added in Froxlor 0.9.13
*/
$lng['install']['phpmagic_quotes_runtime'] = 'Checking whether magic_quotes_runtime is off';
$lng['install']['active'] = 'no';
$lng['install']['phpmagic_quotes_runtime_description'] = 'PHP setting "magic_quotes_runtime" must be set to "Off" in order to avoid strange behavior of Froxlor. Disabling it for now (this is only temporary, please fix our php.ini).';
$lng['install']['phpxml'] = 'Testing if PHP XML-extension is installed...';
?>

View File

@@ -1,79 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Tim Zielosko <mail@zielosko.net>
* @author Romain MARIADASSOU <roms2000@free.fr>
* @author Froxlor Team <team@froxlor.org>
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
*
*/
/**
* Begin
*/
$lng['install']['language'] = 'Langue d\'installation';
$lng['install']['welcome'] = 'Bienvenue <20> l\'installation de Froxlor';
$lng['install']['welcometext'] = 'Merci beaucoup d\'avoir choisi Froxlor. Pour installer Froxlor remplissez les cases ci-dessous avec les informations demand<6E>es.<br /><b>Attention :</b> Si vous entrez le nom d\'une base de donn<6E>es existante, celle-ci sera effac<61>e !';
$lng['install']['database'] = 'Base de donn<6E>es';
$lng['install']['mysql_hostname'] = 'Nom d\'h<>te du serveur MySQL';
$lng['install']['mysql_database'] = 'Base de donn<6E>es MySQL';
$lng['install']['mysql_unpriv_user'] = 'Utilisateur pour l\'acc<63>s non privil<69>gi<67> <20> MySQL';
$lng['install']['mysql_unpriv_pass'] = 'Mot de passe pour l\'acc<63>s non privil<69>gi<67> <20> MySQL';
$lng['install']['mysql_root_user'] = 'Utilisateur pour l\'acc<63>s root <20> MySQL';
$lng['install']['mysql_root_pass'] = 'Mot de passe pour l\'acc<63>s root <20> MySQL';
$lng['install']['admin_account'] = 'Acc<63>s administratif';
$lng['install']['admin_user'] = 'Login de l\'administrateur';
$lng['install']['admin_pass'] = 'Mot de passe de l\'administrateur';
$lng['install']['admin_pass_confirm'] = 'Mot de passe de l\'administrateur (confirmation)';
$lng['install']['serversettings'] = 'Configuration du serveur';
$lng['install']['servername'] = 'Nom du serveur (FQDN)';
$lng['install']['serverip'] = 'Adresse IP du serveur';
$lng['install']['apacheversion'] = 'Version du serveur Apache';
$lng['install']['next'] = 'Continuer';
$lng['install']['installdata'] = 'Installation - Data';
/**
* Progress
*/
$lng['install']['testing_mysql'] = 'V<>rification du login root de MySQL ...';
$lng['install']['erasing_old_db'] = 'Effacement de l\'ancienne base de donn<6E>es ...';
$lng['install']['create_mysqluser_and_db'] = 'Cr<43>ation de la base de donn<6E>es puis des utilisateurs ...';
$lng['install']['testing_new_db'] = 'V<>rification de la base de donn<6E>es et des utilisateurs ...';
$lng['install']['importing_data'] = 'Importation des informations dans la base de donn<6E>es ...';
$lng['install']['changing_data'] = 'Modification des donn<6E>es import<72>s ...';
$lng['install']['adding_admin_user'] = 'Ajout de l\'utilisateur administrateur ...';
$lng['install']['creating_configfile'] = 'Cr<43>ation du fichier de configuration ...';
$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php a <20>t<EFBFBD> sauvegard<72> dans le dossier lib/ de Froxlor.';
$lng['install']['creating_configfile_temp'] = 'Le fichier a <20>t<EFBFBD> sauvegard<72> dans /tmp/userdata.inc.php, veuillez le d<>placer / copier dans le dossier lib/ de Froxlor.';
$lng['install']['creating_configfile_failed'] = 'Erreur en cr<63>ant le fichier lib/userdata.inc.php, veuillez le cr<63>er avec le contenu ci-dessous :';
$lng['install']['froxlor_succ_installed'] = 'Froxlor a <20>t<EFBFBD> install<6C> correctement.';
$lng['install']['click_here_to_login'] = 'Cliquez ici pour vous rendre <20> l\'invite de connexion.';
$lng['install']['httpuser'] = 'Nom du utilisateur du HTTP';
$lng['install']['httpgroup'] = 'Nom du la group du HTTP';
/**
* ADDED IN 1.2.19-svn7
*/
$lng['install']['servername_should_be_fqdn'] = 'Le nom du serveur doit être un nom FQDN, pas une adresse IP';
/**
* Renamed in 1.2.19-svn40
*/
$lng['install']['webserver'] = 'Version du serveur';
$lng['install']['phpxml'] = 'Tester si PHP XML-extension est install<6C>e...';
?>

View File

@@ -2,107 +2,85 @@
/** /**
* This file is part of the Froxlor project. * This file is part of the Froxlor project.
* Copyright (c) 2003-2007 the SysCP Team (see authors). * Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors). * Copyright (c) 2010 the Froxlor Team (see authors).
* *
* For the full copyright and license information, please view the COPYING * For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the * file that was distributed with this source code. You can also view the
* COPYING file online at http://files.syscp.org/misc/COPYING.txt * COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* *
* @copyright (c) the authors * @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2007) * @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor Team <team@froxlor.org> (2010-) * @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language * @package Language
* *
*/ */
/** $lng['requirements']['title'] = 'Prüfe Systemvoraussetzungen...';
* Begin $lng['requirements']['installed'] = 'installiert';
*/ $lng['requirements']['not_true'] = 'nein';
$lng['requirements']['notfound'] = 'nicht gefunden';
$lng['requirements']['notinstalled'] = 'nicht installiert';
$lng['requirements']['activated'] = 'ist aktiviert.';
$lng['requirements']['phpversion'] = 'PHP Version >= 5.2';
$lng['requirements']['phpmagic_quotes_runtime'] = 'magic_quotes_runtime';
$lng['requirements']['phpmagic_quotes_runtime_description'] = 'Die PHP Einstellung "magic_quotes_runtime" muss deaktiviert sein ("Off"). Die Einstellung wurde temporär deaktiviert, bitte ändern Sie diese in der entsprechenden php.ini.';
$lng['requirements']['phpmysql'] = 'PHP MySQL-Erweiterung...';
$lng['requirements']['phpxml'] = 'PHP XML-Erweiterung...';
$lng['requirements']['phpfilter'] = 'PHP filter-Erweiterung...';
$lng['requirements']['phpposix'] = 'PHP posix-Erweiterung...';
$lng['requirements']['phpbcmath'] = 'PHP bcmath-Erweiterung...';
$lng['requirements']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollständig zur Verfügung!';
$lng['requirements']['openbasedir'] = 'open_basedir genutzt wird...';
$lng['requirements']['openbasedirenabled'] = 'Froxlor wird mit aktiviertem open_basedir nicht vollständig funktionieren. Bitte deaktivieren Sie open_basedir für Froxlor in der entsprechenden php.ini';
$lng['requirements']['diedbecauseofrequirements'] = 'Kann Froxlor ohne diese Voraussetzungen nicht installieren! Versuchen Sie die angezeigten Problem zu beheben und versuchen Sie es erneut.';
$lng['requirements']['froxlor_succ_checks'] = 'Alle Vorraussetzungen sind erfüllt';
$lng['install']['language'] = 'Installations - Sprache'; $lng['install']['lngtitle'] = 'Froxlor Installation - Sprache auswählen';
$lng['install']['welcome'] = 'Willkommen zur Froxlor Installation'; $lng['install']['language'] = 'Sprache für die Installation';
$lng['install']['welcometext'] = 'Vielen Dank dass Sie sich f&uuml;r Froxlor entschieden haben. Um Ihre Installation von Froxlor zu starten, f&uuml;llen Sie bitte alle Felder unten mit den geforderten Angaben.<br /><b>Achtung:</b> Eine eventuell bereits existierende Datenbank, die den selben Namen hat wie den, den Sie unten eingeben werden, wird mit allen enthaltenen Daten gel&ouml;scht!'; $lng['install']['lngbtn_go'] = 'Sprache ändern';
$lng['install']['database'] = 'Datenbank'; $lng['install']['title'] = 'Froxlor Installation - Einrichtung';
$lng['install']['mysql_hostname'] = 'MySQL-Hostname'; $lng['install']['welcometext'] = 'Vielen Dank dass Sie sich für Froxlor entschieden haben. Um die Installation von Froxlor zu starten, füllen Sie bitte alle Felder mit den geforderten Angaben aus.<br /><b>Achtung:</b> Eine eventuell existierende Datenbank, die den selben Namen hat wie den Gewählten, wird mit allen enthaltenen Daten gelöscht!';
$lng['install']['mysql_database'] = 'MySQL-Datenbank'; $lng['install']['database'] = 'Datenbankverbindung';
$lng['install']['mysql_unpriv_user'] = 'Benutzername f&uuml;r den unprivilegierten MySQL-Account'; $lng['install']['mysql_host'] = 'MySQL-Hostname';
$lng['install']['mysql_unpriv_pass'] = 'Passwort f&uuml;r den unprivilegierten MySQL-Account'; $lng['install']['mysql_database'] = 'Datenbank Name';
$lng['install']['mysql_root_user'] = 'Benutzername f&uuml;r den MySQL-Root-Account'; $lng['install']['mysql_unpriv_user'] = 'Benutzername für den unprivilegierten MySQL-Account';
$lng['install']['mysql_root_pass'] = 'Passwort f&uuml;r den MySQL-Root-Account'; $lng['install']['mysql_unpriv_pass'] = 'Passwort für den unprivilegierten MySQL-Account';
$lng['install']['mysql_root_user'] = 'Benutzername für den MySQL-Root-Account';
$lng['install']['mysql_root_pass'] = 'Passwort für den MySQL-Root-Account';
$lng['install']['admin_account'] = 'Admin-Zugang'; $lng['install']['admin_account'] = 'Admin-Zugang';
$lng['install']['admin_user'] = 'Administrator-Benutzername'; $lng['install']['admin_user'] = 'Administrator-Benutzername';
$lng['install']['admin_pass'] = 'Administrator-Passwort'; $lng['install']['admin_pass1'] = 'Administrator-Passwort';
$lng['install']['admin_pass_confirm'] = 'Administrator-Passwort (Best&auml;tigung)'; $lng['install']['admin_pass2'] = 'Administrator-Passwort (Bestätigung)';
$lng['install']['serversettings'] = 'Servereinstellungen'; $lng['install']['serversettings'] = 'Servereinstellungen';
$lng['install']['servername'] = 'Servername (FQDN)'; $lng['install']['servername'] = 'Servername (FQDN)';
$lng['install']['serverip'] = 'Server-IP'; $lng['install']['serverip'] = 'Server-IP';
$lng['install']['apacheversion'] = 'Apacheversion'; $lng['install']['webserver'] = 'Webserver';
$lng['install']['next'] = 'Fortfahren'; $lng['install']['apache2'] = 'Apache 2';
$lng['install']['installdata'] = 'Installation - Daten'; $lng['install']['lighttpd'] = 'LigHTTPd';
$lng['install']['nginx'] = 'NGINX';
/**
* Progress
*/
$lng['install']['testing_mysql'] = 'Teste, ob die MySQL-Root-Benutzerdaten richtig sind...';
$lng['install']['erasing_old_db'] = 'Entferne alte Datenbank...';
$lng['install']['backup_old_db'] = 'Sichere bisherige Datenbank...';
$lng['install']['backing_up'] = 'Sicherung l&auml;ft';
$lng['install']['backing_up_binary_missing'] = '/usr/bin/mysqldump nicht vorhanden';
$lng['install']['create_mysqluser_and_db'] = 'Erstelle Datenbank und Benutzer...';
$lng['install']['testing_new_db'] = 'Teste, ob die Datenbank und Passwort korrekt angelegt wurden...';
$lng['install']['importing_data'] = 'Importiere Daten in die MySQL-Datenbank...';
$lng['install']['changing_data'] = 'Passe die importierten Daten an...';
$lng['install']['adding_admin_user'] = 'F&uuml;ge den Admin-Benutzer hinzu...';
$lng['install']['creating_configfile'] = 'Erstelle Konfigurationsdatei...';
$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php wurde in lib/ gespeichert.';
$lng['install']['creating_configfile_temp'] = 'Datei wurde in /tmp/userdata.inc.php gespeichert, bitte nach lib/ verschieben.';
$lng['install']['creating_configfile_failed'] = 'Konnte lib/userdata.inc.php nicht erstellen, bitte manuell mit folgendem Inhalt anlegen:';
$lng['install']['froxlor_succ_installed'] = 'Froxlor wurde erfolgreich installiert.';
$lng['install']['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.';
$lng['install']['phpmysql'] = 'Teste, ob die PHP MySQL-Erweiterung installiert ist...';
$lng['install']['phpfilter'] = 'Teste, ob die PHP Filter-Erweiterung installiert ist...';
$lng['install']['diedbecauseofrequirements'] = 'Kann Froxlor ohne diese Voraussetzungen nicht installieren! Breche ab...';
$lng['install']['notinstalled'] = 'nicht installiert!';
$lng['install']['phpbcmath'] = 'Teste, ob die PHP bcmath-Erweiterung installiert ist...';
$lng['install']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollst&auml;ndig zur Verf&uuml;gung!';
$lng['install']['openbasedir'] = 'Teste, ob open_basedir genutzt wird...';
$lng['install']['openbasedirenabled'] = 'aktiviert. Froxlor wird mit aktiviertem open_basedir nicht vollst&auml;ndig funktionieren. Bitte deaktivieren Sie open_basedir f&uuml;r Froxlor';
$lng['install']['httpuser'] = 'HTTP Username'; $lng['install']['httpuser'] = 'HTTP Username';
$lng['install']['httpgroup'] = 'HTTP Gruppenname'; $lng['install']['httpgroup'] = 'HTTP Gruppenname';
/** $lng['install']['system_servername'] = 'System ServerName';
* ADDED IN 1.2.19-svn7 $lng['install']['servername_should_be_fqdn'] = 'Der Servername sollte ein vollqualifizierter Domainname sein und keine IP Adresse.';
*/ $lng['install']['testing_mysql'] = 'Teste MySQL-Root Zugang...';
$lng['install']['backup_old_db'] = 'Sicherung vorheriger Datenbank...';
$lng['install']['backup_binary_missing'] = 'Konnte mysqldump nicht finden';
$lng['install']['backup_failed'] = 'Sicherung fehlgeschlagen';
$lng['install']['prepare_db'] = 'Datenbank wird vorbereitet...';
$lng['install']['create_mysqluser_and_db'] = 'Erstelle Datenbank und Benutzer...';
$lng['install']['testing_new_db'] = 'Teste, ob Datenbank und Benutzer korrekt angelegt wurden...';
$lng['install']['importing_data'] = 'Importiere Daten...';
$lng['install']['changing_data'] = 'Einstellungen anpassen...';
$lng['install']['creating_entries'] = 'Trage neue Werte ein...';
$lng['install']['adding_admin_user'] = 'Erstelle Admin-Benutzer...';
$lng['install']['creating_configfile'] = 'Erstelle Konfigurationsdatei...';
$lng['install']['creating_configfile_temp'] = 'Datei wurde in /tmp/userdata.inc.php gespeichert, bitte nach lib/ verschieben.';
$lng['install']['creating_configfile_failed'] = 'Konnte lib/userdata.inc.php nicht erstellen, bitte manuell mit folgendem Inhalt anlegen:';
$lng['install']['froxlor_succ_installed'] = 'Froxlor wurde erfolgreich installiert.';
$lng['install']['servername_should_be_fqdn'] = 'Der Servername sollte eine FQDN sein und keine IP Adresse sein'; $lng['click_here_to_refresh'] = 'Hier klicken, um erneut zu prüfen';
$lng['click_here_to_continue'] = 'Installation fortführen';
/** $lng['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.';
* Renamed in 1.2.19-svn40
*/
$lng['install']['webserver'] = 'Webserver';
/*
* Added in Froxlor 0.9
*/
$lng['install']['phpversion'] = 'Pr&uuml;fe PHP Version >= 5.2';
$lng['install']['phpposix'] = 'Teste, ob die PHP Posix-Erweiterung installiert ist...';
/*
* Added in Froxlor 0.9.4
*/
$lng['install']['click_here_to_refresh'] = 'Erneut pr&uuml;fen';
$lng['install']['click_here_to_continue'] = 'Installation fortf&uuml;hren';
$lng['install']['froxlor_succ_checks'] = 'Alle Vorraussetzungen sind erf&uuml;llt';
/*
* Added in Froxlor 0.9.13
*/
$lng['install']['phpmagic_quotes_runtime'] = 'Pr&uuml;fe ob magic_quotes_runtime ausgeschalten ist';
$lng['install']['active'] = 'nein';
$lng['install']['phpmagic_quotes_runtime_description'] = 'Die PHP Einstellung "magic_quotes_runtime" muss deaktiviert sein ("Off"), um merkw&uuml;rdige Verhalten von Froxlor zu umgehen. Sie wurde deaktiviert (nur tempor&auml;r, bitte php.ini anpassen).';
$lng['install']['phpxml'] = 'Teste, ob die PHP XML-Erweiterung installiert ist...';
?>

View File

@@ -0,0 +1,11 @@
<form action="{$formaction}" method="get">
<fieldset>
<legend>{$this->_lng['install']['title']}</legend>
{$formdata}
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="submit" name="chooselang" value="{$this->_lng['install']['btn_go']}" />
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>

View File

@@ -0,0 +1,13 @@
<form action="{$formaction}" method="post">
<fieldset>
<legend>{$this->_lng['install']['welcometext']}</legend>
{$formdata}
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="hidden" name="language" value="{$language}" />
<input type="hidden" name="installstep" value="1" />
<input class="bottom" type="submit" name="submitbutton" value="{$this->_lng['click_here_to_continue']}" />
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>

View File

@@ -0,0 +1,4 @@
<p>
<label for="{$fieldname}" style="widht:65%;{$style}">{$fieldlabel}:</label>&nbsp;
<input type="{$type}" name="{$fieldname}" id="{$fieldname}" value="{$fieldvalue}" {$required} />
</p>

View File

@@ -0,0 +1,4 @@
<p>
<label for="{$fieldname}" style="widht:65%;{$style}">{$this->_lng['install']['webserver']} {$fieldlabel}:</label>
<input type="radio" name="webserver" id="{$fieldname}" value="{$fieldname}" {$checked} />{$fieldlabel}
</p>

View File

@@ -0,0 +1 @@
<h3>{$section}</h3>

View File

@@ -0,0 +1,7 @@
</div>
<footer>
<span> Froxlor &copy; 2009-{$current_year} by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
</span>
</footer>
</body>
</html>

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Default-Style" content="text/css" />
<!--[if lt IE 9]><script src="../js/html5shiv.js"></script><![endif]-->
<link href="../templates/{$theme}/assets/css/main.css" rel="stylesheet" type="text/css" />
<!--[if IE]><link rel="stylesheet" href="../templates/{$theme}/css/main_ie.css" type="text/css" /><![endif]-->
<link href="../templates/{$theme}/assets/img/favicon.ico" rel="icon" type="image/x-icon" />
<title>Froxlor Server Management Panel - Installation</title>
<style type="text/css">
body {
font-family: Verdana, Geneva, sans-serif;
}
</style>
</head>
<body>
<div class="loginpage">

View File

@@ -0,0 +1,16 @@
<form action="{$formaction}" method="get">
<fieldset>
<legend>{$this->_lng['install']['lngtitle']}</legend>
<p>
<label for="language">{$this->_lng['install']['language']}:</label>&nbsp;
<select name="language" id="language">
{$language_options}
</select>
</p>
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="submit" name="chooselang" value="{$this->_lng['install']['lngbtn_go']}" />
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>

View File

@@ -0,0 +1,11 @@
<article class="install bradius">
<header class="dark">
<img src="../templates/{$theme}/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2>{$pagetitle}</h2>
{$pagecontent}
{$pagenavigation}
</section>
</article>

View File

@@ -0,0 +1,4 @@
<h3 style="color:{$msgcolor};text-align: center">{$message}</h3>
<aside>
<a href="{$link}">{$linktext}</a>
</aside>

View File

@@ -0,0 +1,5 @@
<tr>
<td class="main_field_name">
<p>{$escpduserdata}</p>
</td>
</tr>

View File

@@ -2116,13 +2116,13 @@ if (isFroxlorVersion('0.9.29-dev3')) {
showUpdateStep("Adding new tables to database", true); showUpdateStep("Adding new tables to database", true);
$db->query("CREATE TABLE IF NOT EXISTS `domain_ssl_settings` ( $db->query("CREATE TABLE IF NOT EXISTS `domain_ssl_settings` (
`id` int(5) NOT NULL auto_increment, `id` int(5) NOT NULL auto_increment,
`domainid` int(11) NOT NULL, `domainid` int(11) NOT NULL,
`ssl_cert_file` text NOT NULL, `ssl_cert_file` text NOT NULL,
`ssl_key_file` text NOT NULL, `ssl_key_file` text NOT NULL,
`ssl_ca_file` text NOT NULL, `ssl_ca_file` text NOT NULL,
`ssl_cert_chainfile` text NOT NULL, `ssl_cert_chainfile` text NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;"); ) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;");
lastStepStatus(0); lastStepStatus(0);
@@ -2163,10 +2163,10 @@ if (isFroxlorVersion('0.9.29')) {
showUpdateStep("Adding new ip to domain - mapping-table"); showUpdateStep("Adding new ip to domain - mapping-table");
$db->query("DROP TABLE IF EXISTS `panel_domaintoip`;"); $db->query("DROP TABLE IF EXISTS `panel_domaintoip`;");
$sql = "CREATE TABLE `".TABLE_DOMAINTOIP."` ( $sql = "CREATE TABLE `".TABLE_DOMAINTOIP."` (
`id_domain` int(11) unsigned NOT NULL, `id_domain` int(11) unsigned NOT NULL,
`id_ipandports` int(11) unsigned NOT NULL, `id_ipandports` int(11) unsigned NOT NULL,
PRIMARY KEY (`id_domain`, `id_ipandports`) PRIMARY KEY (`id_domain`, `id_ipandports`)
) ENGINE=MyISAM ;"; ) ENGINE=MyISAM ;";
$db->query($sql); $db->query($sql);
lastStepStatus(0); lastStepStatus(0);
@@ -2176,23 +2176,23 @@ if (isFroxlorVersion('0.9.29')) {
while ($row = $db->fetch_array($result)) { while ($row = $db->fetch_array($result)) {
if ((int)$row['ipandport'] != 0) { if ((int)$row['ipandport'] != 0) {
$db->query("INSERT INTO `".TABLE_DOMAINTOIP."` SET $db->query("INSERT INTO `".TABLE_DOMAINTOIP."` SET
`id_domain` = " . (int)$row['id'] . ", `id_domain` = " . (int)$row['id'] . ",
`id_ipandports` = " . (int)$row['ipandport']); `id_ipandports` = " . (int)$row['ipandport']);
} }
if ((int)$row['ssl_ipandport'] != 0) { if ((int)$row['ssl_ipandport'] != 0) {
$db->query("INSERT INTO `".TABLE_DOMAINTOIP."` SET $db->query("INSERT INTO `".TABLE_DOMAINTOIP."` SET
`id_domain` = " . (int)$row['id'] . ", `id_domain` = " . (int)$row['id'] . ",
`id_ipandports` = " . (int)$row['ssl_ipandport']); `id_ipandports` = " . (int)$row['ssl_ipandport']);
} }
// Subdomains also have ssl ports if the parent has // Subdomains also have ssl ports if the parent has
elseif ((int)$row['ssl_ipandport'] == 0 elseif ((int)$row['ssl_ipandport'] == 0
&& (int)$row['ssl_redirect'] != 0 && (int)$row['ssl_redirect'] != 0
&& (int)$row['parentdomainid'] != 0 && (int)$row['parentdomainid'] != 0
) { ) {
$db->query("INSERT INTO `".TABLE_DOMAINTOIP."` SET $db->query("INSERT INTO `".TABLE_DOMAINTOIP."` SET
`id_domain` = " . (int)$row['id'] . ", `id_domain` = " . (int)$row['id'] . ",
`id_ipandports` = ( `id_ipandports` = (
SELECT `ssl_ipandport` FROM `" . TABLE_PANEL_DOMAINS . "` SELECT `ssl_ipandport` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `id` = '".(int)$row['parentdomainid']."');" WHERE `id` = '".(int)$row['parentdomainid']."');"
); );
} }
@@ -2233,3 +2233,14 @@ if (isFroxlorVersion('0.9.29.1-dev2')) {
updateToVersion('0.9.29.1-dev3'); updateToVersion('0.9.29.1-dev3');
} }
if (isFroxlorVersion('0.9.29.1-dev3')) {
showUpdateStep("Updating from 0.9.29.1-dev3 to 0.9.29.1-dev4", true);
lastStepStatus(0);
showUpdateStep("Removing old billing-field from admin-users");
$db->query("ALTER TABLE `".TABLE_PANEL_ADMINS."` DROP `edit_billingdata`");
lastStepStatus(0);
updateToVersion('0.9.29.1-dev4');
}

View File

@@ -21,63 +21,54 @@
* Class to manage the connection to the Database * Class to manage the connection to the Database
* @package Functions * @package Functions
*/ */
class db {
class db
{
/** /**
* Link ID for every connection * Link ID for every connection
* @var int * @var int
*/ */
public $link_id = 0; public $link_id = 0;
/** /**
* Query ID for every query * Query ID for every query
* @var int * @var int
*/ */
private $query_id = 0; private $query_id = 0;
/** /**
* Errordescription, if an error occures * Errordescription, if an error occures
* @var string * @var string
*/ */
public $errdesc = ''; public $errdesc = '';
/** /**
* Errornumber, if an error occures * Errornumber, if an error occures
* @var int * @var int
*/ */
public $errno = 0; public $errno = 0;
/** /**
* Servername * Servername
* @var string * @var string
*/ */
private $server = ''; private $server = '';
/** /**
* Username * Username
* @var string * @var string
*/ */
private $user = ''; private $user = '';
/** /**
* Password * Password
* @var string * @var string
*/ */
private $password = ''; private $password = '';
/** /**
* Database * Database
* @var string * @var string
*/ */
private $database = ''; private $database = '';
/** /**
@@ -88,14 +79,11 @@ class db
* @param string Password * @param string Password
* @param string Database * @param string Database
*/ */
public function __construct($server, $user, $password, $database = '') {
function db($server, $user, $password, $database = '')
{
// check for mysql extension // check for mysql extension
if (!extension_loaded('mysql')) {
if(!extension_loaded('mysql')) $this->_showerror('You should install the PHP MySQL extension!', false);
{
$this->showerror('You should install the PHP MySQL extension!', false);
} }
$this->server = $server; $this->server = $server;
@@ -104,34 +92,25 @@ class db
$this->database = $database; $this->database = $database;
$this->link_id = @mysql_connect($this->server, $this->user, $this->password, 1); $this->link_id = @mysql_connect($this->server, $this->user, $this->password, 1);
if(!$this->link_id) if (!$this->link_id) {
{
//try to connect with no password and change it afterwards. only for root user
if($this->user == 'root') //try to connect with no password and change it afterwards. only for root user
{ if ($this->user == 'root') {
$this->link_id = @mysql_connect($this->server, $this->user, '', 1); $this->link_id = @mysql_connect($this->server, $this->user, '', 1);
if($this->link_id) if ($this->link_id) {
{
$this->query("SET PASSWORD = PASSWORD('" . $this->escape($this->password) . "')"); $this->query("SET PASSWORD = PASSWORD('" . $this->escape($this->password) . "')");
} else {
$this->_showerror('Establishing connection failed, exiting');
} }
else } else {
{ $this->_showerror('Establishing connection failed, exiting');
$this->showerror('Establishing connection failed, exiting');
}
}
else
{
$this->showerror('Establishing connection failed, exiting');
} }
} }
if($this->database != '') if ($this->database != '') {
{ if (!@mysql_select_db($this->database, $this->link_id)) {
if(!@mysql_select_db($this->database, $this->link_id)) $this->_showerror('Trying to use database ' . $this->database . ' failed, exiting');
{
$this->showerror('Trying to use database ' . $this->database . ' failed, exiting');
} }
} }
@@ -141,14 +120,11 @@ class db
/** /**
* Closes connection to Databaseserver * Closes connection to Databaseserver
*/ */
public function close() {
function close()
{
return @mysql_close($this->link_id); return @mysql_close($this->link_id);
} }
function getDbName() public function getDbName() {
{
return $this->database; return $this->database;
} }
@@ -158,19 +134,12 @@ class db
* @param string $input * @param string $input
* @return string escaped string * @return string escaped string
*/ */
public function escape($input) {
function escape($input) if (is_int($input)) {
{
if(is_int($input))
{
return (int)$input; return (int)$input;
} } elseif(is_float($input)) {
elseif(is_float($input))
{
return (float)$input; return (float)$input;
} } else {
else
{
return mysql_real_escape_string($input, $this->link_id); return mysql_real_escape_string($input, $this->link_id);
} }
} }
@@ -182,54 +151,40 @@ class db
* @param bool Unbuffered query? * @param bool Unbuffered query?
* @return string RessourceId * @return string RessourceId
*/ */
public function query($query_str, $unbuffered = false, $suppress_error = false) {
function query($query_str, $unbuffered = false, $suppress_error = false)
{
global $numbqueries, $theme; global $numbqueries, $theme;
if (!mysql_ping($this->link_id)) // check if connection is still alive
{ if (!mysql_ping($this->link_id)) {
$this->link_id = mysql_connect($this->server,$this->user,$this->password); $this->link_id = mysql_connect($this->server,$this->user,$this->password);
if(!$this->database) if (!$this->database) {
{
return false; return false;
} }
mysql_select_db($this->database); mysql_select_db($this->database);
} }
if(!$unbuffered) if (!$unbuffered) {
{ if ($suppress_error) {
if($suppress_error)
{
$this->query_id = @mysql_query($query_str, $this->link_id); $this->query_id = @mysql_query($query_str, $this->link_id);
} else { } else {
$this->query_id = mysql_query($query_str, $this->link_id); $this->query_id = mysql_query($query_str, $this->link_id);
} }
} } else {
else if ($suppress_error) {
{
if($suppress_error)
{
$this->query_id = @mysql_unbuffered_query($query_str, $this->link_id); $this->query_id = @mysql_unbuffered_query($query_str, $this->link_id);
} else { } else {
$this->query_id = mysql_unbuffered_query($query_str, $this->link_id); $this->query_id = mysql_unbuffered_query($query_str, $this->link_id);
} }
} }
if(!$this->query_id && !$suppress_error) if (!$this->query_id && !$suppress_error) {
{ $this->_showerror('Invalid SQL: ' . $query_str);
$this->showerror('Invalid SQL: ' . $query_str); } elseif(!$this->query_id && $suppress_error) {
}
elseif(!$this->query_id && $suppress_error)
{
return false; return false;
} }
$numbqueries++; $numbqueries++;
//echo $query_str.' '.$numbqueries.'<br />';
return $this->query_id; return $this->query_id;
} }
@@ -240,22 +195,15 @@ class db
* @param string Datatype, num or assoc * @param string Datatype, num or assoc
* @return array The row * @return array The row
*/ */
public function fetch_array($query_id = - 1, $_datatype = 'assoc') {
function fetch_array($query_id = - 1, $datatype = 'assoc') if ($query_id != - 1) {
{
if($query_id != - 1)
{
$this->query_id = $query_id; $this->query_id = $query_id;
} }
if($datatype == 'num') $datatype = MYSQL_ASSOC;
{ if ($_datatype == 'num') {
$datatype = MYSQL_NUM; $datatype = MYSQL_NUM;
} }
else
{
$datatype = MYSQL_ASSOC;
}
$this->record = mysql_fetch_array($this->query_id, $datatype); $this->record = mysql_fetch_array($this->query_id, $datatype);
return $this->record; return $this->record;
@@ -268,9 +216,7 @@ class db
* @param string Datatype, num or assoc * @param string Datatype, num or assoc
* @return array The first row * @return array The first row
*/ */
public function query_first($query_string, $datatype = 'assoc') {
function query_first($query_string, $datatype = 'assoc')
{
$this->query($query_string); $this->query($query_string);
return $this->fetch_array($this->query_id, $datatype); return $this->fetch_array($this->query_id, $datatype);
} }
@@ -281,14 +227,10 @@ class db
* @param string RessourceId * @param string RessourceId
* @return int Number of rows * @return int Number of rows
*/ */
public function num_rows($query_id = - 1) {
function num_rows($query_id = - 1) if ($query_id != - 1) {
{
if($query_id != - 1)
{
$this->query_id = $query_id; $this->query_id = $query_id;
} }
return mysql_num_rows($this->query_id); return mysql_num_rows($this->query_id);
} }
@@ -297,9 +239,7 @@ class db
* *
* @return int auto_incremental-Value * @return int auto_incremental-Value
*/ */
public function insert_id() {
function insert_id()
{
return mysql_insert_id($this->link_id); return mysql_insert_id($this->link_id);
} }
@@ -308,9 +248,7 @@ class db
* *
* @return int affected rows * @return int affected rows
*/ */
public function affected_rows() {
function affected_rows()
{
return mysql_affected_rows($this->link_id); return mysql_affected_rows($this->link_id);
} }
@@ -319,22 +257,15 @@ class db
* *
* @return int Errornumber * @return int Errornumber
*/ */
private function _geterrdescno() {
function geterrdescno() if ($this->link_id != 0) {
{
if($this->link_id != 0)
{
$this->errdesc = mysql_error($this->link_id); $this->errdesc = mysql_error($this->link_id);
$this->errno = mysql_errno($this->link_id); $this->errno = mysql_errno($this->link_id);
} } else {
else
{
// Maybe we don't have any linkid so let's try to catch at least anything // Maybe we don't have any linkid so let's try to catch at least anything
$this->errdesc = mysql_error(); $this->errdesc = mysql_error();
$this->errno = mysql_errno(); $this->errno = mysql_errno();
} }
return $this->errno; return $this->errno;
} }
@@ -343,24 +274,19 @@ class db
* *
* @param string Errormessage * @param string Errormessage
*/ */
private function _showerror($errormsg, $mysqlActive = true) {
function showerror($errormsg, $mysqlActive = true)
{
global $filename, $theme; global $filename, $theme;
$text = 'MySQL - Error: ' . str_replace("\n", "\t", $errormsg); $text = 'MySQL - Error: ' . str_replace("\n", "\t", $errormsg);
if($mysqlActive)
{ if ($mysqlActive) {
$this->geterrdescno(); $this->_geterrdescno();
$text .= "; ErrNo: " . $this->errno . "; Desc: " . $this->errdesc; $text .= "; ErrNo: " . $this->errno . "; Desc: " . $this->errdesc;
} }
if($filename != 'cronscript.php') if ($filename != 'froxlor_master_cronjob.php') {
{
$text .= "; Script: " . getenv('REQUEST_URI') . "; Ref: " . getenv('HTTP_REFERER'); $text .= "; Script: " . getenv('REQUEST_URI') . "; Ref: " . getenv('HTTP_REFERER');
} } else {
else
{
$text .= "; Script: cronscript"; $text .= "; Script: cronscript";
} }
$md5 = md5($text . time()); $md5 = md5($text . time());
@@ -384,5 +310,3 @@ class db
die("We are sorry, but a MySQL - error occurred. The administrator may find more information in syslog with the ID ".$md5." or in the sql-error.log in the logs/ directory"); die("We are sorry, but a MySQL - error occurred. The administrator may find more information in syslog with the ID ".$md5." or in the sql-error.log in the logs/ directory");
} }
} }
?>

View File

@@ -42,39 +42,87 @@ function includeFunctions($dirname)
closedir($dirhandle); closedir($dirhandle);
} }
function __autoload($classname)
{
global $libdirname, $theme;
findIncludeClass($libdirname . '/classes/', $classname);
}
spl_autoload_register('__autoload');
function findIncludeClass($dirname, $classname)
{
$dirhandle = opendir($dirname);
while(false !== ($filename = readdir($dirhandle)))
{
if($filename != '.' && $filename != '..' && $filename != '')
{
if($filename == 'class.' . $classname . '.php' || $filename == 'abstract.' . $classname . '.php' || $filename == 'interface.' . $classname . '.php')
{
include($dirname . $filename);
return;
}
if(is_dir($dirname . $filename))
{
findIncludeClass($dirname . $filename . '/', $classname);
}
}
}
closedir($dirhandle);
}
function exportDetails($fielddata, $newfieldvalue) function exportDetails($fielddata, $newfieldvalue)
{ {
print_r($newfieldvalue); print_r($newfieldvalue);
} }
Autoloader::init();
/**
* Class Autoloader
*
* iterates through given directory and includes
* the file which matches $classname
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2013-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Autoloader
* @since 0.9.29.1
*/
class Autoloader {
/**
* returns a new AutoLoader-object
* @return Autoloader
*/
public static function init() {
return new self();
}
/**
* class constructor
*
* @return null
*/
public function __construct() {
// register autoload.function
spl_autoload_register(array($this, 'doAutoload'));
}
/**
* gets the class to load as parameter, searches the library-paths
* recursively for this class and includes it
*
* @param string $class
*
* @throws Exception
* @return boolean
*/
public function doAutoload($class) {
// define the paths where to look for classes
$paths = array(
dirname(__FILE__) . '/',
dirname(dirname(__FILE__)) . '/scripts/',
dirname(dirname(__FILE__)) . '/install/',
);
// now iterate through the paths
foreach ($paths as $path) {
// valid directory?
if (is_dir($path)) {
// create RecursiveIteratorIterator
$its = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($path)
);
// check every file
foreach ($its as $fullFileName => $it ) {
// does it match the Filename pattern?
if (preg_match("/^(class|module|interface|abstract|)\.?$class\.php$/i", $it->getFilename())) {
// include the file and return from the loop
include_once $fullFileName;
return true;
}
}
} else {
// yikes - no valid directory to check
throw new Exception("Cannot autoload from directory '".$path."'. No such directory.");
}
}
// yikes - class not found
throw new Exception("Could not find class '".$class."'");
}
}

View File

@@ -1,55 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Functions
*
*/
//
// remove_remarks will strip the sql comment lines out of an uploaded sql file
// The whole function has been taken from the phpbb installer, copyright by the phpbb team, phpbb in summer 2004.
//
function remove_remarks($sql)
{
$lines = explode("\n", $sql);
// try to keep mem. use down
$sql = "";
$linecount = count($lines);
$output = "";
for ($i = 0;$i < $linecount;$i++)
{
if(($i != ($linecount - 1))
|| (strlen($lines[$i]) > 0))
{
if(substr($lines[$i], 0, 1) != "#")
{
$output.= $lines[$i] . "\n";
}
else
{
$output.= "\n";
}
// Trading a bit of speed for lower mem. use here.
$lines[$i] = "";
}
}
return $output;
}

View File

@@ -1,140 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Functions
*
*/
//
// split_sql_file will split an uploaded sql file into single sql statements.
// Note: expects trim() to have already been run on $sql
// The whole function has been taken from the phpbb installer, copyright by the phpbb team, phpbb in summer 2004.
//
function split_sql_file($sql, $delimiter)
{
// Split up our string into "possible" SQL statements.
$tokens = explode($delimiter, $sql);
// try to save mem.
$sql = "";
$output = array();
// we don't actually care about the matches preg gives us.
$matches = array();
// this is faster than calling count($oktens) every time thru the loop.
$token_count = count($tokens);
for ($i = 0;$i < $token_count;$i++)
{
// Don't wanna add an empty string as the last thing in the array.
if(($i != ($token_count - 1))
|| (strlen($tokens[$i] > 0)))
{
// This is the total number of single quotes in the token.
$total_quotes = preg_match_all("/'/", $tokens[$i], $matches);
// Counts single quotes that are preceded by an odd number of backslashes,
// which means they're escaped quotes.
$escaped_quotes = preg_match_all("/(?<!\\\\)(\\\\\\\\)*\\\\'/", $tokens[$i], $matches);
$unescaped_quotes = $total_quotes - $escaped_quotes;
// If the number of unescaped quotes is even, then the delimiter did NOT occur inside a string literal.
if(($unescaped_quotes % 2) == 0)
{
// It's a complete sql statement.
$output[] = $tokens[$i];
// save memory.
$tokens[$i] = "";
}
else
{
// incomplete sql statement. keep adding tokens until we have a complete one.
// $temp will hold what we have so far.
$temp = $tokens[$i] . $delimiter;
// save memory..
$tokens[$i] = "";
// Do we have a complete statement yet?
$complete_stmt = false;
for ($j = $i + 1;(!$complete_stmt && ($j < $token_count));$j++)
{
// This is the total number of single quotes in the token.
$total_quotes = preg_match_all("/'/", $tokens[$j], $matches);
// Counts single quotes that are preceded by an odd number of backslashes,
// which means they're escaped quotes.
$escaped_quotes = preg_match_all("/(?<!\\\\)(\\\\\\\\)*\\\\'/", $tokens[$j], $matches);
$unescaped_quotes = $total_quotes - $escaped_quotes;
if(($unescaped_quotes % 2) == 1)
{
// odd number of unescaped quotes. In combination with the previous incomplete
// statement(s), we now have a complete statement. (2 odds always make an even)
$output[] = $temp . $tokens[$j];
// save memory.
$tokens[$j] = "";
$temp = "";
// exit the loop.
$complete_stmt = true;
// make sure the outer loop continues at the right point.
$i = $j;
}
else
{
// even number of unescaped quotes. We still don't have a complete statement.
// (1 odd and 1 even always make an odd)
$temp.= $tokens[$j] . $delimiter;
// save memory.
$tokens[$j] = "";
}
}
// for..
}
// else
}
}
return $output;
}

View File

@@ -74,6 +74,6 @@ define('PACKAGE_LOCKED', 1);
define('PACKAGE_ENABLED', 2); define('PACKAGE_ENABLED', 2);
// VERSION INFO // VERSION INFO
$version = '0.9.29.1-dev3'; $version = '0.9.29.1-dev4';
$dbversion = '2'; $dbversion = '2';
$branding = ''; $branding = '';

View File

@@ -1290,7 +1290,7 @@ $lng['cronmgmt']['days'] = 'Tage';
$lng['cronmgmt']['weeks'] = 'Wochen'; $lng['cronmgmt']['weeks'] = 'Wochen';
$lng['cronmgmt']['months'] = 'Monate'; $lng['cronmgmt']['months'] = 'Monate';
$lng['admin']['cronjob_edit'] = 'Cronjob bearbeiten'; $lng['admin']['cronjob_edit'] = 'Cronjob bearbeiten';
$lng['cronjob']['cronjobsettings'] = 'Cronjob-instellungen'; $lng['cronjob']['cronjobsettings'] = 'Cronjob-Einstellungen';
$lng['cronjob']['cronjobintervalv'] = 'Laufzeit-Intervall Wert'; $lng['cronjob']['cronjobintervalv'] = 'Laufzeit-Intervall Wert';
$lng['cronjob']['cronjobinterval'] = 'Laufzeit-Intervall'; $lng['cronjob']['cronjobinterval'] = 'Laufzeit-Intervall';
$lng['panel']['options'] = 'Optionen'; $lng['panel']['options'] = 'Optionen';

View File

@@ -244,33 +244,22 @@ while ($row = $db->fetch_array($result_tasks)) {
/* /*
* see if we have some php-fcgid leftovers if used * see if we have some php-fcgid leftovers if used
* and remove them, #200 * and remove them, #200
* UPDATE: this is being done in ConfigIO::cleanUp()
*/ */
if($settings['system']['mod_fcgid'] == 1)
{
// e.g. /var/www/php-fcgi-starter/web1/
$configdir = makeCorrectDir($settings['system']['mod_fcgid_configdir'] . '/' . $row['data']['loginname'] . '/');
if (is_dir($configdir)) /**
{ * webserver logs
$its = new RecursiveIteratorIterator( */
new RecursiveDirectoryIterator($configdir) $logsdir = makeCorrectFile($settings['system']['logfiles_directory'].'/'.$row['data']['loginname']);
); if ($logsdir != '/'
&& $logsdir != makeCorrectDir($settings['system']['logfiles_directory'])
// iterate through all subdirs, && substr($logsdir, 0, strlen($settings['system']['logfiles_directory'])) == $settings['system']['logfiles_directory']
// look for php-fcgi-starter files ) {
// and take immutable-flag away from them // build up wildcard for webX-{access,error}.log{*}
// so we can delete them :) $logfiles = $logsdir.'-*';
foreach ($its as $fullFileName => $it ) safe_exec('rm -f '.escapeshellarg($logfiles));
{
if ($it->isFile() && $it->getFilename() == 'php-fcgi-starter')
{
removeImmutable($its->getPathname());
}
}
// now get rid of old stuff
safe_exec('rm -rf '. escapeshellarg($configdir));
}
} }
} }
} }
} }