From a46b99ea0357f7f9aa784ee845d10d179559a6e6 Mon Sep 17 00:00:00 2001 From: "Florian Aders (EleRas)" Date: Fri, 22 Jan 2010 14:02:42 +0000 Subject: [PATCH] Merged d00ps and my branch, renamed SysCP -> Froxlor in installer --- admin_admins.php | 1 - admin_domains.php | 10 ++-- install/install.php | 18 ++++--- install/lng/english.lng.php | 20 ++++---- install/lng/french.lng.php | 18 ++++--- install/lng/german.lng.php | 18 ++++--- install/updates/froxlor/upgrade_syscp.inc.php | 51 ++++++++++++++++++- lib/classes/database/class.db.php | 2 + .../froxlor/function.convertUtf8.php | 32 ++++++++++++ .../function.createAWStatsConf.php | 0 .../function.createAWStatsVhost.php | 0 .../{syscp => froxlor}/function.getAdmins.php | 0 .../function.getCustomerDetail.php | 0 .../function.getCustomers.php | 0 .../function.getIpAddresses.php | 0 .../function.getIpPortCombinations.php | 0 .../function.getLanguages.php | 0 .../function.getSessionUserDetail.php | 0 .../function.inserttask.php | 0 lib/functions/froxlor/function.isUtf8.php | 39 ++++++++++++++ .../function.loadConfigArrayDir.php | 0 .../function.updateCounters.php | 0 lib/init.php | 4 +- lng/english.lng.php | 14 ++--- lng/german.lng.php | 18 +++---- scripts/cron_tasks.inc.http.10.apache.php | 11 ++-- .../cron_tasks.inc.http.15.apache_fcgid.php | 4 +- scripts/cron_tasks.inc.http.20.lighttpd.php | 32 ++++++++---- .../cron_tasks.inc.http.25.lighttpd_fcgid.php | 12 ++--- templates/header.tpl | 2 +- .../gentoo/lighttpd/etc_lighttpd.conf | 1 - templates/misc/standardcustomer/index.html | 8 +-- 32 files changed, 228 insertions(+), 87 deletions(-) create mode 100644 lib/functions/froxlor/function.convertUtf8.php rename lib/functions/{syscp => froxlor}/function.createAWStatsConf.php (100%) rename lib/functions/{syscp => froxlor}/function.createAWStatsVhost.php (100%) rename lib/functions/{syscp => froxlor}/function.getAdmins.php (100%) rename lib/functions/{syscp => froxlor}/function.getCustomerDetail.php (100%) rename lib/functions/{syscp => froxlor}/function.getCustomers.php (100%) rename lib/functions/{syscp => froxlor}/function.getIpAddresses.php (100%) rename lib/functions/{syscp => froxlor}/function.getIpPortCombinations.php (100%) rename lib/functions/{syscp => froxlor}/function.getLanguages.php (100%) rename lib/functions/{syscp => froxlor}/function.getSessionUserDetail.php (100%) rename lib/functions/{syscp => froxlor}/function.inserttask.php (100%) create mode 100644 lib/functions/froxlor/function.isUtf8.php rename lib/functions/{syscp => froxlor}/function.loadConfigArrayDir.php (100%) rename lib/functions/{syscp => froxlor}/function.updateCounters.php (100%) diff --git a/admin_admins.php b/admin_admins.php index 32656018..61014ad6 100644 --- a/admin_admins.php +++ b/admin_admins.php @@ -78,7 +78,6 @@ if($page == 'admins' { if($paging->checkDisplay($i)) { - $highlight_row = ($row['service_active'] != '1' && $settings['billing']['activate_billing'] == '1' && $settings['billing']['highlight_inactive'] == '1'); $row['traffic_used'] = round($row['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']); $row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']); $row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']); diff --git a/admin_domains.php b/admin_domains.php index e7dccde9..119e64ad 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -524,7 +524,7 @@ if($page == 'domains' if($userinfo['customers_see_all'] == '1') { - $result_admins = $db->query("SELECT `adminid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `domains_used` < `domains` OR `domains` = '-1' ORDER BY `name` ASC"); + $result_admins = $db->query("SELECT `adminid`, `loginname`, `name` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `domains_used` < `domains` OR `domains` = '-1' ORDER BY `name` ASC"); while($row_admin = $db->fetch_array($result_admins)) { @@ -622,7 +622,7 @@ if($page == 'domains' elseif($action == 'edit' && $id != 0) { - $result = $db->query_first("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`adminid`, `d`.`email_only`, `d`.`documentroot`, `d`.`ssl`, `d`.`ssl_redirect`, `d`.`ssl_ipandport`,`d`.`ipandport`, `d`.`aliasdomain`, `d`.`isbinddomain`, `d`.`isemaildomain`, `d`.`subcanemaildomain`, `d`.`dkim`, `d`.`caneditdomain`, `d`.`zonefile`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `d`.`add_date`, `d`.`registration_date`, `d`.`interval_fee`, `d`.`interval_length`, `d`.`interval_type`, `d`.`interval_payment`, `d`.`setup_fee`, `d`.`taxclass`, `d`.`service_active`, `d`.`servicestart_date`, `d`.`serviceend_date`, `d`.`lastinvoiced_date`, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `d`.`phpsettingid`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "WHERE `d`.`parentdomainid`='0' AND `d`.`id`='" . (int)$id . "'" . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' ")); + $result = $db->query_first("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`adminid`, `d`.`email_only`, `d`.`documentroot`, `d`.`ssl`, `d`.`ssl_redirect`, `d`.`ssl_ipandport`,`d`.`ipandport`, `d`.`aliasdomain`, `d`.`isbinddomain`, `d`.`isemaildomain`, `d`.`subcanemaildomain`, `d`.`dkim`, `d`.`caneditdomain`, `d`.`zonefile`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `d`.`add_date`, `d`.`registration_date`, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `d`.`phpsettingid`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "WHERE `d`.`parentdomainid`='0' AND `d`.`id`='" . (int)$id . "'" . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' ")); if($result['domain'] != '') { @@ -994,7 +994,7 @@ if($page == 'domains' $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$result['adminid'] . "' "); } - $result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "', `interval_fee`='" . $db->escape($interval_fee) . "', `interval_length`='" . $db->escape($interval_length) . "', `interval_type`='" . $db->escape($interval_type) . "', `interval_payment`='" . $db->escape($interval_payment) . "', `setup_fee`='" . $db->escape($setup_fee) . "', `taxclass`='" . $db->escape($taxclass) . "', `service_active`='" . $db->escape($service_active) . "', `servicestart_date`='" . $db->escape($servicestart_date) . "', `serviceend_date`='" . $db->escape($serviceend_date) . "' WHERE `id`='" . (int)$id . "'"); + $result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "' WHERE `id`='" . (int)$id . "'"); $result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "'" . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'"); $log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id); $redirect_props = Array( @@ -1027,7 +1027,7 @@ if($page == 'domains' if($settings['panel']['allow_domain_change_admin'] == '1') { $admins = ''; - $result_admins = $db->query("SELECT `adminid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_ADMINS . "` WHERE (`domains_used` < `domains` OR `domains` = '-1') OR `adminid` = '" . (int)$result['adminid'] . "' ORDER BY `name` ASC"); + $result_admins = $db->query("SELECT `adminid`, `loginname`, `name` FROM `" . TABLE_PANEL_ADMINS . "` WHERE (`domains_used` < `domains` OR `domains` = '-1') OR `adminid` = '" . (int)$result['adminid'] . "' ORDER BY `name` ASC"); while($row_admin = $db->fetch_array($result_admins)) { @@ -1036,7 +1036,7 @@ if($page == 'domains' } else { - $admin = $db->query_first("SELECT `adminid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = '" . (int)$result['adminid'] . "'"); + $admin = $db->query_first("SELECT `adminid`, `loginname`, `name` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = '" . (int)$result['adminid'] . "'"); $result['adminname'] = getCorrectFullUserDetails($admin) . ' (' . $admin['loginname'] . ')'; } } diff --git a/install/install.php b/install/install.php index ce24a675..559d7d12 100644 --- a/install/install.php +++ b/install/install.php @@ -1,16 +1,18 @@ - * @license GPLv2 http://files.syscp.org/misc/COPYING.txt + * @author Florian Lippert (2003-2009) + * @author Froxlor Team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package System * @version $Id: install.php 2724 2009-06-07 14:18:02Z flo $ */ @@ -23,7 +25,7 @@ if(file_exists('../lib/userdata.inc.php')) { /** - * Includes the Usersettings eg. MySQL-Username/Passwort etc. to test if SysCP is already installed + * Includes the Usersettings eg. MySQL-Username/Passwort etc. to test if Froxlor is already installed */ require ('../lib/userdata.inc.php'); @@ -31,7 +33,7 @@ if(file_exists('../lib/userdata.inc.php')) if(isset($sql) && is_array($sql)) { - die('Sorry, SysCP is already configured...'); + die('Sorry, Froxlor is already configured...'); } } @@ -95,7 +97,7 @@ function page_header() - SysCP + Froxlor