Compare commits

..

26 Commits

Author SHA1 Message Date
Michael Kaufmann (d00p)
261d6e7d76 backport bugfixes from current master
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-19 18:05:40 +01:00
Michael Kaufmann (d00p)
23a1a55bf2 set version to 0.9.31 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-18 09:40:48 +01:00
Michael Kaufmann (d00p)
7a5be5456d categorize cronjob on cronjob-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-17 09:59:11 +01:00
Michael Kaufmann (d00p)
7256d4ff91 fix possible xss-target
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-17 07:57:38 +01:00
Michael Kaufmann (d00p)
bdf03486d2 set better defaults (sites-enabled/* is included in apache by default on most systems)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 18:33:57 +01:00
Michael Kaufmann (d00p)
41d33ae538 use correct quoting-character in sql-query
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 13:34:08 +01:00
Michael Kaufmann (d00p)
5be5787afd fix wrong Database method-usage when toggling catchall for e-mail address
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 13:28:03 +01:00
Michael Kaufmann (d00p)
8ad3c79589 add actually a www-alias if set, fixes #1326
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 12:26:10 +01:00
Michael Kaufmann (d00p)
28fbd2487e backport important changes of makePathfield for 0.9.31
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 11:33:13 +01:00
Roman Schmerold (BNoiZe)
1e87fb8d94 removed whitespace and german strings
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-15 14:55:27 +01:00
Roman Schmerold (BNoiZe)
fd0a2bea2f tweaking the traffic-graphs
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-15 14:21:23 +01:00
Michael Kaufmann (d00p)
b8f963cd29 fix pagination and sorting in customer-tickets, refs #701
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 10:48:54 +01:00
Roman Schmerold (BNoiZe)
e4142571d7 removed duplicate of overview page (settings)
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-14 19:09:45 +01:00
Roman Schmerold (BNoiZe)
40dbf85f77 added a.active class to the template css
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-14 18:07:15 +01:00
Roman Schmerold (BNoiZe)
491ac02c0d added 'active' to class in navigation when link is active
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-14 16:30:08 +01:00
Michael Kaufmann (d00p)
7688f83134 beautify loadConfigArrayDir(); fix pagination and sorting in admin-tickets, fixes #701
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-14 15:43:51 +01:00
Michael Kaufmann (d00p)
83b615bc37 why easy if you could do it the hard way? :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-13 08:14:01 +01:00
Michael Kaufmann (d00p)
682defcbcf fix tiny sql-query error when using APS and correct DbManager-replacers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-13 08:07:52 +01:00
Michael Kaufmann (d00p)
26b57e2d4d fix sql-query (thx to anonymous report) in admin-customers; fix german language-string (thx to dnano91)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-13 07:15:13 +01:00
Roman Schmerold (BNoiZe)
fcaa2f8aa9 fixed translation of 'traffic' for german
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-12 23:07:18 +01:00
Michael Kaufmann (d00p)
06cff22caa allow custom sendmail_path value in php.ini when using php-fpm, fixes #1323
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-12 14:27:24 +01:00
Michael Kaufmann (d00p)
aa7d1d3f48 show customer name and loginname in ticket-archive if customer-exists
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-12 13:39:18 +01:00
Michael Kaufmann (d00p)
8516cbb64d don't show 'there is a newer version of froxlor available' if a customzied (unknown) version is being checked
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-12 11:20:19 +01:00
Michael Kaufmann (d00p)
73f5547a5e add php-config for froxlor-vhost and set it as default for froxlor's vhost when fcgid/fpm is used (and the current default is set, custom settings won't be overwritten)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-12 10:44:32 +01:00
Michael Kaufmann (d00p)
0e6da344ba don't use -b for 'du' command as FreeBSD does not know it, fixes #1320
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-12 09:09:57 +01:00
Roman Schmerold (BNoiZe)
911de0727f fixed search not calculating diskspace/traffic if no operator is used
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-11 17:11:49 +01:00
36 changed files with 280 additions and 1152 deletions

View File

@@ -129,7 +129,7 @@ return array(
'settinggroup' => 'system', 'settinggroup' => 'system',
'varname' => 'mod_fcgid_defaultini_ownvhost', 'varname' => 'mod_fcgid_defaultini_ownvhost',
'type' => 'option', 'type' => 'option',
'default' => '1', 'default' => '2',
'option_mode' => 'one', 'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs', 'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',

View File

@@ -69,7 +69,7 @@ return array(
'settinggroup' => 'phpfpm', 'settinggroup' => 'phpfpm',
'varname' => 'vhost_defaultini', 'varname' => 'vhost_defaultini',
'type' => 'option', 'type' => 'option',
'default' => '1', 'default' => '2',
'option_mode' => 'one', 'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs', 'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField' 'save_method' => 'storeSettingField'

View File

@@ -53,7 +53,7 @@ return array(
'settinggroup' => 'system', 'settinggroup' => 'system',
'varname' => 'allow_error_report_admin', 'varname' => 'allow_error_report_admin',
'type' => 'bool', 'type' => 'bool',
'default' => true, // TODO: will be false in final release 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'system_allow_error_report_customer' => array( 'system_allow_error_report_customer' => array(

View File

@@ -35,11 +35,8 @@ if ($page == 'cronjobs' || $page == 'overview') {
); );
$paging = new paging($userinfo, TABLE_PANEL_CRONRUNS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); $paging = new paging($userinfo, TABLE_PANEL_CRONRUNS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
/*
* @TODO Fix sorting
*/
$crons = ''; $crons = '';
$result_stmt = Database::prepare("SELECT `c`.* FROM `" . TABLE_PANEL_CRONRUNS . "` `c` ORDER BY `cronfile` ASC"); $result_stmt = Database::prepare("SELECT `c`.* FROM `" . TABLE_PANEL_CRONRUNS . "` `c` ORDER BY `module` ASC, `cronfile` ASC");
Database::pexecute($result_stmt); Database::pexecute($result_stmt);
$paging->setEntries(Database::num_rows()); $paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng); $sortcode = $paging->getHtmlSortCode($lng);
@@ -49,8 +46,15 @@ if ($page == 'cronjobs' || $page == 'overview') {
$i = 0; $i = 0;
$count = 0; $count = 0;
$cmod = '';
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) { while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($cmod != $row['module']) {
$_mod = explode("/", $row['module']);
$module = ucfirst($_mod[1]);
eval("\$crons.=\"" . getTemplate('cronjobs/cronjobs_cronjobmodule') . "\";");
$cmod = $row['module'];
}
if ($paging->checkDisplay($i)) { if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row); $row = htmlentities_array($row);

View File

@@ -300,7 +300,7 @@ if ($page == 'customers'
DELETE FROM `" . TABLE_PANEL_TASKS . "` DELETE FROM `" . TABLE_PANEL_TASKS . "`
WHERE `type` = '2' AND `data` LIKE :loginname" WHERE `type` = '2' AND `data` LIKE :loginname"
); );
Database::pexecute($del_stmt, array(':loginname' => "%:{$result['loginname']};%")); Database::pexecute($del_stmt, array('loginname' => "%:{$result['loginname']};%"));
// remove everything APS-related, #216 // remove everything APS-related, #216
$apsresult_stmt = Database::prepare("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID` = :id"); $apsresult_stmt = Database::prepare("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID` = :id");
@@ -315,7 +315,7 @@ if ($page == 'customers'
Database::pexecute($del_stmt, array('iid' => $apsrow['ID'])); Database::pexecute($del_stmt, array('iid' => $apsrow['ID']));
} }
// now remove all user instances // now remove all user instances
$stmt = Database::prepare("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID` = :id'"); $stmt = Database::prepare("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID` = :id");
Database::pexecute($stmt, array('id' => $id)); Database::pexecute($stmt, array('id' => $id));
// eventually some temp-setting-leftovers // eventually some temp-setting-leftovers
$stmt = Database::prepare("DELETE FROM `".TABLE_APS_TEMP_SETTINGS."` WHERE `CustomerID` = :id"); $stmt = Database::prepare("DELETE FROM `".TABLE_APS_TEMP_SETTINGS."` WHERE `CustomerID` = :id");
@@ -1305,7 +1305,7 @@ if ($page == 'customers'
// set ip <-> domain connection // set ip <-> domain connection
$ins_stmt = Database::prepare(" $ins_stmt = Database::prepare("
INSERT INTO `".TABLE_DOMAINTOIP."` SET `id_domain` = :domainid, `id_ipandports` = :ipid'" INSERT INTO `".TABLE_DOMAINTOIP."` SET `id_domain` = :domainid, `id_ipandports` = :ipid"
); );
Database::pexecute($ins_stmt, array('domainid' => $domainid, 'ipid' => $settings['system']['defaultip'])); Database::pexecute($ins_stmt, array('domainid' => $domainid, 'ipid' => $settings['system']['defaultip']));

