function getFormOverviewGroupOutput($groupname, $groupdetails) { global $lng, $filename, $s, $theme; $group = ''; $title = $groupdetails['title']; $part = $groupname; $activated = true; $option = ''; if (isset($groupdetails['fields'])) { foreach ($groupdetails['fields'] as $fieldname => $fielddetails) { if (isset($fielddetails['overview_option']) && $fielddetails['overview_option'] == true) { if ($fielddetails['type'] != 'option' && $fielddetails['type'] != 'bool') { standard_error('overviewsettingoptionisnotavalidfield'); } if ($fielddetails['type'] == 'option') { $options_array = $fielddetails['option_options']; $options = ''; foreach ($options_array as $value => $vtitle) { $options .= makeoption($vtitle, $value, Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname'])); } $option .= $fielddetails['label'] . ': '; $option .= '<select class="dropdown_noborder" name="' . $fieldname . '">'; $option .= $options; $option .= '</select>'; $activated = true; } else { $option .= $lng['admin']['activated'] . ': '; $option .= makeyesno($fieldname, '1', '0', Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname'])); $activated = (int) Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']); } } } } /** * this part checks for the 'websrv_avail' entry in the settings * if found, we check if the current webserver is in the array. If this * is not the case, we change the setting type to "hidden", #502 */ $do_show = true; if (isset($groupdetails['websrv_avail']) && is_array($groupdetails['websrv_avail'])) { $websrv = Settings::Get('system.webserver'); if (!in_array($websrv, $groupdetails['websrv_avail'])) { $do_show = false; $title .= sprintf($lng['serversettings']['option_unavailable_websrv'], implode(", ", $groupdetails['websrv_avail'])); // hack disabled flag into select-box $option = str_replace('<select class', '<select disabled="disabled" class', $option); } } eval("\$group = \"" . getTemplate("settings/settings_overviewgroup") . "\";"); return $group; }
/** * checks if the new-version has some updating to do * * @param boolean $has_preconfig pointer to check if any preconfig has to be output * @param string $return pointer to output string * @param string $current_version current froxlor version * * @return null */ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) { global $lng; if (versionInUpdate($current_version, '0.9.4-svn2')) { $has_preconfig = true; $description = 'Froxlor now enables the usage of a domain-wildcard entry and subdomains for this domain at the same time (subdomains are parsed before the main-domain vhost container).'; $description .= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.<br />'; $description .= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.'; $question = '<strong>Do you want to use wildcard-entries for existing domains?:</strong> '; $question .= makeyesno('update_domainwildcardentry', '1', '0', '1'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.6-svn2')) { if (!PHPMailer::ValidateAddress(Settings::Get('panel.adminmail'))) { $has_preconfig = true; $description = 'Froxlor uses a newer version of the phpMailerClass and determined that your current admin-mail address is invalid.'; $question = '<strong>Please specify a new admin-email address:</strong> <input type="text" class="text" name="update_adminmail" value="' . Settings::Get('panel.adminmail') . '" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.6-svn3')) { $has_preconfig = true; $description = 'You now have the possibility to define default error-documents for your webserver which replace the default webserver error-messages.'; $question = '<strong>Do you want to enable default error-documents?:</strong> '; $question .= makeyesno('update_deferr_enable', '1', '0', '0') . '<br /><br />'; if (Settings::Get('system.webserver') == 'apache2') { $question .= 'Path/URL for error 500: <input type="text" class="text" name="update_deferr_500" /><br /><br />'; $question .= 'Path/URL for error 401: <input type="text" class="text" name="update_deferr_401" /><br /><br />'; $question .= 'Path/URL for error 403: <input type="text" class="text" name="update_deferr_403" /><br /><br />'; } $question .= 'Path/URL for error 404: <input type="text" class="text" name="update_deferr_404" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.6-svn4')) { $has_preconfig = true; $description = 'You can define a default support-ticket priority level which is pre-selected for new support-tickets.'; $question = '<strong>Which should be the default ticket-priority?:</strong> '; $question .= '<select name="update_deftic_priority">'; $priorities = makeoption($lng['ticket']['high'], '1', '2'); $priorities .= makeoption($lng['ticket']['normal'], '2', '2'); $priorities .= makeoption($lng['ticket']['low'], '3', '2'); $question .= $priorities . '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.6-svn5')) { $has_preconfig = true; $description = 'If you have more than one PHP configurations defined in Froxlor you can now set a default one which will be used for every domain.'; $question = '<strong>Select default PHP configuration:</strong> '; $question .= '<select name="update_defsys_phpconfig">'; $configs_array = getPhpConfigs(); $configs = ''; foreach ($configs_array as $idx => $desc) { $configs .= makeoption($desc, $idx, '1'); } $question .= $configs . '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.6-svn6')) { $has_preconfig = true; $description = 'For the new FTP-quota feature, you can now chose the currently used ftpd-software.'; $question = '<strong>Used FTPd-software:</strong> '; $question .= '<select name="update_defsys_ftpserver">'; $question .= makeoption('ProFTPd', 'proftpd', 'proftpd'); $question .= makeoption('PureFTPd', 'pureftpd', 'proftpd'); $question .= '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.7-svn1')) { $has_preconfig = true; $description = 'You can now choose whether customers can select the http-redirect code and which of them acts as default.'; $question = '<strong>Allow customer chosen redirects?:</strong> '; $question .= makeyesno('update_customredirect_enable', '1', '0', '1') . '<br /><br />'; $question .= '<strong>Select default redirect code (default: empty):</strong> '; $question .= '<select name="update_customredirect_default">'; $redirects = makeoption('--- (' . $lng['redirect_desc']['rc_default'] . ')', 1, '1'); $redirects .= makeoption('301 (' . $lng['redirect_desc']['rc_movedperm'] . ')', 2, '1'); $redirects .= makeoption('302 (' . $lng['redirect_desc']['rc_found'] . ')', 3, '1'); $redirects .= makeoption('303 (' . $lng['redirect_desc']['rc_seeother'] . ')', 4, '1'); $redirects .= makeoption('307 (' . $lng['redirect_desc']['rc_tempred'] . ')', 5, '1'); $question .= $redirects . '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.7-svn2')) { $result = Database::query("SELECT `domain` FROM " . TABLE_PANEL_DOMAINS . " WHERE `documentroot` LIKE '%:%' AND `documentroot` NOT LIKE 'http://%' AND `openbasedir_path` = '0' AND `openbasedir` = '1'"); $wrongOpenBasedirDomain = array(); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $wrongOpenBasedirDomain[] = $row['domain']; } if (count($wrongOpenBasedirDomain) > 0) { $has_preconfig = true; $description = 'Resetting the open_basedir to customer - root'; $question = '<strong>Due to a security - issue regarding open_basedir, Froxlor will set the open_basedir for the following domains to the customers root instead of the chosen documentroot:</strong><br /> '; $question .= '<ul>'; $idna_convert = new idna_convert_wrapper(); foreach ($wrongOpenBasedirDomain as $domain) { $question .= '<li>' . $idna_convert->decode($domain) . '</li>'; } $question .= '</ul>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.9-svn1')) { $has_preconfig = true; $description = 'When entering MX servers to Froxlor there was no mail-, imap-, pop3- and smtp-"A record" created. You can now chose whether this should be done or not.'; $question = '<strong>Do you want these A-records to be created even with MX servers given?:</strong> '; $question .= makeyesno('update_defdns_mailentry', '1', '0', '0'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.10-svn1')) { $has_nouser = false; $has_nogroup = false; $result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'"); $result = $result_stmt->fetch(PDO::FETCH_ASSOC); if (!isset($result) || !isset($result['value'])) { $has_preconfig = true; $has_nouser = true; $guessed_user = '******'; if (function_exists('posix_getuid') && function_exists('posix_getpwuid')) { $_httpuser = posix_getpwuid(posix_getuid()); $guessed_user = $_httpuser['name']; } } $result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'"); $result = $result_stmt->fetch(PDO::FETCH_ASSOC); if (!isset($result) || !isset($result['value'])) { $has_preconfig = true; $has_nogroup = true; $guessed_group = 'www-data'; if (function_exists('posix_getgid') && function_exists('posix_getgrgid')) { $_httpgroup = posix_getgrgid(posix_getgid()); $guessed_group = $_httpgroup['name']; } } if ($has_nouser || $has_nogroup) { $description = 'Please enter the correct username/groupname of the webserver on your system We\'re guessing the user but it might not be correct, so please check.'; if ($has_nouser) { $question = '<strong>Please enter the webservers username:</strong> <input type="text" class="text" name="update_httpuser" value="' . $guessed_user . '" />'; } elseif ($has_nogroup) { $question2 = '<strong>Please enter the webservers groupname:</strong> <input type="text" class="text" name="update_httpgroup" value="' . $guessed_group . '" />'; if ($has_nouser) { $question .= '<br /><br />' . $question2; } else { $question = $question2; } } eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.10')) { $has_preconfig = true; $description = 'you can now decide whether Froxlor should be reached via hostname/froxlor or directly via the hostname.'; $question = '<strong>Do you want Froxlor to be reached directly via the hostname?:</strong> '; $question .= makeyesno('update_directlyviahostname', '1', '0', '0'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.11-svn1')) { $has_preconfig = true; $description = 'It is possible to enhance security with setting a regular expression to force your customers to enter more complex passwords.'; $question = '<strong>Enter a regular expression to force a higher password complexity (leave empty for none):</strong> '; $question .= '<input type="text" class="text" name="update_pwdregex" value="" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.11-svn3')) { $has_preconfig = true; $description = 'As Froxlor can now handle perl, you have to specify where the perl executable is (only if you\'re running lighttpd, else just leave empty).'; $question = '<strong>Path to perl (default \'/usr/bin/perl\'):</strong> '; $question .= '<input type="text" class="text" name="update_perlpath" value="/usr/bin/perl" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.12-svn1')) { if (Settings::Get('system.mod_fcgid') == 1) { $has_preconfig = true; $description = 'You can chose whether you want Froxlor to use FCGID itself too now.'; $question = '<strong>Use FCGID for the Froxlor Panel?:</strong> '; $question .= makeyesno('update_fcgid_ownvhost', '1', '0', '0') . '<br /><br />'; $question .= '<strong>If \'yes\', please specify local user/group (have to exist, Froxlor does not add them automatically):</strong><br /><br />'; $question .= 'Local user: '; $question .= '<input type="text" class="text" name="update_fcgid_httpuser" value="froxlorlocal" /><br /><br />'; $question .= 'Local group: '; $question .= '<input type="text" class="text" name="update_fcgid_httpgroup" value="froxlorlocal" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.12-svn2')) { $has_preconfig = true; $description = 'Many apache user will have problems using perl/CGI as the customer docroots are not within the suexec path. Froxlor provides a simple workaround for that.'; $question = '<strong>Enable Apache/SuExec/Perl workaround?:</strong> '; $question .= makeyesno('update_perl_suexecworkaround', '1', '0', '0') . '<br /><br />'; $question .= '<strong>If \'yes\', please specify a path within the suexec path where Froxlor will create symlinks to customer perl-enabled paths:</strong><br /><br />'; $question .= 'Path for symlinks (must be within suexec path): '; $question .= '<input type="text" class="text" name="update_perl_suexecpath" value="/var/www/cgi-bin/" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.12-svn4')) { if ((int) Settings::Get('system.awstats_enabled') == 1) { $has_preconfig = true; $description = 'Due to different paths of awstats_buildstaticpages.pl and awstats.pl you can set a different path for awstats.pl now.'; $question = '<strong>Path to \'awstats.pl\'?:</strong> '; $question .= '<input type="text" class="text" name="update_awstats_awstatspath" value="' . Settings::Get('system.awstats_path') . '" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.13-svn1')) { if ((int) Settings::Get('autoresponder.autoresponder_active') == 1) { $has_preconfig = true; $description = 'Froxlor can now limit the number of autoresponder-entries for each user. Here you can set the value which will be available for each customer (Of course you can change the value for each customer separately after the update).'; $question = '<strong>How many autoresponders should your customers be able to add?:</strong> '; $question .= '<input type="text" class="text" name="update_autoresponder_default" value="0" /> ' . makecheckbox('update_autoresponder_default', $lng['customer']['unlimited'], '-1', false, 0, true, true) . '<br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.13.1')) { if ((int) Settings::Get('system.mod_fcgid_ownvhost') == 1) { $has_preconfig = true; $description = 'You have FCGID for Froxlor itself activated. You can now specify a PHP-configuration for this.'; $question = '<strong>Select Froxlor-vhost PHP configuration:</strong> '; $question .= '<select name="update_defaultini_ownvhost">'; $configs_array = getPhpConfigs(); $configs = ''; foreach ($configs_array as $idx => $desc) { $configs .= makeoption($desc, $idx, '1'); } $question .= $configs . '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.14-svn3')) { if ((int) Settings::Get('system.awstats_enabled') == 1) { $has_preconfig = true; $description = 'To have icons in AWStats statistic-pages please enter the path to AWStats icons folder.'; $question = '<strong>Path to AWSTats icons folder:</strong> '; $question .= '<input type="text" class="text" name="update_awstats_icons" value="' . Settings::Get('system.awstats_icons') . '" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.14-svn4')) { if ((int) Settings::Get('system.use_ssl') == 1) { $has_preconfig = true; $description = 'Froxlor now has the possibility to set \'SSLCertificateChainFile\' for the apache webserver.'; $question = '<strong>Enter filename (leave empty for none):</strong> '; $question .= '<input type="text" class="text" name="update_ssl_cert_chainfile" value="' . Settings::Get('system.ssl_cert_chainfile') . '" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.14-svn6')) { $has_preconfig = true; $description = 'You can now allow customers to use any of their domains as username for the login.'; $question = '<strong>Do you want to enable domain-login for all customers?:</strong> '; $question .= makeyesno('update_allow_domain_login', '1', '0', '0'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.14-svn10')) { $has_preconfig = true; $description = '<strong>This update removes the unsupported real-time option. Additionally the deprecated tables for navigation and cronscripts are removed, any modules using these tables need to be updated to the new structure!</strong>'; $question = ''; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.16-svn1')) { $has_preconfig = true; $description = 'Froxlor now features support for php-fpm.'; $question = '<strong>Do you want to enable php-fpm?:</strong> '; $question .= makeyesno('update_phpfpm_enabled', '1', '0', '0') . '<br /><br />'; $question .= 'If \'yes\', please specify the configuration directory: '; $question .= '<input type="text" class="text" name="update_phpfpm_configdir" value="/etc/php-fpm.d/" /><br /><br />'; $question .= 'Please specify the temporary files directory: '; $question .= '<input type="text" class="text" name="update_phpfpm_tmpdir" value="/var/customers/tmp/" /><br /><br />'; $question .= 'Please specify the PEAR directory: '; $question .= '<input type="text" class="text" name="update_phpfpm_peardir" value="/usr/share/php/:/usr/share/php5/" /><br /><br />'; $question .= 'Please specify the php-fpm restart-command: '; $question .= '<input type="text" class="text" name="update_phpfpm_reload" value="/etc/init.d/php-fpm restart" /><br /><br />'; $question .= 'Please specify the php-fpm rocess manager control: '; $question .= '<select name="update_phpfpm_pm">'; $redirects = makeoption('static', 'static', 'static'); $redirects .= makeoption('dynamic', 'dynamic', 'static'); $question .= $redirects . '</select><br /><br />'; $question .= 'Please specify the number of child processes: '; $question .= '<input type="text" class="text" name="update_phpfpm_max_children" value="1" /><br /><br />'; $question .= 'Please specify the number of requests per child before respawning: '; $question .= '<input type="text" class="text" name="update_phpfpm_max_requests" value="0" /><br /><br />'; $question .= '<em>The following settings are only required if you chose process manager = dynamic</em><br /><br />'; $question .= 'Please specify the number of child processes created on startup: '; $question .= '<input type="text" class="text" name="update_phpfpm_start_servers" value="20" /><br /><br />'; $question .= 'Please specify the desired minimum number of idle server processes: '; $question .= '<input type="text" class="text" name="update_phpfpm_min_spare_servers" value="5" /><br /><br />'; $question .= 'Please specify the desired maximum number of idle server processes: '; $question .= '<input type="text" class="text" name="update_phpfpm_max_spare_servers" value="35" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.16-svn2')) { if ((int) Settings::Get('phpfpm.enabled') == 1) { $has_preconfig = true; $description = 'You can chose whether you want Froxlor to use PHP-FPM itself too now.'; $question = '<strong>Use PHP-FPM for the Froxlor Panel?:</strong> '; $question .= makeyesno('update_phpfpm_enabled_ownvhost', '1', '0', '0') . '<br /><br />'; $question .= '<strong>If \'yes\', please specify local user/group (have to exist, Froxlor does not add them automatically):</strong><br /><br />'; $question .= 'Local user: '; $question .= '<input type="text" class="text" name="update_phpfpm_httpuser" value="' . Settings::Get('system.mod_fcgid_httpuser') . '" /><br /><br />'; $question .= 'Local group: '; $question .= '<input type="text" class="text" name="update_phpfpm_httpgroup" value="' . Settings::Get('system.mod_fcgid_httpgroup') . '" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.17-svn1')) { $has_preconfig = true; $description = 'Select if you want to enable the web- and traffic-reports'; $question = '<strong>Enable?:</strong> '; $question .= makeyesno('update_system_report_enable', '1', '0', '1') . '<br /><br />'; $question .= '<strong>If \'yes\', please specify a percentage value for web- and traffic when reports are to be sent:</strong><br /><br />'; $question .= 'Webusage warning level: '; $question .= '<input type="text" class="text" name="update_system_report_webmax" value="90" /><br /><br />'; $question .= 'Traffic warning level: '; $question .= '<input type="text" class="text" name="update_system_report_trafficmax" value="90" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.18-svn2')) { $has_preconfig = true; $description = 'As you can (obviously) see, Froxlor now comes with a new theme. You also have the possibility to switch back to "Classic" if you want to.'; $question = '<strong>Select default panel theme:</strong> '; $question .= '<select name="update_default_theme">'; $themes = getThemes(); foreach ($themes as $cur_theme) { $question .= makeoption($cur_theme, $cur_theme, 'Froxlor'); } $question .= '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.28-svn4')) { $has_preconfig = true; $description = 'This version introduces a lot of profound changes:'; $description .= '<br /><ul><li>Improving the whole template system</li><li>Full UTF-8 support</li><li><strong>Removing support for the former default theme \'Classic\'</strong></li></ul>'; $description .= '<br /><br />Notice: This update will <strong>alter your Froxlor database to use UTF-8</strong> as default charset. '; $description .= 'Even though this is already tested, we <span class="red">strongly recommend</span> to '; $description .= 'test this update in a testing environment using your existing data.<br /><br />'; $question = '<strong>Select your preferred Classic Theme replacement:</strong> '; $question .= '<select name="classic_theme_replacement">'; $themes = getThemes(); foreach ($themes as $cur_theme) { $question .= makeoption($cur_theme, $cur_theme, 'Froxlor'); } $question .= '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.28-svn6')) { if (Settings::Get('system.webserver') == 'apache2') { $has_preconfig = true; $description = 'Froxlor now supports the new Apache 2.4. Please be aware that you need to load additional apache-modules in ordner to use it.<br />'; $description .= '<pre>LoadModule authz_core_module modules/mod_authz_core.so LoadModule authz_host_module modules/mod_authz_host.so</pre><br />'; $question = '<strong>Do you want to enable the Apache-2.4 modification?:</strong> '; $question .= makeyesno('update_system_apache24', '1', '0', '0'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } elseif (Settings::Get('system.webserver') == 'nginx') { $has_preconfig = true; $description = 'The path to nginx\'s fastcgi_params file is now customizable.<br /><br />'; $question = '<strong>Please enter full path to you nginx/fastcgi_params file (including filename):</strong> '; $question .= '<input type="text" class="text" name="nginx_fastcgi_params" value="/etc/nginx/fastcgi_params" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.28-rc2')) { $has_preconfig = true; $description = 'This version adds an option to append the domain-name to the document-root for domains and subdomains.<br />'; $description .= 'You can enable or disable this feature anytime from settings -> system settings.<br />'; $question = '<strong>Do you want to automatically append the domain-name to the documentroot of newly created domains?:</strong> '; $question .= makeyesno('update_system_documentroot_use_default_value', '1', '0', '0'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.28')) { $has_preconfig = true; // just an information about the new sendmail parameter (#1134) $description = 'Froxlor changed the default parameter-set of sendmail (php.ini)<br />'; $description .= 'sendmail_path = "/usr/sbin/sendmail -t <strong>-i</strong> -f {CUSTOMER_EMAIL}"<br /><br />'; $description .= 'If you don\'t have any problems with sending mails, you don\'t need to change this'; if (Settings::Get('system.mod_fcgid') == '1' || Settings::Get('phpfpm.enabled') == '1') { // information about removal of php's safe_mode $description .= '<br /><br />The php safe_mode flag has been removed as current versions of PHP<br />'; $description .= 'do not support it anymore.<br /><br />'; $description .= 'Please check your php-configurations and remove safe_mode-directives to avoid php notices/warnings.'; } $question = ''; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.29-dev1')) { // we only need to ask if fcgid|php-fpm is enabled if (Settings::Get('system.mod_fcgid') == '1' || Settings::Get('phpfpm.enabled') == '1') { $has_preconfig = true; $description = 'Standard-subdomains can now be hidden from the php-configuration overview.<br />'; $question = '<strong>Do you want to hide the standard-subdomains (this can be changed in the settings any time)?:</strong> '; $question .= makeyesno('hide_stdsubdomains', '1', '0', '0'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.29-dev2')) { $has_preconfig = true; $description = 'You can now decide whether admins/customers are able to change the theme<br />'; $question = '<strong>If you want to disallow theme-changing, select "no" from the dropdowns:</strong> '; $question .= "Admins: " . makeyesno('allow_themechange_a', '1', '0', '1') . ' '; $question .= "Customers: " . makeyesno('allow_themechange_c', '1', '0', '1'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.29-dev3')) { $has_preconfig = true; $description = 'There is now a possibility to specify AXFR servers for your bind zone-configuration<br />'; $question = '<strong>Enter a comma-separated list of AXFR servers or leave empty (default):</strong> '; $question .= '<input type="text" class="text" name="system_afxrservers" value="" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.29-dev4')) { $has_preconfig = true; $description = 'As customers can now specify ssl-certificate data for their domains, you need to specify where the generated files are stored<br />'; $question = '<strong>Specify the directory for customer ssl-certificates:</strong> '; $question .= '<input type="text" class="text" name="system_customersslpath" value="/etc/ssl/froxlor-custom/" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.29.1-dev3')) { $has_preconfig = true; $description = 'The build in logrotation-feature has been removed. Please follow the configuration-instructions for your system to enable logrotating again.'; $question = ''; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } // let the apache+fpm users know that they MUST change their config // for the domains / webserver to work after the update if (versionInUpdate($current_version, '0.9.30-dev1')) { if (Settings::Get('system.webserver') == 'apache2' && Settings::Get('phpfpm.enabled') == '1') { $has_preconfig = true; $description = 'The PHP-FPM implementation for apache2 has changed. Please look for the "<b>fastcgi.conf</b>" (Debian/Ubuntu) or "<b>70_fastcgi.conf</b>" (Gentoo) within /etc/apache2/ and change it as shown below:<br /><br />'; $description .= '<pre class="code-block"><IfModule mod_fastcgi.c> FastCgiIpcDir /var/lib/apache2/fastcgi/ <Location "/fastcgiphp"> Order Deny,Allow Deny from All # Prevent accessing this path directly Allow from env=REDIRECT_STATUS </Location> </IfModule></pre>'; $question = ''; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.31-dev2')) { if (Settings::Get('system.webserver') == 'apache2' && Settings::Get('phpfpm.enabled') == '1') { $has_preconfig = true; $description = 'The FPM socket directory is now a setting in froxlor. Its default is <b>/var/lib/apache2/fastcgi/</b>.<br/>If you are using <b>/var/run/apache2</b> in the "<b>fastcgi.conf</b>" (Debian/Ubuntu) or "<b>70_fastcgi.conf</b>" (Gentoo) please correct this path accordingly<br />'; $question = ''; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.31-dev4')) { $has_preconfig = true; $description = 'The template-variable {PASSWORD} has been replaced with {LINK}. Please update your password reset templates!<br />'; $question = ''; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.31-dev5')) { $has_preconfig = true; $description = 'You can enable/disable error-reporting for admins and customers!<br /><br />'; $question = '<strong>Do you want to enable error-reporting for admins? (default: yes):</strong> '; $question .= makeyesno('update_error_report_admin', '1', '0', '1') . '<br />'; $question .= '<strong>Do you want to enable error-reporting for customers? (default: no):</strong> '; $question .= makeyesno('update_error_report_customer', '1', '0', '0'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.31-rc2')) { $has_preconfig = true; $description = 'You can enable/disable the display/usage of the news-feed for admins<br /><br />'; $question = '<strong>Do you want to enable the news-feed for admins? (default: yes):</strong> '; $question .= makeyesno('update_admin_news_feed', '1', '0', '1') . '<br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.32-dev2')) { $has_preconfig = true; $description = 'To enable logging of the mail-traffic, you need to set the following settings accordingly<br /><br />'; $question = '<strong>Do you want to enable the traffic collection for mail? (default: yes):</strong> '; $question .= makeyesno('mailtraffic_enabled', '1', '0', '1') . '<br />'; $question .= '<strong>Mail Transfer Agent</strong><br />'; $question .= 'Type of your MTA: '; $question .= '<select name="mtaserver">'; $question .= makeoption('Postfix', 'postfix', 'postfix'); $question .= makeoption('Exim4', 'exim4', 'postfix'); $question .= '</select><br />'; $question .= 'Logfile for your MTA: '; $question .= '<input type="text" class="text" name="mtalog" value="/var/log/mail.log" /><br />'; $question .= '<strong>Mail Delivery Agent</strong><br />'; $question .= 'Type of your MDA: '; $question .= '<select name="mdaserver">'; $question .= makeoption('Dovecot', 'dovecot', 'dovecot'); $question .= makeoption('Courier', 'courier', 'dovecot'); $question .= '</select><br /><br />'; $question .= 'Logfile for your MDA: '; $question .= '<input type="text" class="text" name="mdalog" value="/var/log/mail.log" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.32-dev5')) { $has_preconfig = true; $description = 'Froxlor now generates a cron-configuration file for the cron-daemon. Please set a filename which will be included automatically by your crond (e.g. files in /etc/cron.d/)<br /><br />'; $question = '<strong>Path to the cron-service configuration-file.</strong> This file will be updated regularly and automatically by froxlor.<br />Note: please <b>be sure</b> to use the same filename as for the main froxlor cronjob (default: /etc/cron.d/froxlor)!<br />'; $question .= '<input type="text" class="text" name="crondfile" value="/etc/cron.d/froxlor" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.32-dev6')) { $has_preconfig = true; $description = 'In order for the new cron.d file to work properly, we need to know about the cron-service reload command.<br /><br />'; $question = '<strong>Please specify the reload-command of your cron-daemon</strong> (default: /etc/init.d/cron reload)<br />'; $question .= '<input type="text" class="text" name="crondreload" value="/etc/init.d/cron reload" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.32-rc2')) { $has_preconfig = true; $description = 'To customize the command which executes the cronjob (php - basically) change the path below according to your system.<br /><br />'; $question = '<strong>Please specify the command to execute cronscripts</strong> (default: "/usr/bin/nice -n 5 /usr/bin/php5 -q")<br />'; $question .= '<input type="text" class="text" name="croncmdline" value="/usr/bin/nice -n 5 /usr/bin/php5 -q" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.33-dev1')) { $has_preconfig = true; $description = 'You can enable/disable the display/usage of the custom newsfeed for customers.<br /><br />'; $question = '<strong>Do you want to enable the custom newsfeed for customer? (default: no):</strong> '; $question .= makeyesno('customer_show_news_feed', '1', '0', '0') . '<br />'; $question .= '<strong>You have to set the URL for your RSS-feed here, if you have chosen to enable the custom newsfeed on the customer-dashboard:</strong> '; $question .= '<input type="text" class="text" name="customer_news_feed_url" value="" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.33-dev2')) { // only if bind is used - if not the default will be set, which is '0' (off) if (Settings::get('system.bind_enable') == 1) { $has_preconfig = true; $description = 'You can enable/disable the generation of the bind-zone / config for the system hostname.<br /><br />'; $question = '<strong>Do you want to generate a bind-zone for the system-hostname? (default: no):</strong> '; $question .= makeyesno('dns_createhostnameentry', '1', '0', '0') . '<br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.33-rc2')) { $has_preconfig = true; $description = 'You can chose whether you want to receive an e-mail on cronjob errors. Keep in mind that this can lead to an e-mail being sent every 5 minutes.<br /><br />'; $question = '<strong>Do you want to receive cron-errors via mail? (default: no):</strong> '; $question .= makeyesno('system_send_cron_errors', '1', '0', '0') . '<br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.34-dev3')) { $has_preconfig = true; $description = 'Froxlor now requires the PHP mbstring-extension as we need to be multibyte-character safe in some cases'; $question = '<strong>PHP mbstring</strong> is currently: '; if (!extension_loaded('mbstring')) { $question .= '<span class="red">not installed/loaded</span>'; $question .= '<br>Please install the PHP mbstring extension in order to finish the update'; } else { $question .= '<span class="green">installed/loaded</span>'; } $question .= '<br>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } }
} if ($_POST['error403path'] === '' || validateUrl($idna_convert->encode($_POST['error403path']))) { $error403path = $_POST['error403path']; } else { standard_error('mustbeurl'); } if ($_POST['error500path'] === '' || validateUrl($idna_convert->encode($_POST['error500path']))) { $error500path = $_POST['error500path']; } else { standard_error('mustbeurl'); } if ($option_indexes != $result['options_indexes'] || $error404path != $result['error404path'] || $error403path != $result['error403path'] || $error500path != $result['error500path']) { inserttask('1'); $db->query('UPDATE `' . TABLE_PANEL_HTACCESS . '` SET `options_indexes` = "' . $db->escape($option_indexes) . '", `error404path` = "' . $db->escape($error404path) . '", `error403path` = "' . $db->escape($error403path) . '", `error500path` = "' . $db->escape($error500path) . '" WHERE `customerid` = "' . (int) $userinfo['customerid'] . '" AND `id` = "' . (int) $id . '"'); $log->logAction(USR_ACTION, LOG_INFO, "edited htaccess for '" . str_replace($userinfo['documentroot'], '', $result['path']) . "'"); } redirectTo($filename, array('page' => $page, 's' => $s)); } else { if (strpos($result['path'], $userinfo['documentroot']) === 0) { $result['path'] = substr($result['path'], strlen($userinfo['documentroot'])); } $result['error404path'] = $result['error404path']; $result['error403path'] = $result['error403path']; $result['error500path'] = $result['error500path']; $options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']); $result = htmlentities_array($result); eval("echo \"" . getTemplate("extras/htaccess_edit") . "\";"); } } } }
standard_error('youhavealreadyacatchallforthisdomain'); exit; } else { $db->query("INSERT INTO `" . TABLE_MAIL_VIRTUAL . "` (`customerid`, `email`, `email_full`, `iscatchall`, `domainid`) VALUES ('" . (int) $userinfo['customerid'] . "', '" . $db->escape($email) . "', '" . $db->escape($email_full) . "', '" . $db->escape($iscatchall) . "', '" . (int) $domain_check['id'] . "')"); $address_id = $db->insert_id(); $db->query("UPDATE " . TABLE_PANEL_CUSTOMERS . " SET `emails_used` = `emails_used` + 1 WHERE `customerid`='" . (int) $userinfo['customerid'] . "'"); $log->logAction(USR_ACTION, LOG_INFO, "added email address '" . $email_full . "'"); redirectTo($filename, array('page' => $page, 'action' => 'edit', 'id' => $address_id, 's' => $s)); } } else { $result = $db->query("SELECT `id`, `domain`, `customerid` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int) $userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC"); $domains = ''; while ($row = $db->fetch_array($result)) { $domains .= makeoption($idna_convert->decode($row['domain']), $row['domain']); } $iscatchall = makeyesno('iscatchall', '1', '0', '0'); eval("echo \"" . getTemplate("email/emails_add") . "\";"); } } else { standard_error('allresourcesused'); } } elseif ($action == 'edit' && $id != 0) { $result = $db->query_first("SELECT `v`.`id`, `v`.`email`, `v`.`email_full`, `v`.`iscatchall`, `v`.`destination`, `v`.`customerid`, `v`.`popaccountid`, `u`.`quota` FROM `" . TABLE_MAIL_VIRTUAL . "` `v` LEFT JOIN `" . TABLE_MAIL_USERS . "` `u` ON(`v`.`popaccountid` = `u`.`id`)WHERE `v`.`customerid`='" . (int) $userinfo['customerid'] . "' AND `v`.`id`='" . (int) $id . "'"); if (isset($result['email']) && $result['email'] != '') { $result['email'] = $idna_convert->decode($result['email']); $result['email_full'] = $idna_convert->decode($result['email_full']); $result['destination'] = explode(' ', $result['destination']); uasort($result['destination'], 'strcasecmp'); $forwarders = ''; $forwarders_count = 0; while (list($dest_id, $destination) = each($result['destination'])) {
if ($result['servicestart_date'] != '0000-00-00' && $result['serviceend_date'] == '0000-00-00') { // We are ending the service now. $serviceend_date = date('Y-m-d'); // We don't need to set servicestart_date to 0 because the billing module will do this after the final invoice } } $db->query('UPDATE `' . TABLE_BILLING_SERVICE_OTHER . '` SET `templateid` = \'' . $db->escape($templateid) . '\', `caption_setup` = \'' . $db->escape($caption_setup) . '\', `caption_interval` = \'' . $db->escape($caption_interval) . '\', `taxclass` = \'' . $db->escape($taxclass) . '\', `quantity` = \'' . $db->escape($quantity) . '\', `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) . '\', `service_active` = \'' . $db->escape($service_active) . '\', `servicestart_date` = \'' . $db->escape($servicestart_date) . '\', `serviceend_date` = \'' . $db->escape($serviceend_date) . '\' WHERE `id` = \'' . $id . '\' '); $redirect_props = array('page' => $page, 's' => $s); if (isset($_POST['enable_billing_data_edit'])) { $redirect_props['action'] = $action; $redirect_props['id'] = $id; $redirect_props['override_billing_data_edit'] = '1'; } redirectTo($filename, $redirect_props); } else { $interval_type = getIntervalTypes('option', $result['interval_type']); $service_active = makeyesno('service_active', '1', '0', $result['service_active']); $interval_payment = makeoption($lng['service']['interval_payment_prepaid'], '0', $result['interval_payment'], true) . makeoption($lng['service']['interval_payment_postpaid'], '1', $result['interval_payment'], true); $other_templates_option = ''; foreach ($other_templates as $templateid => $caption) { $other_templates_option .= makeoption($caption, $templateid, $result['templateid']); } $taxclasses_option = ''; foreach ($taxclasses as $classid => $classname) { $taxclasses_option .= makeoption($classname, $classid, $result['taxclass']); } eval("echo \"" . getTemplate("billing/other_edit") . "\";"); } } } }
$ssl_cert_file = makeCorrectFile($ssl_cert_file); } if ($ssl_key_file != '') { $ssl_key_file = makeCorrectFile($ssl_key_file); } if ($ssl_ca_file != '') { $ssl_ca_file = makeCorrectFile($ssl_ca_file); } if ($result['ip'] != $ip && $result['ip'] == $settings['system']['ipaddress'] && $result_sameipotherport['id'] == '') { standard_error('cantchangesystemip'); } elseif ($result_checkfordouble['id'] != '' && $result_checkfordouble['id'] != $id) { standard_error('myipnotdouble'); } else { $db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "` SET `ip`='" . $db->escape($ip) . "', `port`='" . (int) $port . "', `listen_statement`='" . (int) $listen_statement . "', `namevirtualhost_statement`='" . (int) $namevirtualhost_statement . "', `vhostcontainer`='" . (int) $vhostcontainer . "', `vhostcontainer_servername_statement`='" . (int) $vhostcontainer_servername_statement . "', `specialsettings`='" . $db->escape($specialsettings) . "', `ssl`='" . (int) $ssl . "', `ssl_cert_file`='" . $db->escape($ssl_cert_file) . "', `ssl_key_file`='" . $db->escape($ssl_key_file) . "', `ssl_ca_file`='" . $db->escape($ssl_ca_file) . "', `default_vhostconf_domain`='" . $db->escape($default_vhostconf_domain) . "' WHERE `id`='" . (int) $id . "'"); $log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'"); inserttask('1'); inserttask('4'); redirectTo($filename, array('page' => $page, 's' => $s)); } } else { $enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']); $result = htmlentities_array($result); $listen_statement = makeyesno('listen_statement', '1', '0', $result['listen_statement']); $namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', $result['namevirtualhost_statement']); $vhostcontainer = makeyesno('vhostcontainer', '1', '0', $result['vhostcontainer']); $vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', $result['vhostcontainer_servername_statement']); eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";"); } } } }
* Include our init.php, which manages Sessions, Language etc. */ require "./lib/init.php"; if (isset($_POST['id'])) { $id = intval($_POST['id']); } elseif (isset($_GET['id'])) { $id = intval($_GET['id']); } if ($page == 'overview') { $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras"); eval("echo \"" . getTemplate("extras/extras") . "\";"); } elseif ($page == 'backup') { $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras_backup"); $result = $db->query("SELECT `backup_enabled` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int) $userinfo['customerid'] . "'"); $row = $db->fetch_array($result); $backup_enabled = makeyesno('backup_enabled', '1', '0', $row['backup_enabled']); if (isset($_POST['send']) && $_POST['send'] == 'send') { $backup_enabled = $_POST['backup_enabled'] == '1' ? '1' : '0'; $backup_ftp_enabled = $_POST['backup_ftp_enabled'] == '1' ? '1' : '0'; $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `backup_enabled`='" . $backup_enabled . "' WHERE `customerid`='" . (int) $userinfo['customerid'] . "'"); redirectTo($filename, array('page' => $page, 's' => $s)); } $backup_data = (include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.backup.php'); $backup_form = htmlform::genHTMLForm($backup_data); $title = $backup_data['backup']['title']; $image = $backup_data['backup']['image']; eval("echo \"" . getTemplate("extras/backup") . "\";"); } elseif ($page == 'htpasswds') { if ($action == '') { $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras::htpasswds"); $fields = array('username' => $lng['login']['username'], 'path' => $lng['panel']['path']);
$ssl = makeyesno('ssl', '1', '0', $result['ssl']); $ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']); $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); $subcanemaildomain .= makeoption($lng['admin']['subcanemaildomain']['always'], '3', $result['subcanemaildomain'], true, true); $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']); $speciallogfile = $result['speciallogfile'] == 1 ? $lng['panel']['yes'] : $lng['panel']['no']; $result['add_date'] = date('Y-m-d', $result['add_date']); if ($settings['billing']['activate_billing'] == '1') { $interval_type = getIntervalTypes('option', $result['interval_type']); $service_active = ($result['service_active'] == '0' ? $lng['panel']['no'] : '') . ($result['service_active'] == '1' ? $lng['panel']['yes'] : ''); $service_active_options = makeyesno('service_active', '1', '0', $result['service_active']); $interval_payment = ($result['interval_payment'] == '0' ? $lng['service']['interval_payment_prepaid'] : '') . ($result['interval_payment'] == '1' ? $lng['service']['interval_payment_postpaid'] : ''); $interval_payment_options = makeoption($lng['service']['interval_payment_prepaid'], '0', $result['interval_payment'], true) . makeoption($lng['service']['interval_payment_postpaid'], '1', $result['interval_payment'], true); $taxclasses_option = ''; foreach ($taxclasses as $classid => $classname) { $taxclasses_option .= makeoption($classname, $classid, $result['taxclass']); } } $phpconfigs = ''; $phpconfigs_result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`"); while ($phpconfigs_row = $db->fetch_array($phpconfigs_result)) { $phpconfigs .= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true); } $result = htmlentities_array($result); eval("echo \"" . getTemplate("domains/domains_edit") . "\";"); }
$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']); $can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', $result['can_manage_aps_packages']); if ($settings['billing']['activate_billing'] == '1') { $edit_billingdata = makeyesno('edit_billingdata', '1', '0', $result['edit_billingdata']); $result['additional_traffic_unit'] = round($result['additional_traffic_unit'] / (1024 * 1024), 4); $result['additional_diskspace_unit'] = round($result['additional_diskspace_unit'] / 1024, 4); $interval_type = getIntervalTypes('option', $result['interval_type']); $service_active = makeyesno('service_active', '1', '0', $result['service_active']); $interval_payment = makeoption($lng['service']['interval_payment_prepaid'], '0', $result['interval_payment'], true) . makeoption($lng['service']['interval_payment_postpaid'], '1', $result['interval_payment'], true); $payment_method = ''; foreach ($lng['customer']['payment_methods'] as $payment_method_id => $payment_method_name) { $payment_method .= makeoption($payment_method_name, $payment_method_id, (int) $result['payment_method'], true); } $taxclasses_option = ''; foreach ($taxclasses as $classid => $classname) { $taxclasses_option .= makeoption($classname, $classid, $result['taxclass']); } $calc_tax = makeyesno('calc_tax', '1', '0', $result['calc_tax']); $service_categories_option_once = ''; $service_categories_option_period = ''; foreach ($service_categories as $service_category_id => $service_category_caption) { $service_categories_option_once .= makeoption($service_category_caption, $service_category_id, explode('-', $result['customer_categories_once'])); $service_categories_option_period .= makeoption($service_category_caption, $service_category_id, explode('-', $result['customer_categories_period'])); } } $result = htmlentities_array($result); eval('echo "' . getTemplate('admins/admins_edit') . '";'); } } } }
$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', $result['standardsubdomain'] != '0' ? '1' : '0'); $phpenabled = makeyesno('phpenabled', '1', '0', $result['phpenabled']); $deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']); $email_imap = makeyesno('email_imap', '1', '0', $result['imap']); $email_pop3 = makeyesno('email_pop3', '1', '0', $result['pop3']); if ($settings['billing']['activate_billing'] == '1') { $result['additional_traffic_unit'] = round($result['additional_traffic_unit'] / (1024 * 1024), 4); $result['additional_diskspace_unit'] = round($result['additional_diskspace_unit'] / 1024, 4); $result['included_domains_tld'] = $idna_convert->decode($result['included_domains_tld']); $interval_type = getIntervalTypes('option', $result['interval_type']); $service_active = ($result['service_active'] == '0' ? $lng['panel']['no'] : '') . ($result['service_active'] == '1' ? $lng['panel']['yes'] : ''); $service_active_options = makeyesno('service_active', '1', '0', $result['service_active']); $interval_payment = ($result['interval_payment'] == '0' ? $lng['service']['interval_payment_prepaid'] : '') . ($result['interval_payment'] == '1' ? $lng['service']['interval_payment_postpaid'] : ''); $interval_payment_options = makeoption($lng['service']['interval_payment_prepaid'], '0', $result['interval_payment'], true) . makeoption($lng['service']['interval_payment_postpaid'], '1', $result['interval_payment'], true); $calc_tax = ($result['calc_tax'] == '0' ? $lng['panel']['no'] : '') . ($result['calc_tax'] == '1' ? $lng['panel']['yes'] : ''); $calc_tax_options = makeyesno('calc_tax', '1', '0', $result['calc_tax']); $payment_method = ''; $taxclasses_option = ''; foreach ($lng['customer']['payment_methods'] as $payment_method_id => $payment_method_name) { $payment_method .= makeoption($payment_method_name, $payment_method_id, (int) $result['payment_method'], true); } foreach ($taxclasses as $classid => $classname) { $taxclasses_option .= makeoption($classname, $classid, $result['taxclass']); } } $result = htmlentities_array($result); eval("echo \"" . getTemplate("customers/customers_edit") . "\";"); } } } elseif ($action == 'pdf' && $settings['billing']['activate_billing'] == '1') { $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int) $id . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int) $userinfo['adminid'] . "' "));
if ($result['tickets'] == '-1') { $result['tickets'] = ''; } $mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, $result['mysqls'], true, true); if ($result['mysqls'] == '-1') { $result['mysqls'] = ''; } $number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, $result['aps_packages'], true, true); if ($result['aps_packages'] == '-1') { $result['aps_packages'] = ''; } #$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', (($result['standardsubdomain'] != '0') ? '1' : '0')); #$phpenabled = makeyesno('phpenabled', '1', '0', $result['phpenabled']); #$perlenabled = makeyesno('perlenabled', '1', '0', $result['perlenabled']); #$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']); #$email_imap = makeyesno('email_imap', '1', '0', $result['imap']); #$email_pop3 = makeyesno('email_pop3', '1', '0', $result['pop3']); $backup_allowed = makeyesno('backup_allowed', '1', '0', $result['backup_allowed']); $result = htmlentities_array($result); $gender_options = makeoption($lng['gender']['undef'], 0, $result['gender'] == '0' ? true : false, true, true); $gender_options .= makeoption($lng['gender']['male'], 1, $result['gender'] == '1' ? true : false, true, true); $gender_options .= makeoption($lng['gender']['female'], 2, $result['gender'] == '2' ? true : false, true, true); $customer_edit_data = (include_once dirname(__FILE__) . '/lib/formfields/admin/customer/formfield.customer_edit.php'); $customer_edit_form = htmlform::genHTMLForm($customer_edit_data); $title = $customer_edit_data['customer_edit']['title']; $image = $customer_edit_data['customer_edit']['image']; eval("echo \"" . getTemplate("customers/customers_edit") . "\";"); } } } }
} redirectTo($filename, array('page' => $page, 's' => $s)); } } else { $result['domain'] = $idna_convert->decode($result['domain']); $domains = makeoption($lng['domains']['noaliasdomain'], 0, $result['aliasdomain'], true); $result_domains = $db->query('SELECT `d`.`id`, `d`.`domain` FROM `' . TABLE_PANEL_DOMAINS . '` `d`, `' . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int) $result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int) $userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC"); while ($row_domain = $db->fetch_array($result_domains)) { $domains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']); } if (preg_match('/^https?\\:\\/\\//', $result['documentroot']) && validateUrl($idna_convert->encode($result['documentroot'])) && $settings['panel']['pathedit'] == 'Dropdown') { $urlvalue = $result['documentroot']; $pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']); } else { $urlvalue = ''; $pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']); } $ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']); $iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']); $isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']); $openbasedir = makeoption($lng['domain']['docroot'], 0, $result['openbasedir_path'], true) . makeoption($lng['domain']['homedir'], 1, $result['openbasedir_path'], true); $result = htmlentities_array($result); if ($settings['system']['use_ssl'] == '1') { } eval('echo "' . getTemplate('domains/domains_edit') . '";'); } } else { standard_error('domains_canteditdomain'); } } }
/** * checks if the new-version has some updating to do * * @param boolean $has_preconfig pointer to check if any preconfig has to be output * @param string $return pointer to output string * @param string $current_version current froxlor version * * @return null */ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) { global $settings, $lng, $db; if (versionInUpdate($current_version, '0.9.4-svn2')) { $has_preconfig = true; $description = 'Froxlor now enables the usage of a domain-wildcard entry and subdomains for this domain at the same time (subdomains are parsed before the main-domain vhost container).'; $description .= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.<br />'; $description .= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.'; $question = '<strong>Do you want to use wildcard-entries for existing domains?:</strong> '; $question .= makeyesno('update_domainwildcardentry', '1', '0', '1'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.6-svn2')) { if (!PHPMailer::ValidateAddress($settings['panel']['adminmail'])) { $has_preconfig = true; $description = 'Froxlor uses a newer version of the phpMailerClass and determined that your current admin-mail address is invalid.'; $question = '<strong>Please specify a new admin-email address:</strong> <input type="text" class="text" name="update_adminmail" value="' . $settings['panel']['adminmail'] . '" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.6-svn3')) { $has_preconfig = true; $description = 'You now have the possibility to define default error-documents for your webserver which replace the default webserver error-messages.'; $question = '<strong>Do you want to enable default error-documents?:</strong> '; $question .= makeyesno('update_deferr_enable', '1', '0', '0') . '<br /><br />'; if ($settings['system']['webserver'] == 'apache2') { $question .= 'Path/URL for error 500: <input type="text" class="text" name="update_deferr_500" /><br /><br />'; $question .= 'Path/URL for error 401: <input type="text" class="text" name="update_deferr_401" /><br /><br />'; $question .= 'Path/URL for error 403: <input type="text" class="text" name="update_deferr_403" /><br /><br />'; } $question .= 'Path/URL for error 404: <input type="text" class="text" name="update_deferr_404" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.6-svn4')) { $has_preconfig = true; $description = 'You can define a default support-ticket priority level which is pre-selected for new support-tickets.'; $question = '<strong>Which should be the default ticket-priority?:</strong> '; $question .= '<select name="update_deftic_priority">'; $priorities = makeoption($lng['ticket']['high'], '1', '2'); $priorities .= makeoption($lng['ticket']['normal'], '2', '2'); $priorities .= makeoption($lng['ticket']['low'], '3', '2'); $question .= $priorities . '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.6-svn5')) { $has_preconfig = true; $description = 'If you have more than one PHP configurations defined in Froxlor you can now set a default one which will be used for every domain.'; $question = '<strong>Select default PHP configuration:</strong> '; $question .= '<select name="update_defsys_phpconfig">'; $configs_array = getPhpConfigs(); $configs = ''; foreach ($configs_array as $idx => $desc) { $configs .= makeoption($desc, $idx, '1'); } $question .= $configs . '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.6-svn6')) { $has_preconfig = true; $description = 'For the new FTP-quota feature, you can now chose the currently used ftpd-software.'; $question = '<strong>Used FTPd-software:</strong> '; $question .= '<select name="update_defsys_ftpserver">'; $question .= makeoption('ProFTPd', 'proftpd', 'proftpd'); $question .= makeoption('PureFTPd', 'pureftpd', 'proftpd'); $question .= '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.7-svn1')) { $has_preconfig = true; $description = 'You can now choose whether customers can select the http-redirect code and which of them acts as default.'; $question = '<strong>Allow customer chosen redirects?:</strong> '; $question .= makeyesno('update_customredirect_enable', '1', '0', '1') . '<br /><br />'; $question .= '<strong>Select default redirect code (default: empty):</strong> '; $question .= '<select name="update_customredirect_default">'; $redirects = makeoption('--- (' . $lng['redirect_desc']['rc_default'] . ')', 1, '1'); $redirects .= makeoption('301 (' . $lng['redirect_desc']['rc_movedperm'] . ')', 2, '1'); $redirects .= makeoption('302 (' . $lng['redirect_desc']['rc_found'] . ')', 3, '1'); $redirects .= makeoption('303 (' . $lng['redirect_desc']['rc_seeother'] . ')', 4, '1'); $redirects .= makeoption('307 (' . $lng['redirect_desc']['rc_tempred'] . ')', 5, '1'); $question .= $redirects . '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.7-svn2')) { $result = $db->query("SELECT `domain` FROM " . TABLE_PANEL_DOMAINS . " WHERE `documentroot` LIKE '%:%' AND `documentroot` NOT LIKE 'http://%' AND `openbasedir_path` = '0' AND `openbasedir` = '1'"); $wrongOpenBasedirDomain = array(); while ($row = $db->fetch_array($result)) { $wrongOpenBasedirDomain[] = $row['domain']; } if (count($wrongOpenBasedirDomain) > 0) { $has_preconfig = true; $description = 'Resetting the open_basedir to customer - root'; $question = '<strong>Due to a security - issue regarding open_basedir, Froxlor will set the open_basedir for the following domains to the customers root instead of the chosen documentroot:</strong><br /> '; $question .= '<ul>'; $idna_convert = new idna_convert_wrapper(); foreach ($wrongOpenBasedirDomain as $domain) { $question .= '<li>' . $idna_convert->decode($domain) . '</li>'; } $question .= '</ul>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.9-svn1')) { $has_preconfig = true; $description = 'When entering MX servers to Froxlor there was no mail-, imap-, pop3- and smtp-"A record" created. You can now chose whether this should be done or not.'; $question = '<strong>Do you want these A-records to be created even with MX servers given?:</strong> '; $question .= makeyesno('update_defdns_mailentry', '1', '0', '0'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.10-svn1')) { $has_nouser = false; $has_nogroup = false; $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'"); if (!isset($result) || !isset($result['value'])) { $has_preconfig = true; $has_nouser = true; $guessed_user = '******'; if (function_exists('posix_getuid') && function_exists('posix_getpwuid')) { $_httpuser = posix_getpwuid(posix_getuid()); $guessed_user = $_httpuser['name']; } } $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'"); if (!isset($result) || !isset($result['value'])) { $has_preconfig = true; $has_nogroup = true; $guessed_group = 'www-data'; if (function_exists('posix_getgid') && function_exists('posix_getgrgid')) { $_httpgroup = posix_getgrgid(posix_getgid()); $guessed_group = $_httpgroup['name']; } } if ($has_nouser || $has_nogroup) { $description = 'Please enter the correct username/groupname of the webserver on your system We\'re guessing the user but it might not be correct, so please check.'; if ($has_nouser) { $question = '<strong>Please enter the webservers username:</strong> <input type="text" class="text" name="update_httpuser" value="' . $guessed_user . '" />'; } elseif ($has_nogroup) { $question2 = '<strong>Please enter the webservers groupname:</strong> <input type="text" class="text" name="update_httpgroup" value="' . $guessed_group . '" />'; if ($has_nouser) { $question .= '<br /><br />' . $question2; } else { $question = $question2; } } eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.10')) { $has_preconfig = true; $description = 'you can now decide whether Froxlor should be reached via hostname/froxlor or directly via the hostname.'; $question = '<strong>Do you want Froxlor to be reached directly via the hostname?:</strong> '; $question .= makeyesno('update_directlyviahostname', '1', '0', '0'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.11-svn1')) { $has_preconfig = true; $description = 'It is possible to enhance security with setting a regular expression to force your customers to enter more complex passwords.'; $question = '<strong>Enter a regular expression to force a higher password complexity (leave empty for none):</strong> '; $question .= '<input type="text" class="text" name="update_pwdregex" value="" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.11-svn3')) { $has_preconfig = true; $description = 'As Froxlor can now handle perl, you have to specify where the perl executable is (only if you\'re running lighttpd, else just leave empty).'; $question = '<strong>Path to perl (default \'/usr/bin/perl\'):</strong> '; $question .= '<input type="text" class="text" name="update_perlpath" value="/usr/bin/perl" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.12-svn1')) { if ($settings['system']['mod_fcgid'] == 1) { $has_preconfig = true; $description = 'You can chose whether you want Froxlor to use FCGID itself too now.'; $question = '<strong>Use FCGID for the Froxlor Panel?:</strong> '; $question .= makeyesno('update_fcgid_ownvhost', '1', '0', '0') . '<br /><br />'; $question .= '<strong>If \'yes\', please specify local user/group (have to exist, Froxlor does not add them automatically):</strong><br /><br />'; $question .= 'Local user: '; $question .= '<input type="text" class="text" name="update_fcgid_httpuser" value="froxlorlocal" /><br /><br />'; $question .= 'Local group: '; $question .= '<input type="text" class="text" name="update_fcgid_httpgroup" value="froxlorlocal" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.12-svn2')) { $has_preconfig = true; $description = 'Many apache user will have problems using perl/CGI as the customer docroots are not within the suexec path. Froxlor provides a simple workaround for that.'; $question = '<strong>Enable Apache/SuExec/Perl workaround?:</strong> '; $question .= makeyesno('update_perl_suexecworkaround', '1', '0', '0') . '<br /><br />'; $question .= '<strong>If \'yes\', please specify a path within the suexec path where Froxlor will create symlinks to customer perl-enabled paths:</strong><br /><br />'; $question .= 'Path for symlinks (must be within suexec path): '; $question .= '<input type="text" class="text" name="update_perl_suexecpath" value="/var/www/cgi-bin/" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.12-svn4')) { if ((int) $settings['system']['awstats_enabled'] == 1) { $has_preconfig = true; $description = 'Due to different paths of awstats_buildstaticpages.pl and awstats.pl you can set a different path for awstats.pl now.'; $question = '<strong>Path to \'awstats.pl\'?:</strong> '; $question .= '<input type="text" class="text" name="update_awstats_awstatspath" value="' . $settings['system']['awstats_path'] . '" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.13-svn1')) { if ((int) $settings['autoresponder']['autoresponder_active'] == 1) { $has_preconfig = true; $description = 'Froxlor can now limit the number of autoresponder-entries for each user. Here you can set the value which will be available for each customer (Of course you can change the value for each customer separately after the update).'; $question = '<strong>How many autoresponders should your customers be able to add?:</strong> '; $question .= '<input type="text" class="text" name="update_autoresponder_default" value="0" /> ' . makecheckbox('update_autoresponder_default', $lng['customer']['unlimited'], '-1', false, 0, true, true) . '<br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.13.1')) { if ((int) $settings['system']['mod_fcgid_ownvhost'] == 1) { $has_preconfig = true; $description = 'You have FCGID for Froxlor itself activated. You can now specify a PHP-configuration for this.'; $question = '<strong>Select Froxlor-vhost PHP configuration:</strong> '; $question .= '<select name="update_defaultini_ownvhost">'; $configs_array = getPhpConfigs(); $configs = ''; foreach ($configs_array as $idx => $desc) { $configs .= makeoption($desc, $idx, '1'); } $question .= $configs . '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.14-svn3')) { if ((int) $settings['system']['awstats_enabled'] == 1) { $has_preconfig = true; $description = 'To have icons in AWStats statistic-pages please enter the path to AWStats icons folder.'; $question = '<strong>Path to AWSTats icons folder:</strong> '; $question .= '<input type="text" class="text" name="update_awstats_icons" value="' . $settings['system']['awstats_icons'] . '" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.14-svn4')) { if ((int) $settings['system']['use_ssl'] == 1) { $has_preconfig = true; $description = 'Froxlor now has the possibility to set \'SSLCertificateChainFile\' for the apache webserver.'; $question = '<strong>Enter filename (leave empty for none):</strong> '; $question .= '<input type="text" class="text" name="update_ssl_cert_chainfile" value="' . $settings['system']['ssl_cert_chainfile'] . '" />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.14-svn6')) { $has_preconfig = true; $description = 'You can now allow customers to use any of their domains as username for the login.'; $question = '<strong>Do you want to enable domain-login for all customers?:</strong> '; $question .= makeyesno('update_allow_domain_login', '1', '0', '0'); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.14-svn10')) { $has_preconfig = true; $description = '<strong>This update removes the unsupported real-time option. Additionally the deprecated tables for navigation and cronscripts are removed, any modules using these tables need to be updated to the new structure!</strong>'; $question = ''; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.16-svn1')) { $has_preconfig = true; $description = 'Froxlor now features support for php-fpm.'; $question = '<strong>Do you want to enable php-fpm?:</strong> '; $question .= makeyesno('update_phpfpm_enabled', '1', '0', '0') . '<br /><br />'; $question .= 'If \'yes\', please specify the configuration directory: '; $question .= '<input type="text" class="text" name="update_phpfpm_configdir" value="/etc/php-fpm.d/" /><br /><br />'; $question .= 'Please specify the temporary files directory: '; $question .= '<input type="text" class="text" name="update_phpfpm_tmpdir" value="/var/customers/tmp/" /><br /><br />'; $question .= 'Please specify the PEAR directory: '; $question .= '<input type="text" class="text" name="update_phpfpm_peardir" value="/usr/share/php/:/usr/share/php5/" /><br /><br />'; $question .= 'Please specify the php-fpm restart-command: '; $question .= '<input type="text" class="text" name="update_phpfpm_reload" value="/etc/init.d/php-fpm restart" /><br /><br />'; $question .= 'Please specify the php-fpm rocess manager control: '; $question .= '<select name="update_phpfpm_pm">'; $redirects = makeoption('static', 'static', 'static'); $redirects .= makeoption('dynamic', 'dynamic', 'static'); $question .= $redirects . '</select><br /><br />'; $question .= 'Please specify the number of child processes: '; $question .= '<input type="text" class="text" name="update_phpfpm_max_children" value="1" /><br /><br />'; $question .= 'Please specify the number of requests per child before respawning: '; $question .= '<input type="text" class="text" name="update_phpfpm_max_requests" value="0" /><br /><br />'; $question .= '<em>The following settings are only required if you chose process manager = dynamic</em><br /><br />'; $question .= 'Please specify the number of child processes created on startup: '; $question .= '<input type="text" class="text" name="update_phpfpm_start_servers" value="20" /><br /><br />'; $question .= 'Please specify the desired minimum number of idle server processes: '; $question .= '<input type="text" class="text" name="update_phpfpm_min_spare_servers" value="5" /><br /><br />'; $question .= 'Please specify the desired maximum number of idle server processes: '; $question .= '<input type="text" class="text" name="update_phpfpm_max_spare_servers" value="35" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.16-svn2')) { if ((int) $settings['phpfpm']['enabled'] == 1) { $has_preconfig = true; $description = 'You can chose whether you want Froxlor to use PHP-FPM itself too now.'; $question = '<strong>Use PHP-FPM for the Froxlor Panel?:</strong> '; $question .= makeyesno('update_phpfpm_enabled_ownvhost', '1', '0', '0') . '<br /><br />'; $question .= '<strong>If \'yes\', please specify local user/group (have to exist, Froxlor does not add them automatically):</strong><br /><br />'; $question .= 'Local user: '; $question .= '<input type="text" class="text" name="update_phpfpm_httpuser" value="' . $settings['system']['mod_fcgid_httpuser'] . '" /><br /><br />'; $question .= 'Local group: '; $question .= '<input type="text" class="text" name="update_phpfpm_httpgroup" value="' . $settings['system']['mod_fcgid_httpgroup'] . '" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if (versionInUpdate($current_version, '0.9.17-svn1')) { $has_preconfig = true; $description = 'Select if you want to enable the web- and traffic-reports'; $question = '<strong>Enable?:</strong> '; $question .= makeyesno('update_system_report_enable', '1', '0', '1') . '<br /><br />'; $question .= '<strong>If \'yes\', please specify a percentage value for web- and traffic when reports are to be sent:</strong><br /><br />'; $question .= 'Webusage warning level: '; $question .= '<input type="text" class="text" name="update_system_report_webmax" value="90" /><br /><br />'; $question .= 'Traffic warning level: '; $question .= '<input type="text" class="text" name="update_system_report_trafficmax" value="90" /><br />'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if (versionInUpdate($current_version, '0.9.18-svn2')) { $has_preconfig = true; $description = 'As you can (obviously) see, Froxlor now comes with a new theme. You also have the possibility to switch back to "Classic" if you want to.'; $question = '<strong>Select default panel theme:</strong> '; $question .= '<select name="update_default_theme">'; $themes = getThemes(); foreach ($themes as $theme) { $question .= makeoption($theme, $theme, 'Froxlor'); } $question .= '</select>'; eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } }