diff --git a/admin_customers.php b/admin_customers.php index 917f6854..936f0147 100644 --- a/admin_customers.php +++ b/admin_customers.php @@ -54,44 +54,13 @@ if($page == 'customers' 'c.diskspace' => $lng['customer']['diskspace'], 'c.diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')', 'c.traffic' => $lng['customer']['traffic'], - 'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')', - 'c.backup_allowed' => $lng['backup_allowed'] -/* - 'c.mysqls' => $lng['customer']['mysqls'], - 'c.mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')', - 'c.ftps' => $lng['customer']['ftps'], - 'c.ftps_used' => $lng['customer']['ftps'] . ' (' . $lng['panel']['used'] . ')', - 'c.subdomains' => $lng['customer']['subdomains'], - 'c.subdomains_used' => $lng['customer']['subdomains'] . ' (' . $lng['panel']['used'] . ')', - 'c.emails' => $lng['customer']['emails'], - 'c.emails_used' => $lng['customer']['emails'] . ' (' . $lng['panel']['used'] . ')', - 'c.email_accounts' => $lng['customer']['accounts'], - 'c.email_accounts_used' => $lng['customer']['accounts'] . ' (' . $lng['panel']['used'] . ')', - 'c.email_forwarders' => $lng['customer']['forwarders'], - 'c.email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')', - 'c.email_quota' => $lng['customer']['email_quota'], - 'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')', - 'c.deactivated' => $lng['admin']['deactivated'], - 'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'], - 'c.phpenabled' => $lng['admin']['phpenabled'], - 'c.perlenabled' => $lng['admin']['perlenabled'] -*/ + 'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')' ); -/* - if($settings['ticket']['enabled'] == 1) - { - $fields['c.tickets'] = $lng['customer']['tickets']; - $fields['c.tickets_used'] = $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')'; + if ($settings['system']['backup_enabled'] == '1') { + $field['c.backup_allowed'] = $lng['backup_allowed']; } - if($settings['autoresponder']['autoresponder_active'] == 1) - { - $fields['c.email_autoresponder'] = $lng['customer']['autoresponder']; - $fields['c.email_autoresponder_used'] = $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')'; - } -*/ - $paging = new paging($userinfo, $db, TABLE_PANEL_CUSTOMERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); $customers = ''; $result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy($settings['panel']['natsorting']) . " " . $paging->getSqlLimit()); diff --git a/admin_domains.php b/admin_domains.php index bed62fe7..1c25ae6a 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -195,9 +195,8 @@ if($page == 'domains' updateCounters(); inserttask('1'); - # Using nameserver, insert a task which rebuilds the server config - if ($settings['system']['bind_enable']) - { + // Using nameserver, insert a task which rebuilds the server config + if ($settings['system']['bind_enable'] = '1') { inserttask('4'); } redirectTo($filename, Array('page' => $page, 's' => $s)); @@ -283,9 +282,16 @@ if($page == 'domains' if($userinfo['change_serversettings'] == '1') { - $isbinddomain = intval($_POST['isbinddomain']); $caneditdomain = isset($_POST['caneditdomain']) ? 1 : 0; - $zonefile = validate($_POST['zonefile'], 'zonefile'); + + $isbinddomain = '0'; + $zonefile = ''; + if ($settings['system']['bind_enable'] == '1') { + if (isset($_POST['isbinddomain'])) { + $isbinddomain = intval($_POST['isbinddomain']); + } + $zonefile = validate($_POST['zonefile'], 'zonefile'); + } if(isset($_POST['dkim'])) { @@ -315,7 +321,10 @@ if($page == 'domains' } else { - $isbinddomain = '1'; + $isbinddomain = '0'; + if ($settings['system']['bind_enable'] == '1') { + $isbinddomain = '1'; + } $caneditdomain = '1'; $zonefile = ''; $dkim = '1'; @@ -325,8 +334,8 @@ if($page == 'domains' if($userinfo['caneditphpsettings'] == '1' || $userinfo['change_serversettings'] == '1') { - $openbasedir = isset($_POST['openbasedir']) ? 1 : 0; - $safemode = isset($_POST['safemode']) ? 1 : 0; + $openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0; + $safemode = isset($_POST['safemode']) ? intval($_POST['safemode']) : 0; if((int)$settings['system']['mod_fcgid'] == 1) { @@ -577,8 +586,7 @@ if($page == 'domains' inserttask('1'); # Using nameserver, insert a task which rebuilds the server config - if ($settings['system']['bind_enable']) - { + if ($settings['system']['bind_enable']) { inserttask('4'); } redirectTo($filename, Array('page' => $page, 's' => $s)); @@ -683,19 +691,6 @@ if($page == 'domains' $phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true); } - /* - $isbinddomain = makeyesno('isbinddomain', '1', '0', '1'); - $isemaildomain = makeyesno('isemaildomain', '1', '0', '1'); - $email_only = makeyesno('email_only', '1', '0', '0'); - $dkim = makeyesno('dkim', '1', '0', '1'); - $wwwserveralias = makeyesno('wwwserveralias', '1', '0', '1'); - $caneditdomain = makeyesno('caneditdomain', '1', '0', '1'); - $openbasedir = makeyesno('openbasedir', '1', '0', '1'); - $safemode = makeyesno('safemode', '1', '0', '1'); - $speciallogfile = makeyesno('speciallogfile', '1', '0', '0'); - $ssl = makeyesno('ssl', '1', '0', '0'); - $ssl_redirect = makeyesno('ssl_redirect', '1', '0', '0'); - */ $subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['always'], '3', '0', true, true); $add_date = date('Y-m-d'); @@ -818,8 +813,14 @@ if($page == 'domains' if($userinfo['change_serversettings'] == '1') { - $isbinddomain = intval($_POST['isbinddomain']); - $zonefile = validate($_POST['zonefile'], 'zonefile'); + $isbinddomain = $result['isbinddomain']; + $zonefile = $result['zonefile']; + if ($settings['system']['bind_enable'] == '1') { + if (isset($_POST['isbinddomain'])) { + $isbinddomain = '1'; + } + $zonefile = validate($_POST['zonefile'], 'zonefile'); + } if($settings['dkim']['use_dkim'] == '1') { @@ -856,8 +857,8 @@ if($page == 'domains' if($userinfo['caneditphpsettings'] == '1' || $userinfo['change_serversettings'] == '1') { - $openbasedir = isset($_POST['openbasedir']) ? 1 : 0; - $safemode = isset($_POST['safemode']) ? 1 : 0; + $openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0; + $safemode = isset($_POST['safemode']) ? intval($_POST['safemode']) : 0; if((int)$settings['system']['mod_fcgid'] == 1) { @@ -1086,7 +1087,9 @@ if($page == 'domains' || $dkim != $result['dkim'] || $ipandport != $result['ipandport']) { - inserttask('4'); + if ($settings['system']['bind_enable'] == '1') { + inserttask('4'); + } } if($isemaildomain == '0' @@ -1239,18 +1242,7 @@ if($page == 'domains' } $result['specialsettings'] = $result['specialsettings']; - /* - $isbinddomain = makeyesno('isbinddomain', '1', '0', $result['isbinddomain']); - $wwwserveralias = makeyesno('wwwserveralias', '1', '0', $result['wwwserveralias']); - $isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']); - $email_only = makeyesno('email_only', '1', '0', $result['email_only']); - $ssl = makeyesno('ssl', '1', '0', $result['ssl']); - $ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']); - $dkim = makeyesno('dkim', '1', '0', $result['dkim']); - $caneditdomain = makeyesno('caneditdomain', '1', '0', $result['caneditdomain']); - $openbasedir = makeyesno('openbasedir', '1', '0', $result['openbasedir']); - $safemode = makeyesno('safemode', '1', '0', $result['safemode']); - */ + $subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', $result['subcanemaildomain'], true, true); $subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', $result['subcanemaildomain'], true, true); $subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', $result['subcanemaildomain'], true, true); @@ -1266,10 +1258,6 @@ if($page == 'domains' $phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true); } - /* - $specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1'); - */ - $result = htmlentities_array($result); $domain_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_edit.php'; diff --git a/install/froxlor.sql b/install/froxlor.sql index d90270e9..3a46f01e 100644 --- a/install/froxlor.sql +++ b/install/froxlor.sql @@ -462,8 +462,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_peardir', '/usr/share/php/:/usr/share/php5/'), ('system', 'index_file_extension', 'html'), ('system', 'mod_fcgid_maxrequests', '250'), - ('system','ssl_key_file','/etc/apache2/apache2.key'), - ('system','ssl_ca_file', ''), + ('system', 'ssl_key_file','/etc/apache2/apache2.key'), + ('system', 'ssl_ca_file', ''), ('system', 'debug_cron', '0'), ('system', 'store_index_file_subs', '1'), ('system', 'stdsubdomain', ''), diff --git a/lib/formfields/admin/domains/formfield.domains_edit.php b/lib/formfields/admin/domains/formfield.domains_edit.php index 7df515e7..616da100 100644 --- a/lib/formfields/admin/domains/formfield.domains_edit.php +++ b/lib/formfields/admin/domains/formfield.domains_edit.php @@ -214,7 +214,7 @@ return array( 'section_d' => array( 'title' => $lng['admin']['nameserversettings'], 'image' => 'icons/domain_edit.png', - 'visible' => ($system['system']['bind_enable'] == '1' && $userinfo['change_serversettings'] == '1' ? true : false), + 'visible' => ($settings['system']['bind_enable'] == '1' && $userinfo['change_serversettings'] == '1' ? true : false), 'fields' => array( 'isbinddomain' => array( 'label' => 'Nameserver',