View File

@@ -108,7 +108,12 @@ if ($page == 'overview') {
$lookfornewversion_link = $_link; $lookfornewversion_link = $_link;
$lookfornewversion_addinfo = $_message; $lookfornewversion_addinfo = $_message;
if (version_compare2($version, $_version) == -1) { // not numeric -> error-message
if (!is_numeric($_version)) {
// check for customized version to not output
// "There is a newer version of froxlor" besides the error-message
$isnewerversion = 2;
} elseif (version_compare2($version, $_version) == -1) {
$isnewerversion = 1; $isnewerversion = 1;
} else { } else {
$isnewerversion = 0; $isnewerversion = 0;
@@ -359,7 +364,7 @@ if ($page == 'overview') {
$mail_body .= "-------------------------------------------------------------\n\n"; $mail_body .= "-------------------------------------------------------------\n\n";
$mail_body .= "Froxlor-version: ".$version."\n\n"; $mail_body .= "Froxlor-version: ".$version."\n\n";
$mail_body .= "End of report"; $mail_body .= "End of report";
$mail_html = str_replace("\n", "<br />", $mail_body); $mail_html = nl2br($mail_body);
// send actual report to dev-team // send actual report to dev-team
if (isset($_POST['send']) if (isset($_POST['send'])

View File

@@ -26,9 +26,7 @@ Database::needSqlData();
$sql_root = Database::getSqlData(); $sql_root = Database::getSqlData();
Database::needRoot(false); Database::needRoot(false);
if (($page == 'settings' || $page == 'overview') if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
&& $userinfo['change_serversettings'] == '1'
) {
$settings_data = loadConfigArrayDir('./actions/admin/settings/'); $settings_data = loadConfigArrayDir('./actions/admin/settings/');
$settings = loadSettings($settings_data); $settings = loadSettings($settings_data);

View File

@@ -63,15 +63,11 @@ if ($page == 'tickets'
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets"); $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets");
$fields = array( $fields = array(
'status' => $lng['ticket']['status'], 'status' => $lng['ticket']['status'],
'priority' => $lng['ticket']['priority'],
'lastchange' => $lng['ticket']['lastchange'], 'lastchange' => $lng['ticket']['lastchange'],
'ticket_answers' => $lng['ticket']['ticket_answers'],
'subject' => $lng['ticket']['subject'], 'subject' => $lng['ticket']['subject'],
'lastreplier' => $lng['ticket']['lastreplier'] 'lastreplier' => $lng['ticket']['lastreplier']
); );
$paging = new paging($userinfo, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); $paging = new paging($userinfo, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'lastchange';
$paging->sortorder = 'desc';
$result_stmt = Database::prepare(" $result_stmt = Database::prepare("
SELECT `main`.`id`, `main`.`customerid`, ( SELECT `main`.`id`, `main`.`customerid`, (
SELECT COUNT(`sub`.`id`) SELECT COUNT(`sub`.`id`)
@@ -170,8 +166,8 @@ if ($page == 'tickets'
$count++; $count++;
$_cid = $row['customerid']; $_cid = $row['customerid'];
} }
$i++;
} }
$i++;
} }
eval("echo \"" . getTemplate("tickets/tickets") . "\";"); eval("echo \"" . getTemplate("tickets/tickets") . "\";");
@@ -380,7 +376,7 @@ if ($page == 'tickets'
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true); $priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true); $priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true); $priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true);
$subject = $mainticket->Get('subject'); $subject = htmlentities($mainticket->Get('subject'));
$ticket_replies_count = $numrows_andere + 1; $ticket_replies_count = $numrows_andere + 1;
// don't forget the main-ticket! // don't forget the main-ticket!
@@ -815,8 +811,22 @@ if ($page == 'tickets'
WHERE `customerid` = :cid' WHERE `customerid` = :cid'
); );
$usr = Database::pexecute_first($usr_stmt, array('cid' => $cid)); $usr = Database::pexecute_first($usr_stmt, array('cid' => $cid));
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>'; if (isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr);
$customerloginname = ' ('.$usr['loginname'].')';
$customerid = $usr['customerid'];
} else {
$customer = $lng['ticket']['nonexistingcustomer'];
$customerid = 0;
$customerloginname = '';
}
if ($customerid != 0) {
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $customerid)).'" rel="external">';
$by .= $customer.$customerloginname.'</a>';
} else {
$by = $customer;
}
} }
$subject = $mainticket->Get('subject'); $subject = $mainticket->Get('subject');
@@ -849,8 +859,22 @@ if ($page == 'tickets'
WHERE `customerid` = :cid' WHERE `customerid` = :cid'
); );
$usr = Database::pexecute_first($usr_stmt, array('cid' => $cid)); $usr = Database::pexecute_first($usr_stmt, array('cid' => $cid));
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>'; if (isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr);
$customerloginname = ' ('.$usr['loginname'].')';
$customerid = $usr['customerid'];
} else {
$customer = $lng['ticket']['nonexistingcustomer'];
$customerid = 0;
$customerloginname = '';
}
if ($customerid != 0) {
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $customerid)).'" rel="external">';
$by .= $customer.$customerloginname.'</a>';
} else {
$by = $customer;
}
} }
$subject = $subticket->Get('subject'); $subject = $subticket->Get('subject');

View File

@@ -379,7 +379,7 @@ if ($page == 'overview') {
standard_error('youhavealreadyacatchallforthisdomain'); standard_error('youhavealreadyacatchallforthisdomain');
exit; exit;
} else { } else {
$stmt = Database::pexecute("UPDATE `" . TABLE_MAIL_VIRTUAL . "` $stmt = Database::prepare("UPDATE `" . TABLE_MAIL_VIRTUAL . "`
SET `email` = :email , `iscatchall` = '1' SET `email` = :email , `iscatchall` = '1'
WHERE `customerid`= :cid WHERE `customerid`= :cid
AND `id`= :id" AND `id`= :id"

View File

@@ -44,15 +44,11 @@ if($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets::tickets"); $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets::tickets");
$fields = array( $fields = array(
'status' => $lng['ticket']['status'], 'status' => $lng['ticket']['status'],
'priority' => $lng['ticket']['priority'],
'lastchange' => $lng['ticket']['lastchange'], 'lastchange' => $lng['ticket']['lastchange'],
'ticket_answers' => $lng['ticket']['ticket_answers'],
'subject' => $lng['ticket']['subject'], 'subject' => $lng['ticket']['subject'],
'lastreplier' => $lng['ticket']['lastreplier'] 'lastreplier' => $lng['ticket']['lastreplier']
); );
$paging = new paging($userinfo, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); $paging = new paging($userinfo, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'lastchange';
$paging->sortorder = 'desc';
$stmt = Database::prepare('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` $stmt = Database::prepare('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub`
WHERE `sub`.`answerto` = `main`.`id`) AS `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` WHERE `sub`.`answerto` = `main`.`id`) AS `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority`
FROM `' . TABLE_PANEL_TICKETS . '` as `main` FROM `' . TABLE_PANEL_TICKETS . '` as `main`
@@ -330,7 +326,7 @@ if($page == 'overview') {
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true); $priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true); $priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true); $priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true);
$subject = $mainticket->Get('subject'); $subject = htmlentities($mainticket->Get('subject'));
$ticket_replies_count = $numrows_andere + 1; $ticket_replies_count = $numrows_andere + 1;
// don't forget the main-ticket! // don't forget the main-ticket!

View File

@@ -453,8 +453,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('system', 'nameservers', ''), ('system', 'nameservers', ''),
('system', 'mxservers', ''), ('system', 'mxservers', ''),
('system', 'mod_fcgid', '0'), ('system', 'mod_fcgid', '0'),
('system', 'apacheconf_vhost', '/etc/apache2/vhosts.conf'), ('system', 'apacheconf_vhost', '/etc/apache2/sites-enabled/'),
('system', 'apacheconf_diroptions', '/etc/apache2/diroptions.conf'), ('system', 'apacheconf_diroptions', '/etc/apache2/sites-enabled/'),
('system', 'apacheconf_htpasswddir', '/etc/apache2/htpasswd/'), ('system', 'apacheconf_htpasswddir', '/etc/apache2/htpasswd/'),
('system', 'webalizer_quiet', '2'), ('system', 'webalizer_quiet', '2'),
('system', 'last_archive_run', '000000'), ('system', 'last_archive_run', '000000'),
@@ -553,7 +553,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.31-rc2'); ('panel', 'version', '0.9.31.1');
DROP TABLE IF EXISTS `panel_tasks`; DROP TABLE IF EXISTS `panel_tasks`;
@@ -763,7 +763,8 @@ CREATE TABLE `panel_phpconfigs` (
INSERT INTO `panel_phpconfigs` (`id`, `description`, `binary`, `file_extensions`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `phpsettings`) VALUES INSERT INTO `panel_phpconfigs` (`id`, `description`, `binary`, `file_extensions`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `phpsettings`) VALUES
(1, 'Default Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = Off\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_exec,curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\n{OPEN_BASEDIR_C}open_basedir = "{OPEN_BASEDIR}"\r\noutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n'); (1, 'Default Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = Off\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_exec,curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\n{OPEN_BASEDIR_C}open_basedir = "{OPEN_BASEDIR}"\r\noutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n'),
(2, 'Froxlor Vhost Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = On\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 60\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\nnoutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n');
DROP TABLE IF EXISTS `aps_instances`; DROP TABLE IF EXISTS `aps_instances`;

View File

@@ -2534,3 +2534,45 @@ if (isFroxlorVersion('0.9.31-rc1')) {
updateToVersion('0.9.31-rc2'); updateToVersion('0.9.31-rc2');
} }
if (isFroxlorVersion('0.9.31-rc2')) {
showUpdateStep("Updating from 0.9.31-rc2 to 0.9.31-rc3");
lastStepStatus(0);
showUpdateStep("Adding new php-config for froxlor-vhost");
Database::query("
INSERT INTO `panel_phpconfigs` SET
`description` = 'Froxlor Vhost Config', `binary` = '/usr/bin/php-cgi',
`file_extensions` = 'php', `mod_fcgid_starter` = '-1', `mod_fcgid_maxrequests` = '-1',
`phpsettings` = 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = On\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = \"GPC\"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = \".:{PEAR_DIR}\"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 60\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\nnoutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = \"/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}\"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = \"{TMP_DIR}\"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = \"{TMP_DIR}\"\r\nvariables_order = \"GPCS\"\r\n'
");
$frxvhostconfid = Database::lastInsertId();
// update default vhosts-config for froxlor if they are on the system-default
if ($settings['system']['mod_fcgid_defaultini_ownvhost'] == '1') {
$upd_stmt = Database::prepare("
UPDATE `".TABLE_PANEL_SETTINGS."` SET `value` = :value WHERE `settinggroup` = 'system' AND `varname` = 'mod_fcgid_defaultini_ownvhost'
");
Database::pexecute($upd_stmt, array('value' => $frxvhostconfid));
}
if ($settings['phpfpm']['vhost_defaultini'] == '1') {
$upd_stmt = Database::prepare("
UPDATE `".TABLE_PANEL_SETTINGS."` SET `value` = :value WHERE `settinggroup` = 'phpfpm' AND `varname` = 'vhost_defaultini'
");
Database::pexecute($upd_stmt, array('value' => $frxvhostconfid));
}
lastStepStatus(0);
updateToVersion('0.9.31-rc3');
}
if (isFroxlorVersion('0.9.31-rc3')) {
showUpdateStep("Updating from 0.9.31-rc3 to 0.9.31 final", true);
lastStepStatus(0);
updateToVersion('0.9.31');
}
if (isFroxlorVersion('0.9.31')) {
showUpdateStep("Updating from 0.9.31 to 0.9.31.1 final", true);
lastStepStatus(0);
updateToVersion('0.9.31.1');
}

View File

@@ -106,7 +106,7 @@ class DbManagerMySQL {
while ($host = $host_res_stmt->fetch(PDO::FETCH_ASSOC)) { while ($host = $host_res_stmt->fetch(PDO::FETCH_ASSOC)) {
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+) // as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
$drop_stmt = Database::prepare("DROP USER :dbname@:host"); $drop_stmt = Database::prepare("DROP USER :dbname@:host");
Database::pexecute($drop_stmt, array(':dbname' => $dbname, ':host' => $host['Host']), false); Database::pexecute($drop_stmt, array('dbname' => $dbname, 'host' => $host['Host']), false);
} }
$drop_stmt = Database::prepare("DROP DATABASE IF EXISTS `".$dbname."`"); $drop_stmt = Database::prepare("DROP DATABASE IF EXISTS `".$dbname."`");

View File

@@ -279,27 +279,40 @@ class paging {
} }
$searchfield = implode('.', $searchfield); $searchfield = implode('.', $searchfield);
// check for logical operators and whether searchtext is a number
// in any other case the logical-operators would make no sense
$ops = array('<', '>', '='); $ops = array('<', '>', '=');
if (in_array(substr($this->searchtext, 0, 1), $ops) && is_numeric(substr($this->searchtext, 1))) {
// if we're checking on traffic or diskspace, we need to adjust the search-value // check if we use an operator or not
if (strpos($searchfield, 'diskspace') > 0) { $useOper = 0;
// anything with diskspace is *1024 $oper = "=";
$searchtext = ((int)substr($this->searchtext, 1))*1024; if (in_array(substr($this->searchtext, 0, 1), $ops)) {
} elseif (strpos($searchfield, 'traffic') > 0) { $useOper = 1;
// anything with traffic is *1024*1024 $oper = substr($this->searchtext, 0, 1);
$searchtext = ((int)substr($this->searchtext, 1))*1024*1024; }
} else {
// any other field // check for diskspace and whether searchtext is a number
$searchtext = substr($this->searchtext, 1); // in any other case the logical-operators would make no sense
} if (strpos($searchfield, 'diskspace') > 0 && is_numeric(substr($this->searchtext, $useOper))) {
// anything with diskspace is *1024
$searchtext = ((int)substr($this->searchtext, $useOper))*1024;
$useOper = 1;
} elseif (strpos($searchfield, 'traffic') > 0 && is_numeric(substr($this->searchtext, $useOper))) {
// anything with traffic is *1024*1024
$searchtext = ((int)substr($this->searchtext, $useOper))*1024*1024;
$useOper = 1;
} else {
// any other field
$searchtext = substr($this->searchtext, $useOper);
}
if ($useOper == 1 && is_numeric(substr($this->searchtext, $useOper))) {
// now as we use >, < or = we use the given operator and not LIKE // now as we use >, < or = we use the given operator and not LIKE
$condition.= $searchfield . " ".substr($this->searchtext, 0, 1)." " . Database::quote($searchtext); $condition.= $searchfield . " ".$oper." " . Database::quote($searchtext);
} else { } else {
$searchtext = str_replace('*', '%', $this->searchtext); $searchtext = str_replace('*', '%', $this->searchtext);
$condition.= $searchfield . " LIKE " . Database::quote($searchtext); $condition.= $searchfield . " LIKE " . Database::quote($searchtext);
} }
} else { } else {
$condition = ''; $condition = '';
} }

View File

@@ -74,6 +74,7 @@ class phpinterface_fpm {
'variables_order', 'variables_order',
'gpc_order', 'gpc_order',
'date.timezone', 'date.timezone',
'sendmail_path',
'session.gc_divisor', 'session.gc_divisor',
'session.gc_probability' 'session.gc_probability'
), ),
@@ -178,14 +179,11 @@ class phpinterface_fpm {
if (!is_dir($tmpdir)) { if (!is_dir($tmpdir)) {
$this->getTempDir(); $this->getTempDir();
} }
//$slowlog = makeCorrectFile($this->_settings['system']['logfiles_directory'] . $this->_domain['loginname'] . '/php-fpm_slow.log');
$fpm_config.= 'env[TMP] = '.$tmpdir."\n"; $fpm_config.= 'env[TMP] = '.$tmpdir."\n";
$fpm_config.= 'env[TMPDIR] = '.$tmpdir."\n"; $fpm_config.= 'env[TMPDIR] = '.$tmpdir."\n";
$fpm_config.= 'env[TEMP] = '.$tmpdir."\n"; $fpm_config.= 'env[TEMP] = '.$tmpdir."\n";
$fpm_config.= 'php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f '.$this->_domain['email']."\n";
$openbasedir = ''; $openbasedir = '';
if ($this->_domain['loginname'] != 'froxlor.panel') { if ($this->_domain['loginname'] != 'froxlor.panel') {
if ($this->_domain['openbasedir'] == '1') { if ($this->_domain['openbasedir'] == '1') {
@@ -256,6 +254,12 @@ class phpinterface_fpm {
} }
} }
// now check if 'sendmail_path' has not beed set in the custom-php.ini
// if not we use our fallback-default as usual
if (strpos($fpm_config, 'php_admin_value[sendmail_path]') === false) {
$fpm_config.= 'php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f '.$this->_domain['email']."\n";
}
fwrite($fh, $fpm_config, strlen($fpm_config)); fwrite($fh, $fpm_config, strlen($fpm_config));
fclose($fh); fclose($fh);
} }

View File

@@ -407,11 +407,11 @@ class ticket {
} }
$upd_stmt = Database::prepare(" $upd_stmt = Database::prepare("
UPDATE `' . TABLE_PANEL_TICKET_CATS . '` SET UPDATE `" . TABLE_PANEL_TICKET_CATS . "` SET
`name` = :name, `name` = :name,
`logicalorder` = :lo `logicalorder` = :lo
WHERE `id` = :id" WHERE `id` = :id
); ");
Database::pexecute($upd_stmt, array('name' => $_category, 'lo' => $_order, 'id' => $_id)); Database::pexecute($upd_stmt, array('name' => $_category, 'lo' => $_order, 'id' => $_id));
return true; return true;
} }

View File

@@ -23,7 +23,6 @@
* @param string path The path to start searching in * @param string path The path to start searching in
* @param integer uid The uid which must match the found directories * @param integer uid The uid which must match the found directories
* @param integer gid The gid which must match the found direcotries * @param integer gid The gid which must match the found direcotries
* @param string fieldType Either "Manual" or "Dropdown"
* @param string value the value for the input-field * @param string value the value for the input-field
* *
* @return string The html tag for the choosen $fieldType * @return string The html tag for the choosen $fieldType
@@ -31,10 +30,9 @@
* @author Martin Burchert <martin.burchert@syscp.de> * @author Martin Burchert <martin.burchert@syscp.de>
* @author Manuel Bernhardt <manuel.bernhardt@syscp.de> * @author Manuel Bernhardt <manuel.bernhardt@syscp.de>
*/ */
function makePathfield($path, $uid, $gid, $value = '', $dom = false) {
function makePathfield($path, $uid, $gid, $fieldType, $value = '', $dom = false) global $lng, $settings;
{
global $lng;
$value = str_replace($path, '', $value); $value = str_replace($path, '', $value);
$field = array(); $field = array();
@@ -47,41 +45,34 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '', $dom = false)
$value = '/'.$value; $value = '/'.$value;
} }
if($fieldType == 'Manual') $fieldType = $settings['panel']['pathedit'];
{
if ($fieldType == 'Manual') {
$field = array( $field = array(
'type' => 'text', 'type' => 'text',
'value' => htmlspecialchars($value) 'value' => htmlspecialchars($value)
); );
} } elseif($fieldType == 'Dropdown') {
elseif($fieldType == 'Dropdown')
{
$dirList = findDirs($path, $uid, $gid);
$dirList = findDirs($path, $uid, $gid);
natcasesort($dirList); natcasesort($dirList);
if(sizeof($dirList) > 0) if (sizeof($dirList) > 0) {
{ if (sizeof($dirList) <= 100) {
if(sizeof($dirList) <= 100)
{
$_field = ''; $_field = '';
foreach($dirList as $key => $dir) foreach ($dirList as $key => $dir) {
{ if (strpos($dir, $path) === 0) {
if(strpos($dir, $path) === 0)
{
$dir = makeCorrectDir(substr($dir, strlen($path))); $dir = makeCorrectDir(substr($dir, strlen($path)));
} }
$_field.= makeoption($dir, $dir, $value); $_field.= makeoption($dir, $dir, $value);
} }
$field = array( $field = array(
'type' => 'select', 'type' => 'select',
'value' => $_field 'value' => $_field
); );
} } else {
else
{
// remove starting slash we added // remove starting slash we added
// for the Dropdown, #225 // for the Dropdown, #225
$value = substr($value, 1); $value = substr($value, 1);
@@ -92,9 +83,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '', $dom = false)
'note' => $lng['panel']['toomanydirs'] 'note' => $lng['panel']['toomanydirs']
); );
} }
} } else {
else
{
//$field = $lng['panel']['dirsmissing']; //$field = $lng['panel']['dirsmissing'];
//$field = '<input type="hidden" name="path" value="/" />'; //$field = '<input type="hidden" name="path" value="/" />';
$field = array( $field = array(

View File

@@ -17,8 +17,8 @@
* *
*/ */
function loadConfigArrayDir() function loadConfigArrayDir() {
{
// Workaround until we use gettext // Workaround until we use gettext
global $lng, $theme; global $lng, $theme;
@@ -26,7 +26,9 @@ function loadConfigArrayDir()
// so we can read from more than one directory // so we can read from more than one directory
// and still be valid for old calls // and still be valid for old calls
$numargs = func_num_args(); $numargs = func_num_args();
if($numargs <= 0) { return null; } if($numargs <= 0) {
return null;
}
// variable that holds all dirs that will // variable that holds all dirs that will
// be parsed for inclusion // be parsed for inclusion
@@ -48,15 +50,15 @@ function loadConfigArrayDir()
$data_files = array(); $data_files = array();
$has_data = false; $has_data = false;
foreach($configdirs as $data_dirname) foreach ($configdirs as $data_dirname) {
{ if (is_dir($data_dirname)) {
if(is_dir($data_dirname))
{
$data_dirhandle = opendir($data_dirname); $data_dirhandle = opendir($data_dirname);
while(false !== ($data_filename = readdir($data_dirhandle))) while (false !== ($data_filename = readdir($data_dirhandle))) {
{ if ($data_filename != '.'
if($data_filename != '.' && $data_filename != '..' && $data_filename != '' && substr($data_filename, -4 ) == '.php') && $data_filename != '..'
{ && $data_filename != ''
&& substr($data_filename, -4 ) == '.php'
) {
$data_files[] = $data_dirname . $data_filename; $data_files[] = $data_dirname . $data_filename;
} }
} }
@@ -64,12 +66,9 @@ function loadConfigArrayDir()
} }
} }
if($has_data) if ($has_data) {
{
sort($data_files); sort($data_files);
foreach ($data_files as $data_filename) {
foreach($data_files as $data_filename)
{
$data = array_merge_recursive($data, include($data_filename)); $data = array_merge_recursive($data, include($data_filename));
} }
} }
@@ -78,14 +77,13 @@ function loadConfigArrayDir()
// to select, we'll handle this here // to select, we'll handle this here
// (this is for multiserver-client settings) // (this is for multiserver-client settings)
$_data = array(); $_data = array();
if($selection != null if ($selection != null
&& is_array($selection) && is_array($selection)
&& isset($selection[0]) && isset($selection[0])
) { ) {
$_data['groups'] = array(); $_data['groups'] = array();
foreach($data['groups'] as $group => $data) foreach ($data['groups'] as $group => $data) {
{ if (in_array($group, $selection)) {
if(in_array($group, $selection)) {
$_data['groups'][$group] = $data; $_data['groups'][$group] = $data;
} }
} }

View File

@@ -26,53 +26,44 @@
* @author Florian Lippert <flo@syscp.org> * @author Florian Lippert <flo@syscp.org>
*/ */
function buildNavigation($navigation, $userinfo) function buildNavigation($navigation, $userinfo) {
{
global $theme; global $theme;
$returnvalue = ''; $returnvalue = '';
foreach($navigation as $box) foreach($navigation as $box) {
{ if ((!isset($box['show_element']) || $box['show_element'] === true) &&
if((!isset($box['show_element']) || $box['show_element'] === true) && (!isset($box['required_resources']) || $box['required_resources'] == '' || (isset($userinfo[$box['required_resources']]) && ((int)$userinfo[$box['required_resources']] > 0 || $userinfo[$box['required_resources']] == '-1')))) {
(!isset($box['required_resources']) || $box['required_resources'] == '' || (isset($userinfo[$box['required_resources']]) && ((int)$userinfo[$box['required_resources']] > 0 || $userinfo[$box['required_resources']] == '-1'))))
{
$navigation_links = ''; $navigation_links = '';
foreach($box['elements'] as $element_id => $element) foreach ($box['elements'] as $element_id => $element) {
{ if ((!isset($element['show_element']) || $element['show_element'] === true) &&
if((!isset($element['show_element']) || $element['show_element'] === true) && (!isset($element['required_resources']) || $element['required_resources'] == '' || (isset($userinfo[$element['required_resources']]) && ((int)$userinfo[$element['required_resources']] > 0 || $userinfo[$element['required_resources']] == '-1')))) {
(!isset($element['required_resources']) || $element['required_resources'] == '' || (isset($userinfo[$element['required_resources']]) && ((int)$userinfo[$element['required_resources']] > 0 || $userinfo[$element['required_resources']] == '-1')))) if (isset($element['url']) && trim($element['url']) != '') {
{
if(isset($element['url']) && trim($element['url']) != '')
{
// append sid only to local // append sid only to local
if(!preg_match('/^https?\:\/\//', $element['url']) if (!preg_match('/^https?\:\/\//', $element['url'])
&& (isset($userinfo['hash']) && $userinfo['hash'] != '')) && (isset($userinfo['hash']) && $userinfo['hash'] != '')) {
{
// generate sid with ? oder & // generate sid with ? oder &
if(strpos($element['url'], '?') !== false) if (strpos($element['url'], '?') !== false) {
{
$element['url'].= '&s=' . $userinfo['hash']; $element['url'].= '&s=' . $userinfo['hash'];
} } else {
else
{
$element['url'].= '?s=' . $userinfo['hash']; $element['url'].= '?s=' . $userinfo['hash'];
} }
} }
$target = ''; $target = '';
if (isset($element['new_window']) && $element['new_window'] == true) {
if(isset($element['new_window']) && $element['new_window'] == true)
{
$target = ' target="_blank"'; $target = ' target="_blank"';
} }
$completeLink = '<a href="' . htmlspecialchars($element['url']) . '"' . $target . ' class="menu">' . $element['label'] . '</a>'; $active = '';
} if (isset($_GET['page']) && substr_count($element['url'], "page=" . $_GET['page']) > 0 && substr_count($element['url'], basename($_SERVER["SCRIPT_FILENAME"])) > 0) {
else $active = ' active';
{ }
$completeLink = '<a href="' . htmlspecialchars($element['url']) . '"' . $target . ' class="menu' . $active . '">' . $element['label'] . '</a>';
} else {
$completeLink = $element['label']; $completeLink = $element['label'];
} }
@@ -80,38 +71,27 @@ function buildNavigation($navigation, $userinfo)
} }
} }
if($navigation_links != '') if ($navigation_links != '') {
{ if (isset($box['url']) && trim($box['url']) != '') {
if(isset($box['url']) && trim($box['url']) != '')
{
// append sid only to local // append sid only to local
if(!preg_match('/^https?\:\/\//', $box['url']) if (!preg_match('/^https?\:\/\//', $box['url']) && (isset($userinfo['hash']) && $userinfo['hash'] != '')) {
&& (isset($userinfo['hash']) && $userinfo['hash'] != ''))
{
// generate sid with ? oder & // generate sid with ? oder &
if(strpos($box['url'], '?') !== false) if (strpos($box['url'], '?') !== false) {
{
$box['url'].= '&s=' . $userinfo['hash']; $box['url'].= '&s=' . $userinfo['hash'];
} } else {
else
{
$box['url'].= '?s=' . $userinfo['hash']; $box['url'].= '?s=' . $userinfo['hash'];
} }
} }
$target = ''; $target = '';
if (isset($box['new_window']) && $box['new_window'] == true) {
if(isset($box['new_window']) && $box['new_window'] == true)
{
$target = ' target="_blank"'; $target = ' target="_blank"';
} }
$completeLink = '<a href="' . htmlspecialchars($box['url']) . '"' . $target . ' class="menu">' . $box['label'] . '</a>'; $completeLink = '<a href="' . htmlspecialchars($box['url']) . '"' . $target . ' class="menu">' . $box['label'] . '</a>';
} } else {
else
{
$completeLink = $box['label']; $completeLink = $box['label'];
} }

View File

@@ -217,7 +217,7 @@ return array (
'required_resources' => 'change_serversettings', 'required_resources' => 'change_serversettings',
), ),
array ( array (
'url' => 'admin_settings.php?page=settings', 'url' => 'admin_settings.php?page=overview',
'label' => $lng['admin']['serversettings'], 'label' => $lng['admin']['serversettings'],
'required_resources' => 'change_serversettings', 'required_resources' => 'change_serversettings',
), ),

View File

@@ -72,6 +72,6 @@ define('PACKAGE_LOCKED', 1);
define('PACKAGE_ENABLED', 2); define('PACKAGE_ENABLED', 2);
// VERSION INFO // VERSION INFO
$version = '0.9.31-rc2'; $version = '0.9.31.1';
$dbversion = '2'; $dbversion = '2';
$branding = ''; $branding = '';

View File

@@ -807,7 +807,7 @@ $lng['admin']['allips'] = 'Alle IP\'s';
$lng['panel']['nosslipsavailable'] = 'Für diesen Server wurden noch keine SSL IP/Port Kombinationen eingetragen'; $lng['panel']['nosslipsavailable'] = 'Für diesen Server wurden noch keine SSL IP/Port Kombinationen eingetragen';
$lng['ticket']['by'] = 'von'; $lng['ticket']['by'] = 'von';
$lng['dkim']['use_dkim']['title'] = 'DKIM Support aktivieren?'; $lng['dkim']['use_dkim']['title'] = 'DKIM Support aktivieren?';
$lng['dkim']['use_dkim']['description'] = 'Wollen Sie das Domain Keys (DKIM) System benutzen?<br/><em style="color:red;font-weight:bold;">Hinweis: Der Zeit wird DKIM nur via dkim-filter unterstützt, nicht opendkim</em>'; $lng['dkim']['use_dkim']['description'] = 'Wollen Sie das Domain Keys (DKIM) System benutzen?<br/><em style="color:red;font-weight:bold;">Hinweis: Derzeit wird DKIM nur via dkim-filter unterstützt, nicht opendkim</em>';
$lng['error']['invalidmysqlhost'] = 'Ungültige MySQL Host Adresse: "%s"'; $lng['error']['invalidmysqlhost'] = 'Ungültige MySQL Host Adresse: "%s"';
$lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Webalizer und AWstats können nicht zur gleichen Zeit aktiviert werden, bitte wählen Sie eines aus'; $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Webalizer und AWstats können nicht zur gleichen Zeit aktiviert werden, bitte wählen Sie eines aus';
$lng['serversettings']['webalizer_enabled'] = 'Nutze Webalizer Statistiken'; $lng['serversettings']['webalizer_enabled'] = 'Nutze Webalizer Statistiken';
@@ -1539,10 +1539,10 @@ $lng['serversettings']['validate_domain'] = 'Validiere Domainnamen';
$lng['login']['combination_not_found'] = 'Kombination aus Benutzername und E-Mail Adresse stimmen nicht überein.'; $lng['login']['combination_not_found'] = 'Kombination aus Benutzername und E-Mail Adresse stimmen nicht überein.';
$lng['customer']['generated_pwd'] = 'Passwortvorschlag'; $lng['customer']['generated_pwd'] = 'Passwortvorschlag';
$lng['customer']['usedmax'] = 'Benutzt / Max.'; $lng['customer']['usedmax'] = 'Benutzt / Max.';
$lng['admin']['traffic'] = 'Datentransfer'; $lng['admin']['traffic'] = 'Traffic';
$lng['admin']['customertraffic'] = 'Kunden'; $lng['admin']['customertraffic'] = 'Kunden';
$lng['traffic']['customer'] = 'Kunde'; $lng['traffic']['customer'] = 'Kunde';
$lng['traffic']['trafficoverview'] = 'Übersicht Datentransfervolumen je'; $lng['traffic']['trafficoverview'] = 'Übersicht Traffic je';
$lng['traffic']['months']['jan'] = 'Jan'; $lng['traffic']['months']['jan'] = 'Jan';
$lng['traffic']['months']['feb'] = 'Feb'; $lng['traffic']['months']['feb'] = 'Feb';
$lng['traffic']['months']['mar'] = 'Mär'; $lng['traffic']['months']['mar'] = 'Mär';

File diff suppressed because it is too large Load Diff

View File

@@ -35,11 +35,16 @@ while ($maildir = $maildirs_stmt->fetch(PDO::FETCH_ASSOC)) {
if (file_exists($_maildir) if (file_exists($_maildir)
&& is_dir($_maildir) && is_dir($_maildir)
) { ) {
$back = safe_exec('du -sb ' . escapeshellarg($_maildir) . ''); $back = safe_exec('du -sk ' . escapeshellarg($_maildir) . '');
foreach ($back as $backrow) { foreach ($back as $backrow) {
$emailusage = explode(' ', $backrow); $emailusage = explode(' ', $backrow);
} }
$emailusage = floatval($emailusage['0']); $emailusage = floatval($emailusage['0']);
// as freebsd does not have the -b flag for 'du' which gives
// the size in bytes, we use "-sk" for all and calculate from KiB
$emailusage *= 1024;
unset($back); unset($back);
Database::pexecute($upd_stmt, array('size' => $emailusage, 'id' => $maildir['id'])); Database::pexecute($upd_stmt, array('size' => $emailusage, 'id' => $maildir['id']));
} else { } else {

View File

@@ -309,7 +309,7 @@ class bind
// Check whether to add a www.-prefix // Check whether to add a www.-prefix
if ($domain['wwwserveralias'] == '1') { if ($domain['wwwserveralias'] == '1') {
$records[] = str_replace('.' . $domain['domain'], '', $subdomain['domain']); $records[] = 'www.'.str_replace('.' . $domain['domain'], '', $subdomain['domain']);
} }
} }

View File

@@ -0,0 +1,3 @@
<tr>
<td colspan="5"><b>{$module}</b></td>
</tr>

View File

@@ -141,7 +141,7 @@ $header
<td><a href="$lookfornewversion_link">$lookfornewversion_lable</a></td> <td><a href="$lookfornewversion_link">$lookfornewversion_lable</a></td>
</if> </if>
</tr> </tr>
<if $isnewerversion != 0 > <if $isnewerversion == 1 >
<tr> <tr>
<td colspan="2"><strong>{$lng['admin']['newerversionavailable']}</strong></td> <td colspan="2"><strong>{$lng['admin']['newerversionavailable']}</strong></td>
</tr> </tr>

View File

@@ -26,11 +26,11 @@ $header
<thead> <thead>
<tr> <tr>
<th>{$lng['ticket']['lastchange']}&nbsp;{$arrowcode['lastchange']}</th> <th>{$lng['ticket']['lastchange']}&nbsp;{$arrowcode['lastchange']}</th>
<th>{$lng['ticket']['ticket_answers']}&nbsp;{$arrowcode['ticket_answers']}</th> <th>{$lng['ticket']['ticket_answers']}</th>
<th>{$lng['ticket']['subject']}&nbsp;{$arrowcode['subject']}</th> <th>{$lng['ticket']['subject']}&nbsp;{$arrowcode['subject']}</th>
<th>{$lng['ticket']['status']}&nbsp;{$arrowcode['status']}</th> <th>{$lng['ticket']['status']}&nbsp;{$arrowcode['status']}</th>
<th>{$lng['ticket']['lastreplier']}&nbsp;{$arrowcode['lastreplier']}</th> <th>{$lng['ticket']['lastreplier']}&nbsp;{$arrowcode['lastreplier']}</th>
<th>{$lng['ticket']['priority']}&nbsp;{$arrowcode['priority']}</th> <th>{$lng['ticket']['priority']}</th>
<th>{$lng['panel']['options']}</th> <th>{$lng['panel']['options']}</th>
</tr> </tr>
</thead> </thead>

View File

@@ -395,6 +395,10 @@ a:hover {
text-decoration: underline; text-decoration: underline;
} }
a.active {
font-weight: bold;
}
.infotext { .infotext {
font-size: 11px; font-size: 11px;
} }

View File

@@ -39,11 +39,11 @@ $header
<thead> <thead>
<tr> <tr>
<th>{$lng['ticket']['lastchange']}&nbsp;{$arrowcode['lastchange']}</th> <th>{$lng['ticket']['lastchange']}&nbsp;{$arrowcode['lastchange']}</th>
<th>{$lng['ticket']['ticket_answers']}&nbsp;{$arrowcode['ticket_answers']}</th> <th>{$lng['ticket']['ticket_answers']}</th>
<th>{$lng['ticket']['subject']}&nbsp;{$arrowcode['subject']}</th> <th>{$lng['ticket']['subject']}&nbsp;{$arrowcode['subject']}</th>
<th>{$lng['ticket']['status']}&nbsp;{$arrowcode['status']}</th> <th>{$lng['ticket']['status']}&nbsp;{$arrowcode['status']}</th>
<th>{$lng['ticket']['lastreplier']}&nbsp;{$arrowcode['lastreplier']}</th> <th>{$lng['ticket']['lastreplier']}&nbsp;{$arrowcode['lastreplier']}</th>
<th>{$lng['ticket']['priority']}&nbsp;{$arrowcode['priority']}</th> <th>{$lng['ticket']['priority']}</th>
<th>{$lng['panel']['options']}</th> <th>{$lng['panel']['options']}</th>
</tr> </tr>
</thead> </thead>

View File

@@ -0,0 +1,3 @@
<tr>
<td colspan="5"><b>{$module}</b></td>
</tr>

View File

@@ -265,7 +265,7 @@ $header
<td><a href="$lookfornewversion_link">$lookfornewversion_lable</a></td> <td><a href="$lookfornewversion_link">$lookfornewversion_lable</a></td>
</if> </if>
</tr> </tr>
<if $isnewerversion != 0 > <if $isnewerversion == 1 >
<tr> <tr>
<td colspan="2"><strong>{$lng['admin']['newerversionavailable']}</strong></td> <td colspan="2"><strong>{$lng['admin']['newerversionavailable']}</strong></td>
</tr> </tr>

View File

@@ -26,11 +26,11 @@ $header
<thead> <thead>
<tr> <tr>
<th>{$lng['ticket']['lastchange']}&nbsp;{$arrowcode['lastchange']}</th> <th>{$lng['ticket']['lastchange']}&nbsp;{$arrowcode['lastchange']}</th>
<th>{$lng['ticket']['ticket_answers']}&nbsp;{$arrowcode['ticket_answers']}</th> <th>{$lng['ticket']['ticket_answers']}</th>
<th>{$lng['ticket']['subject']}&nbsp;{$arrowcode['subject']}</th> <th>{$lng['ticket']['subject']}&nbsp;{$arrowcode['subject']}</th>
<th>{$lng['ticket']['status']}&nbsp;{$arrowcode['status']}</th> <th>{$lng['ticket']['status']}&nbsp;{$arrowcode['status']}</th>
<th>{$lng['ticket']['lastreplier']}&nbsp;{$arrowcode['lastreplier']}</th> <th>{$lng['ticket']['lastreplier']}&nbsp;{$arrowcode['lastreplier']}</th>
<th>{$lng['ticket']['priority']}&nbsp;{$arrowcode['priority']}</th> <th>{$lng['ticket']['priority']}</th>
<th>{$lng['panel']['options']}</th> <th>{$lng['panel']['options']}</th>
</tr> </tr>
</thead> </thead>

View File

@@ -488,6 +488,10 @@ a:hover {
text-decoration:underline; text-decoration:underline;
} }
a.active {
font-weight: bold;
}
.infotext { .infotext {
font-size:11px; font-size:11px;
} }

View File

@@ -60,37 +60,50 @@ $(document).ready(function(){
//alert(ftp); //alert(ftp);
var plot2 = $.jqplot('chartdiv', [ftp, http, mail], { var plot2 = $.jqplot('chartdiv', [ftp, http, mail], {
series: [ series: [
{ {
lineWidth:1, lineWidth:1,
color: '#019522', color: '#019522',
label: 'FTP', label: 'FTP',
showMarker: false markerOptions: { style:"circle", size: 5, shadow: false },
rendererOptions: { smooth: true },
pointLabels: { show:true, formatString: "%#.2f" }
}, },
{ {
lineWidth:1, lineWidth:1,
color: '#0000FF', color: '#0000FF',
label: 'HTTP', label: 'HTTP',
showMarker: false markerOptions: { style:"circle", size: 5, shadow: false },
rendererOptions: { smooth: true },
pointLabels: { show:true, formatString: "%#.2f" }
}, },
{ {
lineWidth:1, lineWidth:1,
color: '#800000', color: '#800000',
label: 'Mail', label: 'Mail',
showMarker: false markerOptions: { style: "circle", size: 5, shadow: false },
rendererOptions: { smooth: true },
pointLabels: { show:true, formatString: "%#.2f" }
} }
], ],
axes: { axes: {
yaxis: { yaxis: {
min: 0, min: 0,
numberTicks: 10 numberTicks: 5,
rendererOptions: {drawBaseline: false}
}, },
xaxis: { xaxis: {
tickOptions:{
showGridline: false
},
pad: 0, pad: 0,
ticks: aticks ticks: aticks
}, },
}, },
grid: { grid: {
show: false,
background: '#fff', background: '#fff',
gridLineColor: '#e2e4e6',
borderWidth: 0, borderWidth: 0,
shadow: false shadow: false
} }

View File

@@ -39,11 +39,11 @@ $header
<thead> <thead>
<tr> <tr>
<th>{$lng['ticket']['lastchange']}&nbsp;{$arrowcode['lastchange']}</th> <th>{$lng['ticket']['lastchange']}&nbsp;{$arrowcode['lastchange']}</th>
<th>{$lng['ticket']['ticket_answers']}&nbsp;{$arrowcode['ticket_answers']}</th> <th>{$lng['ticket']['ticket_answers']}</th>
<th>{$lng['ticket']['subject']}&nbsp;{$arrowcode['subject']}</th> <th>{$lng['ticket']['subject']}&nbsp;{$arrowcode['subject']}</th>
<th>{$lng['ticket']['status']}&nbsp;{$arrowcode['status']}</th> <th>{$lng['ticket']['status']}&nbsp;{$arrowcode['status']}</th>
<th>{$lng['ticket']['lastreplier']}&nbsp;{$arrowcode['lastreplier']}</th> <th>{$lng['ticket']['lastreplier']}&nbsp;{$arrowcode['lastreplier']}</th>
<th>{$lng['ticket']['priority']}&nbsp;{$arrowcode['priority']}</th> <th>{$lng['ticket']['priority']}</th>
<th>{$lng['panel']['options']}</th> <th>{$lng['panel']['options']}</th>
</tr> </tr>
</thead> </thead>