Compare commits

..

129 Commits
0.9.2 ... 0.9.5

Author SHA1 Message Date
Robert Foerster (Dessa)
e50d0b0440 Tagging release 0.9.5 2010-04-19 16:30:42 +00:00
Michael Kaufmann (d00p)
cc89f26982 corrected special character in german-language file, fixes #164 2010-04-17 11:08:39 +00:00
Michael Kaufmann (d00p)
8155484ee9 - highlight temporary locked customers for admins, fixes #159 2010-04-15 11:00:27 +00:00
Michael Kaufmann (d00p)
97e3b30415 - show last login of customer in admin-customer-overview, fixes #158 2010-04-15 10:39:47 +00:00
Michael Kaufmann (d00p)
07b2c26bec - bugfixing 'servername guessing' on installation
- fixed undefined constant SERVER_SOFTWARE
- bugfixed form-validation on installation (thx to kTitan)
2010-04-15 10:13:41 +00:00
Michael Kaufmann (d00p)
afe431b72f - fixed possibility to add subdomains for domains with wildcarddomain=yes, fixes #150 2010-04-15 05:58:43 +00:00
Michael Kaufmann (d00p)
f5f796344c text beautifications 2010-04-14 10:33:47 +00:00
Michael Kaufmann (d00p)
8ee56d23ba - fixed password-reset $adminchecked; if no user is given don't output (admins) "password reset not allowed" 2010-04-14 10:27:28 +00:00
Michael Kaufmann (d00p)
f62dba4e1b - removed undefined variable in forgot-pwd 2010-04-14 10:09:31 +00:00
Michael Kaufmann (d00p)
87f84c694a - fixed awstats traffic value, save as KB (like webalizer) instead of Bytes, fixes #124 2010-04-14 08:26:13 +00:00
Michael Kaufmann (d00p)
f5a0727b8e - fixing improved update-procedure + beautification 2010-04-14 08:22:25 +00:00
Michael Kaufmann (d00p)
4d5dcb82d6 - fixed some more "Deprecated: Call-time pass-by-reference" issues 2010-04-14 07:48:41 +00:00
Michael Kaufmann (d00p)
7fa901bebb - improved update-procedure
- updated version to 0.9.4-svn2
2010-04-14 07:36:38 +00:00
Michael Kaufmann (d00p)
1159bde3eb - merged wildcardsubdomain-branch to trunk, refs #123, refs #150 2010-04-14 06:42:14 +00:00
Michael Kaufmann (d00p)
9013062ae9 - show domain-destination IP in customer-panel (domain-edit-view), fixes #95 2010-04-13 11:21:25 +00:00
Michael Kaufmann (d00p)
47b2fe7c7c - put 'server.error-handler-404' to the right place + beautification 2010-04-13 07:10:30 +00:00
Michael Kaufmann (d00p)
cfaae63657 - merged settings branch, fixes #134 2010-04-13 05:41:09 +00:00
Michael Kaufmann (d00p)
98e79d933c - check for regular file when deleting old zonefiles (don't try to delete directories), fixes #147 2010-04-12 17:16:46 +00:00
Michael Kaufmann (d00p)
ae27e06675 - fixing domain validation
- added validation for local hosts (mysql-hosts)
2010-04-12 16:36:09 +00:00
Michael Kaufmann (d00p)
209ab4dff9 - wups, forgot to use the conditional selected webalizer-binary-value :P, refs #140 2010-04-12 11:14:32 +00:00
Michael Kaufmann (d00p)
cf18590b84 - implemented alternative regex-validation for broken php "filter_var" function in various php-versions, refs #109, #122, #138
- check for webalizer binary in /usr/bin and in /usr/local/bin (freebsd), fixes #140
2010-04-12 11:09:53 +00:00
Michael Kaufmann (d00p)
6c25cd1c85 - fix domain-sorting in customer-panel (domain-overview), fixes #126
- add dkim-milter restart command to bind-cron
2010-04-12 06:15:16 +00:00
Michael Kaufmann (d00p)
0d3df6e1fe - fixed some left-overs when using safe_exec which have not been escaped correctly, fixes #136 2010-04-12 05:49:16 +00:00
Michael Kaufmann (d00p)
b11d0c5cd9 - fixed link to awstats in customer-panel (domain-overview), fixes #137 2010-04-12 05:34:34 +00:00
Robert Foerster (Dessa)
afc3ab8a8b correct bind permissions in config templates, refs #135 2010-04-11 20:13:54 +00:00
Florian Aders (EleRas)
1903f34dea If we don't have a wildcard - domain and no special - MX - hosts, we add the three special - subdomains imap, smtp and pop3, fixes #82 2010-04-10 07:52:53 +00:00
Florian Aders (EleRas)
ee7e50004a Adjusting svn:ignore for packages and temporary - directory 2010-04-10 07:47:03 +00:00
Robert Foerster (Dessa)
96d26d0d94 - correct freebsd proftpd template, fixes #132
- don't display mkdir statement for deactivated docroot when it is not defined, this was already done in the other templates but got somehow lost for etch
2010-04-10 00:44:09 +00:00
Florian Aders (EleRas)
7c12ab82c5 fixing stupid if in lng - tool 2010-04-09 19:30:52 +00:00
Florian Aders (EleRas)
5c152a9754 Updating languagefiles (mostly removing old strings, translating some strings from english to german) 2010-04-09 19:24:17 +00:00
Michael Kaufmann (d00p)
5a4fffbce6 -create awstats-configuration-folder if it does not exist 2010-04-09 12:04:09 +00:00
Michael Kaufmann (d00p)
220118f4bc corrected index-name of array 2010-04-08 14:54:42 +00:00
Florian Aders (EleRas)
5d214e5bd7 fixing bug where old awstats - config will not be removed due to check on wrong panel - name 2010-04-08 14:36:20 +00:00
Michael Kaufmann (d00p)
43fe968ad0 added awstats configuration to FreeBSD, thx to jenus for the great help 2010-04-08 12:05:26 +00:00
Michael Kaufmann (d00p)
7daa7eb0bc - also send database-hostname in information-mail (customer::add-mysql), fixes #108 2010-04-08 10:45:02 +00:00
Michael Kaufmann (d00p)
a0274b083b - make path to awstats configuration folder a setting (again), fixes #125 2010-04-08 10:28:48 +00:00
Michael Kaufmann (d00p)
04c7aae433 - correct path to awstats-folder in traffic-cron, thx to kTitan 2010-04-08 05:47:03 +00:00
Michael Kaufmann (d00p)
5a99950a8f support for older Froxlor-versions in update-process (we had the awstats_path setting already in older releases), refs #120 2010-04-07 11:31:31 +00:00
Michael Kaufmann (d00p)
4659d8e24a beautification of update-process 2010-04-07 11:24:53 +00:00
Michael Kaufmann (d00p)
5e3a4fb1ab - re-enable setting for "path to awstats 'awstats_buildstaticpages.pl' script", fixes #120 2010-04-07 11:14:43 +00:00
Michael Kaufmann (d00p)
1839264f7a - don't block mails from localhost
- added postfix-mxaccess for freebsd
refs #119
2010-04-07 10:52:15 +00:00
Michael Kaufmann (d00p)
5f9d90a293 added Postfix MX-Access, fixes #119 2010-04-07 10:35:50 +00:00
Michael Kaufmann (d00p)
5c825e3206 fixed undefined variables in lighty-cron 2010-04-07 09:43:46 +00:00
Michael Kaufmann (d00p)
a54a27d6ba fixing up german-language file, thx monotek, refs #108 2010-04-07 08:15:50 +00:00
Michael Kaufmann (d00p)
16135fb92b - implemented check for used APS packages on domain-deletion, fixes #110 2010-04-07 07:47:20 +00:00
Michael Kaufmann (d00p)
f8d0472274 - added possibility to send new database information via email to the customer, fixes #108 2010-04-07 06:57:27 +00:00
Michael Kaufmann (d00p)
368e6a5c50 - improved 'edit ftp-account', fixes #116 2010-04-07 06:08:09 +00:00
Michael Kaufmann (d00p)
fb4ade70d2 fixing wrong variable name in autoresponder, fixes #115 2010-04-06 19:28:39 +00:00
Michael Kaufmann (d00p)
6a0fcc1fd9 set namevirtualhost_statement default to 'On', so froxlor is still reachable after addition of first customer 2010-04-06 17:36:22 +00:00
Michael Kaufmann (d00p)
0eec533647 - fix undefined variable in lighttpd-cron 2010-04-06 12:35:01 +00:00
Michael Kaufmann (d00p)
941b887b75 - fixed typo in field-name (just beautification, no functions affected)
- don't show delete-link for std-subdomains (they can be deactivated individually for each user when editing a user), fixes #101
2010-04-06 05:58:03 +00:00
Florian Aders (EleRas)
43595df977 Deactivating limitation of commands in safe_exec, we'll just check if there are redirects and stuff like that
The original reason for safe_exec is already allowed: rm
2010-04-05 13:03:58 +00:00
Michael Kaufmann (d00p)
8d652183a0 - set version to 0.9.4 for upcoming release 2010-04-05 08:26:47 +00:00
Michael Kaufmann (d00p)
6af37fb40e - corrected e-mail validation in APS-System, fixes #112 2010-04-04 08:32:34 +00:00
Michael Kaufmann (d00p)
d3ceeb3f14 - adding feature to set a hostname for customer-standard-subdomain to replace froxlor-system-hostname (optional)
- set version to 0.9.3-svn5
2010-04-02 13:51:25 +00:00
Michael Kaufmann (d00p)
7182b245b3 - assign correct (parentdomains) php-configuration to new subdomains, fixes #107 2010-04-01 10:18:05 +00:00
Michael Kaufmann (d00p)
a48d6ae174 - removed unnecessary language-entries for the autoresponder-module, fixes #106 2010-04-01 05:52:32 +00:00
Michael Kaufmann (d00p)
521d6bbd4d - fixing most of the special characters in czech language file, fixes #104 2010-03-31 07:33:14 +00:00
Michael Kaufmann (d00p)
e4f0144bbc - fix regex in wipeOutOldConfigs() in lighttpd-cron 2010-03-31 05:16:01 +00:00
Michael Kaufmann (d00p)
2c50107bea - some more bugfixing of undefined variable notices 2010-03-30 09:40:02 +00:00
Michael Kaufmann (d00p)
043ca2ff5a - fixing some undefined variables
- added missing dkim_notes field to settings-table
2010-03-30 09:18:22 +00:00
Michael Kaufmann (d00p)
ab1e3c3fc8 - don't use validate* functions before checking php-filter-extension, fixes #98 2010-03-29 13:08:01 +00:00
Michael Kaufmann (d00p)
230c2a1cf3 - added freebsd to configfiles array so it shows up in the menu, fixes #97
- check for mysqldump also in /usr/local/bin (freebsd), fixes #99
2010-03-29 12:06:50 +00:00
Florian Aders (EleRas)
7bea15a7a9 Deferred dirprotection until 0.9.5, refs #72 2010-03-29 09:17:58 +00:00
Robert Foerster (Dessa)
2b2d44166d fix a bunch of svn props (no functional changes):
- add svn:eol-style native where needed, seems that we forgot some files last time
- nuke svn:keywords from some files where it is not used
2010-03-28 15:57:53 +00:00
Robert Foerster (Dessa)
70dc03098c revert r695 since we have no way to get the path for awstats.pl at the moment (to appened it to the awbsp command to be able to place it somewhere else then cgi-bin since it doesn't really belong there), so it needs to stay in the same path as we *expect* awstats.pl to be, otherwise it won't work 2010-03-27 09:44:45 +00:00
Robert Foerster (Dessa)
16b7d7f029 corrected conditional for debian to look in the path where the package installs the awbsp script, fixes #96 2010-03-27 08:58:11 +00:00
Michael Kaufmann (d00p)
81dad796ee - added some more language-parts
- changed store-function for dkim-settings as they need to insert a bind-rebuild-configs-task
refs #94
2010-03-26 10:55:01 +00:00
Michael Kaufmann (d00p)
8a28c6e0ef quick template fix for cronjob-edit, refs #75 2010-03-26 08:53:03 +00:00
Michael Kaufmann (d00p)
fc5d14d223 - added admin_cronjobs.php to change cronjob intervals and possibility to enable/disable them, refs #75 2010-03-26 08:42:13 +00:00
Florian Aders (EleRas)
0ec2238e4b Adding new DKIM - stuff d00p made, fixes #94 2010-03-25 12:14:56 +00:00
Michael Kaufmann (d00p)
8077a2e3b1 - fix redirect-statement in lighttpd-cronjobm refs #89 2010-03-25 10:54:21 +00:00
Michael Kaufmann (d00p)
677cd54e1c - correct language-name, fixes #85 2010-03-25 08:28:12 +00:00
Michael Kaufmann (d00p)
a3a3dec68c - place redirect to vhost content if documentroot is a domain, fixes #89 2010-03-25 06:51:02 +00:00
Michael Kaufmann (d00p)
bb6860532c - add hidden field to install form (check for requirements), fixes #88 2010-03-24 18:39:26 +00:00
Florian Aders (EleRas)
68b4edd1e1 sabling the default lighty - fastcgi and cgi - support in debian 7 ubuntu, froxlor will ad it again, fixes #90 2010-03-24 17:46:44 +00:00
Michael Kaufmann (d00p)
9dff94f1c8 - corrected awstats-statsfile-parsing and traffic-calculation, refs #58 2010-03-24 11:22:53 +00:00
Michael Kaufmann (d00p)
f5e2d13c53 - corrected path to 'awstats_buildstaticpages.pl' under debian (note: additional configuration has been added, awstats_buildstaticpages.pl default is *not* in the correct path), #fixes 87 2010-03-24 09:58:24 +00:00
Michael Kaufmann (d00p)
15e7441ab9 - added new language: polish, thx to Michal Gozdzik, refs #85 2010-03-23 10:02:16 +00:00
Michael Kaufmann (d00p)
12e63a3eea - make specific cronjobs run only at night, timestamp correction 2010-03-22 18:06:55 +00:00
Michael Kaufmann (d00p)
4e1405ca39 fixing php-error (using $this where there should not be one), fixes #83 2010-03-22 16:14:23 +00:00
Michael Kaufmann (d00p)
0e1d82db8b corrected file-comment 2010-03-22 13:27:55 +00:00
Michael Kaufmann (d00p)
952edd380f corrected paths and commands for awstats, refs #57, refs #58 2010-03-22 13:25:37 +00:00
Michael Kaufmann (d00p)
9b843a8ad5 merging awstats branch to trunk, fixes #57, fixes #58 2010-03-22 12:36:59 +00:00
Michael Kaufmann (d00p)
d4e310d150 - replace tabs (\t) with spaces in string-values (settings), fixes #81 2010-03-22 11:46:38 +00:00
Robert Foerster (Dessa)
e0e57da5b8 small wording change 2010-03-22 00:48:00 +00:00
Robert Foerster (Dessa)
00b881f49b bump to -svn2 2010-03-21 21:49:51 +00:00
Michael Kaufmann (d00p)
080eeb29ec add reply-to address and sender-name configuration to panel, fixes #76 2010-03-21 20:21:29 +00:00
Michael Kaufmann (d00p)
db74c99098 - commented out directory-protection, needs refactoring (bad regex)
- bugfixed vhost-file include path if vhost-settings is set to a folder for lighttpd, refs #70
2010-03-21 17:13:23 +00:00
Michael Kaufmann (d00p)
d3599dc8c0 - check Froxlor-requirements before main-install-process, fixes #78 2010-03-21 09:32:57 +00:00
Michael Kaufmann (d00p)
6eba5f5318 - correcting c'n'p error (default index.html not being placed correclty on user creation) 2010-03-20 15:37:20 +00:00
Michael Kaufmann (d00p)
16bca3c665 - don't show empty line in commands for webserver is no deactivated-root-dir is set (and therefore no command is shown but an empty line) 2010-03-20 14:50:58 +00:00
Michael Kaufmann (d00p)
dcb32c1bb5 - use makeCorrectDir() on fcgid-tmp-directory (trailing slash needed) 2010-03-20 14:44:47 +00:00
Michael Kaufmann (d00p)
f76df2252d - fix access-log filename in lighttpd cron, fixes #77 2010-03-20 12:51:39 +00:00
Florian Aders (EleRas)
402e8620a9 Removed duplicate entry from configfiles (will be added via command) 2010-03-19 22:26:00 +00:00
Michael Kaufmann (d00p)
ccf40fc89b - corrected regex for lighttpd - apache needs fixing too, refs #72 2010-03-19 20:29:02 +00:00
Michael Kaufmann (d00p)
660bede9c5 - implemented 'Create vHost-Container' and 'Own vHost-Settings' for lighttpd
- implemented Froxlor-directory protection (apache and lighttpd), fixes #72
- enable `vhostcontainer` and `vhostcontainer_servername_statement` by default
2010-03-19 17:29:31 +00:00
Michael Kaufmann (d00p)
1db572e010 - added Domainkey-Filter configuration for FreeBSD (thx to hedo)
- bugfixed DKIM verification failure when using .private file-extension (also thx to hedo), fixes #63
2010-03-19 10:46:09 +00:00
Michael Kaufmann (d00p)
d4c4a0c05f - if folder given as vhosts-"file" for lighttpd, now seperate files are being generated and included to the $SERVER["socket"]-part, fixes #70 2010-03-19 10:23:45 +00:00
Michael Kaufmann (d00p)
6b7a3e73f1 - bugfixing function getLoginNameByUid, refs #68 2010-03-17 12:32:27 +00:00
Michael Kaufmann (d00p)
55aab4004c create default index-file also in subfolders if newly created (and enabled), needs testing, fixes #68 2010-03-17 12:20:14 +00:00
Michael Kaufmann (d00p)
c1de55f3d5 - added possibility to set a minimum password length for all passwords (does not count for old passwords already saved), fixes #59
- set version to 0.9.3-svn1
2010-03-17 07:51:16 +00:00
Michael Kaufmann (d00p)
f9d84a09f1 - also decode ticket-subject in ticket-class, thx to Michał Goździk for the hint, fixes #67 2010-03-17 06:23:10 +00:00
Robert Foerster (Dessa)
e79fe3e510 fix link here too 2010-03-15 07:53:03 +00:00
Michael Kaufmann (d00p)
eddb2a2623 set correct wiki entry for realtime-documentation 2010-03-15 07:42:59 +00:00
Michael Kaufmann (d00p)
ae595b0f2f show [OK] when only updating version 2010-03-15 06:26:04 +00:00
Michael Kaufmann (d00p)
423fd7b7df set version to 0.9.3 2010-03-15 06:16:37 +00:00
Robert Foerster (Dessa)
7f6a21ceec - remove phpmailer.lang-en.php as its not used it this release
- its PHPMailer not phpMailer
2010-03-15 01:40:58 +00:00
Robert Foerster (Dessa)
f11c180ea8 - add apt-get for proftpd command for debian + derivates 2010-03-14 12:10:43 +00:00
Michael Kaufmann (d00p)
a7f22a3426 - added $branding for package-specific-patch-indication, fixes #60 2010-03-12 16:23:21 +00:00
Michael Kaufmann (d00p)
2c12c51977 - don't set $_die to false on warnings on installation because this would make it possible to continue even without the requirements 2010-03-11 13:11:22 +00:00
Michael Kaufmann (d00p)
ee7f83aede - correcting safe_exec check in function.safe_exec.php, fixes #56 2010-03-10 12:19:20 +00:00
Michael Kaufmann (d00p)
6f37aa2209 - corrected dbversion-setting when upgrading from syscp-stable (1.4.2.1), fixes #54 2010-03-10 07:30:53 +00:00
Michael Kaufmann (d00p)
1d03f04e1e - show reasonable errormessage in function validateFormFieldHidden() when hidden fields changed
- don't show error if cronjob-timestamps changed while editing settings, fixes #52
2010-03-09 06:45:36 +00:00
Michael Kaufmann (d00p)
8ec1b723a2 - only select customerid from panel_customers on edit-domains (admin), documentroot comes from panel_domains, fixes #51 2010-03-08 15:47:33 +00:00
Michael Kaufmann (d00p)
fb75e43511 set user-defined tmp-directory for php-socket in lighttpd.conf 2010-03-08 15:04:05 +00:00
Michael Kaufmann (d00p)
3e4dc2f1d8 forgot to save freebsd-file, refs #50 2010-03-07 15:38:08 +00:00
Michael Kaufmann (d00p)
6c233818f2 only display command if folder is set in configs, refs #50 2010-03-07 15:37:26 +00:00
Michael Kaufmann (d00p)
9a18dbcc36 add command to create the "deactivated users"-folder, fixes #50 2010-03-07 15:23:28 +00:00
Michael Kaufmann (d00p)
cbfb89f86a - set correct html-linebreaks when sending e-mails in ticket-class
- prevent usage of <script>-tag in tickets
- design-correction in archive-search
2010-03-05 07:55:04 +00:00
Michael Kaufmann (d00p)
491e5363a7 - set correct html-linebreaks when sending e-mails
- disallow email-add form when no (email-)domain is added yet
2010-03-05 07:13:00 +00:00
Robert Foerster (Dessa)
b5465f602f unbreak SQL-Query for Ticketcreation, fixes bug #47 2010-03-04 01:59:07 +00:00
Florian Aders (EleRas)
49ff638e20 Create logfiles if they do not exist, fixes #46 2010-03-03 18:36:50 +00:00
Michael Kaufmann (d00p)
cb2ad2261b added Postfix and Dovecot configuration-templates for FreeBSD 2010-03-03 09:57:54 +00:00
Michael Kaufmann (d00p)
a6909a8cec updated phpMailer-Class to version 5.1 (PHP5/PHP6), fixes #35 2010-03-03 08:51:13 +00:00
Michael Kaufmann (d00p)
a0c557c405 - check for existing awstats-configuration-directory and model-file, fixes #45 2010-03-02 22:03:55 +00:00
Michael Kaufmann (d00p)
0cd452de28 fixing function checkLastGuid() 2010-03-01 17:43:47 +00:00
Michael Kaufmann (d00p)
91d461b122 fix logging in checklastguid() when not called from cronjob 2010-03-01 16:30:16 +00:00
Michael Kaufmann (d00p)
098afe7cf8 - started to add FreeBSD configuration to Froxlor, refs #37 2010-03-01 10:39:08 +00:00
237 changed files with 10626 additions and 6897 deletions

View File

@@ -77,6 +77,24 @@ return array(
'default' => '', 'default' => '',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'panel_adminmail_defname' => array(
'label' => $lng['serversettings']['adminmail_defname'],
'settinggroup' => 'panel',
'varname' => 'adminmail_defname',
'type' => 'string',
'default' => 'Froxlor Administrator',
'save_method' => 'storeSettingField',
),
'panel_adminmail_return' => array(
'label' => $lng['serversettings']['adminmail_return'],
'settinggroup' => 'panel',
'varname' => 'adminmail_return',
'type' => 'string',
'string_type' => 'mail',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'panel_decimal_places' => array( 'panel_decimal_places' => array(
'label' => $lng['serversettings']['decimal_places'], 'label' => $lng['serversettings']['decimal_places'],
'settinggroup' => 'panel', 'settinggroup' => 'panel',

View File

@@ -54,6 +54,14 @@ return array(
'default' => 900, 'default' => 900,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'panel_password_min_length' => array(
'label' => $lng['serversettings']['panel_password_min_length'],
'settinggroup' => 'panel',
'varname' => 'password_min_length',
'type' => 'int',
'default' => 0,
'save_method' => 'storeSettingField',
),
'customer_accountprefix' => array( 'customer_accountprefix' => array(
'label' => $lng['serversettings']['accountprefix'], 'label' => $lng['serversettings']['accountprefix'],
'settinggroup' => 'customer', 'settinggroup' => 'customer',

View File

@@ -58,6 +58,14 @@ return array(
'default' => '', 'default' => '',
'save_method' => 'storeSettingHostname', 'save_method' => 'storeSettingHostname',
), ),
'system_stdsubdomain' => array(
'label' => $lng['serversettings']['stdsubdomainhost'],
'settinggroup' => 'system',
'varname' => 'stdsubdomain',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingHostname',
),
'system_mysql_access_host' => array( 'system_mysql_access_host' => array(
'label' => $lng['serversettings']['mysql_access_host'], 'label' => $lng['serversettings']['mysql_access_host'],
'settinggroup' => 'system', 'settinggroup' => 'system',
@@ -85,6 +93,14 @@ return array(
'default' => 'html', 'default' => 'html',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'system_store_index_file_subs' => array(
'label' => $lng['serversettings']['system_store_index_file_subs'],
'settinggroup' => 'system',
'varname' => 'store_index_file_subs',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'system_httpuser' => array( 'system_httpuser' => array(
'settinggroup' => 'system', 'settinggroup' => 'system',
'varname' => 'httpuser', 'varname' => 'httpuser',

View File

@@ -31,6 +31,7 @@ return array(
'option_mode' => 'one', 'option_mode' => 'one',
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd'), 'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd'),
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
'overview_option' => true
), ),
'system_apacheconf_vhost' => array( 'system_apacheconf_vhost' => array(
'label' => $lng['serversettings']['apacheconf_vhost'], 'label' => $lng['serversettings']['apacheconf_vhost'],

View File

@@ -40,45 +40,27 @@ return array(
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'system_awstats_domain_file' => array(
'label' => $lng['serversettings']['awstats_domain_file'],
'settinggroup' => 'system',
'varname' => 'awstats_domain_file',
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/awstats/',
'save_method' => 'storeSettingField',
),
'system_awstats_model_file' => array(
'label' => $lng['serversettings']['awstats_model_file'],
'settinggroup' => 'system',
'varname' => 'awstats_model_file',
'type' => 'string',
'string_type' => 'file',
'default' => '/etc/awstats/awstats.model.conf.syscp',
'save_method' => 'storeSettingField',
),
'system_awstats_path' => array( 'system_awstats_path' => array(
'label' => $lng['serversettings']['awstats_path'], 'label' => $lng['serversettings']['awstats_path'],
'settinggroup' => 'system', 'settinggroup' => 'system',
'varname' => 'awstats_path', 'varname' => 'awstats_path',
'type' => 'string', 'type' => 'string',
'string_type' => 'dir', 'string_type' => 'dir',
'default' => '/usr/share/awstats/VERSION/webroot/cgi-bin/', 'default' => '/usr/bin/',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'system_awstats_updateall_command' => array( 'system_awstats_conf' => array(
'label' => $lng['serversettings']['awstats_updateall_command'], 'label' => $lng['serversettings']['awstats_conf'],
'settinggroup' => 'system', 'settinggroup' => 'system',
'varname' => 'awstats_updateall_command', 'varname' => 'awstats_conf',
'type' => 'string', 'type' => 'string',
'string_type' => 'file', 'string_type' => 'dir',
'default' => '/usr/bin/awstats_updateall.pl', 'default' => '/etc/awstats/',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), )
), )
), )
), )
); );
?> ?>

View File

@@ -75,7 +75,7 @@ return array(
'default' => 100, 'default' => 100,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'systen_autoresponder_enabled' => array( 'system_autoresponder_enabled' => array(
'label' => $lng['serversettings']['autoresponder_active'], 'label' => $lng['serversettings']['autoresponder_active'],
'settinggroup' => 'autoresponder', 'settinggroup' => 'autoresponder',
'varname' => 'autoresponder_active', 'varname' => 'autoresponder_active',
@@ -84,7 +84,7 @@ return array(
'cronmodule' => 'froxlor/autoresponder', 'cronmodule' => 'froxlor/autoresponder',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'systen_last_autoresponder_run' => array( 'system_last_autoresponder_run' => array(
'settinggroup' => 'autoresponder', 'settinggroup' => 'autoresponder',
'varname' => 'last_autoresponder_run', 'varname' => 'last_autoresponder_run',
'type' => 'hidden', 'type' => 'hidden',

View File

@@ -29,6 +29,7 @@ return array(
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
'overview_option' => true
), ),
'logger_severity' => array( 'logger_severity' => array(
'label' => $lng['serversettings']['logger']['severity'], 'label' => $lng['serversettings']['logger']['severity'],

View File

@@ -28,7 +28,8 @@ return array(
'varname' => 'use_dkim', 'varname' => 'use_dkim',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingFieldInsertBindTask',
'overview_option' => true
), ),
'dkim_prefix' => array( 'dkim_prefix' => array(
'label' => $lng['dkim']['dkim_prefix'], 'label' => $lng['dkim']['dkim_prefix'],
@@ -56,6 +57,63 @@ return array(
'default' => 'dkim-keys.conf', 'default' => 'dkim-keys.conf',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'dkim_algorithm' => array(
'label' => $lng['dkim']['dkim_algorithm'],
'settinggroup' => 'dkim',
'varname' => 'dkim_algorithm',
'type' => 'option',
'default' => 'all',
'option_mode' => 'multiple',
'option_options' => array('all' => 'All', 'sha1' => 'SHA1', 'sha256' => 'SHA256'),
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_servicetype' => array(
'label' => $lng['dkim']['dkim_servicetype'],
'settinggroup' => 'dkim',
'varname' => 'dkim_servicetype',
'type' => 'option',
'default' => '0',
'option_mode' => 'one',
'option_options' => array('0' => 'All', '1' => 'E-Mail'),
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_keylength' => array(
'label' => $lng['dkim']['dkim_keylength'],
'settinggroup' => 'dkim',
'varname' => 'dkim_keylength',
'type' => 'option',
'default' => '1024',
'option_mode' => 'one',
'option_options' => array('1024' => '1024 Bit', '2048' => '2048 Bit'),
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_notes' => array(
'label' => $lng['dkim']['dkim_notes'],
'settinggroup' => 'dkim',
'varname' => 'dkim_notes',
'type' => 'string',
'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => '',
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_add_adsp' => array(
'label' => $lng['dkim']['dkim_add_adsp'],
'settinggroup' => 'dkim',
'varname' => 'dkim_add_adsp',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_add_adsppolicy' => array(
'label' => $lng['dkim']['dkim_add_adsppolicy'],
'settinggroup' => 'dkim',
'varname' => 'dkim_add_adsppolicy',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options' => array('0' => 'Unknown', '1' => 'All', '2' => 'Discardable'),
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkimrestart_command' => array( 'dkimrestart_command' => array(
'label' => $lng['dkim']['dkimrestart_command'], 'label' => $lng['dkim']['dkimrestart_command'],
'settinggroup' => 'dkim', 'settinggroup' => 'dkim',

View File

@@ -26,7 +26,8 @@ return array(
'varname' => 'use_spf', 'varname' => 'use_spf',
'type' => 'bool', 'type' => 'bool',
'default' => false, 'default' => false,
'save_method' => 'storeSettingField' 'save_method' => 'storeSettingField',
'overview_option' => true
), ),
'spf_entry' => array( 'spf_entry' => array(
'label' => $lng['spf']['spf_entry'], 'label' => $lng['spf']['spf_entry'],

View File

@@ -30,6 +30,7 @@ return array(
'default' => false, 'default' => false,
'cronmodule' => 'froxlor/ticket', 'cronmodule' => 'froxlor/ticket',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
'overview_option' => true
), ),
'ticket_noreply_email' => array( 'ticket_noreply_email' => array(
'label' => $lng['serversettings']['ticket']['noreply_email'], 'label' => $lng['serversettings']['ticket']['noreply_email'],

View File

@@ -30,6 +30,7 @@ return array(
'default' => false, 'default' => false,
'cronmodule' => 'froxlor/aps', 'cronmodule' => 'froxlor/aps',
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
'overview_option' => true
), ),
'aps_items_per_page' => array( 'aps_items_per_page' => array(
'label' => $lng['aps']['packages_per_page'], 'label' => $lng['aps']['packages_per_page'],

View File

@@ -154,6 +154,7 @@ if($page == 'admins'
$loginname = validate($_POST['loginname'], 'loginname'); $loginname = validate($_POST['loginname'], 'loginname');
$password = validate($_POST['admin_password'], 'password'); $password = validate($_POST['admin_password'], 'password');
$password = validatePassword($password);
$def_language = validate($_POST['def_language'], 'default language'); $def_language = validate($_POST['def_language'], 'default language');
$customers = intval_ressource($_POST['customers']); $customers = intval_ressource($_POST['customers']);
@@ -560,6 +561,7 @@ if($page == 'admins'
{ {
if($password != '') if($password != '')
{ {
$password = validatePassword($password);
$password = md5($password); $password = md5($password);
} }
else else

View File

@@ -95,9 +95,9 @@ if($userinfo['change_serversettings'] == '1')
'<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'], '<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'],
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'], '<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'], '<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
'<AWSTATS_PATH>' => $settings['system']['awstats_path'],
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '', '<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
'<REALTIME_PORT>' => $settings['system']['realtime_port'] '<REALTIME_PORT>' => $settings['system']['realtime_port'],
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : '/tmp/'
); );
$files = ''; $files = '';
$configpage = ''; $configpage = '';
@@ -110,6 +110,7 @@ if($userinfo['change_serversettings'] == '1')
if(is_array($value)) if(is_array($value))
{ {
$commands = implode("\n", $value); $commands = implode("\n", $value);
$commands = str_replace("\n\n", "\n", $commands);
if($commands != '') if($commands != '')
{ {

View File

@@ -75,12 +75,6 @@ if($page == 'cronjobs'
$description = $lng['crondesc'][$row['desc_lng_key']]; $description = $lng['crondesc'][$row['desc_lng_key']];
/*
* don't allow deletion of 'froxlor' cronjobs
*/
$vendor_a = explode('/', $row['module']);
$vendor = $vendor_a[0];
eval("\$crons.=\"" . getTemplate("cronjobs/cronjobs_cronjob") . "\";"); eval("\$crons.=\"" . getTemplate("cronjobs/cronjobs_cronjob") . "\";");
$count++; $count++;
} }
@@ -94,21 +88,68 @@ if($page == 'cronjobs'
elseif($action == 'new') elseif($action == 'new')
{ {
/* /*
* @TODO Finish me * @TODO later
*/ */
} }
elseif($action == 'edit' elseif($action == 'edit'
&& $id != 0) && $id != 0)
{ {
/* $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `id`='" . (int)$id . "'");
* @TODO Finish me
*/ if ($result['cronfile'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$isactive = intval($_POST['isactive']);
$interval_value = validate($_POST['interval_value'], 'interval_value', '/^([0-9]+)$/Di', 'stringisempty');
$interval_interval = validate($_POST['interval_interval'], 'interval_interval');
if($isactive != 1)
{
$isactive = 0;
}
$interval = $interval_value.' '.strtoupper($interval_interval);
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "`
SET `isactive` = '".(int)$isactive."',
`interval` = '".$interval."'
WHERE `id` = '" . (int)$id . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
// interval
$interval_nfo = explode(' ', $result['interval']);
$interval_value = $interval_nfo[0];
$interval_interval = '';
$interval_interval.= makeoption($lng['cronmgmt']['seconds'], 'SECOND', $interval_nfo[1]);
$interval_interval.= makeoption($lng['cronmgmt']['minutes'], 'MINUTE', $interval_nfo[1]);
$interval_interval.= makeoption($lng['cronmgmt']['hours'], 'HOUR', $interval_nfo[1]);
$interval_interval.= makeoption($lng['cronmgmt']['days'], 'DAY', $interval_nfo[1]);
$interval_interval.= makeoption($lng['cronmgmt']['weeks'], 'WEEK', $interval_nfo[1]);
$interval_interval.= makeoption($lng['cronmgmt']['months'], 'MONTH', $interval_nfo[1]);
// end of interval
$change_cronfile = false;
if (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor')
{
$change_cronfile = true;
}
eval("echo \"" . getTemplate("cronjobs/cronjob_edit") . "\";");
}
}
} }
elseif($action == 'delete' elseif($action == 'delete'
&& $id != 0) && $id != 0)
{ {
/* /*
* @TODO Finish me * @TODO later
*/ */
} }
} }

View File

@@ -66,6 +66,7 @@ if($page == 'customers'
'c.email_quota' => $lng['customer']['email_quota'], 'c.email_quota' => $lng['customer']['email_quota'],
'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')', 'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
'c.deactivated' => $lng['admin']['deactivated'], 'c.deactivated' => $lng['admin']['deactivated'],
'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'],
'c.phpenabled' => $lng['admin']['phpenabled'] 'c.phpenabled' => $lng['admin']['phpenabled']
); );
@@ -96,6 +97,15 @@ if($page == 'customers'
$row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']); $row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
$row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']); $row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']); $row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
$last_login = ((int)$row['lastlogin_succ'] == 0) ? $lng['panel']['neverloggedin'] : date('d.m.Y', $row['lastlogin_succ']);
$column_style = '';
if($row['loginfail_count'] >= $settings['login']['maxloginattempts']
&& $row['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
) {
$column_style = ' style="background-color: #f99122;"';
}
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains'); $row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains');
$row = htmlentities_array($row); $row = htmlentities_array($row);
eval("\$customers.=\"" . getTemplate("customers/customers_customer") . "\";"); eval("\$customers.=\"" . getTemplate("customers/customers_customer") . "\";");
@@ -379,6 +389,7 @@ if($page == 'customers'
$createstdsubdomain = intval($_POST['createstdsubdomain']); $createstdsubdomain = intval($_POST['createstdsubdomain']);
$password = validate($_POST['customer_password'], 'password'); $password = validate($_POST['customer_password'], 'password');
$password = validatePassword($password);
$sendpassword = intval($_POST['sendpassword']); $sendpassword = intval($_POST['sendpassword']);
$phpenabled = intval($_POST['phpenabled']); $phpenabled = intval($_POST['phpenabled']);
$diskspace = $diskspace * 1024; $diskspace = $diskspace * 1024;
@@ -567,14 +578,16 @@ if($page == 'customers'
$htpasswdPassword = crypt($password); $htpasswdPassword = crypt($password);
} }
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/webalizer/')) . "')");
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added webalizer htpasswd for user '" . $loginname . "'");
if($settings['system']['awstats_enabled'] == '1') if($settings['system']['awstats_enabled'] == '1')
{ {
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/awstats/')) . "')"); $db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/awstats/')) . "')");
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added awstats htpasswd for user '" . $loginname . "'"); $log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added awstats htpasswd for user '" . $loginname . "'");
} }
else
{
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/webalizer/')) . "')");
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added webalizer htpasswd for user '" . $loginname . "'");
}
inserttask('1'); inserttask('1');
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')"); $result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
@@ -583,8 +596,18 @@ if($page == 'customers'
if($createstdsubdomain == '1') if($createstdsubdomain == '1')
{ {
if (isset($settings['system']['stdsubdomain'])
&& $settings['system']['stdsubdomain'] != ''
) {
$_stdsubdomain = $loginname . '.' . $settings['system']['stdsubdomain'];
}
else
{
$_stdsubdomain = $loginname . '.' . $settings['system']['hostname'];
}
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " . $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
"`domain` = '". $db->escape($loginname . '.' . $settings['system']['hostname']) . "', " . "`domain` = '". $db->escape($_stdsubdomain) . "', " .
"`customerid` = '" . (int)$customerid . "', " . "`customerid` = '" . (int)$customerid . "', " .
"`adminid` = '" . (int)$userinfo['adminid'] . "', " . "`adminid` = '" . (int)$userinfo['adminid'] . "', " .
"`parentdomainid` = '-1', " . "`parentdomainid` = '-1', " .
@@ -622,23 +645,22 @@ if($page == 'customers'
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'createcustomer_mailbody\''); $result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'createcustomer_mailbody\'');
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['createcustomer']['mailbody']), $replace_arr)); $mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['createcustomer']['mailbody']), $replace_arr));
$mail->From = $userinfo['email']; $_mailerror = false;
$mail->FromName = $userinfo['name']; try {
$mail->Subject = $mail_subject; $mail->Subject = $mail_subject;
$mail->Body = $mail_body; $mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($email, getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company))); $mail->AddAddress($email, getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)));
$mail->Send();
if(!$mail->Send()) } catch(phpmailerException $e) {
{ $mailerr_msg = $e->errorMessage();
if($mail->ErrorInfo != '') $_mailerror = true;
{ } catch (Exception $e) {
$mailerr_msg = $mail->ErrorInfo; $mailerr_msg = $e->getMessage();
} $_mailerror = true;
else
{
$mailerr_msg = $email;
} }
if ($_mailerror) {
$log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg); $log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $email); standard_error('errorsendingmail', $email);
} }
@@ -850,6 +872,7 @@ if($page == 'customers'
{ {
if($password != '') if($password != '')
{ {
$password = validatePassword($password);
$password = md5($password); $password = md5($password);
} }
else else
@@ -865,7 +888,17 @@ if($page == 'customers'
if($createstdsubdomain == '1' if($createstdsubdomain == '1'
&& $result['standardsubdomain'] == '0') && $result['standardsubdomain'] == '0')
{ {
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($result['loginname'] . '.' . $settings['system']['hostname']) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '')"); if (isset($settings['system']['stdsubdomain'])
&& $settings['system']['stdsubdomain'] != ''
) {
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['stdsubdomain'];
}
else
{
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
}
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($_stdsubdomain) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '')");
$domainid = $db->insert_id(); $domainid = $db->insert_id();
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\''); $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\'');
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $result['loginname'] . "'"); $log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $result['loginname'] . "'");

View File

@@ -147,6 +147,14 @@ if($page == 'domains'
if(isset($_POST['send']) if(isset($_POST['send'])
&& $_POST['send'] == 'send') && $_POST['send'] == 'send')
{ {
/*
* check for APS packages used with this domain, #110
*/
if(domainHasApsInstances($id))
{
standard_error('domains_cantdeletedomainwithapsinstances');
}
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"'; $query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"';
$subResult = $db->query($query); $subResult = $db->query($query);
$idString = array(); $idString = array();
@@ -624,8 +632,10 @@ if($page == 'domains'
elseif($action == 'edit' elseif($action == 'edit'
&& $id != 0) && $id != 0)
{ {
$result = $db->query_first("SELECT `d`.*, `c`.* FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) $result = $db->query_first("SELECT `d`.*, `c`.`customerid` FROM `" . TABLE_PANEL_DOMAINS . "` `d`
WHERE `d`.`parentdomainid`='0' AND `d`.`id`='" . (int)$id . "'" LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`)
WHERE `d`.`parentdomainid`='0'
AND `d`.`id`='" . (int)$id . "'"
. ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' ")); . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' "));
if($result['domain'] != '') if($result['domain'] != '')

View File

@@ -31,20 +31,78 @@ if(($page == 'settings' || $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, &$db); $settings = loadSettings($settings_data, $db);
if(isset($_POST['send']) if(isset($_POST['send'])
&& $_POST['send'] == 'send') && $_POST['send'] == 'send')
{ {
if(processForm(&$settings_data, &$_POST, array('filename' => $filename, 'action' => $action, 'page' => $page))) $_part = isset($_GET['part']) ? $_GET['part'] : '';
if($_part == '')
{ {
$_part = isset($_POST['part']) ? $_POST['part'] : '';
}
if($_part != '')
{
if($_part == 'all')
{
$settings_all = true;
$settings_part = false;
}
else
{
$settings_all = false;
$settings_part = true;
}
$only_enabledisable = false;
}
else
{
$settings_all = false;
$settings_part = false;
$only_enabledisable = true;
}
if(processFormEx(
$settings_data,
$_POST,
array('filename' => $filename, 'action' => $action, 'page' => $page),
$_part,
$settings_all,
$settings_part,
$only_enabledisable
)
) {
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page)); standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
} }
} }
else else
{ {
$fields = buildForm(&$settings_data); $_part = isset($_GET['part']) ? $_GET['part'] : '';
eval("echo \"" . getTemplate("settings/settings") . "\";");
if($_part == '')
{
$_part = isset($_POST['part']) ? $_POST['part'] : '';
}
$fields = buildFormEx($settings_data, $_part);
$settings_page = '';
if($_part == '')
{
eval("\$settings_page .= \"" . getTemplate("settings/settings_overview") . "\";");
}
else
{
eval("\$settings_page .= \"" . getTemplate("settings/settings") . "\";");
}
eval("echo \"" . getTemplate("settings/settings_form_begin") . "\";");
eval("echo \$settings_page;");
eval("echo \"" . getTemplate("settings/settings_form_end") . "\";");
} }
} }
elseif($page == 'rebuildconfigs' elseif($page == 'rebuildconfigs'

View File

@@ -37,19 +37,40 @@ if($page == 'overview')
if (!isset($settings['system']['dbversion']) if (!isset($settings['system']['dbversion'])
|| $settings['system']['dbversion'] == '' || $settings['system']['dbversion'] == ''
) { ) {
$settings['system']['dbversion'] = 2; /**
* for syscp-stable (1.4.2.1) this value has to be 0
* so the required table-fields are added correctly
* and the svn-version has its value in the database
* -> bug #54
*/
$result = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'");
if(isset($result['value']))
{
$settings['system']['dbversion'] = (int)$result['value'];
} else {
$settings['system']['dbversion'] = 0;
}
} }
} }
if(hasUpdates($version)) if(hasUpdates($version))
{ {
$successful_update = false;
$message = '';
if(isset($_POST['send']) if(isset($_POST['send'])
&& $_POST['send'] == 'send') && $_POST['send'] == 'send')
{ {
if((isset($_POST['update_preconfig'])
&& isset($_POST['update_changesagreed'])
&& intval($_POST['update_changesagreed']) != 0)
|| !isset($_POST['update_preconfig'])
) {
eval("echo \"" . getTemplate("update/update_start") . "\";"); eval("echo \"" . getTemplate("update/update_start") . "\";");
include_once('./install/updatesql.php'); include_once './install/updatesql.php';
$redirect_url = 'admin_index.php'; $redirect_url = 'admin_index.php';
eval("echo \"" . getTemplate("update/update_end") . "\";"); eval("echo \"" . getTemplate("update/update_end") . "\";");
@@ -57,17 +78,34 @@ if($page == 'overview')
updateCounters(); updateCounters();
inserttask('1'); inserttask('1');
@chmod('./lib/userdata.inc.php', 0440); @chmod('./lib/userdata.inc.php', 0440);
$successful_update = true;
} }
else else
{
$message = '<br /><strong style="color:#ff0000;">You have to agree that you have read the update notifications.</strong>';
}
}
if(!$successful_update)
{ {
$current_version = $settings['panel']['version']; $current_version = $settings['panel']['version'];
$new_version = $version; $new_version = $version;
$ui_text = $lng['update']['update_information']; $ui_text = $lng['update']['update_information']['part_a'];
$ui_text = str_replace('%curversion', $current_version, $ui_text); $ui_text = str_replace('%curversion', $current_version, $ui_text);
$ui_text = str_replace('%newversion', $new_version, $ui_text); $ui_text = str_replace('%newversion', $new_version, $ui_text);
$update_information = $ui_text; $update_information = $ui_text;
include_once './install/updates/preconfig.php';
$preconfig = getPreConfig($current_version);
if($preconfig != '')
{
$update_information .= '<br />'.$preconfig.$message;
}
$update_information .= $lng['update']['update_information']['part_b'];
eval("echo \"" . getTemplate("update/index") . "\";"); eval("echo \"" . getTemplate("update/index") . "\";");
} }
} }

View File

@@ -68,13 +68,13 @@ elseif($page == 'domains')
$row['domainalias'] = $idna_convert->decode($row['domainalias']); $row['domainalias'] = $idna_convert->decode($row['domainalias']);
if($row['parentdomainid'] == '0' if($row['parentdomainid'] == '0'
&& $row['iswildcarddomain'] != '1'
&& $row['caneditdomain'] == '1') && $row['caneditdomain'] == '1')
{ {
$parentdomains_count++; $parentdomains_count++;
} }
$domains_count++; $domains_count++;
/*
$domainparts = explode('.', $row['domain']); $domainparts = explode('.', $row['domain']);
$domainparts = array_reverse($domainparts); $domainparts = array_reverse($domainparts);
$sortkey = ''; $sortkey = '';
@@ -82,8 +82,9 @@ elseif($page == 'domains')
{ {
$sortkey.= $part . '.'; $sortkey.= $part . '.';
} }
$domain_array[$sortkey] = $row; $domain_array[$sortkey] = $row;
*/
$domain_array[$row['domain']] = $row;
} }
ksort($domain_array); ksort($domain_array);
@@ -125,6 +126,11 @@ elseif($page == 'domains')
if($paging->checkDisplay($i)) if($paging->checkDisplay($i))
{ {
$row = htmlentities_array($domain_array[$sortkey]); $row = htmlentities_array($domain_array[$sortkey]);
if($settings['system']['awstats_enabled'] == '1') {
$statsapp = 'awstats';
} else {
$statsapp = 'webalizer';
}
eval("\$domains.=\"" . getTemplate("domains/domains_delimiter") . "\";"); eval("\$domains.=\"" . getTemplate("domains/domains_delimiter") . "\";");
if($paging->sortfield == 'd.domain' if($paging->sortfield == 'd.domain'
@@ -178,6 +184,14 @@ elseif($page == 'domains')
} }
} }
/*
* check for APS packages used with this domain, #110
*/
if(domainHasApsInstances($id))
{
standard_error('domains_cantdeletedomainwithapsinstances');
}
$log->logAction(USR_ACTION, LOG_INFO, "deleted subdomain '" . $idna_convert->decode($result['domain']) . "'"); $log->logAction(USR_ACTION, LOG_INFO, "deleted subdomain '" . $idna_convert->decode($result['domain']) . "'");
$result = $db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'"); $result = $db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`-1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'"); $result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`-1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
@@ -205,7 +219,7 @@ elseif($page == 'domains')
{ {
$subdomain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['subdomain'], 'subdomain', '', 'subdomainiswrong'))); $subdomain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['subdomain'], 'subdomain', '', 'subdomainiswrong')));
$domain = $idna_convert->encode($_POST['domain']); $domain = $idna_convert->encode($_POST['domain']);
$domain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($domain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `iswildcarddomain`='0' AND `caneditdomain`='1' "); $domain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($domain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `caneditdomain`='1' ");
$completedomain = $subdomain . '.' . $domain; $completedomain = $subdomain . '.' . $domain;
$completedomain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($completedomain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `email_only`='0' AND `caneditdomain` = '1'"); $completedomain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($completedomain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `email_only`='0' AND `caneditdomain` = '1'");
$aliasdomain = intval($_POST['alias']); $aliasdomain = intval($_POST['alias']);
@@ -286,7 +300,31 @@ elseif($page == 'domains')
} }
else else
{ {
$result = $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`customerid`, `domain`, `documentroot`, `ipandport`, `aliasdomain`, `parentdomainid`, `isemaildomain`, `openbasedir`, `openbasedir_path`, `safemode`, `speciallogfile`, `specialsettings`, `ssl_redirect`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($completedomain) . "', '" . $db->escape($path) . "', '" . $db->escape($domain_check['ipandport']) . "', " . (($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") . ", '" . (int)$domain_check['id'] . "', '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "', '" . $db->escape($domain_check['openbasedir']) . "', '" . $db->escape($openbasedir_path) . "', '" . $db->escape($domain_check['safemode']) . "', '" . $db->escape($domain_check['speciallogfile']) . "', '" . $db->escape($domain_check['specialsettings']) . "', '" . $ssl_redirect . "')"); // get the phpsettingid from parentdomain, #107
$phpsid_result = $db->query_first("SELECT `phpsettingid` FROM `".TABLE_PANEL_DOMAINS."` WHERE `id` = '".(int)$domain_check['id']."'");
if(!isset($phpsid_result['phpsettingid'])
|| (int)$phpsid_result['phpsettingid'] <= 0
) {
// assign default config
$phpsid_result['phpsettingid'] = 1;
}
$result = $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET
`customerid` = '" . (int)$userinfo['customerid'] . "',
`domain` = '" . $db->escape($completedomain) . "',
`documentroot` = '" . $db->escape($path) . "',
`ipandport` = '" . $db->escape($domain_check['ipandport']) . "',
`aliasdomain` = ".(($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") .",
`parentdomainid` = '" . (int)$domain_check['id'] . "',
`isemaildomain` = '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "',
`openbasedir` = '" . $db->escape($domain_check['openbasedir']) . "',
`openbasedir_path` = '" . $db->escape($openbasedir_path) . "',
`safemode` = '" . $db->escape($domain_check['safemode']) . "',
`speciallogfile` = '" . $db->escape($domain_check['speciallogfile']) . "',
`specialsettings` = '" . $db->escape($domain_check['specialsettings']) . "',
`ssl_redirect` = '" . $ssl_redirect . "',
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'"); $result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'"); $log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
inserttask('1'); inserttask('1');
@@ -296,7 +334,7 @@ elseif($page == 'domains')
} }
else else
{ {
$result = $db->query("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `iswildcarddomain`='0' AND `caneditdomain`='1' ORDER BY `domain` ASC"); $result = $db->query("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `caneditdomain`='1' ORDER BY `domain` ASC");
$domains = ''; $domains = '';
while($row = $db->fetch_array($result)) while($row = $db->fetch_array($result))
@@ -322,7 +360,7 @@ elseif($page == 'domains')
elseif($action == 'edit' elseif($action == 'edit'
&& $id != 0) && $id != 0)
{ {
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path` ,`pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'"); $result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\''); $alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
$alias_check = $alias_check['count']; $alias_check = $alias_check['count'];
@@ -355,16 +393,7 @@ elseif($page == 'domains')
if(isset($_POST['iswildcarddomain']) if(isset($_POST['iswildcarddomain'])
&& $_POST['iswildcarddomain'] == '1' && $_POST['iswildcarddomain'] == '1'
&& $result['parentdomainid'] == '0' && $result['parentdomainid'] == '0'
&& $userinfo['subdomains'] != '0') ){
{
$wildcarddomaincheck = $db->query("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `parentdomainid` = '" . (int)$result['id'] . "'");
if($db->num_rows($wildcarddomaincheck) != '0')
{
standard_error('firstdeleteallsubdomains');
exit;
}
$iswildcarddomain = '1'; $iswildcarddomain = '1';
} }
else else
@@ -475,11 +504,14 @@ elseif($page == 'domains')
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']); $iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']); $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); $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") $result_ipandport = $db->query_first("SELECT `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` WHERE `id`='".(int)$result['ipandport']."'");
if(filter_var($result_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
{ {
$result_ipandport['ip'] = '[' . $result_ipandport['ip'] . ']';
} }
$domainip = $result_ipandport['ip'];
$result = htmlentities_array($result);
eval("echo \"" . getTemplate("domains/domains_edit") . "\";"); eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
} }

View File

@@ -372,6 +372,7 @@ elseif($page == 'accounts')
$email_full = $result['email_full']; $email_full = $result['email_full'];
$username = $idna_convert->decode($email_full); $username = $idna_convert->decode($email_full);
$password = validate($_POST['email_password'], 'password'); $password = validate($_POST['email_password'], 'password');
$password = validatePassword($password);
if($settings['panel']['sendalternativemail'] == 1) if($settings['panel']['sendalternativemail'] == 1)
{ {
@@ -427,25 +428,26 @@ elseif($page == 'accounts')
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['subject']), $replace_arr)); $mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['subject']), $replace_arr));
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_mailbody\''); $result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_mailbody\'');
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['mailbody']), $replace_arr)); $mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['mailbody']), $replace_arr));
$mail->From = $admin['email'];
$mail->FromName = getCorrectUserSalutation($admin); $_mailerror = false;
try {
$mail->SetFrom($admin['email'], getCorrectUserSalutation($admin));
$mail->Subject = $mail_subject; $mail->Subject = $mail_subject;
$mail->Body = $mail_body; $mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($email_full, getCorrectUserSalutation($userinfo)); $mail->AddAddress($email_full, getCorrectUserSalutation($userinfo));
$mail->Send();
if(!$mail->Send()) } catch(phpmailerException $e) {
{ $mailerr_msg = $e->errorMessage();
if($mail->ErrorInfo != '') $_mailerror = true;
{ } catch (Exception $e) {
$mailerr_msg = $mail->ErrorInfo; $mailerr_msg = $e->getMessage();
} $_mailerror = true;
else
{
$mailerr_msg = $email;
} }
if ($_mailerror) {
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg); $log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $email); standard_error('errorsendingmail', $email_full);
} }
$mail->ClearAddresses(); $mail->ClearAddresses();
@@ -457,23 +459,24 @@ elseif($page == 'accounts')
$mail_subject = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['subject']), $replace_arr); $mail_subject = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['subject']), $replace_arr);
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_alternative_mailbody\''); $result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_alternative_mailbody\'');
$mail_body = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['mailbody']), $replace_arr); $mail_body = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['mailbody']), $replace_arr);
$mail->From = $admin['email'];
$mail->FromName = getCorrectUserSalutation($admin); $_mailerror = false;
try {
$mail->SetFrom($admin['email'], getCorrectUserSalutation($admin));
$mail->Subject = $mail_subject; $mail->Subject = $mail_subject;
$mail->Body = $mail_body; $mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($userinfo)); $mail->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($userinfo));
$mail->Send();
if(!$mail->Send()) } catch(phpmailerException $e) {
{ $mailerr_msg = $e->errorMessage();
if($mail->ErrorInfo != '') $_mailerror = true;
{ } catch (Exception $e) {
$mailerr_msg = $mail->ErrorInfo; $mailerr_msg = $e->getMessage();
} $_mailerror = true;
else
{
$mailerr_msg = $alternative_email;
} }
if ($_mailerror) {
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg); $log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error(array('errorsendingmail', $alternative_email)); standard_error(array('errorsendingmail', $alternative_email));
} }
@@ -516,13 +519,13 @@ elseif($page == 'accounts')
standard_error(array('stringisempty', 'mypassword')); standard_error(array('stringisempty', 'mypassword'));
exit; exit;
} }
else
{ $password = validatePassword($password);
$log->logAction(USR_ACTION, LOG_NOTICE, "changed email password for '" . $result['email_full'] . "'"); $log->logAction(USR_ACTION, LOG_NOTICE, "changed email password for '" . $result['email_full'] . "'");
$result = $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET " . ($settings['system']['mailpwcleartext'] == '1' ? "`password` = '" . $db->escape($password) . "', " : '') . " `password_enc`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['popaccountid'] . "'"); $result = $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET " . ($settings['system']['mailpwcleartext'] == '1' ? "`password` = '" . $db->escape($password) . "', " : '') . " `password_enc`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['popaccountid'] . "'");
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s)); redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
} }
}
else else
{ {
$result['email_full'] = $idna_convert->decode($result['email_full']); $result['email_full'] = $idna_convert->decode($result['email_full']);

View File

@@ -135,6 +135,7 @@ elseif($page == 'accounts')
{ {
$path = validate($_POST['path'], 'path'); $path = validate($_POST['path'], 'path');
$password = validate($_POST['ftp_password'], 'password'); $password = validate($_POST['ftp_password'], 'password');
$password = validatePassword($password);
if($settings['customer']['ftpatdomain'] == '1') if($settings['customer']['ftpatdomain'] == '1')
{ {
@@ -172,18 +173,12 @@ elseif($page == 'accounts')
} }
else else
{ {
$userpath = makeCorrectDir($path);
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path); $path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
$db->query("INSERT INTO `" . TABLE_FTP_USERS . "` (`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($path) . "', 'y', '" . (int)$userinfo['guid'] . "', '" . (int)$userinfo['guid'] . "')"); $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` (`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($path) . "', 'y', '" . (int)$userinfo['guid'] . "', '" . (int)$userinfo['guid'] . "')");
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'"); $db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'");
// $db->query("INSERT INTO `".TABLE_FTP_GROUPS."` (`customerid`, `groupname`, `gid`, `members`) VALUES ('".$userinfo['customerid']."', '$username', '$uid', '$username')");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'"); $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
// $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value`='$uid' WHERE settinggroup='ftp' AND varname='lastguid'");
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'"); $log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
inserttask(5); inserttask(5);
redirectTo($filename, Array('page' => $page, 's' => $s)); redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -212,7 +207,7 @@ elseif($page == 'accounts')
elseif($action == 'edit' elseif($action == 'edit'
&& $id != 0) && $id != 0)
{ {
$result = $db->query_first("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'"); $result = $db->query_first("SELECT `id`, `username`, `homedir`, `uid`, `gid` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
if(isset($result['username']) if(isset($result['username'])
&& $result['username'] != '') && $result['username'] != '')
@@ -220,8 +215,18 @@ elseif($page == 'accounts')
if(isset($_POST['send']) if(isset($_POST['send'])
&& $_POST['send'] == 'send') && $_POST['send'] == 'send')
{ {
$password = validate($_POST['ftp_password'], 'password'); $path = validate($_POST['path'], 'path');
$_setnewpass = false;
if(isset($_POST['ftp_password']) && $_POST['ftp_password'] != '')
{
$password = validate($_POST['ftp_password'], 'password');
$password = validatePassword($password);
$_setnewpass = true;
}
if($_setnewpass)
{
if($password == '') if($password == '')
{ {
standard_error(array('stringisempty', 'mypassword')); standard_error(array('stringisempty', 'mypassword'));
@@ -229,13 +234,55 @@ elseif($page == 'accounts')
} }
else else
{ {
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account password for '" . $result['username'] . "'");
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'"); $db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$log->logAction(USR_ACTION, LOG_INFO, "edited ftp-account '" . $result['username'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
} }
} }
if($path != '')
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
if($path != $result['homedir'])
{
if(!file_exists($path))
{
mkDirWithCorrectOwnership($userinfo['documentroot'], $path, $result['uid'], $result['gid']);
}
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account homdir for '" . $result['username'] . "'");
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `homedir`= '" . $db->escape($path) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
}
}
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else else
{ {
if(strpos($result['homedir'], $userinfo['documentroot']) === 0)
{
$homedir = substr($result['homedir'], strlen($userinfo['documentroot']));
}
else
{
$homedir = $result['homedir'];
}
$homedir = makeCorrectDir($homedir);
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $homedir);
if($settings['customer']['ftpatdomain'] == '1')
{
$domains = '';
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
while($row_domain = $db->fetch_array($result_domains))
{
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
}
}
eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";"); eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";");
} }
} }

View File

@@ -139,6 +139,13 @@ elseif($page == 'mysqls')
&& $_POST['send'] == 'send') && $_POST['send'] == 'send')
{ {
$password = validate($_POST['mysql_password'], 'password'); $password = validate($_POST['mysql_password'], 'password');
$password = validatePassword($password);
$sendinfomail = intval($_POST['sendinfomail']);
if($sendinfomail != 1)
{
$sendinfomail = 0;
}
if($password == '') if($password == '')
{ {
@@ -184,6 +191,50 @@ elseif($page == 'mysqls')
$databasedescription = validate($_POST['description'], 'description'); $databasedescription = validate($_POST['description'], 'description');
$result = $db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($username) . '", "' . $db->escape($databasedescription) . '", "' . $db->escape($dbserver) . '")'); $result = $db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($username) . '", "' . $db->escape($databasedescription) . '", "' . $db->escape($dbserver) . '")');
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1, `mysql_lastaccountnumber`=`mysql_lastaccountnumber`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"'); $result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1, `mysql_lastaccountnumber`=`mysql_lastaccountnumber`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
if($sendinfomail == 1)
{
$pma = '';
if($settings['panel']['phpmyadmin_url'] != '')
{
$r_arr = array('URI' => $settings['panel']['phpmyadmin_url']);
$pma = replace_variables($lng['customer']['mysql_add']['infomail_body']['pma'], $r_arr);
}
$replace_arr = array(
'CUST_NAME' => getCorrectUserSalutation($userinfo),
'DB_NAME' => $username,
'DB_PASS' => $password,
'DB_DESC' => $databasedescription,
'DB_SRV' => $sql_root[$dbserver]['host'],
'PMA_URI' => $pma
);
$mail_body = replace_variables($lng['customer']['mysql_add']['infomail_body']['main'], $replace_arr);
$_mailerror = false;
try {
$mail->Subject = $lng['customer']['mysql_add']['infomail_subject'];
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $userinfo['email']);
}
$mail->ClearAddresses();
}
redirectTo($filename, Array('page' => $page, 's' => $s)); redirectTo($filename, Array('page' => $page, 's' => $s));
} }
} }
@@ -196,6 +247,8 @@ elseif($page == 'mysqls')
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server); $mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
} }
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";"); eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
} }
} }
@@ -219,6 +272,7 @@ elseif($page == 'mysqls')
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29 // Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
$password = validate($_POST['mysql_password'], 'password'); $password = validate($_POST['mysql_password'], 'password');
$password = validatePassword($password);
if($password != '') if($password != '')
{ {

View File

@@ -213,10 +213,12 @@ if($action == 'login')
if($action == 'forgotpwd') if($action == 'forgotpwd')
{ {
$adminchecked = false;
$message = '';
if(isset($_POST['send']) if(isset($_POST['send'])
&& $_POST['send'] == 'send') && $_POST['send'] == 'send')
{ {
$adminchecked = false;
$loginname = validate($_POST['loginname'], 'loginname'); $loginname = validate($_POST['loginname'], 'loginname');
$email = validateEmail($_POST['loginemail'], 'email'); $email = validateEmail($_POST['loginemail'], 'email');
$sql = "SELECT `customerid`, `firstname`, `name`, `email`, `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "` $sql = "SELECT `customerid`, `firstname`, `name`, `email`, `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "`
@@ -230,9 +232,19 @@ if($action == 'forgotpwd')
WHERE `loginname`='" . $db->escape($loginname) . "' WHERE `loginname`='" . $db->escape($loginname) . "'
AND `email`='" . $db->escape($email) . "'"; AND `email`='" . $db->escape($email) . "'";
$result = $db->query($sql); $result = $db->query($sql);
if($db->num_rows() > 0)
{
$adminchecked = true; $adminchecked = true;
} }
else
{
$result = null;
}
}
if($result !== null)
{
$user = $db->fetch_array($result); $user = $db->fetch_array($result);
if(($adminchecked && $settings['panel']['allow_preset_admin'] == '1') if(($adminchecked && $settings['panel']['allow_preset_admin'] == '1')
@@ -240,7 +252,18 @@ if($action == 'forgotpwd')
{ {
if($user !== false) if($user !== false)
{ {
if ($settings['panel']['password_min_length'] <= 6) {
$password = substr(md5(uniqid(microtime(), 1)), 12, 6); $password = substr(md5(uniqid(microtime(), 1)), 12, 6);
} else {
// make it two times larger than password_min_length
$rnd = '';
$minlength = $settings['panel']['password_min_length'];
while (strlen($rnd) < ($minlength * 2))
{
$rnd .= md5(uniqid(microtime(), 1));
}
$password = substr($rnd, (int)($minlength / 2), $minlength);
}
if($adminchecked) if($adminchecked)
{ {
@@ -258,23 +281,23 @@ if($action == 'forgotpwd')
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings); $rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
$rstlog->logAction(USR_ACTION, LOG_WARNING, "Password for user '" . $user['loginname'] . "' has been reset!"); $rstlog->logAction(USR_ACTION, LOG_WARNING, "Password for user '" . $user['loginname'] . "' has been reset!");
$body = strtr($lng['pwdreminder']['body'], array('%s' => $user['firstname'] . ' ' . $user['name'], '%p' => $password)); $body = strtr($lng['pwdreminder']['body'], array('%s' => $user['firstname'] . ' ' . $user['name'], '%p' => $password));
$mail->From = $settings['panel']['adminmail'];
$mail->FromName = 'Froxlor'; $_mailerror = false;
try {
$mail->Subject = $lng['pwdreminder']['subject']; $mail->Subject = $lng['pwdreminder']['subject'];
$mail->Body = $body; $mail->AltBody = $body;
$mail->MsgHTML(str_replace("\\n", "<br />", $body));
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']); $mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
$mail->Send();
if(!$mail->Send()) } catch(phpmailerException $e) {
{ $mailerr_msg = $e->errorMessage();
if($mail->ErrorInfo != '') $_mailerror = true;
{ } catch (Exception $e) {
$mailerr_msg = $mail->ErrorInfo; $mailerr_msg = $e->getMessage();
} $_mailerror = true;
else
{
$mailerr_msg = $email;
} }
if ($_mailerror) {
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings); $rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg); $rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
redirectTo('index.php', Array('showmessage' => '4'), true); redirectTo('index.php', Array('showmessage' => '4'), true);
@@ -294,15 +317,9 @@ if($action == 'forgotpwd')
unset($user); unset($user);
} }
else
{
$message = '';
} }
} }
else
{
$message = '';
}
if($adminchecked) if($adminchecked)
{ {

View File

@@ -274,7 +274,7 @@ CREATE TABLE `panel_domains` (
`isbinddomain` tinyint(1) NOT NULL default '0', `isbinddomain` tinyint(1) NOT NULL default '0',
`isemaildomain` tinyint(1) NOT NULL default '0', `isemaildomain` tinyint(1) NOT NULL default '0',
`email_only` tinyint(1) NOT NULL default '0', `email_only` tinyint(1) NOT NULL default '0',
`iswildcarddomain` tinyint(1) NOT NULL default '0', `iswildcarddomain` tinyint(1) NOT NULL default '1',
`subcanemaildomain` tinyint(1) NOT NULL default '0', `subcanemaildomain` tinyint(1) NOT NULL default '0',
`caneditdomain` tinyint(1) NOT NULL default '1', `caneditdomain` tinyint(1) NOT NULL default '1',
`zonefile` varchar(255) NOT NULL default '', `zonefile` varchar(255) NOT NULL default '',
@@ -451,7 +451,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.2'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.5');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
@@ -508,48 +508,57 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (77, 'dkim', 'use_dkim', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (77, 'dkim', 'use_dkim', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (78, 'system', 'webalizer_enabled', '1'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (78, 'system', 'webalizer_enabled', '1');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (79, 'system', 'awstats_enabled', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (79, 'system', 'awstats_enabled', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (80, 'system', 'awstats_domain_file', '/etc/awstats/'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (80, 'dkim', 'dkim_prefix', '/etc/postfix/dkim/');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (81, 'system', 'awstats_model_file', '/etc/awstats/awstats.model.conf.froxlor'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (81, 'dkim', 'dkim_domains', 'domains');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (82, 'dkim', 'dkim_prefix', '/etc/postfix/dkim/'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (82, 'dkim', 'dkim_dkimkeys', 'dkim-keys.conf');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (83, 'dkim', 'dkim_domains', 'domains'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (83, 'dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (84, 'dkim', 'dkim_dkimkeys', 'dkim-keys.conf'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (84, 'panel', 'unix_names', '1');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (85, 'dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (85, 'panel', 'allow_preset', '1');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (86, 'panel', 'unix_names', '1'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (86, 'panel', 'allow_preset_admin', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (87, 'panel', 'allow_preset', '1'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (87, 'system', 'httpuser', 'www-data');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (88, 'system', 'awstats_path', '/usr/share/awstats/VERSION/webroot/cgi-bin/'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (88, 'system', 'httpgroup', 'www-data');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (89, 'system', 'awstats_updateall_command', '/usr/bin/awstats_updateall.pl'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (89, 'system', 'webserver', 'apache2');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (90, 'panel', 'allow_preset_admin', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (90, 'autoresponder', 'autoresponder_active', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (91, 'system', 'httpuser', 'www-data'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (91, 'autoresponder', 'last_autoresponder_run', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (92, 'system', 'httpgroup', 'www-data'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (92, 'admin', 'show_version_login', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (93, 'system', 'webserver', 'apache2'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (93, 'admin', 'show_version_footer', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (94, 'autoresponder', 'autoresponder_active', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (94, 'admin', 'froxlor_graphic', 'images/header.gif');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (95, 'autoresponder', 'last_autoresponder_run', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (95, 'system', 'mod_fcgid_wrapper', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (96, 'admin', 'show_version_login', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (96, 'system', 'mod_fcgid_starter', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (97, 'admin', 'show_version_footer', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (97, 'system', 'mod_fcgid_peardir', '/usr/share/php/:/usr/share/php5/');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (98, 'admin', 'froxlor_graphic', 'images/header.gif'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (98, 'system', 'index_file_extension', 'html');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (99, 'system', 'mod_fcgid_wrapper', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (99, 'aps', 'items_per_page', '20');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (100, 'system', 'mod_fcgid_starter', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (100, 'aps', 'upload_fields', '5');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (101, 'system', 'mod_fcgid_peardir', '/usr/share/php/:/usr/share/php5/'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (101, 'aps', 'aps_active', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (102, 'system', 'index_file_extension', 'html'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (102, 'aps', 'php-extension', '');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (103, 'aps', 'items_per_page', '20'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (103, 'aps', 'php-configuration', '');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (104, 'aps', 'upload_fields', '5'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (104, 'aps', 'webserver-htaccess', '');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (105, 'aps', 'aps_active', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (105, 'aps', 'php-function', '');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (1069, 'aps', 'php-extension', ''); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (106, 'aps', 'webserver-module', '');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (107, 'aps', 'php-configuration', ''); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (107, 'system', 'realtime_port', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (108, 'aps', 'webserver-htaccess', ''); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (108, 'session', 'allow_multiple_login', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (109, 'aps', 'php-function', ''); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (109, 'panel', 'allow_domain_change_admin', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (110, 'aps', 'webserver-module', ''); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (110, 'panel', 'allow_domain_change_customer', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (111, 'system', 'realtime_port', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (111, 'system', 'mod_fcgid_maxrequests', '250');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (112, 'session', 'allow_multiple_login', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (112, 'system','ssl_key_file','/etc/apache2/apache2.key');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (113, 'panel', 'allow_domain_change_admin', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (113, 'system','ssl_ca_file','');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (114, 'panel', 'allow_domain_change_customer', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (114, 'panel', 'frontend', 'froxlor');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (115, 'system', 'mod_fcgid_maxrequests', '250'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (115, 'spf', 'use_spf', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (116, 'system','ssl_key_file','/etc/apache2/apache2.key'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (116, 'spf', 'spf_entry', '@ IN TXT "v=spf1 a mx -all"');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (117, 'system','ssl_ca_file',''); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (117, 'system', 'debug_cron', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (118, 'panel', 'frontend', 'froxlor'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (118, 'panel', 'password_min_length', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (119, 'spf', 'use_spf', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (119, 'system', 'store_index_file_subs', '1');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (120, 'spf', 'spf_entry', '@ IN TXT "v=spf1 a mx -all"'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (120, 'panel', 'adminmail_defname', 'Froxlor Administrator');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (121, 'system', 'debug_cron', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (121, 'panel', 'adminmail_return', '');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (122, 'dkim', 'dkim_algorithm', 'all');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (123, 'dkim', 'dkim_add_adsp', '1');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (124, 'dkim', 'dkim_keylength', '1024');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (125, 'dkim', 'dkim_servicetype', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (126, 'dkim', 'dkim_add_adsppolicy', '1');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (127, 'dkim', 'dkim_notes', '');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (128, 'system', 'stdsubdomain', '');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (129, 'system', 'awstats_path', '/usr/bin/');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (130, 'system', 'awstats_conf', '/etc/awstats/');
# -------------------------------------------------------- # --------------------------------------------------------
@@ -731,6 +740,7 @@ INSERT INTO `panel_languages` VALUES (13, 'Dutch', 'lng/dutch.lng.php');
INSERT INTO `panel_languages` VALUES (14, 'Hungarian', 'lng/hungarian.lng.php'); INSERT INTO `panel_languages` VALUES (14, 'Hungarian', 'lng/hungarian.lng.php');
INSERT INTO `panel_languages` VALUES (15, 'Swedish', 'lng/swedish.lng.php'); INSERT INTO `panel_languages` VALUES (15, 'Swedish', 'lng/swedish.lng.php');
INSERT INTO `panel_languages` VALUES (16, 'Czech', 'lng/czech.lng.php'); INSERT INTO `panel_languages` VALUES (16, 'Czech', 'lng/czech.lng.php');
INSERT INTO `panel_languages` VALUES (17, 'Polski', 'lng/polish.lng.php');
# -------------------------------------------------------- # --------------------------------------------------------

View File

@@ -156,6 +156,121 @@ function status_message($case, $text)
} }
} }
function requirement_checks()
{
global $lng;
page_header();
?>
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable">
<tr>
<td class="maintitle"><b><img src="../images/title.gif" alt="" />&nbsp;Froxlor Installation</b></td>
</tr>
<?php
$_die = false;
// check for correct php version
status_message('begin', $lng['install']['phpversion']);
if(version_compare("5.2.0", PHP_VERSION, ">="))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['phpmysql']);
if(!extension_loaded('mysql'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['phpfilter']);
if(!extension_loaded('filter'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['phpposix']);
if(!extension_loaded('posix'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['phpbcmath']);
if(!extension_loaded('bcmath'))
{
status_message('orange', $lng['install']['notinstalled'] . '<br />' . $lng['install']['bcmathdescription']);
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['openbasedir']);
$php_ob = @ini_get("open_basedir");
if(!empty($php_ob)
&& $php_ob != '')
{
status_message('orange', $lng['install']['openbasedirenabled']);
}
else
{
status_message('green', 'OK');
}
if($_die)
{
?>
<tr>
<td class="main_field_display" align="center">
<?php echo $lng['install']['diedbecauseofrequirements']; ?><br />
<a href="install.php"><?php echo $lng['install']['click_here_to_refresh']; ?></a>
</td>
</tr>
<?php
} else {
?>
<tr>
<td class="main_field_display" align="center">
<?php echo $lng['install']['froxlor_succ_checks']; ?><br />
<a href="install.php?check=1"><?php echo $lng['install']['click_here_to_continue']; ?></a>
</td>
</tr>
<?php
}
?>
</table>
<br />
<br />
<?php
page_footer();
}
/** /**
* END FUNCTIONS --------------------------------------------------- * END FUNCTIONS ---------------------------------------------------
*/ */
@@ -174,7 +289,7 @@ else
{ {
if(!empty($_SERVER['SERVER_NAME'])) if(!empty($_SERVER['SERVER_NAME']))
{ {
if(validate_ip($_SERVER['SERVER_NAME'], true) == false) if(preg_match('/^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$/', $_SERVER['SERVER_NAME']) == false)
{ {
$servername = $_SERVER['SERVER_NAME']; $servername = $_SERVER['SERVER_NAME'];
} }
@@ -307,12 +422,12 @@ if(!empty($_POST['webserver']))
else else
{ {
if(strtoupper(@php_sapi_name()) == "APACHE2HANDLER" if(strtoupper(@php_sapi_name()) == "APACHE2HANDLER"
|| stristr($_SERVER[SERVER_SOFTWARE], "apache/2")) || stristr($_SERVER['SERVER_SOFTWARE'], "apache/2"))
{ {
$webserver = 'apache2'; $webserver = 'apache2';
} }
elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "LIGHTTPD" elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "LIGHTTPD"
|| stristr($_SERVER[SERVER_SOFTWARE], "lighttpd")) || stristr($_SERVER['SERVER_SOFTWARE'], "lighttpd"))
{ {
$webserver = 'lighttpd'; $webserver = 'lighttpd';
} }
@@ -371,89 +486,6 @@ if(isset($_POST['installstep'])
<td class="maintitle"><b><img src="../images/title.gif" alt="" />&nbsp;Froxlor Installation</b></td> <td class="maintitle"><b><img src="../images/title.gif" alt="" />&nbsp;Froxlor Installation</b></td>
</tr> </tr>
<?php <?php
$_die = false;
// check for correct php version
status_message('begin', $lng['install']['phpversion']);
if(version_compare("5.2.0", PHP_VERSION, ">="))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['phpmysql']);
if(!extension_loaded('mysql'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['phpfilter']);
if(!extension_loaded('filter'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['phpposix']);
if(!extension_loaded('posix'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['phpbcmath']);
if(!extension_loaded('bcmath'))
{
status_message('orange', $lng['install']['notinstalled'] . '<br />' . $lng['install']['bcmathdescription']);
$_die = false;
}
else
{
status_message('green', 'OK');
}
status_message('begin', $lng['install']['openbasedir']);
$php_ob = @ini_get("open_basedir");
if(!empty($php_ob)
&& $php_ob != '')
{
status_message('orange', $lng['install']['openbasedirenabled']);
$_die = false;
}
else
{
status_message('green', 'OK');
}
if($_die)
{
status_message('begin', $lng['install']['diedbecauseofrequirements']);
die();
}
//first test if we can access the database server with the given root user and password //first test if we can access the database server with the given root user and password
@@ -475,7 +507,23 @@ if(isset($_POST['installstep'])
if(is_file("/usr/bin/mysqldump")) if(is_file("/usr/bin/mysqldump"))
{ {
$command = "/usr/bin/mysqldump " . $mysql_database . " -u " . $mysql_root_user . " --password='" . $mysql_root_pass . "' --result-file=" . $filename; $do_backup = true;
$mysql_dump = '/usr/bin/mysqldump';
}
elseif(is_file("/usr/local/bin/mysqldump"))
{
$do_backup = true;
$mysql_dump = '/usr/local/bin/mysqldump';
}
else
{
$do_backup = false;
status_message('red', $lng['install']['backing_up_binary_missing']);
}
if($do_backup) {
$command = $mysql_dump . " " . $mysql_database . " -u " . $mysql_root_user . " --password='" . $mysql_root_pass . "' --result-file=" . $filename;
$output = exec($command); $output = exec($command);
if(stristr($output, "error")) if(stristr($output, "error"))
@@ -486,10 +534,7 @@ if(isset($_POST['installstep'])
{ {
status_message('green', 'OK'); status_message('green', 'OK');
} }
}
else
{
status_message('red', $lng['install']['backing_up_binary_missing']);
} }
} }
@@ -575,8 +620,6 @@ if(isset($_POST['installstep'])
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'"); $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'"); $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
//FIXME
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpuser) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'"); $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpuser) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'"); $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
@@ -602,10 +645,21 @@ if(isset($_POST['installstep'])
$query = sprintf($query, TABLE_PANEL_SETTINGS); $query = sprintf($query, TABLE_PANEL_SETTINGS);
$db->query($query); $db->query($query);
// set specific times for some crons (traffic only at night, etc.)
$ts = mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_traffic.php';");
$ts = mktime(1, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_used_tickets_reset.php';");
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_ticketarchive.php';");
// and lets insert the default ip and port // and lets insert the default ip and port
$query = 'INSERT INTO `%s` SET `ip` = \'%s\', `port` = \'80\' '; $query = "INSERT INTO `".TABLE_PANEL_IPSANDPORTS."`
$query = sprintf($query, TABLE_PANEL_IPSANDPORTS, $db->escape($serverip)); SET `ip`= '".$db->escape($serverip)."',
`port` = '80',
`namevirtualhost_statement` = '1',
`vhostcontainer` = '1',
`vhostcontainer_servername_statement` = '1'";
$db->query($query); $db->query($query);
$defaultip = $db->insert_id(); $defaultip = $db->insert_id();
@@ -708,10 +762,17 @@ if(isset($_POST['installstep'])
} }
else else
{ {
if((isset($_GET['check'])
&& $_GET['check'] == '1')
|| (isset($_POST['installstep'])
&& $_POST['installstep'] == '1')
) {
page_header(); page_header();
?> ?>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get"> <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get">
<input type="hidden" name="check" value="1" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40"> <table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
<tr> <tr>
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['welcome']; ?></b></td> <td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['welcome']; ?></b></td>
@@ -746,6 +807,7 @@ else
</form> </form>
<br /> <br />
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post"> <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post">
<input type="hidden" name="check" value="1" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40"> <table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
<tr> <tr>
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['database']; ?></b></td> <td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['database']; ?></b></td>
@@ -821,6 +883,11 @@ else
<br /> <br />
<?php <?php
page_footer(); page_footer();
}
else
{
requirement_checks();
}
} }
/** /**

View File

@@ -84,4 +84,11 @@ $lng['install']['webserver'] = 'Webserver';
$lng['install']['phpversion'] = 'Checking for PHP version >= 5.2'; $lng['install']['phpversion'] = 'Checking for PHP version >= 5.2';
$lng['install']['phpposix'] = 'Testing if PHP posix-extension is installed...'; $lng['install']['phpposix'] = 'Testing if PHP posix-extension is installed...';
/*
* Added in Froxlor 0.9.4
*/
$lng['install']['click_here_to_refresh'] = 'Re-check';
$lng['install']['click_here_to_continue'] = 'Continue installation';
$lng['install']['froxlor_succ_checks'] = 'All requirements are satisfied';
?> ?>

View File

@@ -84,4 +84,11 @@ $lng['install']['webserver'] = 'Webserver';
$lng['install']['phpversion'] = 'Pr&uuml;fe PHP Version >= 5.2'; $lng['install']['phpversion'] = 'Pr&uuml;fe PHP Version >= 5.2';
$lng['install']['phpposix'] = 'Teste, ob die PHP Posix-Erweiterung installiert ist...'; $lng['install']['phpposix'] = 'Teste, ob die PHP Posix-Erweiterung installiert ist...';
/*
* Added in Froxlor 0.9.4
*/
$lng['install']['click_here_to_refresh'] = 'Erneut pr&uuml;fen';
$lng['install']['click_here_to_continue'] = 'Installation fortf&uuml;hren';
$lng['install']['froxlor_succ_checks'] = 'Alle Vorraussetzungen sind erf&uuml;llt';
?> ?>

View File

@@ -21,9 +21,7 @@ $baseLanguage = 'english.lng.php';
// Check if we're in the CLI // Check if we're in the CLI
if(@php_sapi_name() != 'cli' if(@php_sapi_name() != 'cli')
&& @php_sapi_name() != 'cgi'
&& @php_sapi_name() != 'cgi-fcgi')
{ {
die('This script will only work in the shell.'); die('This script will only work in the shell.');
} }

View File

@@ -299,7 +299,7 @@ if(isFroxlorVersion('0.9.1'))
&& (int)$result['latestguid'] > 0 && (int)$result['latestguid'] > 0
&& $result['latestguid'] != $settings['system']['lastguid'] && $result['latestguid'] != $settings['system']['lastguid']
) { ) {
checkLastGuid($result['latestguid']); checkLastGuid();
lastStepStatus(1, 'fixed'); lastStepStatus(1, 'fixed');
} else { } else {
lastStepStatus(0); lastStepStatus(0);
@@ -307,4 +307,169 @@ if(isFroxlorVersion('0.9.1'))
updateToVersion('0.9.2'); updateToVersion('0.9.2');
} }
if(isFroxlorVersion('0.9.2'))
{
showUpdateStep("Updating from 0.9.2 to 0.9.3");
lastStepStatus(0);
updateToVersion('0.9.3');
}
if(isFroxlorVersion('0.9.3'))
{
showUpdateStep("Updating from 0.9.3 to 0.9.3-svn1", false);
showUpdateStep("Updating tables");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'password_min_length', '0');");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'store_index_file_subs', '1');");
lastStepStatus(0);
updateToVersion('0.9.3-svn1');
}
if(isFroxlorVersion('0.9.3-svn1'))
{
showUpdateStep("Updating from 0.9.3-svn1 to 0.9.3-svn2", false);
showUpdateStep("Updating tables");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'adminmail_defname', 'Froxlor Administrator');");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'adminmail_return', '');");
lastStepStatus(0);
updateToVersion('0.9.3-svn2');
}
if(isFroxlorVersion('0.9.3-svn2'))
{
showUpdateStep("Updating from 0.9.3-svn2 to 0.9.3-svn3", false);
showUpdateStep("Correcting cron start-times");
// set specific times for some crons (traffic only at night, etc.)
$ts = mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_traffic.php';");
$ts = mktime(1, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_used_tickets_reset.php';");
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_ticketarchive.php';");
lastStepStatus(0);
showUpdateStep("Adding new language: Polish");
$db->query("INSERT INTO `".TABLE_PANEL_LANGUAGE."` SET `language` = 'Polski', `file` = 'lng/polish.lng.php'");
lastStepStatus(0);
updateToVersion('0.9.3-svn3');
}
if(isFroxlorVersion('0.9.3-svn3'))
{
showUpdateStep("Updating from 0.9.3-svn3 to 0.9.3-svn4", false);
showUpdateStep("Adding new DKIM settings");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_algorithm', 'all');");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_add_adsp', '1');");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_keylength', '1024');");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_servicetype', '0');");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_add_adsppolicy', '1');");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_notes', '');");
lastStepStatus(0);
updateToVersion('0.9.3-svn4');
}
if(isFroxlorVersion('0.9.3-svn4'))
{
showUpdateStep("Updating from 0.9.3-svn4 to 0.9.3-svn5", false);
showUpdateStep("Adding new settings");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'stdsubdomain', '');");
lastStepStatus(0);
updateToVersion('0.9.3-svn5');
}
if(isFroxlorVersion('0.9.3-svn5'))
{
showUpdateStep("Updating from 0.9.3-svn5 to 0.9.4 final");
lastStepStatus(0);
updateToVersion('0.9.4');
}
if(isFroxlorVersion('0.9.4'))
{
showUpdateStep("Updating from 0.9.4 to 0.9.4-svn1", false);
/**
* some users might still have the setting in their database
* because we already had this back in older versions.
* To not confuse Froxlor, we just update old settings.
*/
if(isset($settings['system']['awstats_path'])
&& $settings['system']['awstats_path'] != ''
) {
showUpdateStep("Updating awstats path setting");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/usr/bin/' WHERE `settinggroup` = 'system' AND `varname` = 'awstats_path';");
}
else
{
showUpdateStep("Adding new awstats path setting");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_path', '/usr/bin/');");
}
lastStepStatus(0);
if(isset($settings['system']['awstats_domain_file'])
&& $settings['system']['awstats_domain_file'] != ''
) {
showUpdateStep("Updating awstats configuration path setting");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'awstats_conf' WHERE `varname` = 'awstats_domain_file';");
}
else
{
showUpdateStep("Adding awstats configuration path settings");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_conf', '/etc/awstats/');");
}
lastStepStatus(0);
updateToVersion('0.9.4-svn1');
}
if(isFroxlorVersion('0.9.4-svn1'))
{
showUpdateStep("Updating from 0.9.4-svn1 to 0.9.4-svn2", false);
$update_domains = isset($_POST['update_domainwildcardentry']) ? intval($_POST['update_domainwildcardentry']) : 0;
if($update_domains != 1)
{
$update_domains = 0;
}
if($update_domains == 1)
{
showUpdateStep("Updating domains with iswildcarddomain=yes");
$query = "SELECT `d`.`id` FROM `".TABLE_PANEL_DOMAINS."` `d`, `".TABLE_PANEL_CUSTOMERS."` `c` ";
$query.= "WHERE `parentdomainid`='0' AND `email_only` = '0' AND `d`.`customerid` = `c`.`customerid` AND `d`.`id` <> `c`.`standardsubdomain`";
$result = $db->query($query);
$updated_domains = 0;
while($domain = $db->fetch_array($result))
{
$db->query("UPDATE `".TABLE_PANEL_DOMAINS."` SET `iswildcarddomain` = '1' WHERE `id` ='".(int)$domain['id']."'");
$updated_domains++;
}
lastStepStatus(0, 'Updated '.$updated_domains.' domain(s)');
} else {
showUpdateStep("Won't update domains with iswildcarddomain=yes as requested");
lastStepStatus(1);
}
showUpdateStep("Updating database table definition for panel_domains");
$db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` MODIFY `iswildcarddomain` tinyint(1) NOT NULL default '1';");
lastStepStatus(0);
updateToVersion('0.9.4-svn2');
}
if(isFroxlorVersion('0.9.4-svn2'))
{
showUpdateStep("Updating from 0.9.4-svn2 to 0.9.5 final");
lastStepStatus(0);
updateToVersion('0.9.5');
}
?> ?>

View File

@@ -0,0 +1,59 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* @version $Id$
*/
/**
* Function getPreConfig
*
* outputs various content before the update process
* can be continued (askes for agreement whatever is being asked)
*
* @param string version
*
* @return string
*/
function getPreConfig($current_version)
{
$has_preconfig = false;
$return = '<div class="preconfig"><h3 style="color:#ff0000;">PLEASE NOTE - Important update notifications</h3>';
include_once makeCorrectFile(dirname(__FILE__).'/preconfig/0.9/preconfig_0.9.inc.php');
parseAndOutputPreconfig($has_preconfig, $return, $current_version);
$return .= '<br /><br />'.makecheckbox('update_changesagreed', '<strong>I have read the update notifications and I am aware of the changes made to my system.</strong>', '1', true, '0', true);
$return .= '</div>';
$return .= '<input type="hidden" name="update_preconfig" value="1" />';
if($has_preconfig) {
return $return;
} else {
return '';
}
}
function versionInUpdate($current_version, $version_to_check)
{
$pos_a = strpos($current_version, '-svn');
$pos_b = strpos($current_version, '-svn');
// if we compare svn-versions, we have to add -svn0 to the version
// to compare it correctly
if($pos_a === false && $pos_b !== false)
{
$current_version.= '-svn0';
}
return version_compare($current_version, $version_to_check, '<');
}

View File

@@ -0,0 +1,38 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* @version $Id$
*/
/**
* 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)
{
if(versionInUpdate($current_version, '0.9.4-svn2'))
{
$has_preconfig = true;
$return .= '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). ';
$return .= '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 />';
$return .= '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.<br /><br />';
$return .= '<strong>Do you want to use wildcard-entries for existing domains?:</strong>&nbsp;';
$return .= makeyesno('update_domainwildcardentry', '1', '0', '1').'<br /><br />';
}
}

View File

@@ -2415,7 +2415,8 @@ class ApsParser
{ {
if(isset($_POST[$FieldId])) if(isset($_POST[$FieldId]))
{ {
if(!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $_POST[$FieldId])) $email = strtolower($_POST[$FieldId]);
if(filter_var($email, FILTER_VALIDATE_EMAIL) === false)
{ {
if(!in_array($FieldId, $Error))$Error[] = $FieldId; if(!in_array($FieldId, $Error))$Error[] = $FieldId;
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -286,14 +286,25 @@ class ticket
if($customerid != - 1) if($customerid != - 1)
{ {
$mail->From = $this->settings['ticket']['noreply_email']; $_mailerror = false;
$mail->FromName = $this->settings['ticket']['noreply_name']; try {
$mail->SetFrom($this->settings['ticket']['noreply_email'], $this->settings['ticket']['noreply_name']);
$mail->Subject = $mail_subject; $mail->Subject = $mail_subject;
$mail->Body = $mail_body; $mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($usr['email'], $usr['firstname'] . ' ' . $usr['name']); $mail->AddAddress($usr['email'], $usr['firstname'] . ' ' . $usr['name']);
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if(!$mail->Send()) if ($_mailerror) {
{ $rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'ticket_class'), $this->db, $this->settings);
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error(array('errorsendingmail', $usr['email'])); standard_error(array('errorsendingmail', $usr['email']));
} }
@@ -301,15 +312,27 @@ class ticket
} }
else else
{ {
$admin = $this->db->query_first("SELECT `name`, email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'"); $admin = $this->db->query_first("SELECT `name`, `email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'");
$mail->From = $this->settings['ticket']['noreply_email'];
$mail->FromName = $this->settings['ticket']['noreply_name'];
$mail->Subject = $mail_subject;
$mail->Body = $mail_body;
$mail->AddAddress($admin['email'], $admin['name']);
if(!$mail->Send()) $_mailerror = false;
{ try {
$mail->SetFrom($this->settings['ticket']['noreply_email'], $this->settings['ticket']['noreply_name']);
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($admin['email'], $admin['name']);
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'ticket_class'), $this->db, $this->settings);
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error(array('errorsendingmail', $admin['email'])); standard_error(array('errorsendingmail', $admin['email']));
} }
@@ -668,7 +691,11 @@ class ticket
{ {
if(strtolower($_var) == 'message') if(strtolower($_var) == 'message')
{ {
return htmlspecialchars_decode(nl2br($this->t_data[$_var])); return str_replace('script>', 'pre>', htmlspecialchars_decode(nl2br($this->t_data[$_var])));
}
elseif(strtolower($_var) == 'subject')
{
return str_replace('script>', 'pre>', htmlspecialchars_decode(nl2br($this->t_data[$_var])));
} }
else else
{ {

View File

@@ -29,6 +29,7 @@ return Array(
'commands' => Array( 'commands' => Array(
'mkdir -p ' . $settings['system']['documentroot_prefix'], 'mkdir -p ' . $settings['system']['documentroot_prefix'],
'mkdir -p ' . $settings['system']['logfiles_directory'], 'mkdir -p ' . $settings['system']['logfiles_directory'],
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
'a2dismod userdir', 'a2dismod userdir',
@@ -50,8 +51,11 @@ return Array(
$configcommand['diroptions'], $configcommand['diroptions'],
$configcommand['v_inclighty'], $configcommand['v_inclighty'],
$configcommand['d_inclighty'], $configcommand['d_inclighty'],
'lighty-disable-mod cgi',
'lighty-disable-mod fastcgi',
'mkdir -p ' . $settings['system']['documentroot_prefix'], 'mkdir -p ' . $settings['system']['documentroot_prefix'],
'mkdir -p ' . $settings['system']['logfiles_directory'], 'mkdir -p ' . $settings['system']['logfiles_directory'],
'mkdir -p ' . $settings['system']['deactivateddocroot'],
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
), ),
@@ -69,7 +73,9 @@ return Array(
'commands' => Array( 'commands' => Array(
'apt-get install bind9', 'apt-get install bind9',
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf', 'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf' 'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
), ),
'restart' => Array( 'restart' => Array(
'/etc/init.d/bind9 restart' '/etc/init.d/bind9 restart'
@@ -131,6 +137,19 @@ return Array(
'newaliases' 'newaliases'
) )
), ),
'postfix_mxaccess' => Array(
'label' => 'Postfix MX-Access (anti spam)',
'files' => Array(
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
),
'commands_1' => Array(
'postmap /etc/postfix/mx_access'
),
'restart' => Array(
'/etc/init.d/postfix restart'
)
),
'exim4' => Array( 'exim4' => Array(
'label' => 'Exim4', 'label' => 'Exim4',
'commands_1' => Array( 'commands_1' => Array(
@@ -191,6 +210,9 @@ return Array(
'daemons' => Array( 'daemons' => Array(
'proftpd' => Array( 'proftpd' => Array(
'label' => 'ProFTPd', 'label' => 'ProFTPd',
'commands' => Array(
'apt-get install proftpd-basic proftpd-mod-mysql'
),
'files' => Array( 'files' => Array(
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
@@ -248,18 +270,13 @@ return Array(
), ),
'awstats' => Array( 'awstats' => Array(
'label' => 'Awstats', 'label' => 'Awstats',
'files' => Array(
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
),
'commands' => Array( 'commands' => Array(
'apt-get install awstats', 'apt-get install awstats',
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') 'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
),
'files' => Array(
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
), ),
'restart' => Array(
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
)
), ),
'libnss' => Array( 'libnss' => Array(
'label' => 'libnss (system login with mysql)', 'label' => 'libnss (system login with mysql)',

View File

@@ -0,0 +1,213 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Configfiles
* @version $Id$
*/
return Array(
'freebsd' => Array(
'label' => 'FreeBSD',
'services' => Array(
'http' => Array(
'label' => $lng['admin']['configfiles']['http'],
'daemons' => Array(
'apache2' => Array(
'label' => 'Apache2 Webserver',
'commands' => Array(
'cd /usr/ports/www/apache22',
'make config',
'make install',
'touch ' . $settings['system']['apacheconf_vhost'],
'chown root:0 ' . $settings['system']['apacheconf_vhost'],
'chmod 0600 ' . $settings['system']['apacheconf_vhost'],
'touch ' . $settings['system']['apacheconf_diroptions'],
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
'mkdir -p ' . $settings['system']['documentroot_prefix'],
'mkdir -p ' . $settings['system']['logfiles_directory'],
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
'echo "accf_http_load=\"YES\"" >> /boot/loader.conf',
'echo "accf_data_load=\"YES\"" >> /boot/loader.conf',
'echo "apache22_enable=\"YES\"" >> /etc/rc.conf',
),
'restart' => Array(
'sh /usr/local/etc/rc.d/apache22 restart'
)
)
)
),
'dns' => Array(
'label' => $lng['admin']['configfiles']['dns'],
'daemons' => Array(
'powerdns' => Array(
'label' => 'PowerDNS',
'commands_1' => Array(
'cd /usr/ports/dns/powerdns',
'make config',
'make install',
'echo "add pdns_enable=\"YES\"" >> /etc/rc.conf',
),
'files' => Array(
'usr_local_etc_pdns_pdns.conf' => '/usr/local/etc/pdns/pdns.conf'
),
'commands' => Array(
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chown root:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
),
'restart' => Array(
'sh /usr/local/etc/rc.d/pdns restart'
)
),
)
),
'smtp' => Array(
'label' => $lng['admin']['configfiles']['smtp'],
'daemons' => Array(
'postfix' => Array(
'label' => 'Postfix',
'commands_1' => Array(
'cd /usr/ports/mail/postfix',
'make config',
'set Dovecot SASL authentication method',
'set Enable SSL and TLS support',
'set MySQL maps (choose version with WITH_MYSQL_VER)',
'make install'
),
'commands_2' => Array(
'pw groupadd vmail -g 5001 ',
'pw useradd vmail -u 5001 -g 5001 -s/sbin/nologin -d/dev/null',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chmod 0750 ' . $settings['system']['vmail_homedir']
),
'commands_3' => Array(
'echo "sendmail_enable=\"NO\"" >> /etc/rc.conf',
'echo "sendmail_submit_enable=\"NO\"" >> /etc/rc.conf',
'echo "sendmail_outbound_enable=\"NO\"" >> /etc/rc.conf',
'echo "sendmail_msp_queue_enable=\"NO\"" >> /etc/rc.conf',
'echo "postfix_enable=\"YES\"" >> /etc/rc.conf'
),
'files' => Array(
'etc_periodic.conf' => '/etc/periodic.conf',
'usr_local_etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf',
'usr_local_etc_postfix_mysql-virtual_alias_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_alias_maps.cf',
'usr_local_etc_postfix_mysql-virtual_mailbox_domains.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf',
'usr_local_etc_postfix_mysql-virtual_mailbox_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf'
),
'restart' => Array(
'sh /usr/local/etc/rc.d/postfix restart'
)
),
'postfix_mxaccess' => Array(
'label' => 'Postfix MX-Access (anti spam)',
'files' => Array(
'etc_postfix_mx_access' => '/usr/local/etc/postfix/mx_access',
'etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf'
),
'commands_1' => Array(
'postmap /etc/postfix/mx_access'
),
'restart' => Array(
'/etc/init.d/postfix restart'
)
),
'dkim' => Array(
'label' => 'DomainKey filter',
'commands' => Array(
'cd /usr/ports/mail/dkim-milter/',
'make install clean',
'touch /usr/local/etc/mail/dkim-filter.conf'
),
'files' => Array(
'dkim-filter.conf' => '/usr/local/etc/mail/dkim-filter.conf',
'postfix_dkim_addition.cf' => '/usr/local/etc/postfix/main.cf'
),
'restart' => Array(
'/usr/local/etc/rc.d/milter-dkim restart '
)
)
)
),
'mail' => Array(
'label' => $lng['admin']['configfiles']['mail'],
'daemons' => Array(
'dovecot' => Array(
'label' => 'Dovecot',
'commands_1' => Array(
'cd /usr/ports/mail/dovecot',
'make config',
'set kqueue(2) support ',
'set SSL support ',
'set ManageSieve support (optional)',
'set MySQL support ',
'make install',
'echo "add dovecot_enable=\"YES\"" >> /etc/rc.conf'
),
'files' => Array(
'usr_local_etc_dovecot.conf' => '/usr/local/etc/dovecot.conf',
'usr_local_etc_dovecot-sql.conf' => '/usr/local/etc/dovecot-sql.conf'
),
'commands_2' => Array(
'echo "dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf'
),
'restart' => Array(
'sh /usr/local/etc/rc.d/dovecot restart'
)
)
)
),
'ftp' => Array(
'label' => $lng['admin']['configfiles']['ftp'],
'daemons' => Array(
'proftpd' => Array(
'label' => 'ProFTPd',
'files' => Array(
'etc_proftpd_proftpd.conf' => '/usr/local/etc/proftpd.conf'
),
'commands' => Array(
'touch /usr/local/etc/proftpd.conf',
'chown root:0 /usr/local/etc/proftpd.conf',
'chmod 0600 /usr/local/etc/proftpd.conf'
),
'restart' => Array(
'/usr/local/etc/rc.d/proftpd restart'
)
)
)
),
'etc' => Array(
'label' => $lng['admin']['configfiles']['etc'],
'daemons' => Array(
'awstats' => Array(
'label' => 'Awstats',
'commands' => Array(
'cd /usr/ports/www/awstats/',
'make install clean',
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf'])
),
'files' => Array(
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
)
)
)
)
)
)
);
?>

View File

@@ -34,9 +34,10 @@ return Array(
'chown root:0 ' . $settings['system']['apacheconf_diroptions'], 'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'], 'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
'mkdir -p ' . $settings['system']['documentroot_prefix'], 'mkdir -p ' . $settings['system']['documentroot_prefix'],
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
'mkdir -p ' . $settings['system']['logfiles_directory'], 'mkdir -p ' . $settings['system']['logfiles_directory'],
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
), ),
'restart' => Array( 'restart' => Array(
'rc-update add apache2 default', 'rc-update add apache2 default',
@@ -54,7 +55,8 @@ return Array(
$configcommand['v_inclighty'], $configcommand['v_inclighty'],
$configcommand['d_inclighty'], $configcommand['d_inclighty'],
'mkdir -p ' . $settings['system']['documentroot_prefix'], 'mkdir -p ' . $settings['system']['documentroot_prefix'],
'mkdir -p ' . $settings['system']['logfiles_directory'] 'mkdir -p ' . $settings['system']['logfiles_directory'],
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : ''
), ),
'restart' => Array( 'restart' => Array(
'rc-update add lighttpd default', 'rc-update add lighttpd default',
@@ -74,7 +76,7 @@ return Array(
'commands' => Array( 'commands' => Array(
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf', 'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf', 'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chown root:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf', 'chown named:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf' 'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
), ),
'restart' => Array( 'restart' => Array(
@@ -126,22 +128,37 @@ return Array(
'/etc/init.d/postfix restart' '/etc/init.d/postfix restart'
) )
), ),
'postfix_mxaccess' => Array(
'label' => 'Postfix MX-Access (anti spam)',
'files' => Array(
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
),
'commands_1' => Array(
'postmap /etc/postfix/mx_access'
),
'restart' => Array(
'/etc/init.d/postfix restart'
)
),
'dkim' => Array( 'dkim' => Array(
'label' => 'DomainKey filter', 'label' => 'DomainKey filter',
'commands_1' => Array( 'commands_1' => Array(
'emerge dkim-milter',
'emerge --config mail-filter/dkim-milter',
'mkdir -p /etc/postfix/dkim' 'mkdir -p /etc/postfix/dkim'
), ),
'files' => Array( 'files' => Array(
'dkim-filter.conf' => '/etc/postfix/dkim/dkim-filter.conf' 'dkim-filter.conf' => '/etc/mail/dkim-filter/dkim-filter.conf'
), ),
'commands_2' => Array( 'commands_2' => Array(
'chgrp postfix /etc/postfix/dkim/dkim-filter.conf', 'echo "smtpd_milters = inet:localhost:8891
'echo "smtpd_milters = inet:localhost:8891\n milter_macro_daemon_name = SIGNING
milter_macro_daemon_name = SIGNING\n milter_default_action = accept" >> /etc/postfix/main.cf'
milter_default_action = accept\n" >> /etc/postfix/main.cf'
), ),
'restart' => Array( 'restart' => Array(
'/etc/init.d/dkim-filter restart' 'rc-update add dkim-filter default',
'/etc/init.d/postfix restart'
) )
) )
) )
@@ -266,17 +283,13 @@ milter_default_action = accept\n" >> /etc/postfix/main.cf'
), ),
'awstats' => Array( 'awstats' => Array(
'label' => 'Awstats', 'label' => 'Awstats',
'files' => Array(
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
),
'commands' => Array( 'commands' => Array(
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') 'emerge awstats',
'awstats_configure.pl'
),
'files' => Array(
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
), ),
'restart' => Array(
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
)
), ),
'libnss' => Array( 'libnss' => Array(
'label' => 'libnss (system login with mysql)', 'label' => 'libnss (system login with mysql)',

View File

@@ -29,9 +29,10 @@ return Array(
'commands' => Array( 'commands' => Array(
'mkdir -p ' . $settings['system']['documentroot_prefix'], 'mkdir -p ' . $settings['system']['documentroot_prefix'],
'mkdir -p ' . $settings['system']['logfiles_directory'], 'mkdir -p ' . $settings['system']['logfiles_directory'],
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
'a2dismod userdir', 'a2dismod userdir'
), ),
'restart' => Array( 'restart' => Array(
'/etc/init.d/apache2 restart' '/etc/init.d/apache2 restart'
@@ -50,10 +51,13 @@ return Array(
$configcommand['diroptions'], $configcommand['diroptions'],
$configcommand['v_inclighty'], $configcommand['v_inclighty'],
$configcommand['d_inclighty'], $configcommand['d_inclighty'],
'lighty-disable-mod cgi',
'lighty-disable-mod fastcgi',
'mkdir -p ' . $settings['system']['documentroot_prefix'], 'mkdir -p ' . $settings['system']['documentroot_prefix'],
'mkdir -p ' . $settings['system']['logfiles_directory'], 'mkdir -p ' . $settings['system']['logfiles_directory'],
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
), ),
'restart' => Array( 'restart' => Array(
'/etc/init.d/lighttpd restart' '/etc/init.d/lighttpd restart'
@@ -68,7 +72,9 @@ return Array(
'label' => 'Bind9', 'label' => 'Bind9',
'commands' => Array( 'commands' => Array(
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf', 'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf' 'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
), ),
'restart' => Array( 'restart' => Array(
'/etc/init.d/bind9 restart' '/etc/init.d/bind9 restart'
@@ -131,6 +137,19 @@ return Array(
'newaliases' 'newaliases'
) )
), ),
'postfix_mxaccess' => Array(
'label' => 'Postfix MX-Access (anti spam)',
'files' => Array(
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
),
'commands_1' => Array(
'postmap /etc/postfix/mx_access'
),
'restart' => Array(
'/etc/init.d/postfix restart'
)
),
'exim4' => Array( 'exim4' => Array(
'label' => 'Exim4', 'label' => 'Exim4',
'commands_1' => Array( 'commands_1' => Array(
@@ -188,6 +207,9 @@ return Array(
'daemons' => Array( 'daemons' => Array(
'proftpd' => Array( 'proftpd' => Array(
'label' => 'ProFTPd', 'label' => 'ProFTPd',
'commands' => Array(
'apt-get install proftpd-basic proftpd-mod-mysql'
),
'files' => Array( 'files' => Array(
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
@@ -242,18 +264,13 @@ return Array(
), ),
'awstats' => Array( 'awstats' => Array(
'label' => 'Awstats', 'label' => 'Awstats',
'files' => Array(
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
),
'commands' => Array( 'commands' => Array(
'apt-get install awstats', 'apt-get install awstats',
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') 'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
),
'files' => Array(
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
), ),
'restart' => Array(
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
)
), ),
'libnss' => Array( 'libnss' => Array(
'label' => 'libnss (system login with mysql)', 'label' => 'libnss (system login with mysql)',

View File

@@ -29,9 +29,10 @@ return Array(
'commands' => Array( 'commands' => Array(
'mkdir -p ' . $settings['system']['documentroot_prefix'], 'mkdir -p ' . $settings['system']['documentroot_prefix'],
'mkdir -p ' . $settings['system']['logfiles_directory'], 'mkdir -p ' . $settings['system']['logfiles_directory'],
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
'a2dismod userdir', 'a2dismod userdir'
), ),
'restart' => Array( 'restart' => Array(
'/etc/init.d/apache2 restart' '/etc/init.d/apache2 restart'
@@ -50,10 +51,13 @@ return Array(
$configcommand['diroptions'], $configcommand['diroptions'],
$configcommand['v_inclighty'], $configcommand['v_inclighty'],
$configcommand['d_inclighty'], $configcommand['d_inclighty'],
'lighty-disable-mod cgi',
'lighty-disable-mod fastcgi',
'mkdir -p ' . $settings['system']['documentroot_prefix'], 'mkdir -p ' . $settings['system']['documentroot_prefix'],
'mkdir -p ' . $settings['system']['logfiles_directory'], 'mkdir -p ' . $settings['system']['logfiles_directory'],
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
), ),
'restart' => Array( 'restart' => Array(
'/etc/init.d/lighttpd restart' '/etc/init.d/lighttpd restart'
@@ -69,7 +73,9 @@ return Array(
'commands' => Array( 'commands' => Array(
'apt-get install bind9', 'apt-get install bind9',
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf', 'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf' 'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
), ),
'restart' => Array( 'restart' => Array(
'/etc/init.d/bind9 restart' '/etc/init.d/bind9 restart'
@@ -131,6 +137,19 @@ return Array(
'newaliases' 'newaliases'
) )
), ),
'postfix_mxaccess' => Array(
'label' => 'Postfix MX-Access (anti spam)',
'files' => Array(
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
),
'commands_1' => Array(
'postmap /etc/postfix/mx_access'
),
'restart' => Array(
'/etc/init.d/postfix restart'
)
),
'exim4' => Array( 'exim4' => Array(
'label' => 'Exim4', 'label' => 'Exim4',
'commands_1' => Array( 'commands_1' => Array(
@@ -191,6 +210,9 @@ return Array(
'daemons' => Array( 'daemons' => Array(
'proftpd' => Array( 'proftpd' => Array(
'label' => 'ProFTPd', 'label' => 'ProFTPd',
'commands' => Array(
'apt-get install proftpd-basic proftpd-mod-mysql'
),
'files' => Array( 'files' => Array(
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf', 'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
@@ -249,18 +271,13 @@ return Array(
), ),
'awstats' => Array( 'awstats' => Array(
'label' => 'Awstats', 'label' => 'Awstats',
'files' => Array(
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
),
'commands' => Array( 'commands' => Array(
'apt-get install awstats', 'apt-get install awstats',
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') 'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/'
),
'files' => Array(
'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
), ),
'restart' => Array(
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart')
)
), ),
'libnss' => Array( 'libnss' => Array(
'label' => 'libnss (system login with mysql)', 'label' => 'libnss (system login with mysql)',

View File

@@ -31,7 +31,8 @@ return Array(
$configcommand['diroptions'], $configcommand['diroptions'],
$configcommand['include'], $configcommand['include'],
'mkdir -p ' . $settings['system']['documentroot_prefix'], 'mkdir -p ' . $settings['system']['documentroot_prefix'],
'mkdir -p ' . $settings['system']['logfiles_directory'] 'mkdir -p ' . $settings['system']['logfiles_directory'],
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : ''
), ),
'restart' => Array( 'restart' => Array(
'/etc/init.d/apache2 restart' '/etc/init.d/apache2 restart'
@@ -46,7 +47,9 @@ return Array(
'label' => 'Bind9', 'label' => 'Bind9',
'commands' => Array( 'commands' => Array(
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/named.conf', 'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/named.conf',
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf' 'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chown named:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
), ),
'restart' => Array( 'restart' => Array(
'/etc/init.d/named restart' '/etc/init.d/named restart'
@@ -88,6 +91,19 @@ return Array(
'restart' => Array( 'restart' => Array(
'/etc/init.d/postfix restart' '/etc/init.d/postfix restart'
) )
),
'postfix_mxaccess' => Array(
'label' => 'Postfix MX-Access (anti spam)',
'files' => Array(
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
),
'commands_1' => Array(
'postmap /etc/postfix/mx_access'
),
'restart' => Array(
'/etc/init.d/postfix restart'
)
) )
) )
), ),
@@ -136,16 +152,11 @@ return Array(
), ),
'awstats' => Array( 'awstats' => Array(
'label' => 'Awstats', 'label' => 'Awstats',
'files' => Array(
($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor',
($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats',
($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf')
),
'commands' => Array( 'commands' => Array(
($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') 'awstats_configure.pl'
), ),
'restart' => Array( 'files' => Array(
($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') 'etc_awstats.model.conf' => makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
) )
) )
) )

View File

@@ -45,6 +45,6 @@ else
$cfgPath = 'lib/configfiles/'; $cfgPath = 'lib/configfiles/';
$configfiles = Array(); $configfiles = Array();
$configfiles = array_merge(include $cfgPath . 'lenny.inc.php', include $cfgPath . 'etch.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse10.inc.php'); $configfiles = array_merge(include $cfgPath . 'lenny.inc.php', include $cfgPath . 'etch.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse10.inc.php', include $cfgPath . 'freebsd.inc.php');
?> ?>

View File

@@ -24,6 +24,12 @@ if(@php_sapi_name() != 'cli'
die('This script will only work in the shell.'); die('This script will only work in the shell.');
} }
// ensure that default timezone is set
if(function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get"))
{
@date_default_timezone_set(@date_default_timezone_get());
}
$lockdir = '/var/run/'; $lockdir = '/var/run/';
$lockFilename = 'froxlor_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-'; $lockFilename = 'froxlor_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-';
$lockfName = $lockFilename . getmypid(); $lockfName = $lockFilename . getmypid();
@@ -69,7 +75,7 @@ while($fName = readdir($lockDirHandle))
// Check if cron is running or has died. // Check if cron is running or has died.
$check_pid = substr(strstr($fName, "-"), 1); $check_pid = substr(strstr($fName, "-"), 1);
system("kill -CHLD " . $check_pid . " 1> /dev/null 2> /dev/null", $check_pid_return); system("kill -CHLD " . (int)$check_pid . " 1> /dev/null 2> /dev/null", $check_pid_return);
if($check_pid_return == 1) if($check_pid_return == 1)
{ {

View File

@@ -0,0 +1,45 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* @version $Id$
*/
/**
* Function domainHasApsInstances
*
* Checks if a given domain id
* is used for APS instances
* (if APS enabled, else always false)
*
* @param int domain-id
*
* @return boolean
*/
function domainHasApsInstances($domainid = 0)
{
global $db, $settings;
if($settings['aps']['aps_active'] == '1')
{
if($domainid > 0)
{
$instances = $db->query_first("SELECT COUNT(`ID`) AS `count` FROM `" . TABLE_APS_SETTINGS . "` WHERE `Name`='main_domain' AND `Value`='" . (int)$domainid . "'");
if((int)$instances['count'] != 0)
{
return true;
}
}
}
return false;
}

View File

@@ -38,7 +38,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
if($fieldType == 'Manual') if($fieldType == 'Manual')
{ {
$field = '<input type="text" name="path" value="' . htmlspecialchars($value) . '" size="30" />'; $field = '<input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
} }
elseif($fieldType == 'Dropdown') elseif($fieldType == 'Dropdown')
{ {
@@ -65,7 +65,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
else else
{ {
$field = $lng['panel']['toomanydirs']; $field = $lng['panel']['toomanydirs'];
$field.= '<input type="text" name="path" value="' . htmlspecialchars($value) . '" size="30" />'; $field.= '<input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
} }
} }
else else

View File

@@ -26,13 +26,15 @@
* @param string The dir which should be created * @param string The dir which should be created
* @param int The uid of the user * @param int The uid of the user
* @param int The gid of the user * @param int The gid of the user
* @param bool Place standard-index.html into the new folder
*
* @return bool true if everything went okay, false if something went wrong * @return bool true if everything went okay, false if something went wrong
* *
* @author Florian Lippert <flo@syscp.org> * @author Florian Lippert <flo@syscp.org>
* @author Martin Burchert <martin.burchert@syscp.org> * @author Martin Burchert <martin.burchert@syscp.org>
*/ */
function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid) function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid, $placeindex = false)
{ {
$returncode = true; $returncode = true;
@@ -73,6 +75,17 @@ function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid)
{ {
$sdir = makeCorrectDir($sdir); $sdir = makeCorrectDir($sdir);
safe_exec('mkdir -p ' . escapeshellarg($sdir)); safe_exec('mkdir -p ' . escapeshellarg($sdir));
/**
* #68
*/
if ($placeindex) {
$loginname = getLoginNameByUid($uid);
if ($loginname !== false) {
storeDefaultIndex($loginname, $sdir, null);
}
}
safe_exec('chown -R ' . (int)$uid . ':' . (int)$gid . ' ' . escapeshellarg($sdir)); safe_exec('chown -R ' . (int)$uid . ':' . (int)$gid . ' ' . escapeshellarg($sdir));
} }
} }

View File

@@ -51,11 +51,12 @@ function safe_exec($exec_string, &$return_value = false)
$settings['system']['apachereload_command'], $settings['system']['apachereload_command'],
$settings['system']['bindreload_command'], $settings['system']['bindreload_command'],
$settings['dkim']['dkimrestart_command'], $settings['dkim']['dkimrestart_command'],
$settings['system']['awstats_updateall_command'],
'openssl', 'openssl',
'unzip', 'unzip',
'php', 'php',
'rm' 'rm',
'awstats_buildstaticpages.pl',
'ln'
); );
// //
@@ -75,6 +76,8 @@ function safe_exec($exec_string, &$return_value = false)
die('SECURITY CHECK FAILED!' . "\n" . 'The execute string "' . htmlspecialchars($exec_string) . '" is a possible security risk!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n"); die('SECURITY CHECK FAILED!' . "\n" . 'The execute string "' . htmlspecialchars($exec_string) . '" is a possible security risk!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n");
} }
/*
* This is not needed anymore, we allow all commands and just check for pipes and stuff
// //
// check if command is allowed here // check if command is allowed here
// //
@@ -82,7 +85,7 @@ function safe_exec($exec_string, &$return_value = false)
$ok = false; $ok = false;
foreach($allowed_commands as $allowed_command) foreach($allowed_commands as $allowed_command)
{ {
if(strpos($exec_string, $allowed_command) == 0 if(strpos($exec_string, $allowed_command) === 0
&& (strlen($exec_string) === ($allowed_command_pos = strlen($allowed_command)) || substr($exec_string, $allowed_command_pos, 1) === ' ')) && (strlen($exec_string) === ($allowed_command_pos = strlen($allowed_command)) || substr($exec_string, $allowed_command_pos, 1) === ' '))
{ {
$ok = true; $ok = true;
@@ -93,6 +96,7 @@ function safe_exec($exec_string, &$return_value = false)
{ {
die('SECURITY CHECK FAILED!' . "\n" . 'Your command "' . htmlspecialchars($exec_string) . '" is not allowed!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n"); die('SECURITY CHECK FAILED!' . "\n" . 'Your command "' . htmlspecialchars($exec_string) . '" is not allowed!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n");
} }
*/
// //
// execute the command and return output // execute the command and return output

View File

@@ -0,0 +1,50 @@
<?php
/**
* store the default index-file in a given destination folder
*
* @param string $loginname customers loginname
* @param string $destination path where to create the file
* @param object $logger FroxlorLogger object
* @param boolean $force force creation whatever the settings say (needed for task #2, create new user)
*
* @return null
*/
function storeDefaultIndex($loginname = null, $destination = null, $logger = null, $force = false)
{
global $db, $settings, $pathtophpfiles;
if ($force
|| (int)$settings['system']['store_index_file_subs'] == 1
) {
$result = $db->query("SELECT `t`.`value`, `c`.`email` AS `customer_email`, `a`.`email` AS `admin_email`, `c`.`loginname` AS `customer_login`, `a`.`loginname` AS `admin_login` FROM `" . TABLE_PANEL_CUSTOMERS . "` AS `c` INNER JOIN `" . TABLE_PANEL_ADMINS . "` AS `a` ON `c`.`adminid` = `a`.`adminid` INNER JOIN `" . TABLE_PANEL_TEMPLATES . "` AS `t` ON `a`.`adminid` = `t`.`adminid` WHERE `varname` = 'index_html' AND `c`.`loginname` = '" . $db->escape($loginname) . "'");
if($db->num_rows($result) > 0)
{
$template = $db->fetch_array($result);
$replace_arr = array(
'SERVERNAME' => $settings['system']['hostname'],
'CUSTOMER' => $template['customer_login'],
'ADMIN' => $template['admin_login'],
'CUSTOMER_EMAIL' => $template['customer_email'],
'ADMIN_EMAIL' => $template['admin_email']
);
$htmlcontent = replace_variables($template['value'], $replace_arr);
$indexhtmlpath = makeCorrectFile($destination . '/index.' . $settings['system']['index_file_extension']);
$index_html_handler = fopen($indexhtmlpath, 'w');
fwrite($index_html_handler, $htmlcontent);
fclose($index_html_handler);
if ($logger !== null) {
$logger->logAction(CRON_ACTION, LOG_NOTICE, 'Creating \'index.' . $settings['system']['index_file_extension'] . '\' for Customer \'' . $template['customer_login'] . '\' based on template in directory ' . escapeshellarg($indexhtmlpath));
}
}
else
{
if ($logger !== null) {
$logger->logAction(CRON_ACTION, LOG_NOTICE, 'Running: cp -a ' . $pathtophpfiles . '/templates/misc/standardcustomer/* ' . escapeshellarg($destination));
}
safe_exec('cp -a ' . $pathtophpfiles . '/templates/misc/standardcustomer/* ' . escapeshellarg($destination));
}
}
return;
}

View File

@@ -17,7 +17,7 @@
* @version $Id$ * @version $Id$
*/ */
function getFormFieldDataBool($fieldname, $fielddata, $input) function getFormFieldDataBool($fieldname, $fielddata, &$input)
{ {
if(isset($input[$fieldname]) && ($input[$fieldname] === '1' || $input[$fieldname] === 1 || $input[$fieldname] === true || strtolower($input[$fieldname]) === 'yes' || strtolower($input[$fieldname]) === 'ja')) if(isset($input[$fieldname]) && ($input[$fieldname] === '1' || $input[$fieldname] === 1 || $input[$fieldname] === true || strtolower($input[$fieldname]) === 'yes' || strtolower($input[$fieldname]) === 'ja'))
{ {

View File

@@ -0,0 +1,62 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id $
*/
function buildFormEx($form, $part = '')
{
$fields = '';
if(validateFormDefinition($form))
{
foreach($form['groups'] as $groupname => $groupdetails)
{
// show overview
if($part == '')
{
if(isset($groupdetails['title']) && $groupdetails['title'] != '')
{
$fields .= getFormOverviewGroupOutput($groupname, $groupdetails);
}
}
// only show one section
elseif($part != '' && ($groupname == $part || $part == 'all'))
{
if(isset($groupdetails['title']) && $groupdetails['title'] != '')
{
$fields .= getFormGroupOutput($groupname, $groupdetails);
}
if(validateFieldDefinition($groupdetails))
{
// Prefetch form fields
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
{
$groupdetails['fields'][$fieldname] = array_merge_prefix($fielddetails, $fielddetails['type'], prefetchFormFieldData($fieldname, $fielddetails));
$form['groups'][$groupname]['fields'][$fieldname] = $groupdetails['fields'][$fieldname];
}
// Collect form field output
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
{
$fields .= getFormFieldOutput($fieldname, $fielddetails);
}
}
}
}
}
return $fields;
}

View File

@@ -17,11 +17,11 @@
* @version $Id$ * @version $Id$
*/ */
function getFormFieldData($fieldname, $fielddata, $input) function getFormFieldData($fieldname, $fielddata, &$input)
{ {
if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldData' . ucfirst($fielddata['type']))) if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldData' . ucfirst($fielddata['type'])))
{ {
$newfieldvalue = call_user_func('getFormFieldData' . ucfirst($fielddata['type']), $fieldname, $fielddata, &$input); $newfieldvalue = call_user_func('getFormFieldData' . ucfirst($fielddata['type']), $fieldname, $fielddata, $input);
} }
else else
{ {

View File

@@ -23,3 +23,54 @@ function getFormGroupOutput($groupname, $groupdetails)
eval("\$group = \"" . getTemplate("settings/settings_group") . "\";"); eval("\$group = \"" . getTemplate("settings/settings_group") . "\";");
return $group; return $group;
} }
function getFormOverviewGroupOutput($groupname, $groupdetails)
{
global $lng, $settings, $filename, $s;
$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[$fielddetails['settinggroup']][$fielddetails['varname']]);
}
$option.= $fielddetails['label'].':&nbsp;';
$option.= '<select class="dropdown_noborder" name="'.$fieldname.'">';
$option.= $options;
$option.= '</select>';
$activated = true;
}
else
{
$option.= $lng['admin']['activated'].':&nbsp;';
$option.= makeyesno($fieldname, '1', '0', $settings[$fielddetails['settinggroup']][$fielddetails['varname']]);
$activated = (int)$settings[$fielddetails['settinggroup']][$fielddetails['varname']];
}
}
}
}
eval("\$group = \"" . getTemplate("settings/settings_overviewgroup") . "\";");
return $group;
}

View File

@@ -17,7 +17,7 @@
* @version $Id$ * @version $Id$
*/ */
function processForm($form, $input, $url_params = array()) function processForm(&$form, &$input, $url_params = array())
{ {
if(validateFormDefinition($form)) if(validateFormDefinition($form))
{ {
@@ -45,7 +45,7 @@ function processForm($form, $input, $url_params = array())
// Validate fields // Validate fields
foreach($groupdetails['fields'] as $fieldname => $fielddetails) foreach($groupdetails['fields'] as $fieldname => $fielddetails)
{ {
$newfieldvalue = getFormFieldData($fieldname, $fielddetails, &$input); $newfieldvalue = getFormFieldData($fieldname, $fielddetails, $input);
if($newfieldvalue != $fielddetails['value']) if($newfieldvalue != $fielddetails['value'])
{ {
@@ -143,3 +143,166 @@ function processForm($form, $input, $url_params = array())
return saveForm($form, $saved_fields); return saveForm($form, $saved_fields);
} }
} }
function processFormEx(&$form, &$input, $url_params = array(), $part, $settings_all, $settings_part, $only_enabledisable)
{
if(validateFormDefinition($form))
{
$submitted_fields = array();
$changed_fields = array();
$saved_fields = array();
foreach($form['groups'] as $groupname => $groupdetails)
{
if(($settings_part && $part == $groupname)
|| $settings_all
|| $only_enabledisable
){
if(validateFieldDefinition($groupdetails))
{
// Prefetch form fields
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
{
if(!$only_enabledisable
|| ($only_enabledisable && isset($fielddetails['overview_option']))
) {
$groupdetails['fields'][$fieldname] = array_merge_prefix($fielddetails, $fielddetails['type'], prefetchFormFieldData($fieldname, $fielddetails));
$form['groups'][$groupname]['fields'][$fieldname] = $groupdetails['fields'][$fieldname];
}
}
}
}
}
foreach($form['groups'] as $groupname => $groupdetails)
{
if(($settings_part && $part == $groupname)
|| $settings_all
|| $only_enabledisable
){
if(validateFieldDefinition($groupdetails))
{
// Validate fields
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
{
if(!$only_enabledisable
|| ($only_enabledisable && isset($fielddetails['overview_option']))
) {
$newfieldvalue = getFormFieldData($fieldname, $fielddetails, $input);
if($newfieldvalue != $fielddetails['value'])
{
if(($error = validateFormField($fieldname, $fielddetails, $newfieldvalue)) !== true)
{
standard_error($error, $fieldname);
}
else
{
$changed_fields[$fieldname] = $newfieldvalue;
}
}
$submitted_fields[$fieldname] = $newfieldvalue;
}
}
}
}
}
foreach($form['groups'] as $groupname => $groupdetails)
{
if(($settings_part && $part == $groupname)
|| $settings_all
|| $only_enabledisable
){
if(validateFieldDefinition($groupdetails))
{
// Check fields for plausibility
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
{
if(!$only_enabledisable
|| ($only_enabledisable && isset($fielddetails['overview_option']))
) {
if(($plausibility_check = checkPlausibilityFormField($fieldname, $fielddetails, $submitted_fields[$fieldname], $submitted_fields)) !== false)
{
if(is_array($plausibility_check) && isset($plausibility_check[0]))
{
if($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_OK)
{
// Nothing to do here, everything's okay
}
elseif($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_ERROR)
{
unset($plausibility_check[0]);
$error = $plausibility_check[1];
unset($plausibility_check[1]);
$targetname = implode(' ', $plausibility_check);
standard_error($error, $targetname);
}
elseif($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_QUESTION)
{
unset($plausibility_check[0]);
$question = $plausibility_check[1];
unset($plausibility_check[1]);
$targetname = implode(' ', $plausibility_check);
if(!isset($input[$question]))
{
if(is_array($url_params) && isset($url_params['filename']))
{
$filename = $url_params['filename'];
unset($url_params['filename']);
}
else
{
$filename = '';
}
ask_yesno($question, $filename, array_merge($url_params, $submitted_fields, array($question => $question)), $targetname);
}
}
else
{
standard_error('plausibilitychecknotunderstood');
}
}
}
}
}
}
}
}
foreach($form['groups'] as $groupname => $groupdetails)
{
if(($settings_part && $part == $groupname)
|| $settings_all
|| $only_enabledisable
){
if(validateFieldDefinition($groupdetails))
{
// Save fields
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
{
if(!$only_enabledisable
|| ($only_enabledisable && isset($fielddetails['overview_option']))
) {
if(isset($changed_fields[$fieldname]))
{
if(($saved_field = saveFormField($fieldname, $fielddetails, manipulateFormFieldData($fieldname, $fielddetails, $changed_fields[$fieldname]))) !== false)
{
$saved_fields = array_merge($saved_fields, $saved_field);
}
else
{
standard_error('errorwhensaving', $fieldname);
}
}
}
}
}
}
}
// Save form
return saveForm($form, $saved_fields);
}
}

View File

@@ -19,13 +19,20 @@
function validateFormFieldHidden($fieldname, $fielddata, $newfieldvalue) function validateFormFieldHidden($fieldname, $fielddata, $newfieldvalue)
{ {
if($newfieldvalue === $fielddata['value']) /**
{ * don't show error on cronjob-timestamps changing
* because it might be possible that the cronjob ran
* while settings have been edited (bug #52)
*/
if($newfieldvalue === $fielddata['value']
|| $fieldname == 'system_last_tasks_run'
|| $fieldname == 'system_last_traffic_run'
|| $fieldname == 'system_lastcronrun'
) {
return true; return true;
} }
else else
{ {
// TODO: Throw some error that actually makes sense - false would just throw unknown error return 'hiddenfieldvaluechanged';
return false;
} }
} }

View File

@@ -17,7 +17,7 @@
* @version $Id$ * @version $Id$
*/ */
function getFormFieldDataInt($fieldname, $fielddata, $input) function getFormFieldDataInt($fieldname, $fielddata, &$input)
{ {
if(isset($input[$fieldname])) if(isset($input[$fieldname]))
{ {

View File

@@ -17,7 +17,7 @@
* @version $Id$ * @version $Id$
*/ */
function getFormFieldDataOption($fieldname, $fielddata, $input) function getFormFieldDataOption($fieldname, $fielddata, &$input)
{ {
if(isset($input[$fieldname])) if(isset($input[$fieldname]))
{ {

View File

@@ -27,6 +27,10 @@ function validateFormFieldString($fieldname, $fielddata, $newfieldvalue)
$returnvalue = true; $returnvalue = true;
foreach($newfieldvalues as $single_newfieldvalue) foreach($newfieldvalues as $single_newfieldvalue)
{ {
/**
* don't use tabs in value-fields, #81
*/
$single_newfieldvalue = str_replace("\t", " ", $single_newfieldvalue);
$single_returnvalue = validateFormFieldString($fieldname, $fielddata, $single_newfieldvalue); $single_returnvalue = validateFormFieldString($fieldname, $fielddata, $single_newfieldvalue);
if($single_returnvalue !== true) if($single_returnvalue !== true)
{ {
@@ -39,6 +43,11 @@ function validateFormFieldString($fieldname, $fielddata, $newfieldvalue)
{ {
$returnvalue = false; $returnvalue = false;
/**
* don't use tabs in value-fields, #81
*/
$newfieldvalue = str_replace("\t", " ", $newfieldvalue);
if(isset($fielddata['string_type']) && $fielddata['string_type'] == 'mail') if(isset($fielddata['string_type']) && $fielddata['string_type'] == 'mail')
{ {
$returnvalue = (filter_var($newfieldvalue, FILTER_VALIDATE_EMAIL) == $newfieldvalue); $returnvalue = (filter_var($newfieldvalue, FILTER_VALIDATE_EMAIL) == $newfieldvalue);

View File

@@ -24,37 +24,61 @@
* @param logFile * @param logFile
* @param siteDomain * @param siteDomain
* @param hostAliases * @param hostAliases
* @return * @return null
* @author Michael Duergner
* @author Berend Dekens
*/ */
function createAWStatsConf($logFile, $siteDomain, $hostAliases) function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot)
{ {
global $pathtophpfiles; global $pathtophpfiles, $settings;
// Generation header // Generation header
$header = "## GENERATED BY SYSCP\n"; $header = "## GENERATED BY FROXLOR\n";
$header2 = "## Do not remove the line above! This tells Froxlor to update this configuration\n## If you wish to manually change this configuration file, remove the first line to make sure Froxlor won't rebuild this file\n## Generated for domain {SITE_DOMAIN} on " . date('l dS \of F Y h:i:s A') . "\n"; $header2 = "## Do not remove the line above! This tells Froxlor to update this configuration\n## If you wish to manually change this configuration file, remove the first line to make sure Froxlor won't rebuild this file\n## Generated for domain {SITE_DOMAIN} on " . date('l dS \of F Y h:i:s A') . "\n";
$awstats_dir = makeCorrectDir($customerDocroot.'/awstats/'.$siteDomain.'/');
if(!is_dir($awstats_dir))
{
safe_exec('mkdir -p '.escapeshellarg($awstats_dir));
}
// weird but could happen...
if(!is_dir($settings['system']['awstats_conf']))
{
safe_exec('mkdir -p '.escapeshellarg($settings['system']['awstats_conf']));
}
// These are the variables we will replace // These are the variables we will replace
$regex = array( $regex = array(
'/\{LOG_FILE\}/', '/\{LOG_FILE\}/',
'/\{SITE_DOMAIN\}/', '/\{SITE_DOMAIN\}/',
'/\{HOST_ALIASES\}/' '/\{HOST_ALIASES\}/',
'/\{CUSTOMER_DOCROOT\}/',
'/\{AWSTATS_CONF\}/'
); );
$replace = array( $replace = array(
$logFile, makeCorrectFile($logFile),
$siteDomain, $siteDomain,
$hostAliases $hostAliases,
$awstats_dir,
makeCorrectDir($settings['system']['awstats_conf'])
); );
// File names // File names
$domain_file = '/etc/awstats/awstats.' . $siteDomain . '.conf'; $domain_file = makeCorrectFile($settings['system']['awstats_conf'].'/awstats.' . $siteDomain . '.conf');
$model_file = '/etc/awstats/awstats.model.conf.froxlor'; $model_file = dirname(dirname(dirname(dirname(__FILE__))));
$model_file.= '/templates/misc/awstatsmodel/';
if($settings['system']['mod_log_sql'] == '1')
{
$model_file.= 'awstats.froxlor.model_log_sql.conf';
} else {
$model_file.= 'awstats.froxlor.model.conf';
}
$model_file = makeCorrectFile($model_file);
// Test if the file exists // Test if the file exists

View File

@@ -0,0 +1,21 @@
<?php
/**
* returns the customer-id of a customer by given domain
*
* @param string $domain users domain
*
* @return int customers id
*/
function getCustomerIdByDomain($domain = null)
{
global $db;
$result = $db->query_first("SELECT `customerid` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '".$domain."'");
if(is_array($result)
&& isset($result['customerid'])
) {
return $result['customerid'];
}
return false;
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* returns the loginname of a customer by given uid
*
* @param int $uid uid of customer
*
* @return string customers loginname
*/
function getLoginNameByUid($uid = null)
{
global $db;
$result = $db->query_first("SELECT `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `guid` = '".(int)$uid."'");
if(is_array($result)
&& isset($result['loginname'])
) {
return $result['loginname'];
}
return false;
}

View File

@@ -17,7 +17,7 @@
* @version $Id$ * @version $Id$
*/ */
function loadSettings($settings_data, $db) function loadSettings(&$settings_data, $db)
{ {
$settings = array(); $settings = array();

View File

@@ -29,14 +29,25 @@
* *
* @return null * @return null
*/ */
function checkLastGuid($froxlor_guid = 0) function checkLastGuid()
{ {
global $cronlog; global $log, $cronlog, $db, $settings;
$mylog = null;
if (isset($cronlog) && $cronlog instanceof FroxlorLogger) {
$mylog = $cronlog;
} else {
$mylog = $log;
}
$group_lines = array(); $group_lines = array();
$group_guids = array(); $group_guids = array();
$update_to_guid = 0; $update_to_guid = 0;
$froxlor_guid = 0;
$result = $db->query_first("SELECT MAX(`guid`) as `fguid` FROM `".TABLE_PANEL_CUSTOMERS."`");
$froxlor_guid = $result['fguid'];
$g_file = '/etc/group'; $g_file = '/etc/group';
if(file_exists($g_file)) if(file_exists($g_file))
@@ -66,27 +77,32 @@ function checkLastGuid($froxlor_guid = 0)
$guid = isset($group[2]) ? (int)$group[2] : 0; $guid = isset($group[2]) ? (int)$group[2] : 0;
if($guid > $froxlor_guid) if($guid > $update_to_guid)
{ {
$update_to_guid = $guid; $update_to_guid = $guid;
} }
} }
if($update_to_guid > $froxlor_guid) if($update_to_guid < $froxlor_guid)
{ {
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Updating froxlor last guid to '.$update_to_guid); $update_to_guid = $froxlor_guid;
if ($update_to_guid != $settings['system']['lastguid'])
{
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'Updating froxlor last guid to '.$update_to_guid);
saveSetting('system', 'lastguid', $update_to_guid); saveSetting('system', 'lastguid', $update_to_guid);
$settings['system']['lastguid'] = $update_to_guid; $settings['system']['lastguid'] = $update_to_guid;
} }
} }
}
else else
{ {
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid'); $mylog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
} }
} }
else else
{ {
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid'); $mylog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
} }
} }
else else

View File

@@ -25,6 +25,7 @@ function checkMysqlAccessHost($fieldname, $fielddata, $newfieldvalue, $allnewfie
{ {
if(validate_ip($host_entry, true) == false if(validate_ip($host_entry, true) == false
&& validateDomain($host_entry) == false && validateDomain($host_entry) == false
&& validateLocalHostname($host_entry) == false
&& $host_entry != '%') && $host_entry != '%')
{ {
return array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'invalidmysqlhost', $host_entry); return array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'invalidmysqlhost', $host_entry);

View File

@@ -37,12 +37,34 @@ function validateDomain($domainname)
// If FILTER_VALIDATE_URL is good, but FILTER_VALIDATE_URL with FILTER_FLAG_PATH_REQUIRED or FILTER_FLAG_QUERY_REQUIRED is also good, it isn't just a domain. // If FILTER_VALIDATE_URL is good, but FILTER_VALIDATE_URL with FILTER_FLAG_PATH_REQUIRED or FILTER_FLAG_QUERY_REQUIRED is also good, it isn't just a domain.
// This is a ugly hack, maybe a good regex would be better? // This is a ugly hack, maybe a good regex would be better?
// there is a bug in php 5.2.13 - 5.3.2 which
// lets filter_var fail if the domain has
// a dash (-) in it. #
if(version_compare("5.2.13", PHP_VERSION, "=")
|| version_compare("5.3.2", PHP_VERSION, "="))
{
$pattern = '/^([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
if(preg_match($pattern, $domainname_tmp))
{
return $domainname;
}
}
else
{
if(filter_var($domainname_tmp, FILTER_VALIDATE_URL) !== false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED) === false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_QUERY_REQUIRED) === false) if(filter_var($domainname_tmp, FILTER_VALIDATE_URL) !== false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED) === false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_QUERY_REQUIRED) === false)
{ {
return $domainname; return $domainname;
} }
else
{
return false;
} }
return false;
}
function validateLocalHostname($hostname)
{
$pattern = '/^([a-zA-Z0-9\-])+$/i';
if(preg_match($pattern, $hostname))
{
return $hostname;
}
return false;
} }

View File

@@ -0,0 +1,43 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Functions
* @version $Id$
*/
/**
* Function validatePassword
*
* if password-min-length is set in settings
* we check against the length, if not matched
* an error message will be output and 'exit' is called
*
* @param string $password the password to validate
*
* @return string either the password or an errormessage+exit
*/
function validatePassword($password = null)
{
global $settings;
if ($settings['panel']['password_min_length'] > 0) {
$password = validate(
$password,
$settings['panel']['password_min_length'], /* replacer needs to be password length, not the fieldname */
'/^.{'.(int)$settings['panel']['password_min_length'].',}$/D',
'notrequiredpasswordlength'
);
}
return $password;
}

View File

@@ -150,7 +150,7 @@ if(get_magic_quotes_gpc())
*/ */
$settings_data = loadConfigArrayDir('./actions/admin/settings/'); $settings_data = loadConfigArrayDir('./actions/admin/settings/');
$settings = loadSettings(&$settings_data, &$db); $settings = loadSettings($settings_data, $db);
/* /*
* when upgrading from syscp, the header-graphic gets lost * when upgrading from syscp, the header-graphic gets lost
@@ -416,6 +416,10 @@ if($page == '')
*/ */
$mail = new PHPMailer(); $mail = new PHPMailer();
$mail->From = $settings['panel']['adminmail']; // set return-to address and custom sender-name, see #76
$mail->SetFrom($settings['panel']['adminmail'], $settings['panel']['adminmail_defname']);
if ($settings['panel']['adminmail_return'] != '') {
$mail->AddReplyTo($settings['panel']['adminmail_return'], $settings['panel']['adminmail_defname']);
}
?> ?>

View File

@@ -200,15 +200,11 @@ return array (
'label' => $lng['admin']['ipsandports']['ipsandports'], 'label' => $lng['admin']['ipsandports']['ipsandports'],
'required_resources' => 'change_serversettings', 'required_resources' => 'change_serversettings',
), ),
/*
* @TODO this is for Froxlor-1.0
*
array ( array (
'url' => 'admin_cronjobs.php?page=overview', 'url' => 'admin_cronjobs.php?page=overview',
'label' => $lng['admin']['cron']['cronsettings'], 'label' => $lng['admin']['cron']['cronsettings'],
'required_resources' => 'change_serversettings', 'required_resources' => 'change_serversettings',
), ),
*/
array ( array (
'url' => 'admin_settings.php?page=rebuildconfigs', 'url' => 'admin_settings.php?page=rebuildconfigs',
'label' => $lng['admin']['rebuildconf'], 'label' => $lng['admin']['rebuildconf'],

View File

@@ -68,7 +68,8 @@ define('PACKAGE_ENABLED', 2);
// VERSION INFO // VERSION INFO
$version = '0.9.2'; $version = '0.9.5';
$dbversion = '2'; $dbversion = '2';
$branding = '';
?> ?>

View File

@@ -369,7 +369,6 @@ $lng['admin']['templates']['USERNAME'] = 'Ще бъде заменено с по
$lng['admin']['templates']['PASSWORD'] = 'Ще бъде заменено с паролата за сметката на клиента.'; $lng['admin']['templates']['PASSWORD'] = 'Ще бъде заменено с паролата за сметката на клиента.';
$lng['admin']['templates']['EMAIL'] = 'Ще бъде заменено със сметка за POP3/IMAP.'; $lng['admin']['templates']['EMAIL'] = 'Ще бъде заменено със сметка за POP3/IMAP.';
$lng['admin']['rebuildconf'] = 'Възстановяване на конфигурационни файлове'; $lng['admin']['rebuildconf'] = 'Възстановяване на конфигурационни файлове';
$lng['admin']['cronlastrun'] = 'Последен cron';
$lng['admin']['ipsandports']['ipsandports'] = 'IP адреси и портове'; $lng['admin']['ipsandports']['ipsandports'] = 'IP адреси и портове';
$lng['admin']['ipsandports']['add'] = 'Добавяне на IP/порт'; $lng['admin']['ipsandports']['add'] = 'Добавяне на IP/порт';
$lng['admin']['ipsandports']['edit'] = 'Редакция на на IP/порт'; $lng['admin']['ipsandports']['edit'] = 'Редакция на на IP/порт';

View File

@@ -375,7 +375,6 @@ $lng['serversettings']['pathedit']['description'] = 'Vols que la ruta sigui escr
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = '&Uacute;ltima volta';
$lng['serversettings']['paging']['title'] = 'Entrades per p&agrave;gina'; $lng['serversettings']['paging']['title'] = 'Entrades per p&agrave;gina';
$lng['serversettings']['paging']['description'] = 'Entrades per p&agrave;gina? (0 = sense paginar)'; $lng['serversettings']['paging']['description'] = 'Entrades per p&agrave;gina? (0 = sense paginar)';
$lng['error']['ipstillhasdomains'] = 'La combinaci&oacute; IP/Port que vols esborrar t&eacute; dominis assignats. Si us plau, reassigna els dominis a una altra IP/Port abans d\'esborrar.'; $lng['error']['ipstillhasdomains'] = 'La combinaci&oacute; IP/Port que vols esborrar t&eacute; dominis assignats. Si us plau, reassigna els dominis a una altra IP/Port abans d\'esborrar.';

File diff suppressed because it is too large Load Diff

View File

@@ -382,7 +382,6 @@ $lng['mysql']['description'] = 'Her kan du oprette og editere dine MySQL-Databas
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = 'Sidste Cron';
$lng['serversettings']['paging']['title'] = 'Genstande per side'; $lng['serversettings']['paging']['title'] = 'Genstande per side';
$lng['serversettings']['paging']['description'] = 'Hvor mange genstande skal vises per side? (0 = brug ikke side inddeling)'; $lng['serversettings']['paging']['description'] = 'Hvor mange genstande skal vises per side? (0 = brug ikke side inddeling)';
$lng['error']['ipstillhasdomains'] = 'IP/Port kombinationen du vil slette har stadig dom&aelig;ner tilknyttet. Overf&oslash;r disse dom&aelig;ner til en anden IP/Port kombination for at slette denne.'; $lng['error']['ipstillhasdomains'] = 'IP/Port kombinationen du vil slette har stadig dom&aelig;ner tilknyttet. Overf&oslash;r disse dom&aelig;ner til en anden IP/Port kombination for at slette denne.';

View File

@@ -381,7 +381,6 @@ $lng['mysql']['description'] = 'Hier kunt u MySQL-Databases maken en wijzigen.<b
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = 'Laatste Cron-run';
$lng['serversettings']['paging']['title'] = 'Vermeldingen per pagina'; $lng['serversettings']['paging']['title'] = 'Vermeldingen per pagina';
$lng['serversettings']['paging']['description'] = 'Hoeveel vermeldingen er getoond moeten worden per pagina? (0 = alles laten zien)'; $lng['serversettings']['paging']['description'] = 'Hoeveel vermeldingen er getoond moeten worden per pagina? (0 = alles laten zien)';
$lng['error']['ipstillhasdomains'] = 'De IP/Port combinatie die u verwijderen wilt heeft nog domeinen toegewezen, wijs deze opnieuw to aan andere IP/Poort combinaties voordat u deze IP/Poort combinatie verwijderd.'; $lng['error']['ipstillhasdomains'] = 'De IP/Port combinatie die u verwijderen wilt heeft nog domeinen toegewezen, wijs deze opnieuw to aan andere IP/Poort combinaties voordat u deze IP/Poort combinatie verwijderd.';

View File

@@ -752,7 +752,7 @@ $lng['serversettings']['logger']['severity'] = 'Logging level';
$lng['admin']['logger']['normal'] = 'normal'; $lng['admin']['logger']['normal'] = 'normal';
$lng['admin']['logger']['paranoid'] = 'paranoid'; $lng['admin']['logger']['paranoid'] = 'paranoid';
$lng['serversettings']['logger']['types']['title'] = 'Log-type(s)'; $lng['serversettings']['logger']['types']['title'] = 'Log-type(s)';
$lng['serversettings']['logger']['types']['description'] = 'Specify logtypes seperated by comma.<br />Available logtypes are: syslog, file, mysql'; $lng['serversettings']['logger']['types']['description'] = 'Specify logtypes. To select multiple types, hold down CTRL while selecting.<br />Available logtypes are: syslog, file, mysql';
$lng['serversettings']['logger']['logfile'] = 'Logfile path including filename'; $lng['serversettings']['logger']['logfile'] = 'Logfile path including filename';
$lng['error']['logerror'] = 'Log-Error: %s'; $lng['error']['logerror'] = 'Log-Error: %s';
$lng['serversettings']['logger']['logcron'] = 'Log cronjobs (one run)'; $lng['serversettings']['logger']['logcron'] = 'Log cronjobs (one run)';
@@ -826,8 +826,6 @@ $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'You cannot enable Weba
$lng['serversettings']['webalizer_enabled'] = 'Enable webalizer statistics'; $lng['serversettings']['webalizer_enabled'] = 'Enable webalizer statistics';
$lng['serversettings']['awstats_enabled'] = 'Enable awstats statistics'; $lng['serversettings']['awstats_enabled'] = 'Enable awstats statistics';
$lng['admin']['awstatssettings'] = 'Awstats settings'; $lng['admin']['awstatssettings'] = 'Awstats settings';
$lng['serversettings']['awstats_domain_file']['title'] = 'Awstats domainfiles directory';
$lng['serversettings']['awstats_model_file']['title'] = 'Awstats model file';
// ADDED IN 1.2.19-svn16 // ADDED IN 1.2.19-svn16
@@ -950,7 +948,7 @@ $lng['error']['accountnotexisting'] = 'The given email account doesn\'t exist.';
$lng['error']['autoresponderalreadyexists'] = 'There is already an autoresponder configured for this account.'; $lng['error']['autoresponderalreadyexists'] = 'There is already an autoresponder configured for this account.';
$lng['error']['invalidautoresponder'] = 'The given account is invalid.'; $lng['error']['invalidautoresponder'] = 'The given account is invalid.';
$lng['serversettings']['autoresponder_active']['title'] = 'Use autoresponder module'; $lng['serversettings']['autoresponder_active']['title'] = 'Use autoresponder module';
$lng['serversettings']['autoresponder_active']['description'] = 'Do you want to use the autoresponder module? Therefore an extra cronjob must be set up.'; $lng['serversettings']['autoresponder_active']['description'] = 'Do you want to use the autoresponder module?';
$lng['admin']['security_settings'] = 'Security Options'; $lng['admin']['security_settings'] = 'Security Options';
$lng['admin']['know_what_youre_doing'] = 'Change only, if you know what you\'re doing!'; $lng['admin']['know_what_youre_doing'] = 'Change only, if you know what you\'re doing!';
$lng['admin']['show_version_login']['title'] = 'Show Froxlor version on login'; $lng['admin']['show_version_login']['title'] = 'Show Froxlor version on login';
@@ -1192,7 +1190,7 @@ $lng['error']['admindoesntexist'] = 'The admin you have chosen doesn\'t exist.';
// ADDED IN 1.2.19-svn37 // ADDED IN 1.2.19-svn37
$lng['serversettings']['system_realtime_port']['title'] = 'Port for realtime Froxlor'; $lng['serversettings']['system_realtime_port']['title'] = 'Port for realtime Froxlor';
$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature is disabled.<br />See also: <a href="https://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>'; $lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature is disabled.<br />See also: <a href="http://wiki.froxlor.org/doc/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
$lng['serversettings']['session_allow_multiple_login']['title'] = 'Allow multiple login'; $lng['serversettings']['session_allow_multiple_login']['title'] = 'Allow multiple login';
$lng['serversettings']['session_allow_multiple_login']['description'] = 'If activated a user could login multiple times.'; $lng['serversettings']['session_allow_multiple_login']['description'] = 'If activated a user could login multiple times.';
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Allow moving domains between admins'; $lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Allow moving domains between admins';
@@ -1260,24 +1258,9 @@ $lng['panel']['off'] = 'off';
$lng['update']['updateinprogress_onlyadmincanlogin'] = 'A newer version of Froxlor has been installed but not yet set up.<br />Only the administrator can log in and finish the update.'; $lng['update']['updateinprogress_onlyadmincanlogin'] = 'A newer version of Froxlor has been installed but not yet set up.<br />Only the administrator can log in and finish the update.';
$lng['update']['update'] = 'Froxlor Update'; $lng['update']['update'] = 'Froxlor Update';
$lng['update']['proceed'] = 'Proceed'; $lng['update']['proceed'] = 'Proceed';
$lng['update']['update_information'] = 'The Froxlor files have been updated to version <strong>%newversion</strong>. The installed version is <strong>%curversion</strong>.<br /><br />Customers will not be able to log in until the update has been finished.<br /><strong>Proceed?</strong>'; $lng['update']['update_information']['part_a'] = 'The Froxlor files have been updated to version <strong>%newversion</strong>. The installed version is <strong>%curversion</strong>.';
$lng['update']['update_information']['part_b'] = '<br /><br />Customers will not be able to log in until the update has been finished.<br /><strong>Proceed?</strong>';
$lng['update']['noupdatesavail'] = '<strong>You already have the latest Froxlor version.</strong>'; $lng['update']['noupdatesavail'] = '<strong>You already have the latest Froxlor version.</strong>';
$lng['admin']['cron']['cronsettings'] = 'Cronjob settings';
$lng['cron']['cronname'] = 'cronjob-name';
$lng['cron']['lastrun'] = 'last run';
$lng['cron']['interval'] = 'interval';
$lng['cron']['isactive'] = 'enabled';
$lng['admin']['cron']['add'] = 'Add a new cronjob';
$lng['cron']['description'] = 'description';
$lng['crondesc']['cron_unknown_desc'] = 'no description given';
$lng['crondesc']['cron_tasks'] = 'generating of configfiles';
$lng['crondesc']['cron_legacy'] = 'legacy (old) cronjob';
$lng['crondesc']['cron_apsinstaller'] = 'APS-installer';
$lng['crondesc']['cron_autoresponder'] = 'e-mail autoresponder';
$lng['crondesc']['cron_apsupdater'] = 'updating APS packages';
$lng['crondesc']['cron_traffic'] = 'traffic calculation';
$lng['crondesc']['cron_ticketsreset'] = 'resetting ticket-counters';
$lng['crondesc']['cron_ticketarchive'] = 'archiving old tickets';
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)'; $lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vhost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.'; $lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vhost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
$lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks'; $lng['tasks']['outstanding_tasks'] = 'Outstanding cron-tasks';
@@ -1300,4 +1283,83 @@ $lng['admin']['servicedata'] = 'Service Data';
$lng['admin']['newerversionavailable'] = 'There is a newer version of Froxlor available'; $lng['admin']['newerversionavailable'] = 'There is a newer version of Froxlor available';
// ADDED IN FROXLOR 0.9.3
$lng['emails']['noemaildomainaddedyet'] = 'You do not have a (email-)domain in your account yet.';
$lng['error']['hiddenfieldvaluechanged'] = 'The value for the hidden field &quot;%s&quot; changed while editing the settings.<br /><br />This is usually not a big problem but the settings could not be saved because of this.';
// ADDED IN FROXLOR 0.9.3-svn1
$lng['serversettings']['panel_password_min_length']['title'] = 'Minimum password length';
$lng['serversettings']['panel_password_min_length']['description'] = 'Here you can set a minimum length for passwords. \'0\' means: no minimum length required.';
$lng['error']['notrequiredpasswordlength'] = 'The given password is too short. Please enter at least %s characters.';
$lng['serversettings']['system_store_index_file_subs']['title'] = 'Store default index file also to new subfolders';
$lng['serversettings']['system_store_index_file_subs']['description'] = 'If enabled, the default index-file is being stored to every subdomain-path newly created (not if the folder already exists!)';
// ADDED IN FROXLOR 0.9.3-svn2
$lng['serversettings']['adminmail_return']['title'] = 'Reply-To address';
$lng['serversettings']['adminmail_return']['description'] = 'Define an e-mail address as reply-to-address for mails sent by the panel.';
$lng['serversettings']['adminmail_defname'] = 'Panel e-mail sender name';
// ADDED IN FROXLOR 0.9.3-svn3
$lng['dkim']['dkim_algorithm']['title'] = 'Allowed Hash Algorithms';
$lng['dkim']['dkim_algorithm']['description'] = 'Define allowed hash algorithms, chose "All" for all algorithms or one or more from the other available algorithms';
$lng['dkim']['dkim_servicetype'] = 'Service Types';
$lng['dkim']['dkim_keylength']['title'] = 'Key-length';
$lng['dkim']['dkim_keylength']['description'] = 'Attention: If you change this values, you need to delete all the private/public keys in "'.$settings['dkim']['dkim_prefix'].'"';
$lng['dkim']['dkim_notes']['title'] = 'DKIM Notes';
$lng['dkim']['dkim_notes']['description'] = 'Notes that might be of interest to a human, e.g. a URL like http://www.dnswatch.info. No interpretation is made by any program. This tag should be used sparingly due to space limitations in DNS. This is intended for use by administrators, not end users.';
$lng['dkim']['dkim_add_adsp']['title'] = 'Add DKIM ADSP entry';
$lng['dkim']['dkim_add_adsp']['description'] = 'If you don\'t know what this is, leave it "enabled"';
$lng['dkim']['dkim_add_adsppolicy']['title'] = 'ADSP policy';
$lng['dkim']['dkim_add_adsppolicy']['description'] = 'For more information about this setting see <a href="http://wiki.froxlor.org/contrib/dkim-adsp-policies">http://wiki.froxlor.org/contrib/dkim-adsp-policies</a>';
$lng['admin']['cron']['cronsettings'] = 'Cronjob settings';
$lng['cron']['cronname'] = 'cronjob-name';
$lng['cron']['lastrun'] = 'last run';
$lng['cron']['interval'] = 'interval';
$lng['cron']['isactive'] = 'enabled';
$lng['cron']['description'] = 'description';
$lng['crondesc']['cron_unknown_desc'] = 'no description given';
$lng['admin']['cron']['add'] = 'Add cronjob';
$lng['crondesc']['cron_tasks'] = 'generating of configfiles';
$lng['crondesc']['cron_legacy'] = 'legacy (old) cronjob';
$lng['crondesc']['cron_apsinstaller'] = 'APS-installer';
$lng['crondesc']['cron_autoresponder'] = 'e-mail autoresponder';
$lng['crondesc']['cron_apsupdater'] = 'updating APS packages';
$lng['crondesc']['cron_traffic'] = 'traffic calculation';
$lng['crondesc']['cron_ticketsreset'] = 'resetting ticket-counters';
$lng['crondesc']['cron_ticketarchive'] = 'archiving old tickets';
$lng['cronmgmt']['seconds'] = 'seconds';
$lng['cronmgmt']['minutes'] = 'minutes';
$lng['cronmgmt']['hours'] = 'hours';
$lng['cronmgmt']['days'] = 'days';
$lng['cronmgmt']['weeks'] = 'weeks';
$lng['cronmgmt']['months'] = 'months';
$lng['admin']['cronjob_edit'] = 'Edit cronjob';
$lng['cronjob']['cronjobsettings'] = 'Cronjob settings';
$lng['cronjob']['cronjobinterval'] = 'Runtime interval';
$lng['panel']['options'] = 'options';
$lng['admin']['warning'] = 'WARNING - Please note!';
$lng['cron']['changewarning'] = 'Changing these values can have a negative cause to the behavior of Froxlor and its automated tasks.<br /><br />Please, only change values here if you are *damn sure* you know what you are doing.';
$lng['serversettings']['stdsubdomainhost']['title'] = 'Customer standard subdomain';
$lng['serversettings']['stdsubdomainhost']['description'] = 'What hostname should be used to create standard subdomains for customer. If empty, the system-hostname is used.';
// ADDED IN FROXLOR 0.9.4-svn1
$lng['ftp']['account_edit'] = 'Edit ftp account';
$lng['ftp']['editpassdescription'] = 'Set new password or leave blank for no change.';
$lng['mysql']['sendinfomail'] = 'Send data via email to me';
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] New database created';
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nYou can access your databases using phpMyAdmin via {URI}\n";
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hello {CUST_NAME},\n\nyou have just added a new database. Here is the entered information:\n\nDatabasename: {DB_NAME}\nPassword: {DB_PASS}\nDescription: {DB_DESC}\nDB-Hostname: {DB_SRV}\n{PMA_URI}\nYours sincerely, the Froxlor-Team";
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'You cannot delete a domain which is used by an installed APS package. You have to uninstall it first.';
$lng['serversettings']['awstats_path'] = 'Path to AWStats \'awstats_buildstaticpages.pl\'';
$lng['serversettings']['awstats_conf'] = 'AWStats configuration path';
$lng['error']['overviewsettingoptionisnotavalidfield'] = 'Woops, a field that should be displayed as an option in the settings-overview is not an excepted type. You can blame the developers for this. This should not happen!';
$lng['admin']['configfiles']['compactoverview'] = 'Compact-overview';
$lng['admin']['lastlogin_succ'] = 'Last login';
$lng['panel']['neverloggedin'] = 'No login yet';
?> ?>

View File

@@ -246,7 +246,6 @@ $lng['error']['destinationalreadyexistasmail'] = 'Le renvoi vers l\'adresse "%s"
$lng['error']['destinationalreadyexist'] = 'Il existe d<>j<EFBFBD> une r<>exp<78>dition vers l\'adresse "%s".'; $lng['error']['destinationalreadyexist'] = 'Il existe d<>j<EFBFBD> une r<>exp<78>dition vers l\'adresse "%s".';
$lng['error']['destinationiswrong'] = 'L\'adresse "%s" contient des signes invalides ou est incompl<70>te.'; $lng['error']['destinationiswrong'] = 'L\'adresse "%s" contient des signes invalides ou est incompl<70>te.';
$lng['error']['domainname'] = $lng['domains']['domainname']; $lng['error']['domainname'] = $lng['domains']['domainname'];
$lng['error']['youcantdeletechangemainadmin'] = 'Pour des raisons de s<>curit<69>, il n\'est pas possible de supprimer ou modifier l\'administrateur principal.';
$lng['error']['loginnameissystemaccount'] = 'Vous ne pouvez pas cr<63>er un compte identique au compte syst<73>me, veuillez r<>essayer avec un autre nom.'; $lng['error']['loginnameissystemaccount'] = 'Vous ne pouvez pas cr<63>er un compte identique au compte syst<73>me, veuillez r<>essayer avec un autre nom.';
/** /**
@@ -255,7 +254,6 @@ $lng['error']['loginnameissystemaccount'] = 'Vous ne pouvez pas cr
$lng['question']['question'] = 'Question de s<>curit<69>'; $lng['question']['question'] = 'Question de s<>curit<69>';
$lng['question']['admin_customer_reallydelete'] = 'Etes-vous s<>r de vouloir supprimer le compte "%s" ?<br />ATTENTION ! Toutes ses informations seront supprim<69>es ! Une fois fait, il vous appartiendra de supprimer manuellement tous les dossiers du compte sur le syst<73>me de fichiers.'; $lng['question']['admin_customer_reallydelete'] = 'Etes-vous s<>r de vouloir supprimer le compte "%s" ?<br />ATTENTION ! Toutes ses informations seront supprim<69>es ! Une fois fait, il vous appartiendra de supprimer manuellement tous les dossiers du compte sur le syst<73>me de fichiers.';
$lng['question']['admin_domain_reallyenablemailsystemhostname'] = 'Etes-vous s<>r de vouloir activ<69> le serveur de nom en tant que serveur de mails ?';
$lng['question']['admin_domain_reallydelete'] = 'Etes-vous s<>r de vouloir supprimer le domaine "%s" ?'; $lng['question']['admin_domain_reallydelete'] = 'Etes-vous s<>r de vouloir supprimer le domaine "%s" ?';
$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Etes-vous s<>r de vouloir d<>sactiver les modes de s<>curit<69> suivants : OpenBasedir et / o<> SafeMode ?'; $lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Etes-vous s<>r de vouloir d<>sactiver les modes de s<>curit<69> suivants : OpenBasedir et / o<> SafeMode ?';
$lng['question']['admin_admin_reallydelete'] = 'Etes-vous s<>r de vouloir supprimer l\'administrateur "%s" ?<br />Tous ses comptes seront affect<63>s <20> l\'administrateur principal.'; $lng['question']['admin_admin_reallydelete'] = 'Etes-vous s<>r de vouloir supprimer l\'administrateur "%s" ?<br />Tous ses comptes seront affect<63>s <20> l\'administrateur principal.';
@@ -359,8 +357,6 @@ $lng['serversettings']['hostname']['title'] = 'Nom d\'h
$lng['serversettings']['hostname']['description'] = 'Quel est le nom d\'h<>te (hostname) du serveur ?'; $lng['serversettings']['hostname']['description'] = 'Quel est le nom d\'h<>te (hostname) du serveur ?';
$lng['serversettings']['apachereload_command']['title'] = 'Commande de rechargement d\'Apache'; $lng['serversettings']['apachereload_command']['title'] = 'Commande de rechargement d\'Apache';
$lng['serversettings']['apachereload_command']['description'] = 'Quelle est la commande pour recharger / red<65>marrer Apache ?'; $lng['serversettings']['apachereload_command']['description'] = 'Quelle est la commande pour recharger / red<65>marrer Apache ?';
$lng['serversettings']['apacheconf_filename']['title'] = 'Nom du fichier de configuration Apache';
$lng['serversettings']['apacheconf_filename']['description'] = 'Dans quel fichier souhaitez-vous enregistrer la configuration Apache ?';
$lng['serversettings']['bindconf_directory']['title'] = 'Emplacement du dossier de configuration de Bind / Named'; $lng['serversettings']['bindconf_directory']['title'] = 'Emplacement du dossier de configuration de Bind / Named';
$lng['serversettings']['bindconf_directory']['description'] = 'O<> doit <20>tre stock<63> la configuration de Bind / Named ?'; $lng['serversettings']['bindconf_directory']['description'] = 'O<> doit <20>tre stock<63> la configuration de Bind / Named ?';
$lng['serversettings']['bindreload_command']['title'] = 'Commande de rechargement de Bind / Named'; $lng['serversettings']['bindreload_command']['title'] = 'Commande de rechargement de Bind / Named';
@@ -403,7 +399,6 @@ $lng['mysql']['description'] = 'Ici, vous pouvez ajouter et effacer des bases de
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = 'Derni<6E>re t<>che "cron"';
$lng['serversettings']['paging']['title'] = 'Nombre de r<>sultats par page'; $lng['serversettings']['paging']['title'] = 'Nombre de r<>sultats par page';
$lng['serversettings']['paging']['description'] = 'Nombre de r<>sultats par page ? (0 = D<>sactive la pagination)'; $lng['serversettings']['paging']['description'] = 'Nombre de r<>sultats par page ? (0 = D<>sactive la pagination)';
$lng['error']['ipstillhasdomains'] = 'La combinaison IP / port est encore utilis<69>e, veuillez r<>assigner le ou les domaines existant(s) avec cette adresse IP / port concern<72>(s) <20> une autre combinaison IP / port avant de supprimer celle-ci.'; $lng['error']['ipstillhasdomains'] = 'La combinaison IP / port est encore utilis<69>e, veuillez r<>assigner le ou les domaines existant(s) avec cette adresse IP / port concern<72>(s) <20> une autre combinaison IP / port avant de supprimer celle-ci.';
@@ -452,7 +447,6 @@ $lng['error']['phpmyadminiswrong'] = 'Le lien pour phpMyAdmin n\'est pas valide.
$lng['error']['webmailiswrong'] = 'Le lien pour le WebMail n\'est pas valide.'; $lng['error']['webmailiswrong'] = 'Le lien pour le WebMail n\'est pas valide.';
$lng['error']['webftpiswrong'] = 'Le lien pour le WebFTP n\'est pas valide.'; $lng['error']['webftpiswrong'] = 'Le lien pour le WebFTP n\'est pas valide.';
$lng['domains']['hasaliasdomains'] = 'Le domaine poss<73>de un ou des alias.'; $lng['domains']['hasaliasdomains'] = 'Le domaine poss<73>de un ou des alias.';
$lng['domains']['istopleveldomain'] = 'Est le nom de domaine principal';
$lng['serversettings']['defaultip']['title'] = 'IP / Port par d<>faut'; $lng['serversettings']['defaultip']['title'] = 'IP / Port par d<>faut';
$lng['serversettings']['defaultip']['description'] = 'Quel est l\'IP / Port par d<>faut ?'; $lng['serversettings']['defaultip']['description'] = 'Quel est l\'IP / Port par d<>faut ?';
$lng['domains']['statstics'] = 'Fr<46>quentation'; $lng['domains']['statstics'] = 'Fr<46>quentation';
@@ -546,7 +540,6 @@ $lng['admin']['configfiles']['etc'] = 'Autres (Syst
$lng['admin']['configfiles']['choosedistribution'] = '-- Choisissez une distribution --'; $lng['admin']['configfiles']['choosedistribution'] = '-- Choisissez une distribution --';
$lng['admin']['configfiles']['chooseservice'] = '-- Choisissez un service --'; $lng['admin']['configfiles']['chooseservice'] = '-- Choisissez un service --';
$lng['admin']['configfiles']['choosedaemon'] = '-- Choisissez un d<>mon --'; $lng['admin']['configfiles']['choosedaemon'] = '-- Choisissez un d<>mon --';
$lng['admin']['trafficlastrun'] = 'Dernier calcul du trafic';
// ADDED IN 1.2.16-svn10 // ADDED IN 1.2.16-svn10
@@ -811,10 +804,6 @@ $lng['cronjobs']['notyetrun'] = 'Pas encore lanc
$lng['install']['servername_should_be_fqdn'] = 'Le nom du serveur doit <20>tre un nom FQDN, pas une adresse IP'; $lng['install']['servername_should_be_fqdn'] = 'Le nom du serveur doit <20>tre un nom FQDN, pas une adresse IP';
$lng['serversettings']['default_vhostconf']['title'] = 'Param<61>tres par d<>faut pour les vHosts'; $lng['serversettings']['default_vhostconf']['title'] = 'Param<61>tres par d<>faut pour les vHosts';
$lng['emails']['quota'] = 'Quota'; $lng['emails']['quota'] = 'Quota';
$lng['emails']['quota_type']['byte'] = 'octet(s)';
$lng['emails']['quota_type']['kilobyte'] = 'Ko';
$lng['emails']['quota_type']['megabyte'] = 'Mo';
$lng['emails']['quota_type']['gigabyte'] = 'Go';
$lng['emails']['noquota'] = 'Pas de quota'; $lng['emails']['noquota'] = 'Pas de quota';
$lng['emails']['updatequota'] = 'Mise <20> jour'; $lng['emails']['updatequota'] = 'Mise <20> jour';
$lng['serversettings']['mail_quota']['title'] = 'Quota de la bo<62>te aux lettres'; $lng['serversettings']['mail_quota']['title'] = 'Quota de la bo<62>te aux lettres';
@@ -859,8 +848,6 @@ $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Vous ne pouvez pas act
$lng['serversettings']['webalizer_enabled'] = 'Activer les statistiques Webalizer'; $lng['serversettings']['webalizer_enabled'] = 'Activer les statistiques Webalizer';
$lng['serversettings']['awstats_enabled'] = 'Activer les statistiques AWStats'; $lng['serversettings']['awstats_enabled'] = 'Activer les statistiques AWStats';
$lng['admin']['awstatssettings'] = 'Param<61>tres Awstats'; $lng['admin']['awstatssettings'] = 'Param<61>tres Awstats';
$lng['serversettings']['awstats_domain_file']['title'] = 'Dossier domaines pour AWStats';
$lng['serversettings']['awstats_model_file']['title'] = 'Fichier mod<6F>le pour AWStats';
// ADDED IN 1.2.19-svn16 // ADDED IN 1.2.19-svn16

View File

@@ -756,7 +756,7 @@ $lng['serversettings']['logger']['severity'] = 'Logging Level';
$lng['admin']['logger']['normal'] = 'Normal'; $lng['admin']['logger']['normal'] = 'Normal';
$lng['admin']['logger']['paranoid'] = 'Paranoid'; $lng['admin']['logger']['paranoid'] = 'Paranoid';
$lng['serversettings']['logger']['types']['title'] = 'Log-Art(en)'; $lng['serversettings']['logger']['types']['title'] = 'Log-Art(en)';
$lng['serversettings']['logger']['types']['description'] = 'Tragen Sie hier die gew&uuml;nschten Logtypen kommagetrennt ein.<br />M&ouml;gliche Logtypen sind: syslog, file, mysql'; $lng['serversettings']['logger']['types']['description'] = 'W&auml;hlen Sie hier die gew&uuml;nschten Logtypen. F&uuml;r Mehrfachauswahl, halten Sie w&auml;ghrend der Auswahl STRG gedr&uuml;ckt<br />M&ouml;gliche Logtypen sind: syslog, file, mysql';
$lng['serversettings']['logger']['logfile'] = 'Log-Datei Pfad inklusive Dateinamen'; $lng['serversettings']['logger']['logfile'] = 'Log-Datei Pfad inklusive Dateinamen';
$lng['error']['logerror'] = 'Log-Fehler: %s'; $lng['error']['logerror'] = 'Log-Fehler: %s';
$lng['serversettings']['logger']['logcron'] = 'Log Cronjobs (einen Durchgang)'; $lng['serversettings']['logger']['logcron'] = 'Log Cronjobs (einen Durchgang)';
@@ -830,8 +830,6 @@ $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Webalizer und Awstats
$lng['serversettings']['webalizer_enabled'] = 'Nutze Webalizer Statistiken'; $lng['serversettings']['webalizer_enabled'] = 'Nutze Webalizer Statistiken';
$lng['serversettings']['awstats_enabled'] = 'Nutze AWStats Statistiken'; $lng['serversettings']['awstats_enabled'] = 'Nutze AWStats Statistiken';
$lng['admin']['awstatssettings'] = 'Awstats Einstellungen'; $lng['admin']['awstatssettings'] = 'Awstats Einstellungen';
$lng['serversettings']['awstats_domain_file']['title'] = 'Awstats Domain-Dateien Ordner';
$lng['serversettings']['awstats_model_file']['title'] = 'Awstats Model Datei';
// ADDED IN 1.2.19-svn16 // ADDED IN 1.2.19-svn16
@@ -955,7 +953,7 @@ $lng['error']['accountnotexisting'] = 'Der angegebene E-Mail-Account existiert n
$lng['error']['autoresponderalreadyexists'] = 'F&uuml;r dieses Konto existiert bereits eine Abwesenheitsnachricht.'; $lng['error']['autoresponderalreadyexists'] = 'F&uuml;r dieses Konto existiert bereits eine Abwesenheitsnachricht.';
$lng['error']['invalidautoresponder'] = 'Das angegebene Konto ist ung&uuml;ltig.'; $lng['error']['invalidautoresponder'] = 'Das angegebene Konto ist ung&uuml;ltig.';
$lng['serversettings']['autoresponder_active']['title'] = 'Abwesenheitsnachrichten-Modul verwenden'; $lng['serversettings']['autoresponder_active']['title'] = 'Abwesenheitsnachrichten-Modul verwenden';
$lng['serversettings']['autoresponder_active']['description'] = 'M&ouml;chten Sie das Abwesenheitsnachrichten-Modul verwenden? Dazu muss ein separater Cronjob eingerichtet sein.'; $lng['serversettings']['autoresponder_active']['description'] = 'M&ouml;chten Sie das Abwesenheitsnachrichten-Modul verwenden?';
$lng['admin']['show_version_login']['title'] = 'Zeige Froxlor Version beim Login'; $lng['admin']['show_version_login']['title'] = 'Zeige Froxlor Version beim Login';
$lng['admin']['show_version_login']['description'] = 'Zeige Froxlor Version in der Fu&szlig;zeile der Loginseite'; $lng['admin']['show_version_login']['description'] = 'Zeige Froxlor Version in der Fu&szlig;zeile der Loginseite';
$lng['admin']['show_version_footer']['title'] = 'Zeige Froxlor Version in Fu&szlig;zeile'; $lng['admin']['show_version_footer']['title'] = 'Zeige Froxlor Version in Fu&szlig;zeile';
@@ -1196,7 +1194,7 @@ $lng['error']['admindoesntexist'] = 'Der ausgew&auml;hlte Admin existiert nicht.
// ADDED IN 1.2.19-svn37 // ADDED IN 1.2.19-svn37
$lng['serversettings']['system_realtime_port']['title'] = 'Port f&uuml;r Realtime Froxlor'; $lng['serversettings']['system_realtime_port']['title'] = 'Port f&uuml;r Realtime Froxlor';
$lng['serversettings']['system_realtime_port']['description'] = 'Dieser Port auf localhost wird bei jedem neuen Cron-Task kontaktiert. Wenn der Wert 0 (Null) ist, dann ist dieses Feature deaktiviert.<br />Siehe dazu auch: <a href="https://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>'; $lng['serversettings']['system_realtime_port']['description'] = 'Dieser Port auf localhost wird bei jedem neuen Cron-Task kontaktiert. Wenn der Wert 0 (Null) ist, dann ist dieses Feature deaktiviert.<br />Siehe dazu auch: <a href="http://wiki.froxlor.org/doc/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
$lng['serversettings']['session_allow_multiple_login']['title'] = 'Erlaube gleichzeitigen Login'; $lng['serversettings']['session_allow_multiple_login']['title'] = 'Erlaube gleichzeitigen Login';
$lng['serversettings']['session_allow_multiple_login']['description'] = 'Wenn diese Option aktiviert ist, k&ouml;nnen sich Nutzer mehrmals gleichzeitig anmelden.'; $lng['serversettings']['session_allow_multiple_login']['description'] = 'Wenn diese Option aktiviert ist, k&ouml;nnen sich Nutzer mehrmals gleichzeitig anmelden.';
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Erlaube Verschieben von Domains unter Admins'; $lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Erlaube Verschieben von Domains unter Admins';
@@ -1240,24 +1238,9 @@ $lng['panel']['off'] = 'aus';
$lng['update']['updateinprogress_onlyadmincanlogin'] = 'Eine neuere Version von Froxlor wurde installiert, aber noch nicht eingerichtet.<br />Nur der Administrator kann sich anmelden und die Aktualisierung abschlie&szlig;en.'; $lng['update']['updateinprogress_onlyadmincanlogin'] = 'Eine neuere Version von Froxlor wurde installiert, aber noch nicht eingerichtet.<br />Nur der Administrator kann sich anmelden und die Aktualisierung abschlie&szlig;en.';
$lng['update']['update'] = 'Froxlor Aktualisierung'; $lng['update']['update'] = 'Froxlor Aktualisierung';
$lng['update']['proceed'] = 'Ausf&uuml;hren'; $lng['update']['proceed'] = 'Ausf&uuml;hren';
$lng['update']['update_information'] = 'Die Froxlor Dateien wurden aktualisiert. Neue Version ist <strong>%newversion</strong>. Die bisher installierte Version ist <strong>%curversion</strong><br /><br />Ein Kunden-Login ist vor Abschluss des Aktualisierungsvorganges nicht m&oouml;glich.<br /><strong>Aktualisierung ausf&uuml;hren?</strong>'; $lng['update']['update_information']['part_a'] = 'Die Froxlor Dateien wurden aktualisiert. Neue Version ist <strong>%newversion</strong>. Die bisher installierte Version ist <strong>%curversion</strong>';
$lng['update']['update_information']['part_b'] = '<br /><br />Ein Kunden-Login ist vor Abschluss des Aktualisierungsvorganges nicht m&ouml;glich.<br /><strong>Aktualisierung ausf&uuml;hren?</strong>';
$lng['update']['noupdatesavail'] = '<strong>Ihre Froxlor-Version ist aktuell.</strong>'; $lng['update']['noupdatesavail'] = '<strong>Ihre Froxlor-Version ist aktuell.</strong>';
$lng['admin']['cron']['cronsettings'] = 'Cronjob Einstellungen';
$lng['cron']['cronname'] = 'Cronjob-Name';
$lng['cron']['lastrun'] = 'zuletzt gestartet';
$lng['cron']['interval'] = 'Interval';
$lng['cron']['isactive'] = 'Aktiv';
$lng['admin']['cron']['add'] = 'Cronjob hinzuf&uuml;gen';
$lng['cron']['description'] = 'Beschreibung';
$lng['crondesc']['cron_unknown_desc'] = 'Keine Beschreibung angegeben';
$lng['crondesc']['cron_tasks'] = 'Erstellen von Konfigurationsdateien';
$lng['crondesc']['cron_legacy'] = 'Legacy (alter) Cronjob';
$lng['crondesc']['cron_apsinstaller'] = 'APS-Installer';
$lng['crondesc']['cron_autoresponder'] = 'E-Mail Autoresponder';
$lng['crondesc']['cron_apsupdater'] = 'Aktualisieren der APS Pakete';
$lng['crondesc']['cron_traffic'] = 'Traffic-Berechnung';
$lng['crondesc']['cron_ticketsreset'] = 'Zur&uuml;cksetzen der Ticket-Z&auml;hler';
$lng['crondesc']['cron_ticketarchive'] = 'Archivieren alter Tickets';
$lng['admin']['specialsettingsforsubdomains'] = '&Uuml;bernehme Einstellungen f&uuml;r alle Subdomains (*.beispiel.de)'; $lng['admin']['specialsettingsforsubdomains'] = '&Uuml;bernehme Einstellungen f&uuml;r alle Subdomains (*.beispiel.de)';
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Wenn ja, werden die individuellen Einstellungen f&uuml;r alle Subdomains &uuml;bernommen; wenn nein, werden Subdomain-Specialsettings entfernt.'; $lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Wenn ja, werden die individuellen Einstellungen f&uuml;r alle Subdomains &uuml;bernommen; wenn nein, werden Subdomain-Specialsettings entfernt.';
$lng['tasks']['outstanding_tasks'] = 'Ausstehende Cron-Aufgaben'; $lng['tasks']['outstanding_tasks'] = 'Ausstehende Cron-Aufgaben';
@@ -1280,4 +1263,99 @@ $lng['admin']['servicedata'] = 'Dienstleistungsdaten';
$lng['admin']['newerversionavailable'] = 'Eine neuere Version von Froxlor wurde ver&ouml;ffentlicht'; $lng['admin']['newerversionavailable'] = 'Eine neuere Version von Froxlor wurde ver&ouml;ffentlicht';
// ADDED IN FROXLOR 0.9.3
$lng['emails']['noemaildomainaddedyet'] = 'Sie haben bisher noch keine (E-Mail-)Domain in Ihrem Konto.';
$lng['error']['hiddenfieldvaluechanged'] = 'Der Wert des verborgenen Feldes &quot;%s&quot; hat sich w&auml;hrend dem &Auml;ndern der Einstellungen ge&auml;ndert.<br /><br />Dies ist im Grunde kein schwerwiegendes Problem, allerdings konnten so die Einstellungen nicht gespeichert werden.';
// ADDED IN FROXLOR 0.9.3-svn1
$lng['serversettings']['panel_password_min_length']['title'] = 'Mindestl&auml;nge von Passw&ouml;rtern';
$lng['serversettings']['panel_password_min_length']['description'] = 'Hier k&ouml;nnen Sie die Mindestl&auml;nge f&uuml;r Passw&ouml;rter festlegen. \'0\' bedeutet: Keine Mindestl&auml;nge';
$lng['error']['notrequiredpasswordlength'] = 'Das Passwort ist zu kurz. Bitte geben Sie mindestens %s Zeichen an.';
$lng['serversettings']['system_store_index_file_subs']['title'] = 'Erstelle Index-Datei auch in neuen Unterordnern';
$lng['serversettings']['system_store_index_file_subs']['description'] = 'Wenn aktiviert, wird f&uuml;r jede Subdomain mit neuem Unterordner die Standard-Index Datei angelegt.';
// ADDED IN FROXLOR 0.9.3-svn2
$lng['serversettings']['adminmail_return']['title'] = 'Antwort-Adresse';
$lng['serversettings']['adminmail_return']['description'] = 'Standard-Antwort-Adresse f&uuml;r E-Mails aus dem Panel.';
$lng['serversettings']['adminmail_defname'] = 'Panel Absender Name';
// ADDED IN FROXLOR 0.9.3-svn3
$lng['dkim']['dkim_algorithm']['title'] = 'G&uuml;ltige Hash Algorithmen';
$lng['dkim']['dkim_algorithm']['description'] = 'W&auml;hlen sie einen Algorithmus, "All" f&uuml;r alle Algorithmen oder Einen oder Mehrere von den verf&uuml;gbaren Algorithmen';
$lng['dkim']['dkim_servicetype'] = 'Service Typen';
$lng['dkim']['dkim_keylength']['title'] = 'Schl&uuml;ssel-L&auml;nge';
$lng['dkim']['dkim_keylength']['description'] = 'Achtung: Bei &Auml;nderung dieser Einstellung m&uuml;ssen alle private/public Schl&uuml;ssel in "'.$settings['dkim']['dkim_prefix'].'" gel&ouml;scht werden.';
$lng['dkim']['dkim_notes']['title'] = 'DKIM Notiz';
$lng['dkim']['dkim_notes']['description'] = 'Eine Notiz, welche f&uuml;r Menschen interessant sein k&ouml;nnte, Z.B. eine URL wie http://www.dnswatch.info. Es gibt keine programmgesteuerte Interpretation f&uuml;r dieses Feld. Gehen sie sparsam mit der Anzahl der Zeichen um, da es Einschr&auml;nkungen seitens des DNS Dienstes gibt. Dieses Feld ist f&uuml;r Administratoren gedacht, nicht f&uuml;r Benutzer.';
$lng['dkim']['dkim_add_adsp']['title'] = 'DKIM ADSP Eintrag hinzuf&uuml;gen';
$lng['dkim']['dkim_add_adsp']['description'] = 'Wenn unsicher oder unbekannt, belassen sie es auf "aktiviert"';
$lng['dkim']['dkim_add_adsppolicy']['title'] = 'ADSP Richtlinie';
$lng['dkim']['dkim_add_adsppolicy']['description'] = 'Mehr Informationen zu dieser Einstellung (englisch) <a href="http://wiki.froxlor.org/contrib/dkim-adsp-policies">http://wiki.froxlor.org/contrib/dkim-adsp-policies</a>';
$lng['admin']['cron']['cronsettings'] = 'Cronjob Einstellungen';
$lng['cron']['cronname'] = 'Cronjob-Name';
$lng['cron']['lastrun'] = 'zuletzt gestartet';
$lng['cron']['interval'] = 'Intervall';
$lng['cron']['isactive'] = 'Aktiv';
$lng['cron']['description'] = 'Beschreibung';
$lng['crondesc']['cron_unknown_desc'] = 'Keine Beschreibung angegeben';
$lng['admin']['cron']['add'] = 'Cronjob hinzuf&uuml;gen';
$lng['crondesc']['cron_tasks'] = 'Erstellen von Konfigurationsdateien';
$lng['crondesc']['cron_legacy'] = 'Legacy (alter) Cronjob';
$lng['crondesc']['cron_apsinstaller'] = 'APS-Installer';
$lng['crondesc']['cron_autoresponder'] = 'E-Mail Autoresponder';
$lng['crondesc']['cron_apsupdater'] = 'Aktualisieren der APS Pakete';
$lng['crondesc']['cron_traffic'] = 'Traffic-Berechnung';
$lng['crondesc']['cron_ticketsreset'] = 'Zur&uuml;cksetzen der Ticket-Z&auml;hler';
$lng['crondesc']['cron_ticketarchive'] = 'Archivieren alter Tickets';
$lng['cronmgmt']['seconds'] = 'Sekunden';
$lng['cronmgmt']['minutes'] = 'Minuten';
$lng['cronmgmt']['hours'] = 'Stunden';
$lng['cronmgmt']['days'] = 'Tage';
$lng['cronmgmt']['weeks'] = 'Wochen';
$lng['cronmgmt']['months'] = 'Monate';
$lng['admin']['cronjob_edit'] = 'Cronjob bearbeiten';
$lng['cronjob']['cronjobsettings'] = 'Cronjob Einstellungen';
$lng['cronjob']['cronjobinterval'] = 'Laufzeit-Intervall';
$lng['panel']['options'] = 'Optionen';
$lng['admin']['warning'] = 'ACHTUNG - Wichtiger Hinweis!';
$lng['cron']['changewarning'] = '&Auml;nderungen an diesen Werten kann einen negativen Effekt auf das Verhalten von Froxlor und seinen automatisierten Aufgaben haben.<br /><br />Also bitte nur etwas &auml;ndern, wenn du dir *verdammt sicher* bist das du weisst was du tust.';
$lng['serversettings']['stdsubdomainhost']['title'] = 'Kunden Standard-Subdomain';
$lng['serversettings']['stdsubdomainhost']['description'] = 'Welcher Hostname soll f&uuml;r das Erstellen der Kunden-Standard-Subdomain verwendet werden? Falls leer wird der System-Hostname verwendet.';
// ADDED IN FROXLOR 0.9.4-svn1
$lng['ftp']['account_edit'] = 'FTP Konto bearbeiten';
$lng['ftp']['editpassdescription'] = 'Neues Passwort setzen oder leer f&uuml;r keine &Auml;nderung.';
$lng['mysql']['sendinfomail'] = 'Daten per E-Mail an mich senden';
$lng['customer']['mysql_add']['infomail_subject'] = '[Froxlor] Neue Datenbank erstellt';
$lng['customer']['mysql_add']['infomail_body']['pma'] = "\nDie Datenbank kann mit phpMyAdmin via {URI} verwaltet werden.\n";
$lng['customer']['mysql_add']['infomail_body']['main'] = "Hallo {CUST_NAME},\n\ndu hast gerade eine neue Datenbank angelegt. Hier die angegebenen Informationen:\n\nDatenbankname: {DB_NAME}\nPasswort: {DB_PASS}\nBeschreibung: {DB_DESC}\nDatenbank-Server: {DB_SRV}\n{PMA_URI}\nVielen Dank, das Froxlor-Team";
$lng['error']['domains_cantdeletedomainwithapsinstances'] = 'Sie k&ouml;nnen keine Domain l&ouml;schen, die noch von APS Paketen verwendet wird. L&ouml;schen Sie zuerst alle installierten APS Pakete dieser Domain.';
$lng['serversettings']['awstats_path'] = 'Pfad zu AWStats \'awstats_buildstaticpages.pl\'';
$lng['serversettings']['awstats_conf'] = 'AWStats Konfigurations-Pfad';
$lng['error']['overviewsettingoptionisnotavalidfield'] = 'Hoppla, ein Feld, dass als Option in der Konfigurations&uuml;bersicht angezeigt werden soll, hat nicht den erwarteten Wert. Sie k&ouml;nnen den Entwicklern die Schuld geben. Dies sollte nicht passieren!';
$lng['admin']['configfiles']['compactoverview'] = 'Kompakt-&Uuml;bersicht';
$lng['mysql']['mysql_server'] = 'MySQL-Server';
$lng['admin']['ipsandports']['webserverdefaultconfig'] = 'Webserver Standard Konfiguration';
$lng['admin']['ipsandports']['webserverdomainconfig'] = 'Webserver Domain Konfiguration';
$lng['admin']['ipsandports']['webserverssldomainconfig'] = 'Webserver SSL Konfiguration';
$lng['admin']['ipsandports']['ssl_key_file'] = 'Pfad zu der SSL Schl&uuml;sseldatei';
$lng['admin']['ipsandports']['ssl_ca_file'] = 'Pfad zu dem SSL CA Zertifikat';
$lng['admin']['ipsandports']['default_vhostconf_domain'] = 'Standard vHost - Einstellungen f&uuml;r jeden Domain - Kontainer';
$lng['serversettings']['ssl']['ssl_key_file'] = 'Pfad zu der SSL Schl&uuml;sseldatei';
$lng['serversettings']['ssl']['ssl_ca_file'] = 'Pfad zu dem SSL CA Zertifikat';
$lng['error']['usernamealreadyexists'] = 'Der Benutzername %s existiert bereits.';
$lng['error']['plausibilitychecknotunderstood'] = 'Die Antwort des Plausibilit&auml;tschecks wurde nicht verstanden';
$lng['error']['errorwhensaving'] = 'Bei dem Speichern des Feldes %s trat ein Fehler auf';
$lng['success']['success'] = 'Information';
$lng['success']['clickheretocontinue'] = 'Hier klicken um fortzufahren';
$lng['success']['settingssaved'] = 'Die Einstellungen wurden erfolgreich gespeichert.';
$lng['admin']['lastlogin_succ'] = 'Letzte Anmeldung';
$lng['panel']['neverloggedin'] = 'Keine Anmeldung bisher';
?> ?>

View File

@@ -191,7 +191,6 @@ $lng['error']['youhavealreadyacatchallforthisdomain'] = '&Ouml;n m&aacute;r megh
$lng['error']['ftp_cantdeletemainaccount'] = 'Nem t&ouml;r&ouml;lheti f&#337; FTP hozz&aacute;f&eacute;r&eacute;s&eacute;t.'; $lng['error']['ftp_cantdeletemainaccount'] = 'Nem t&ouml;r&ouml;lheti f&#337; FTP hozz&aacute;f&eacute;r&eacute;s&eacute;t.';
$lng['error']['login'] = 'Helytelen a felhaszn&aacute;l&oacute;n&eacute;v vagy a jelsz&oacute;, amelyet beg&eacute;pelt. K&eacute;rem, pr&oacute;b&aacute;lja &uacute;jra!'; $lng['error']['login'] = 'Helytelen a felhaszn&aacute;l&oacute;n&eacute;v vagy a jelsz&oacute;, amelyet beg&eacute;pelt. K&eacute;rem, pr&oacute;b&aacute;lja &uacute;jra!';
$lng['error']['login_blocked'] = 'Ezt a hozz&aacute;f&eacute;r&eacute;s fel lett f&uuml;ggesztve a t&uacute;l sok bejelentkez&eacute;si hiba miatt. K&eacute;rem, pr&oacute;b&aacute;lja &uacute;jra!'; $lng['error']['login_blocked'] = 'Ezt a hozz&aacute;f&eacute;r&eacute;s fel lett f&uuml;ggesztve a t&uacute;l sok bejelentkez&eacute;si hiba miatt. K&eacute;rem, pr&oacute;b&aacute;lja &uacute;jra!';
$settings['login']['deactivatetime'] . ' seconds.';
$lng['error']['notallreqfieldsorerrors'] = 'Nem teljesen vagy helytelen&uuml;l t&ouml;lt&ouml;tte ki a mez&#337;ket.'; $lng['error']['notallreqfieldsorerrors'] = 'Nem teljesen vagy helytelen&uuml;l t&ouml;lt&ouml;tte ki a mez&#337;ket.';
$lng['error']['oldpasswordnotcorrect'] = 'A r&eacute;gi jelsz&oacute; helytelen.'; $lng['error']['oldpasswordnotcorrect'] = 'A r&eacute;gi jelsz&oacute; helytelen.';
$lng['error']['youcantallocatemorethanyouhave'] = 'Nem oszthat ki t&ouml;bb er&#337;forr&aacute;st, mint amennyit birtokol.'; $lng['error']['youcantallocatemorethanyouhave'] = 'Nem oszthat ki t&ouml;bb er&#337;forr&aacute;st, mint amennyit birtokol.';
@@ -386,7 +385,6 @@ $lng['mysql']['description'] = 'Itt hozhatja l&eacute;tre &eacute;s v&aacute;lto
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = 'Utols&oacute; Cron fut&aacute;s';
$lng['serversettings']['paging']['title'] = 'Bejegyz&eacute;sek sz&aacute;ma egy lapon'; $lng['serversettings']['paging']['title'] = 'Bejegyz&eacute;sek sz&aacute;ma egy lapon';
$lng['serversettings']['paging']['description'] = 'H&aacute;ny bejegyz&eacute;s jelenjen meg egy lapon? (0 = lapoz&aacute;s kikapcsol&aacute;sa)'; $lng['serversettings']['paging']['description'] = 'H&aacute;ny bejegyz&eacute;s jelenjen meg egy lapon? (0 = lapoz&aacute;s kikapcsol&aacute;sa)';
$lng['error']['ipstillhasdomains'] = 'A t&ouml;r&ouml;lni k&iacute;v&aacute;nt IP/Port kombin&aacute;ci&oacute;hoz domainek vannak rendelve. Rendelje hozz&aacute; ezeket egy m&aacute;sik IP/Port kombin&aacute;ci&oacute;hoz, miel&#337;tt a jelenlegi IP/Port kombin&aacute;ci&oacute;t t&ouml;rli.'; $lng['error']['ipstillhasdomains'] = 'A t&ouml;r&ouml;lni k&iacute;v&aacute;nt IP/Port kombin&aacute;ci&oacute;hoz domainek vannak rendelve. Rendelje hozz&aacute; ezeket egy m&aacute;sik IP/Port kombin&aacute;ci&oacute;hoz, miel&#337;tt a jelenlegi IP/Port kombin&aacute;ci&oacute;t t&ouml;rli.';

View File

@@ -378,7 +378,6 @@ $lng['serversettings']['pathedit']['description'] = 'Un percorso/cartella andr
* New strings * New strings
*/ */
$lng['admin']['cronlastrun'] = 'Ultimo Cronjob';
$lng['serversettings']['paging']['title'] = 'Elementi da visualizzare per pagina'; $lng['serversettings']['paging']['title'] = 'Elementi da visualizzare per pagina';
$lng['serversettings']['paging']['description'] = 'Quanti elementi dovrebbero essere visualizzati su una pagina? (0 = disattiva impaginazione)'; $lng['serversettings']['paging']['description'] = 'Quanti elementi dovrebbero essere visualizzati su una pagina? (0 = disattiva impaginazione)';
$lng['error']['ipstillhasdomains'] = 'La combinazione IP/Porta che vuoi eliminare ha ancora dei domini assegnati, per favore riassegna questi domini ad altre combinazioni IP/Porta prima di eliminare questa.'; $lng['error']['ipstillhasdomains'] = 'La combinazione IP/Porta che vuoi eliminare ha ancora dei domini assegnati, per favore riassegna questi domini ad altre combinazioni IP/Porta prima di eliminare questa.';

View File

@@ -1,22 +0,0 @@
<?php
/**
* PHPMailer language file.
* English Version
*/
$PHPMAILER_LANG = array();
$PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' . 'recipient email address.';
$PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.';
$PHPMAILER_LANG["execute"] = 'Could not execute: ';
$PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.';
$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.';
$PHPMAILER_LANG["from_failed"] = 'The following From address failed: ';
$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' . 'recipients failed: ';
$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data not accepted.';
$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host.';
$PHPMAILER_LANG["file_access"] = 'Could not access file: ';
$PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: ';
$PHPMAILER_LANG["encoding"] = 'Unknown encoding: ';
?>

1379
lng/polish.lng.php Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -379,7 +379,6 @@ $lng['serversettings']['pathedit']['description'] = 'A escolha do file tem que s
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = 'Ultimo Agendamento';
$lng['serversettings']['paging']['title'] = 'Entradas por pagina'; $lng['serversettings']['paging']['title'] = 'Entradas por pagina';
$lng['serversettings']['paging']['description'] = 'Quantas entradas devem ser mostradas por pagina? (0 = desabilitar paginas)'; $lng['serversettings']['paging']['description'] = 'Quantas entradas devem ser mostradas por pagina? (0 = desabilitar paginas)';
$lng['error']['ipstillhasdomains'] = 'O IP/Porta que voce quer deletar ainda possui dominios associados e eles, por favor altere o IP/Porta destes dominios antes de delet&aacute;-los.'; $lng['error']['ipstillhasdomains'] = 'O IP/Porta que voce quer deletar ainda possui dominios associados e eles, por favor altere o IP/Porta destes dominios antes de delet&aacute;-los.';
@@ -490,7 +489,6 @@ $lng['admin']['configfiles']['etc'] = 'Outros (Sistema)';
$lng['admin']['configfiles']['choosedistribution'] = 'Escolha uma distribui&ccedil;&atilde;o'; $lng['admin']['configfiles']['choosedistribution'] = 'Escolha uma distribui&ccedil;&atilde;o';
$lng['admin']['configfiles']['chooseservice'] = 'Escolha um servi&ccedil;o'; $lng['admin']['configfiles']['chooseservice'] = 'Escolha um servi&ccedil;o';
$lng['admin']['configfiles']['choosedaemon'] = 'Escolha um daemon'; $lng['admin']['configfiles']['choosedaemon'] = 'Escolha um daemon';
$lng['admin']['trafficlastrun'] = 'C&aacute;lculo do &Uacute;ltimo Tr&aacute;fego';
$lng['serversettings']['ftpdomain']['title'] = 'Contas FTP @dom&iacute;nio'; $lng['serversettings']['ftpdomain']['title'] = 'Contas FTP @dom&iacute;nio';
$lng['serversettings']['ftpdomain']['description'] = 'Clientes podem criar contas de FTP user@dom&iacute;niodocliente?'; $lng['serversettings']['ftpdomain']['description'] = 'Clientes podem criar contas de FTP user@dom&iacute;niodocliente?';
$lng['panel']['back'] = 'Volta'; $lng['panel']['back'] = 'Volta';
@@ -738,8 +736,6 @@ $lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Voc&ecirc; n&atilde;o
$lng['serversettings']['webalizer_enabled'] = 'Ativar estat&iacute;sticas webalizer'; $lng['serversettings']['webalizer_enabled'] = 'Ativar estat&iacute;sticas webalizer';
$lng['serversettings']['awstats_enabled'] = 'Ativar estat&iacute;sticas awstats'; $lng['serversettings']['awstats_enabled'] = 'Ativar estat&iacute;sticas awstats';
$lng['admin']['awstatssettings'] = 'Configura&ccedil;&otilde;es Awtats'; $lng['admin']['awstatssettings'] = 'Configura&ccedil;&otilde;es Awtats';
$lng['serversettings']['awstats_domain_file']['title'] = 'Awstats diret&oacute;rio de arquivos do dominio';
$lng['serversettings']['awstats_model_file']['title'] = 'Modelo de arquivo Awstats';
$lng['admin']['domain_dns_settings'] = 'Configura&ccedil;&otilde;es de DNS'; $lng['admin']['domain_dns_settings'] = 'Configura&ccedil;&otilde;es de DNS';
$lng['dns']['destinationip'] = 'Dom&iacute;nio IP'; $lng['dns']['destinationip'] = 'Dom&iacute;nio IP';
$lng['dns']['standardip'] = 'IP padr&atilde;o do servidor'; $lng['dns']['standardip'] = 'IP padr&atilde;o do servidor';
@@ -789,13 +785,6 @@ $lng['panel']['default'] = 'Padr&atilde;o';
$lng['panel']['never'] = 'Nunca'; $lng['panel']['never'] = 'Nunca';
$lng['panel']['active'] = 'Ativo'; $lng['panel']['active'] = 'Ativo';
$lng['panel']['please_choose'] = 'Por favor escolha'; $lng['panel']['please_choose'] = 'Por favor escolha';
$lng['panel']['intervalfee_type']['y'] = 'Anos';
$lng['panel']['intervalfee_type']['m'] = 'Meses';
$lng['panel']['intervalfee_type']['d'] = 'Dias';
$lng['panel']['intervalfee_type_one']['y'] = 'Ano';
$lng['panel']['intervalfee_type_one']['m'] = 'Mes';
$lng['panel']['intervalfee_type_one']['d'] = 'Dia';
$lng['panel']['service_still_active'] = 'Servi&ccedil;o ainda ativo';
$lng['panel']['allow_modifications'] = 'Aceita altera&ccedil;oes'; $lng['panel']['allow_modifications'] = 'Aceita altera&ccedil;oes';
$lng['domains']['add_date'] = 'Adicionado no Froxlor'; $lng['domains']['add_date'] = 'Adicionado no Froxlor';
$lng['domains']['registration_date'] = 'Adicionado no Registro'; $lng['domains']['registration_date'] = 'Adicionado no Registro';
@@ -803,46 +792,9 @@ $lng['domains']['topleveldomain'] = 'Top-Level-Domain';
$lng['admin']['accountdata'] = 'Data da Conta'; $lng['admin']['accountdata'] = 'Data da Conta';
$lng['admin']['contactdata'] = 'Data de Contato'; $lng['admin']['contactdata'] = 'Data de Contato';
$lng['admin']['servicedata'] = 'Data de Servi&ccedil;o'; $lng['admin']['servicedata'] = 'Data de Servi&ccedil;o';
$lng['customer']['taxid'] = 'ID de Taxa';
$lng['customer']['calc_tax'] = 'Calcular Taxa';
$lng['customer']['create_contract'] = 'Criar contrato';
$lng['customer']['contract_date'] = 'Data de contrato';
$lng['customer']['contract_number'] = 'Descri&ccedil;&atilde;o/N&uacute;mero de contrato';
$lng['customer']['additional_service_description'] = 'Descri&ccedil;&atilde;o adicional de servi&ccedil;o';
$lng['customer']['contract_details'] = 'Detalhes do contrato';
$lng['customer']['included_domains'] = 'Dom&iacute;nios Inclu&iacute;dos';
$lng['customer']['additional_traffic'] = 'Tr&aacute;fego Adicional';
$lng['customer']['additional_diskspace'] = 'Espaco Web Adicional';
$lng['customer']['term_of_payment'] = 'Termo de Pagamento (dias)';
$lng['customer']['payment_every'] = 'Pagamento todo';
$lng['customer']['payment_method'] = 'M&eacute;todo de Pagamento';
$lng['admin']['customer_categories_once'] = 'Incluir configura&ccedil;&otilde;es de taxas de clientes';
$lng['admin']['customer_categories_period'] = 'Incluir intervalo de tavas de clientes';
$lng['customer']['bankaccount_holder'] = 'Propriet&aacute;rio da conta';
$lng['customer']['bankaccount_number'] = 'N&uacute;mero da conta';
$lng['customer']['bankaccount_blz'] = 'N&uacute;mero da ag&ecirc;ncia';
$lng['customer']['bankaccount_bank'] = 'Nome do banco';
$lng['service']['quantity'] = 'Quantidade';
$lng['service']['interval_fee'] = 'Pausa de TAXA';
$lng['service']['interval_length'] = 'Pausa de Tempo';
$lng['service']['interval_payment'] = 'Pausa de Pagamento';
$lng['service']['interval_payment_prepaid'] = 'Pr&eacute; Pago';
$lng['service']['interval_payment_postpaid'] = 'P&oacute;s Pago';
$lng['service']['setup_fee'] = 'Configurar Taxa';
$lng['service']['active'] = 'Ativa Servi&ccedil;o';
$lng['service']['start_date'] = 'Activado desde';
$lng['service']['end_date'] = 'Inativo desde';
$lng['service']['valid_from'] = 'V&aacute;lido de';
$lng['service']['valid_to'] = 'V&aacute;lido para';
$lng['serversettings']['allow_password_reset']['description'] = 'Os clientes podem redefinir sua senha e ser&atilde;o enviadas para seu endere&ccedil;o de e-mail'; $lng['serversettings']['allow_password_reset']['description'] = 'Os clientes podem redefinir sua senha e ser&atilde;o enviadas para seu endere&ccedil;o de e-mail';
$lng['serversettings']['allow_password_reset_admin']['title'] = 'Ativa reset de senhas pelos administradores'; $lng['serversettings']['allow_password_reset_admin']['title'] = 'Ativa reset de senhas pelos administradores';
$lng['serversettings']['allow_password_reset_admin']['description'] = 'Admins / Revendedor pode redefinir sua senha e a nova senha ser&aacute; enviada para seu endere&ccedil;o de e-mail'; $lng['serversettings']['allow_password_reset_admin']['description'] = 'Admins / Revendedor pode redefinir sua senha e a nova senha ser&aacute; enviada para seu endere&ccedil;o de e-mail';
$lng['emails']['quota_type']['byte'] = 'B';
$lng['emails']['quota_type']['kilobyte'] = 'KB';
$lng['emails']['quota_type']['megabyte'] = 'MB';
$lng['emails']['quota_type']['gigabyte'] = 'GB';
$lng['emails']['quota_type']['terabyte'] = 'TB';
$lng['emails']['quota_type']['petabyte'] = 'PB';
$lng['panel']['not_supported'] = 'N&atilde;o suportado em:'; $lng['panel']['not_supported'] = 'N&atilde;o suportado em:';
$lng['menue']['email']['autoresponder'] = 'Auto-Responder'; $lng['menue']['email']['autoresponder'] = 'Auto-Responder';
$lng['autoresponder']['active'] = 'Ativar'; $lng['autoresponder']['active'] = 'Ativar';
@@ -860,7 +812,7 @@ $lng['error']['accountnotexisting'] = 'Esta conta n&atilde;o existe.';
$lng['error']['autoresponderalreadyexists'] = 'J&aacute; existe um auto-responder configurado para esta conta.'; $lng['error']['autoresponderalreadyexists'] = 'J&aacute; existe um auto-responder configurado para esta conta.';
$lng['error']['invalidautoresponder'] = 'Esta determinada est&aacute; inv&aacute;lida.'; $lng['error']['invalidautoresponder'] = 'Esta determinada est&aacute; inv&aacute;lida.';
$lng['serversettings']['autoresponder_active']['title'] = 'Usar m&oacute;dulo de auto-responder'; $lng['serversettings']['autoresponder_active']['title'] = 'Usar m&oacute;dulo de auto-responder';
$lng['serversettings']['autoresponder_active']['description'] = 'Voc&ecirc; deseja utilizar o m&oacute;dulo do auto-responder? Uma tarefa extra no cron deve ser configurada.'; $lng['serversettings']['autoresponder_active']['description'] = 'Voc&ecirc; deseja utilizar o m&oacute;dulo do auto-responder?';
$lng['admin']['security_settings'] = 'Op&ccedil;&otilde;es de Seguran&ccedil;a'; $lng['admin']['security_settings'] = 'Op&ccedil;&otilde;es de Seguran&ccedil;a';
$lng['admin']['know_what_youre_doing'] = 'Somente altere, se voc&ecirc; sabe o que est&aacute; fazendo'; $lng['admin']['know_what_youre_doing'] = 'Somente altere, se voc&ecirc; sabe o que est&aacute; fazendo';
$lng['admin']['show_version_login']['title'] = 'Mostrar vers&atilde;o do Froxlor no login'; $lng['admin']['show_version_login']['title'] = 'Mostrar vers&atilde;o do Froxlor no login';
@@ -1084,7 +1036,7 @@ $lng['aps']['noinstancesexisting'] = 'N&atilde;o existem est&acirc;ncias para ad
$lng['error']['customerdoesntexist'] = 'O cliente que voc&ecirc; escolheu n&atilde;o existe'; $lng['error']['customerdoesntexist'] = 'O cliente que voc&ecirc; escolheu n&atilde;o existe';
$lng['error']['admindoesntexist'] = 'O administrador que voc&ecirc; escolheu n&atilde;o existe'; $lng['error']['admindoesntexist'] = 'O administrador que voc&ecirc; escolheu n&atilde;o existe';
$lng['serversettings']['system_realtime_port']['title'] = 'Porta para Froxlor em tempo real'; $lng['serversettings']['system_realtime_port']['title'] = 'Porta para Froxlor em tempo real';
$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature ist deactivated.<br />See also: <a href="https://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>'; $lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature is disabled.<br />See also: <a href="http://wiki.froxlor.org/contrib/realtime">Make Froxlor work in realtime (Froxlor Wiki)</a>';
$lng['serversettings']['session_allow_multiple_login']['title'] = 'AAtiva login m&uacute;ltiplo'; $lng['serversettings']['session_allow_multiple_login']['title'] = 'AAtiva login m&uacute;ltiplo';
$lng['serversettings']['session_allow_multiple_login']['description'] = 'Se ativado um usu&aacute;rio pode ter m&uacute;ltiplos logins'; $lng['serversettings']['session_allow_multiple_login']['description'] = 'Se ativado um usu&aacute;rio pode ter m&uacute;ltiplos logins';
$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Ativa mover dom&iacute;nios entre admins'; $lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Ativa mover dom&iacute;nios entre admins';

View File

@@ -1160,8 +1160,6 @@ $lng['mysql']['description'] = '&#1047;&#1076;&#1077;&#1089;&#1100; &#1074;&#109
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = '&#1055;&#1086;&#1089;&#1083;&#1077;&#1076;&#1085;&#1080;&#1081; &#1082;&#1088;&#1086;&#1085; (cron)';
// Last Cron // Last Cron
$lng['serversettings']['paging']['title'] = '&#1050;&#1086;&#1083;-&#1074;&#1086; &#1079;&#1072;&#1087;&#1080;&#1089;&#1077;&#1081; &#1085;&#1072; &#1089;&#1090;&#1088;&#1072;&#1085;&#1080;&#1094;&#1091;'; $lng['serversettings']['paging']['title'] = '&#1050;&#1086;&#1083;-&#1074;&#1086; &#1079;&#1072;&#1087;&#1080;&#1089;&#1077;&#1081; &#1085;&#1072; &#1089;&#1090;&#1088;&#1072;&#1085;&#1080;&#1094;&#1091;';

View File

@@ -381,7 +381,6 @@ $lng['mysql']['description'] = 'Tu m
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = 'Posledn<64> Cron';
$lng['serversettings']['paging']['title'] = 'Z<>znamov na str<74>nku'; $lng['serversettings']['paging']['title'] = 'Z<>znamov na str<74>nku';
$lng['serversettings']['paging']['description'] = 'Ko<4B>ko z<>znamov bude zobrazen<65>ch na jednej str<74>nke? (0 = zak<61>zan<61> str<74>nkovanie)'; $lng['serversettings']['paging']['description'] = 'Ko<4B>ko z<>znamov bude zobrazen<65>ch na jednej str<74>nke? (0 = zak<61>zan<61> str<74>nkovanie)';
$lng['error']['ipstillhasdomains'] = 'IP/Port kombin<69>cia ktor<6F> chcete zmaza<7A> m<> st<73>le priraden<65> domen<65>ny. Pred zmazan<61>m tejto IP/Port kombin<69>cie pros<6F>m znovu prira<72>te tieto k ostatn<74>m IP/Port kombin<69>ciam.'; $lng['error']['ipstillhasdomains'] = 'IP/Port kombin<69>cia ktor<6F> chcete zmaza<7A> m<> st<73>le priraden<65> domen<65>ny. Pred zmazan<61>m tejto IP/Port kombin<69>cie pros<6F>m znovu prira<72>te tieto k ostatn<74>m IP/Port kombin<69>ciam.';

View File

@@ -376,7 +376,6 @@ $lng['serversettings']['pathedit']['description'] = 'Prefiere seleccionar un tra
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = '&Uacute;ltimo Cron';
$lng['serversettings']['paging']['title'] = 'Entradas por p&aacute;gina'; $lng['serversettings']['paging']['title'] = 'Entradas por p&aacute;gina';
$lng['serversettings']['paging']['description'] = '&iquest;Cuantas entradas deben ser mostradas en una p&aacute;gina? (0=desactivar paginaci&oacute;n)'; $lng['serversettings']['paging']['description'] = '&iquest;Cuantas entradas deben ser mostradas en una p&aacute;gina? (0=desactivar paginaci&oacute;n)';
$lng['error']['ipstillhasdomains'] = 'La combinaci&oacute;n IP/Puerto que Usted quiere eliminar todav&iacute;a tiene dominios asignados, por favor vuelva a reasignar estas combinaciones IP/Puerto antes de eliminar esta combinaci&oacute;n IP/Puerto.'; $lng['error']['ipstillhasdomains'] = 'La combinaci&oacute;n IP/Puerto que Usted quiere eliminar todav&iacute;a tiene dominios asignados, por favor vuelva a reasignar estas combinaciones IP/Puerto antes de eliminar esta combinaci&oacute;n IP/Puerto.';

View File

@@ -387,7 +387,6 @@ $lng['mysql']['description'] = 'H
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = 'Konfigurerinsfilerna skapades sist';
$lng['serversettings']['paging']['title'] = 'Antal rader per sida'; $lng['serversettings']['paging']['title'] = 'Antal rader per sida';
$lng['serversettings']['paging']['description'] = 'Hur m<>nga rader skall det vara p<> en sida? (0 = St<53>ng av sidbrytning)'; $lng['serversettings']['paging']['description'] = 'Hur m<>nga rader skall det vara p<> en sida? (0 = St<53>ng av sidbrytning)';
$lng['error']['ipstillhasdomains'] = 'IP/Port kombinationen som du vill radera har fortfarande dom<6F>ner anslutna till sig, Flytta dessa till n<>gon annan IP/Port kombination innan du raderar denna IP/Port kombination.'; $lng['error']['ipstillhasdomains'] = 'IP/Port kombinationen som du vill radera har fortfarande dom<6F>ner anslutna till sig, Flytta dessa till n<>gon annan IP/Port kombination innan du raderar denna IP/Port kombination.';
@@ -529,7 +528,6 @@ $lng['admin']['configfiles']['etc'] = 'Others (System)';
$lng['admin']['configfiles']['choosedistribution'] = '-- Choose a distribution --'; $lng['admin']['configfiles']['choosedistribution'] = '-- Choose a distribution --';
$lng['admin']['configfiles']['chooseservice'] = '-- Choose a service --'; $lng['admin']['configfiles']['chooseservice'] = '-- Choose a service --';
$lng['admin']['configfiles']['choosedaemon'] = '-- Choose a daemon --'; $lng['admin']['configfiles']['choosedaemon'] = '-- Choose a daemon --';
$lng['admin']['trafficlastrun'] = 'Senaste trafikber<65>kningen gjordes';
// ADDED IN 1.2.16-svn10 // ADDED IN 1.2.16-svn10

View File

@@ -379,7 +379,6 @@ $lng['serversettings']['pathedit']['description'] = '&#36335;&#24452;&#26159;&#3
* ADDED BETWEEN 1.2.12 and 1.2.13 * ADDED BETWEEN 1.2.12 and 1.2.13
*/ */
$lng['admin']['cronlastrun'] = '&#23450;&#26102;&#25191;&#34892;&#31243;&#24207;&#30340;&#26368;&#21518;&#19968;&#27425;&#25191;&#34892;';
$lng['serversettings']['paging']['title'] = '&#27599;&#39029;&#36827;&#20837;&#27425;&#25968;'; $lng['serversettings']['paging']['title'] = '&#27599;&#39029;&#36827;&#20837;&#27425;&#25968;';
$lng['serversettings']['paging']['description'] = '&#19968;&#39029;&#19978;&#24212;&#35813;&#26174;&#31034;&#22810;&#23569;&#27425; &#36827;&#20837;?(0 =&#26080;&#25928;&#20998;&#39029;)'; $lng['serversettings']['paging']['description'] = '&#19968;&#39029;&#19978;&#24212;&#35813;&#26174;&#31034;&#22810;&#23569;&#27425; &#36827;&#20837;?(0 =&#26080;&#25928;&#20998;&#39029;)';
$lng['error']['ipstillhasdomains'] = '&#20320;&#24819;&#35201;&#21024;&#38500;&#30340;IP/ &#31471;&#21475;&#36830;&#25509;&#20173;&#28982;&#21344;&#26377;&#20998; &#37197;&#32473;&#20182;&#30340;&#22495;,&#22312;&#21024;&#38500;&#27492;IP/&#31471;&#21475;&#36830;&#25509;&#20043;&#21069;&#65292;&#35831;&#25226;&#36825;&#20123;&#22495;&#20998;&#37197;&#32473;&#20854;&#20182;IP/&#31471;&#21475;&#36830;&#25509;.'; $lng['error']['ipstillhasdomains'] = '&#20320;&#24819;&#35201;&#21024;&#38500;&#30340;IP/ &#31471;&#21475;&#36830;&#25509;&#20173;&#28982;&#21344;&#26377;&#20998; &#37197;&#32473;&#20182;&#30340;&#22495;,&#22312;&#21024;&#38500;&#27492;IP/&#31471;&#21475;&#36830;&#25509;&#20043;&#21069;&#65292;&#35831;&#25226;&#36825;&#20123;&#22495;&#20998;&#37197;&#32473;&#20854;&#20182;IP/&#31471;&#21475;&#36830;&#25509;.';

View File

@@ -32,7 +32,7 @@ fwrite($debugHandler, 'Cronfiles have been included' . "\n");
* so users in the database don't conflict with system users * so users in the database don't conflict with system users
*/ */
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Checking system\'s last guid'); $cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Checking system\'s last guid');
checkLastGuid($settings['system']['lastguid']); checkLastGuid();
/* /*
* shutdown cron * shutdown cron

View File

@@ -80,7 +80,7 @@ if($db->num_rows($result) > 0)
$path = $row['homedir'] . $row['maildir'] . "new/"; $path = $row['homedir'] . $row['maildir'] . "new/";
if(!is_dir($paht) || !is_readable($path)) if(!is_dir($path) || !is_readable($path))
{ {
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error accessing maildir: " . $path); $cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error accessing maildir: " . $path);
continue; continue;
@@ -209,28 +209,25 @@ if($db->num_rows($result) > 0)
continue; continue;
} }
//send mail with mailer class $_mailerror = false;
$mail->From = $to; try {
$mail->FromName = $to; $mail->SetFrom($to, $to);
$mail->AddReplyTo($to, $to);
$mail->Subject = $row['subject']; $mail->Subject = $row['subject'];
$mail->Body = html_entity_decode($message); $mail->AltBody = $message;
$mail->MsgHTML(html_entity_decode($message));
$mail->AddAddress($from, $from); $mail->AddAddress($from, $from);
$mail->AddCustomHeader('Precedence: bulk'); $mail->AddCustomHeader('Precedence: bulk');
$mail->Send();
// set correct return path } catch(phpmailerException $e) {
$mail->Sender = $to; $mailerr_msg = $e->errorMessage();
$_mailerror = true;
if(!$mail->Send()) } catch (Exception $e) {
{ $mailerr_msg = $e->getMessage();
if($mail->ErrorInfo != '') $_mailerror = true;
{
$mailerr_msg = $mail->ErrorInfo;
}
else
{
$mailerr_msg = $from;
} }
if ($_mailerror) {
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error sending autoresponder mail: " . $mailerr_msg); $cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error sending autoresponder mail: " . $mailerr_msg);
} }

View File

@@ -137,7 +137,7 @@ class bind
fclose($bindconf_file_handler); fclose($bindconf_file_handler);
fwrite($this->debugHandler, ' cron_tasks: Task4 - froxlor_bind.conf written' . "\n"); fwrite($this->debugHandler, ' cron_tasks: Task4 - froxlor_bind.conf written' . "\n");
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'froxlor_bind.conf written'); $this->logger->logAction(CRON_ACTION, LOG_INFO, 'froxlor_bind.conf written');
safe_exec($this->settings['system']['bindreload_command']); safe_exec(escapeshellcmd($this->settings['system']['bindreload_command']));
fwrite($this->debugHandler, ' cron_tasks: Task4 - Bind9 reloaded' . "\n"); fwrite($this->debugHandler, ' cron_tasks: Task4 - Bind9 reloaded' . "\n");
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'Bind9 reloaded'); $this->logger->logAction(CRON_ACTION, LOG_INFO, 'Bind9 reloaded');
$domains_dir = makeCorrectDir($this->settings['system']['bindconf_directory'] . '/domains/'); $domains_dir = makeCorrectDir($this->settings['system']['bindconf_directory'] . '/domains/');
@@ -149,10 +149,13 @@ class bind
while(false !== ($domain_filename = readdir($domain_file_dirhandle))) while(false !== ($domain_filename = readdir($domain_file_dirhandle)))
{ {
$full_filename = makeCorrectFile($domains_dir . '/' . $domain_filename);
if($domain_filename != '.' if($domain_filename != '.'
&& $domain_filename != '..' && $domain_filename != '..'
&& !in_array($domain_filename, $known_filenames) && !in_array($domain_filename, $known_filenames)
&& file_exists(makeCorrectFile($domains_dir . '/' . $domain_filename))) && is_file($full_filename)
&& file_exists($full_filename))
{ {
fwrite($this->debugHandler, ' cron_tasks: Task4 - unlinking ' . $domain_filename . "\n"); fwrite($this->debugHandler, ' cron_tasks: Task4 - unlinking ' . $domain_filename . "\n");
$this->logger->logAction(CRON_ACTION, LOG_WARNING, 'Deleting ' . $domain_filename); $this->logger->logAction(CRON_ACTION, LOG_WARNING, 'Deleting ' . $domain_filename);
@@ -207,7 +210,14 @@ class bind
if(count($this->mxservers) == 0) if(count($this->mxservers) == 0)
{ {
$zonefile.= '@ IN MX 10 mail' . "\n" . 'mail IN ' . $ip_a_record . "\n"; $zonefile.= '@ IN MX 10 mail' . "\n";
$zonefile.= 'mail IN ' . $ip_a_record . "\n";
if($domain['iswildcarddomain'] != '1')
{
$zonefile.= 'imap IN ' . $ip_a_record . "\n";
$zonefile.= 'smtp IN ' . $ip_a_record . "\n";
$zonefile.= 'pop3 IN ' . $ip_a_record . "\n";
}
} }
else else
{ {
@@ -226,12 +236,10 @@ class bind
$zonefile.= $this->settings['spf']['spf_entry'] . "\n"; $zonefile.= $this->settings['spf']['spf_entry'] . "\n";
} }
if($this->settings['dkim']['use_dkim'] == '1' /**
&& $domain['dkim'] == '1' * generate dkim-zone-entries
&& $domain['dkim_pubkey'] != '') */
{ $zonefile.= $this->generateDkim($domain);
$zonefile.= 'dkim_' . $domain['dkim_id'] . '._domainkey IN TXT "v=DKIM1; k=rsa; p=' . trim(preg_replace('/-----BEGIN PUBLIC KEY-----(.+)-----END PUBLIC KEY-----/s', '$1', str_replace("\n", '', $domain['dkim_pubkey']))) . '"' . "\n";
}
$nssubdomains = $this->db->query('SELECT `domain` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `isbinddomain`=\'1\' AND `domain` LIKE \'%.' . $domain['domain'] . '\''); $nssubdomains = $this->db->query('SELECT `domain` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `isbinddomain`=\'1\' AND `domain` LIKE \'%.' . $domain['domain'] . '\'');
@@ -273,6 +281,88 @@ class bind
return $zonefile; return $zonefile;
} }
private function generateDkim($domain)
{
$zone_dkim = '';
if($this->settings['dkim']['use_dkim'] == '1'
&& $domain['dkim'] == '1'
&& $domain['dkim_pubkey'] != '')
{
// start
$dkim_txt = 'v=DKIM1;';
// algorithm
$algorithm = explode(',', $this->settings['dkim']['dkim_algorithm']);
$alg = '';
foreach($algorithm as $a)
{
if($a == 'all')
{
break;
}
else
{
$alg.=$a.':';
}
}
if($alg != '')
{
$alg = substr($alg, 0, -1);
$dkim_txt.= 'h='.$alg.';';
}
// notes
if(trim($this->settings['dkim']['dkim_notes'] != ''))
{
$dkim_txt.= 'n='.trim($this->settings['dkim']['dkim_notes']).';';
}
// key
$dkim_txt.= 'k=rsa;p='.trim(preg_replace('/-----BEGIN PUBLIC KEY-----(.+)-----END PUBLIC KEY-----/s', '$1', str_replace("\n", '', $domain['dkim_pubkey']))).';';
// service-type
if($this->settings['dkim']['dkim_servicetype'] == '1')
{
$dkim_txt.= 's=email;';
}
// end-part
$dkim_txt.='t=s';
// split if necessary
$txt_record_split='';
$lbr=50;
for($pos=0; $pos<=strlen($dkim_txt)-1; $pos+=$lbr)
{
$txt_record_split.= (($pos==0) ? '("' : "\t\t\t\t\t \"") . substr($dkim_txt, $pos, $lbr) . (($pos>=strlen($dkim_txt)-$lbr) ? '")' : '"' ) ."\n";
}
// dkim-entry
$zone_dkim .= 'dkim_' . $domain['dkim_id'] . '._domainkey IN TXT ' . $txt_record_split;
// adsp-entry
if($this->settings['dkim']['dkim_add_adsp'] == "1")
{
$zone_dkim .= '_adsp._domainkey IN TXT "dkim=';
switch((int)$this->settings['dkim']['dkim_add_adsppolicy'])
{
case 0:
$zone_dkim .= 'unknown"'. "\n";
break;
case 1:
$zone_dkim .= 'all"'. "\n";
break;
case 2:
$zone_dkim .= 'discardable"'. "\n";
break;
}
}
}
return $zone_dkim;
}
public function writeDKIMconfigs() public function writeDKIMconfigs()
{ {
if($this->settings['dkim']['use_dkim'] == '1') if($this->settings['dkim']['use_dkim'] == '1')
@@ -289,7 +379,7 @@ class bind
while($domain = $this->db->fetch_array($result_domains)) while($domain = $this->db->fetch_array($result_domains))
{ {
$privkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.private'); $privkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id']);
$pubkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.public'); $pubkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.public');
if($domain['dkim_privkey'] == '' if($domain['dkim_privkey'] == ''
@@ -297,8 +387,8 @@ class bind
{ {
$max_dkim_id = $this->db->query_first("SELECT MAX(`dkim_id`) as `max_dkim_id` FROM `" . TABLE_PANEL_DOMAINS . "`"); $max_dkim_id = $this->db->query_first("SELECT MAX(`dkim_id`) as `max_dkim_id` FROM `" . TABLE_PANEL_DOMAINS . "`");
$domain['dkim_id'] = (int)$max_dkim_id['max_dkim_id'] + 1; $domain['dkim_id'] = (int)$max_dkim_id['max_dkim_id'] + 1;
$privkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.private'); $privkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id']);
safe_exec('openssl genrsa -out ' . escapeshellarg($privkey_filename) . ' 1024'); safe_exec('openssl genrsa -out ' . escapeshellarg($privkey_filename) . ' ' . $this->settings['dkim']['dkim_keylength']);
$domain['dkim_privkey'] = file_get_contents($privkey_filename); $domain['dkim_privkey'] = file_get_contents($privkey_filename);
safe_exec("chmod 0640 " . escapeshellarg($privkey_filename)); safe_exec("chmod 0640 " . escapeshellarg($privkey_filename));
$pubkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.public'); $pubkey_filename = makeCorrectFile($this->settings['dkim']['dkim_prefix'] . '/dkim_' . $domain['dkim_id'] . '.public');
@@ -338,6 +428,10 @@ class bind
$dkimkeys_file_handler = fopen($dkimkeys_filename, "w"); $dkimkeys_file_handler = fopen($dkimkeys_filename, "w");
fwrite($dkimkeys_file_handler, $dkimkeys); fwrite($dkimkeys_file_handler, $dkimkeys);
fclose($dkimkeys_file_handler); fclose($dkimkeys_file_handler);
safe_exec(escapeshellcmd($this->settings['dkim']['dkimrestart_command']));
fwrite($this->debugHandler, ' cron_tasks: Task4 - Dkim-milter reloaded' . "\n");
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'Dkim-milter reloaded');
} }
} }
} }

View File

@@ -59,7 +59,7 @@ class apache
{ {
fwrite($this->debugHandler, ' apache::reload: reloading apache' . "\n"); fwrite($this->debugHandler, ' apache::reload: reloading apache' . "\n");
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'reloading apache'); $this->logger->logAction(CRON_ACTION, LOG_INFO, 'reloading apache');
safe_exec($this->settings['system']['apachereload_command']); safe_exec(escapeshellcmd($this->settings['system']['apachereload_command']));
} }
/** /**
@@ -121,11 +121,32 @@ class apache
{ {
$this->virtualhosts_data[$vhosts_filename].= '<VirtualHost ' . $ipport . '>' . "\n"; $this->virtualhosts_data[$vhosts_filename].= '<VirtualHost ' . $ipport . '>' . "\n";
/**
* add 'real'-vhost content here, like doc-root :)
*/
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
$this->virtualhosts_data[$vhosts_filename].= 'DocumentRoot "'.$mypath.'"'."\n";
if($row_ipsandports['vhostcontainer_servername_statement'] == '1') if($row_ipsandports['vhostcontainer_servername_statement'] == '1')
{ {
$this->virtualhosts_data[$vhosts_filename].= ' ServerName ' . $this->settings['system']['hostname'] . "\n"; $this->virtualhosts_data[$vhosts_filename].= ' ServerName ' . $this->settings['system']['hostname'] . "\n";
} }
/**
* dirprotection, see #72
* @TODO deferred until 0.9.5, needs more testing
$this->virtualhosts_data[$vhosts_filename].= "\t<Directory \"'.$mypath.'(images|packages|templates)\">\n";
$this->virtualhosts_data[$vhosts_filename].= "\t\tAllow from all\n";
$this->virtualhosts_data[$vhosts_filename].= "\t\tOptions -Indexes\n";
$this->virtualhosts_data[$vhosts_filename].= "\t</Directory>\n";
$this->virtualhosts_data[$vhosts_filename].= "\t<Directory \"'.$mypath.'*\">\n";
$this->virtualhosts_data[$vhosts_filename].= "\t\tOrder Deny,Allow\n";
$this->virtualhosts_data[$vhosts_filename].= "\t\tDeny from All\n";
$this->virtualhosts_data[$vhosts_filename].= "\t</Directory>\n";
* end of dirprotection
*/
if($row_ipsandports['specialsettings'] != '') if($row_ipsandports['specialsettings'] != '')
{ {
$this->virtualhosts_data[$vhosts_filename].= $row_ipsandports['specialsettings'] . "\n"; $this->virtualhosts_data[$vhosts_filename].= $row_ipsandports['specialsettings'] . "\n";
@@ -318,20 +339,24 @@ class apache
{ {
if($domain['parentdomainid'] == '0') if($domain['parentdomainid'] == '0')
{ {
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['domain']) . '"' . "\n";
if($this->settings['system']['awstats_enabled'] == '1') if($this->settings['system']['awstats_enabled'] == '1')
{ {
$stats_text.= createAWStatsVhost($domain['domain'], $this->settings); $stats_text.= ' Alias /awstats "' . makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
}
else
{
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['domain']) . '"' . "\n";
} }
} }
else else
{ {
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['parentdomain']) . '"' . "\n";
if($this->settings['system']['awstats_enabled'] == '1') if($this->settings['system']['awstats_enabled'] == '1')
{ {
$stats_text.= createAWStatsVhost($domain['parentdomain'], $this->settings); $stats_text.= ' Alias /awstats "' . makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['parentdomain']) . '"' . "\n";
}
else
{
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['parentdomain']) . '"' . "\n";
} }
} }
} }
@@ -339,12 +364,14 @@ class apache
{ {
if($domain['customerroot'] != $domain['documentroot']) if($domain['customerroot'] != $domain['documentroot'])
{ {
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
}
if($this->settings['system']['awstats_enabled'] == '1') if($this->settings['system']['awstats_enabled'] == '1')
{ {
$stats_text.= createAWStatsVhost($domain['domain'], $this->settings); $stats_text.= ' Alias /awstats "' . makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
}
else
{
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
}
} }
} }
@@ -387,10 +414,14 @@ class apache
{ {
// The normal access/error - logging is enabled // The normal access/error - logging is enabled
$error_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-error.log'); $error_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-error.log');
// Create the logfile if it does not exist (fixes #46)
touch($error_log);
chown($error_log, $this->settings['system']['httpuser']); chown($error_log, $this->settings['system']['httpuser']);
chgrp($error_log, $this->settings['system']['httpgroup']); chgrp($error_log, $this->settings['system']['httpgroup']);
$access_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log'); $access_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log');
// Create the logfile if it does not exist (fixes #46)
touch($access_log);
chown($access_log, $this->settings['system']['httpuser']); chown($access_log, $this->settings['system']['httpuser']);
chgrp($access_log, $this->settings['system']['httpgroup']); chgrp($access_log, $this->settings['system']['httpgroup']);
@@ -401,10 +432,14 @@ class apache
if($this->settings['system']['awstats_enabled'] == '1') if($this->settings['system']['awstats_enabled'] == '1')
{ {
// prepare the aliases for stats config files if((int)$domain['parentdomainid'] == 0)
{
// prepare the aliases and subdomains for stats config files
$server_alias = ''; $server_alias = '';
$alias_domains = $this->db->query('SELECT `domain`, `iswildcarddomain`, `wwwserveralias` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . $domain['id'] . '\''); $alias_domains = $this->db->query('SELECT `domain`, `iswildcarddomain`, `wwwserveralias` FROM `' . TABLE_PANEL_DOMAINS . '`
WHERE `aliasdomain`=\'' . $domain['id'] . '\'
OR `parentdomainid` =\''. $domain['id']. '\'');
while(($alias_domain = $this->db->fetch_array($alias_domains)) !== false) while(($alias_domain = $this->db->fetch_array($alias_domains)) !== false)
{ {
@@ -443,9 +478,10 @@ class apache
} }
} }
// After inserting the AWStats information, be sure to build the awstats conf file as well // After inserting the AWStats information,
// be sure to build the awstats conf file as well
createAWStatsConf($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias); createAWStatsConf($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot']);
}
} }
return $logfiles_text; return $logfiles_text;
@@ -457,13 +493,22 @@ class apache
protected function getVhostFilename($domain, $ssl_vhost = false) protected function getVhostFilename($domain, $ssl_vhost = false)
{ {
if($ssl_vhost === true) if((int)$domain['parentdomainid'] == 0)
{ {
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/20_froxlor_ssl_vhost_' . $domain['domain'] . '.conf'); $vhost_no = '21';
} }
else else
{ {
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/20_froxlor_normal_vhost_' . $domain['domain'] . '.conf'); $vhost_no = '20';
}
if($ssl_vhost === true)
{
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/'.$vhost_no.'_froxlor_ssl_vhost_' . $domain['domain'] . '.conf');
}
else
{
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/'.$vhost_no.'_froxlor_normal_vhost_' . $domain['domain'] . '.conf');
} }
return $vhost_filename; return $vhost_filename;
@@ -559,7 +604,7 @@ class apache
} }
} }
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid']); mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true);
$vhost_content.= $this->getWebroot($domain); $vhost_content.= $this->getWebroot($domain);
$vhost_content.= $this->composePhpOptions($domain); $vhost_content.= $this->composePhpOptions($domain);
$vhost_content.= $this->getStats($domain); $vhost_content.= $this->getStats($domain);
@@ -591,7 +636,7 @@ class apache
public function createVirtualHosts() public function createVirtualHosts()
{ {
$result_domains = $this->db->query("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`ssl`, `d`.`parentdomainid`, `d`.`ipandport`, `d`.`ssl_ipandport`, `d`.`ssl_redirect`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`openbasedir_path`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `d`.`phpsettingid`, `c`.`adminid`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) " . "WHERE `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC"); $result_domains = $this->db->query("SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `d`.`phpsettingid`, `c`.`adminid`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) " . "WHERE `d`.`aliasdomain` IS NULL ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC");
while($domain = $this->db->fetch_array($result_domains)) while($domain = $this->db->fetch_array($result_domains))
{ {
@@ -914,7 +959,7 @@ class apache
if($vhost_filename != '.' if($vhost_filename != '.'
&& $vhost_filename != '..' && $vhost_filename != '..'
&& !in_array($vhost_filename, $this->known_vhostfilenames) && !in_array($vhost_filename, $this->known_vhostfilenames)
&& preg_match('/^(05|10|20|30)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename) && preg_match('/^(05|10|20|21|30|50|51)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename))) && file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
{ {
fwrite($this->debugHandler, ' apache::wipeOutOldVhostConfigs: unlinking ' . $vhost_filename . "\n"); fwrite($this->debugHandler, ' apache::wipeOutOldVhostConfigs: unlinking ' . $vhost_filename . "\n");

View File

@@ -62,13 +62,13 @@ class lighttpd
public function reload() public function reload()
{ {
fwrite($this->debugHandler, ' lighttpd::reload: reloading lighttpd' . "\n"); fwrite($this->debugHandler, ' lighttpd::reload: reloading lighttpd' . "\n");
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'reloading apache'); $this->logger->logAction(CRON_ACTION, LOG_INFO, 'reloading lighttpd');
safe_exec($this->settings['system']['apachereload_command']); safe_exec(escapeshellcmd($this->settings['system']['apachereload_command']));
} }
public function createIpPort() public function createIpPort()
{ {
$query = "SELECT `id`, `ip`, `port`, `listen_statement`, `namevirtualhost_statement`, `vhostcontainer`, " . " `vhostcontainer_servername_statement`, `specialsettings`, `ssl`, `ssl_cert_file` " . " FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC"; $query = "SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC";
$result_ipsandports = $this->db->query($query); $result_ipsandports = $this->db->query($query);
while($row_ipsandports = $this->db->fetch_array($result_ipsandports)) while($row_ipsandports = $this->db->fetch_array($result_ipsandports))
@@ -88,9 +88,9 @@ class lighttpd
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ip . ":" . $port); $this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ip . ":" . $port);
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_froxlor_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf'); $vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_froxlor_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
if(!isset($this->lighttpd_data[$vhosts_filename])) if(!isset($this->lighttpd_data[$vhost_filename]))
{ {
$this->lighttpd_data[$vhosts_filename] = ''; $this->lighttpd_data[$vhost_filename] = '';
} }
$this->lighttpd_data[$vhost_filename].= '$SERVER["socket"] == "' . $ip . ':' . $port . '" {' . "\n"; $this->lighttpd_data[$vhost_filename].= '$SERVER["socket"] == "' . $ip . ':' . $port . '" {' . "\n";
@@ -101,14 +101,54 @@ class lighttpd
$this->lighttpd_data[$vhost_filename].= 'server.bind = "' . $ip . '"' . "\n"; $this->lighttpd_data[$vhost_filename].= 'server.bind = "' . $ip . '"' . "\n";
} }
if($row_ipsandports['vhostcontainer'] == '1')
{
$myhost = str_replace('.', '\.', $this->settings['system']['hostname']);
$this->lighttpd_data[$vhost_filename].= '# Froxlor default vhost' . "\n";
$this->lighttpd_data[$vhost_filename].= '$HTTP["host"] =~ "^(?:www\.|)' . $myhost . '$" {' . "\n";
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
$this->lighttpd_data[$vhost_filename].= ' server.document-root = "'.$mypath.'"'."\n";
/**
* dirprotection, see #72
* @TODO use better regex for this, deferred until 0.9.5
*
$this->lighttpd_data[$vhost_filename].= ' $HTTP["url"] =~ "^/(.+)\/(.+)\.php" {' . "\n";
$this->lighttpd_data[$vhost_filename].= ' url.access-deny = ("")' . "\n";
$this->lighttpd_data[$vhost_filename].= ' }' . "\n";
*/
if($row_ipsandports['specialsettings'] != '')
{
$this->lighttpd_data[$vhost_filename].= $row_ipsandports['specialsettings'] . "\n";
}
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
}
if($row_ipsandports['ssl'] == '1') if($row_ipsandports['ssl'] == '1')
{ {
$this->lighttpd_data[$vhost_filename].= 'ssl.engine = "enable"' . "\n"; $this->lighttpd_data[$vhost_filename].= 'ssl.engine = "enable"' . "\n";
$this->lighttpd_data[$vhost_filename].= 'ssl.pemfile = "' . $row_ipsandports['ssl_cert_file'] . '"' . "\n"; $this->lighttpd_data[$vhost_filename].= 'ssl.pemfile = "' . $row_ipsandports['ssl_cert_file'] . '"' . "\n";
} }
$this->createLighttpdHosts($row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'], $vhost_filename); /**
$this->lighttpd_data[$vhost_filename].= $this->needed_htpasswds[$row_ipsandports['id']] . "\n"; * this function will create a new file which will be included
* if $this->settings['system']['apacheconf_vhost'] is a folder
* refs #70
*/
$vhosts = $this->createLighttpdHosts($row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'], $vhost_filename);
if($vhosts !== null && is_array($vhosts) && isset($vhosts[0]))
{
// sort vhosts by number (subdomains first!)
sort($vhosts);
foreach($vhosts as $vhost) {
$this->lighttpd_data[$vhost_filename].= ' include "'.$vhost.'"'."\n";
}
}
$this->lighttpd_data[$vhost_filename].= '}' . "\n"; $this->lighttpd_data[$vhost_filename].= '}' . "\n";
} }
} }
@@ -119,6 +159,7 @@ class lighttpd
$htpasswd_query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `path` LIKE '" . $domain['documentroot'] . "%'"; $htpasswd_query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `path` LIKE '" . $domain['documentroot'] . "%'";
$result_htpasswds = $this->db->query($htpasswd_query); $result_htpasswds = $this->db->query($htpasswd_query);
$htaccess_text = '';
while($row_htpasswds = $this->db->fetch_array($result_htpasswds)) while($row_htpasswds = $this->db->fetch_array($result_htpasswds))
{ {
$row_htpasswds['path'] = makeCorrectDir($row_htpasswds['path']); $row_htpasswds['path'] = makeCorrectDir($row_htpasswds['path']);
@@ -145,6 +186,10 @@ class lighttpd
$htaccess_text.= ' ,' . "\n"; $htaccess_text.= ' ,' . "\n";
} }
if(!isset($this->needed_htpasswds[$filename])) {
$this->needed_htpasswds[$filename] = '';
}
if(!strstr($this->needed_htpasswds[$filename], $row_htpasswds['username'] . ':' . $row_htpasswds['password'])) if(!strstr($this->needed_htpasswds[$filename], $row_htpasswds['username'] . ':' . $row_htpasswds['password']))
{ {
$this->needed_htpasswds[$filename].= $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n"; $this->needed_htpasswds[$filename].= $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n";
@@ -156,7 +201,7 @@ class lighttpd
$htaccess_text.= ' (' . "\n"; $htaccess_text.= ' (' . "\n";
$htaccess_text.= ' "method" => "basic",' . "\n"; $htaccess_text.= ' "method" => "basic",' . "\n";
$htaccess_text.= ' "realm" => "Restricted Area",' . "\n"; $htaccess_text.= ' "realm" => "Restricted Area",' . "\n";
$htaccess_text.= ' "require" => "user=' . $row_htpasswds[username] . '"' . "\n"; $htaccess_text.= ' "require" => "user=' . $row_htpasswds['username'] . '"' . "\n";
$htaccess_text.= ' )' . "\n"; $htaccess_text.= ' )' . "\n";
} }
} }
@@ -188,37 +233,72 @@ class lighttpd
if($ssl == '0') if($ssl == '0')
{ {
$query2 = "SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`ssl`, `d`.`parentdomainid`, `d`.`ipandport`, `d`.`ssl_ipandport`, `d`.`ssl_redirect`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`openbasedir_path`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC"; $query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC";
} }
else else
{ {
$query2 = "SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`ssl`, `d`.`parentdomainid`, `d`.`ipandport`, `d`.`ssl_ipandport`, `d`.`ssl_redirect`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`openbasedir_path`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC"; $query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC";
} }
$included_vhosts = array();
$result_domains = $this->db->query($query2); $result_domains = $this->db->query($query2);
while($domain = $this->db->fetch_array($result_domains)) while($domain = $this->db->fetch_array($result_domains))
{ {
if (is_dir($this->settings['system']['apacheconf_vhost']))
{
safe_exec('mkdir -p '.escapeshellarg(makeCorrectDir($this->settings['system']['apacheconf_vhost'].'/vhosts/')));
// determine correct include-path:
// e.g. '/etc/lighttpd/conf-enabled/vhosts/ has to become'
// 'conf-enabled/vhosts/' (damn debian, but luckily works too on other distros)
$_tmp_path = substr(makeCorrectDir($this->settings['system']['apacheconf_vhost']), 0, -1);
$_pos = strrpos($_tmp_path, '/');
$_inc_path = substr($_tmp_path, $_pos+1);
if((int)$domain['parentdomainid'] == 0)
{
$vhost_no = '51';
}
else
{
$vhost_no = '50';
}
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'].'/vhosts/'.$vhost_no.'_'.$domain['domain'].'.conf');
$included_vhosts[] = $_inc_path.'/vhosts/'.$vhost_no.'_'.$domain['domain'].'.conf';
}
if(!isset($this->lighttpd_data[$vhost_filename]))
{
$this->lighttpd_data[$vhost_filename] = '';
}
$query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `id`='" . $domain['ipandport'] . "'"; $query = "SELECT * FROM " . TABLE_PANEL_IPSANDPORTS . " WHERE `id`='" . $domain['ipandport'] . "'";
$ipandport = $this->db->query_first($query); $ipandport = $this->db->query_first($query);
$domain['ip'] = $ipandport['ip']; $domain['ip'] = $ipandport['ip'];
$domain['port'] = $ipandport['port']; $domain['port'] = $ipandport['port'];
$domain['ssl_cert_file'] = $ipandport['ssl_cert_file']; $domain['ssl_cert_file'] = $ipandport['ssl_cert_file'];
if(!empty($this->lighttpd_data[$vhost_filename])) if((!empty($this->lighttpd_data[$vhost_filename])
{ && !is_dir($this->settings['system']['apacheconf_vhost']))
|| is_dir($this->settings['system']['apacheconf_vhost'])
) {
if($ssl == '1') if($ssl == '1')
{ {
$ssl_vhost = true; $ssl_vhost = true;
$ips_and_ports_index = 'ssl_ipandport';
} }
else else
{ {
$ssl_vhost = false; $ssl_vhost = false;
$ips_and_ports_index = 'ipandport';
} }
$this->lighttpd_data[$vhost_filename].= $this->getVhostContent($domain, $ssl_vhost); $this->lighttpd_data[$vhost_filename].= $this->getVhostContent($domain, $ssl_vhost);
$this->lighttpd_data[$vhost_filename].= isset($this->needed_htpasswds[$domain[$ips_and_ports_index]]) ? $this->needed_htpasswds[$domain[$ips_and_ports_index]] . "\n" : '';
} }
} }
return $included_vhosts;
} }
protected function getVhostContent($domain, $ssl_vhost = false) protected function getVhostContent($domain, $ssl_vhost = false)
@@ -253,18 +333,32 @@ class lighttpd
$ipport = $domain['ip'] . ':' . $domain['port']; $ipport = $domain['ip'] . ':' . $domain['port'];
} }
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid']); $vhost_content = '';
$vhost_content.= $this->getServerNames($domain) . " {\n"; $vhost_content.= $this->getServerNames($domain) . " {\n";
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
if ($domain['specialsettings'] != "") { if(preg_match('/^https?\:\/\//', $domain['documentroot']))
$vhost_content.= $domain['specialsettings'] . "\n"; {
$vhost_content.= ' url.redirect = (' . "\n";
$vhost_content.= ' "^/(.*)$" => "'. $this->idnaConvert->encode($domain['documentroot']) . '$1"'. "\n";
$vhost_content.= ' )' . "\n";
} }
else
{
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true);
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
$vhost_content.= $this->create_htaccess($domain); $vhost_content.= $this->create_htaccess($domain);
$vhost_content.= $this->create_pathOptions($domain); $vhost_content.= $this->create_pathOptions($domain);
$vhost_content.= $this->composePhpOptions($domain); $vhost_content.= $this->composePhpOptions($domain);
$vhost_content.= $this->getStats($domain);
$vhost_content.= $this->getLogFiles($domain); $vhost_content.= $this->getLogFiles($domain);
}
if ($domain['specialsettings'] != "") {
$vhost_content.= $domain['specialsettings'] . "\n";
}
$vhost_content.= '}' . "\n"; $vhost_content.= '}' . "\n";
return $vhost_content; return $vhost_content;
} }
@@ -272,6 +366,23 @@ class lighttpd
{ {
$logfiles_text = ''; $logfiles_text = '';
if($domain['speciallogfile'] == '1'
&& $this->settings['system']['mod_log_sql'] != '1')
{
if($domain['parentdomainid'] == '0')
{
$speciallogfile = '-' . $domain['domain'];
}
else
{
$speciallogfile = '-' . $domain['parentdomain'];
}
}
else
{
$speciallogfile = '';
}
if($this->settings['system']['mod_log_sql'] == 1) if($this->settings['system']['mod_log_sql'] == 1)
{ {
// We are using mod_log_sql (http://www.outoforder.cc/projects/apache/mod_log_sql/) // We are using mod_log_sql (http://www.outoforder.cc/projects/apache/mod_log_sql/)
@@ -280,32 +391,70 @@ class lighttpd
else else
{ {
// The normal access/error - logging is enabled // The normal access/error - logging is enabled
// error log cannot be set conditionally see
// https://redmine.lighttpd.net/issues/665
$filename = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-error.log'); $access_log = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log');
// Create the logfile if it does not exist (fixes #46)
touch($access_log);
chown($access_log, $this->settings['system']['httpuser']);
chgrp($access_log, $this->settings['system']['httpgroup']);
if(!is_file($filename)) $logfiles_text.= ' accesslog.filename = "' . $access_log . '"' . "\n";
{
$ourFileHandle = fopen($filename, 'w') or die("can't open file");
fclose($ourFileHandle);
} }
chown($filename, $this->settings['system']['httpuser']); if($this->settings['system']['awstats_enabled'] == '1')
chgrp($filename, $this->settings['system']['httpgroup']);
//access log
$filename = makeCorrectFile($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log');
if(!is_file($filename))
{ {
$ourFileHandle = fopen($filename, 'w') or die("can't open file"); if((int)$domain['parentdomainid'] == 0)
fclose($ourFileHandle); {
// prepare the aliases and subdomains for stats config files
$server_alias = '';
$alias_domains = $this->db->query('SELECT `domain`, `iswildcarddomain`, `wwwserveralias` FROM `' . TABLE_PANEL_DOMAINS . '`
WHERE `aliasdomain`=\'' . $domain['id'] . '\'
OR `parentdomainid` =\''. $domain['id']. '\'');
while(($alias_domain = $this->db->fetch_array($alias_domains)) !== false)
{
$server_alias.= ' ' . $alias_domain['domain'] . ' ';
if($alias_domain['iswildcarddomain'] == '1')
{
$server_alias.= '*.' . $domain['domain'];
}
else
{
if($alias_domain['wwwserveralias'] == '1')
{
$server_alias.= 'www.' . $alias_domain['domain'];
}
else
{
$server_alias.= '';
}
}
} }
$logfiles_text.= ' accesslog.filename = "' . $filename . '"' . "\n"; if($domain['iswildcarddomain'] == '1')
{
$alias = '*.' . $domain['domain'];
}
else
{
if($domain['wwwserveralias'] == '1')
{
$alias = 'www.' . $domain['domain'];
}
else
{
$alias = '';
}
}
chown($filename, $this->settings['system']['httpuser']); // After inserting the AWStats information,
chgrp($filename, $this->settings['system']['httpgroup']); // be sure to build the awstats conf file as well
createAWStatsConf($this->settings['system']['logfiles_directory'] . $domain['loginname'] . $speciallogfile . '-access.log', $domain['domain'], $alias . $server_alias, $domain['customerroot']);
}
} }
return $logfiles_text; return $logfiles_text;
@@ -323,27 +472,26 @@ class lighttpd
{ {
if(!empty($row['error404path'])) if(!empty($row['error404path']))
{ {
$error_string.= ' server.error-handler-404 = "' . makeCorrectFile($row['documentroot'] . '/' . $row['error404path']) . '"' . "\n"; $error_string.= ' server.error-handler-404 = "' . makeCorrectFile($domain['documentroot'] . '/' . $row['error404path']) . '"' . "\n\n";
} }
if($row['options_indexes'] != '0') if($row['options_indexes'] != '0')
{ {
$path = makeCorrectDir(substr($row['path'], strlen($domain['documentroot']) - 1));
mkDirWithCorrectOwnership($domain['documentroot'], $row['path'], $domain['guid'], $domain['guid']);
// We need to remove the last slash, otherwise the regex wouldn't work
$path = substr($path, 0, -1);
$path_options.= '$HTTP["url"] =~ "^' . $path . '($|/)" {' . "\n";
$path_options.= "\t" . 'dir-listing.activate = "enable"' . "\n";
if(!empty($error_string)) if(!empty($error_string))
{ {
$path_options.= $error_string; $path_options.= $error_string;
// reset $error_string here to prevent duplicate entries // reset $error_string here to prevent duplicate entries
$error_string = ''; $error_string = '';
} }
$path_options.= '}' . "\n";
$path = makeCorrectDir(substr($row['path'], strlen($domain['documentroot']) - 1));
mkDirWithCorrectOwnership($domain['documentroot'], $row['path'], $domain['guid'], $domain['guid']);
// We need to remove the last slash, otherwise the regex wouldn't work
$path = substr($path, 0, -1);
$path_options.= ' $HTTP["url"] =~ "^' . $path . '($|/)" {' . "\n";
$path_options.= "\t" . 'dir-listing.activate = "enable"' . "\n";
$path_options.= ' }' . "\n\n";
} }
else else
{ {
@@ -356,7 +504,7 @@ class lighttpd
protected function getDirOptions($domain) protected function getDirOptions($domain)
{ {
$query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `customerid`='" . $domain[customerid] . "'"; $query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `customerid`='" . $domain['customerid'] . "'";
$result = $this->db->query($query); $result = $this->db->query($query);
while($row_htpasswds = $this->db->fetch_array($result)) while($row_htpasswds = $this->db->fetch_array($result))
@@ -527,6 +675,60 @@ class lighttpd
return $webroot_text; return $webroot_text;
} }
/*
* Lets set the text part for the stats software
*/
protected function getStats($domain)
{
$stats_text = '';
if($domain['speciallogfile'] == '1'
&& $this->settings['system']['mod_log_sql'] != '1')
{
if($domain['parentdomainid'] == '0')
{
if($this->settings['system']['awstats_enabled'] == '1')
{
// @TODO see if this is correct for awstats
$stats_text.= ' alias.url = ( "/awstats/" => "'.makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']).'" )' . "\n";
}
else
{
$stats_text.= ' alias.url = ( "/webalizer/" => "'.makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['domain']).'" )' . "\n";
}
}
else
{
if($this->settings['system']['awstats_enabled'] == '1')
{
// @TODO see if this is correct for awstats
$stats_text.= ' alias.url = ( "/awstats/" => "'.makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['parentdomain']).'" )' . "\n";
}
else
{
$stats_text.= ' alias.url = ( "/webalizer/" => "'.makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['parentdomain']).'" )' . "\n";
}
}
}
else
{
if($domain['customerroot'] != $domain['documentroot'])
{
if($this->settings['system']['awstats_enabled'] == '1')
{
$stats_text.= ' alias.url = ( "/awstats/" => "'.makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']).'" )' . "\n";
}
else
{
$stats_text.= ' alias.url = ( "/webalizer/" => "'.makeCorrectFile($domain['customerroot'] . '/webalizer').'" )' . "\n";
}
}
}
return $stats_text;
}
public function writeConfigs() public function writeConfigs()
{ {
fwrite($this->debugHandler, ' lighttpd::writeConfigs: rebuilding ' . $this->settings['system']['apacheconf_vhost'] . "\n"); fwrite($this->debugHandler, ' lighttpd::writeConfigs: rebuilding ' . $this->settings['system']['apacheconf_vhost'] . "\n");
@@ -535,6 +737,7 @@ class lighttpd
if(!isConfigDir($this->settings['system']['apacheconf_vhost'])) if(!isConfigDir($this->settings['system']['apacheconf_vhost']))
{ {
// Save one big file // Save one big file
$vhosts_file = '';
foreach($this->lighttpd_data as $vhosts_filename => $vhost_content) foreach($this->lighttpd_data as $vhosts_filename => $vhost_content)
{ {
@@ -615,7 +818,7 @@ class lighttpd
if($vhost_filename != '.' if($vhost_filename != '.'
&& $vhost_filename != '..' && $vhost_filename != '..'
&& !in_array($vhost_filename, $this->known_filenames) && !in_array($vhost_filename, $this->known_filenames)
&& preg_match('/^(05|10|20|30)_(froxlor|syscp)_ipandport_(.+)\.conf$/', $vhost_filename) && preg_match('/^(05|10|20|21|30|50|51)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename))) && file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
{ {
fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: unlinking ' . $vhost_filename . "\n"); fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: unlinking ' . $vhost_filename . "\n");

View File

@@ -66,7 +66,7 @@ class lighttpd_fcgid extends lighttpd
$phpconfig = $this->getPhpConfig((int)$domain['phpsettingid']); $phpconfig = $this->getPhpConfig((int)$domain['phpsettingid']);
$php_options_text = 'fastcgi.server = ( '."\n"; $php_options_text = ' fastcgi.server = ( '."\n";
$file_extensions = explode(' ', $phpconfig['file_extensions']); $file_extensions = explode(' ', $phpconfig['file_extensions']);
foreach($file_extensions as $f_extension) foreach($file_extensions as $f_extension)
{ {
@@ -109,10 +109,10 @@ class lighttpd_fcgid extends lighttpd
$php_options_text.= "\t\t".')'."\n"; $php_options_text.= "\t\t".')'."\n";
$php_options_text.= "\t".')'."\n"; $php_options_text.= "\t".')'."\n";
$php_options_text.= "".')'."\n"; $php_options_text.= "\t".')'."\n";
} // foreach extension } // foreach extension
$php_options_text.= "".')'."\n"; $php_options_text.= ' )'."\n";
// create starter // create starter

View File

@@ -54,17 +54,39 @@ while($row = $db->fetch_array($result_tasks))
if ($settings['system']['awstats_enabled'] == '1') if ($settings['system']['awstats_enabled'] == '1')
{ {
$awstatsclean['header'] = "## GENERATED BY FROXLOR\n"; $awstatsclean['header'] = "## GENERATED BY FROXLOR\n";
$awstatsclean['headerold'] = "## GENERATED BY SYSCP\n";
$awstatsclean['path'] = '/etc/awstats'; $awstatsclean['path'] = '/etc/awstats';
/**
* dont do anyting if the directory not exists
* (e.g. awstats not installed yet or whatever)
* fixes #45
*/
if (is_dir($awstatsclean['path']))
{
$awstatsclean['dir'] = dir($awstatsclean['path']); $awstatsclean['dir'] = dir($awstatsclean['path']);
while($awstatsclean['entry'] = $awstatsclean['dir']->read()) { while($awstatsclean['entry'] = $awstatsclean['dir']->read()) {
$awstatsclean['fullentry'] = $awstatsclean['path'].'/'.$awstatsclean['entry']; $awstatsclean['fullentry'] = $awstatsclean['path'].'/'.$awstatsclean['entry'];
/**
* dont do anything if the file does not exist
*/
if (file_exists($awstatsclean['fullentry']))
{
$awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r'); $awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r');
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1); $awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
fclose($awstatsclean['fh']); fclose($awstatsclean['fh']);
if($awstatsclean['headerRead'] == $awstatsclean['header']) { if($awstatsclean['headerRead'] == $awstatsclean['header'] || $awstatsclean['headerRead'] ==
$awstatsclean['headerold']) {
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Removing awstats configuration ".$awstatsclean['fullentry']." for re-creation");
@unlink($awstatsclean['fullentry']); @unlink($awstatsclean['fullentry']);
} }
} }
else
{
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "File '".$awstatsclean['fullentry']."' could not be found, please check if you followed all the instructions on the configuration page");
}
}
}
unset($awstatsclean); unset($awstatsclean);
} }
//end dhr //end dhr
@@ -121,35 +143,14 @@ while($row = $db->fetch_array($result_tasks))
{ {
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/webalizer')); $cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/webalizer'));
safe_exec('mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/webalizer')); safe_exec('mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/webalizer'));
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/awstats'));
safe_exec('mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/awstats'));
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['vmail_homedir'] . $row['data']['loginname'])); $cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['vmail_homedir'] . $row['data']['loginname']));
safe_exec('mkdir -p ' . escapeshellarg($settings['system']['vmail_homedir'] . $row['data']['loginname'])); safe_exec('mkdir -p ' . escapeshellarg($settings['system']['vmail_homedir'] . $row['data']['loginname']));
//check if admin of customer has added template for new customer directories //check if admin of customer has added template for new customer directories
$destdir = makeCorrectDir($settings['system']['documentroot_prefix'] . '/' . $row['data']['loginname']);
$result = $db->query("SELECT `t`.`value`, `c`.`email` AS `customer_email`, `a`.`email` AS `admin_email`, `c`.`loginname` AS `customer_login`, `a`.`loginname` AS `admin_login` FROM `" . TABLE_PANEL_CUSTOMERS . "` AS `c` INNER JOIN `" . TABLE_PANEL_ADMINS . "` AS `a` ON `c`.`adminid` = `a`.`adminid` INNER JOIN `" . TABLE_PANEL_TEMPLATES . "` AS `t` ON `a`.`adminid` = `t`.`adminid` WHERE `varname` = 'index_html' AND `c`.`loginname` = '" . $db->escape($row['data']['loginname']) . "'"); storeDefaultIndex($row['data']['loginname'], $destdir, $cronlog, true);
if($db->num_rows($result) > 0)
{
$template = $db->fetch_array($result);
$replace_arr = array(
'SERVERNAME' => $settings['system']['hostname'],
'CUSTOMER' => $template['customer_login'],
'ADMIN' => $template['admin_login'],
'CUSTOMER_EMAIL' => $template['customer_email'],
'ADMIN_EMAIL' => $template['admin_email']
);
$htmlcontent = replace_variables($template['value'], $replace_arr);
$indexhtmlpath = $settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/index.' . $settings['system']['index_file_extension'];
$index_html_handler = fopen($indexhtmlpath, 'w');
fwrite($index_html_handler, $htmlcontent);
fclose($index_html_handler);
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Creating \'index.' . $settings['system']['index_file_extension'] . '\' for Customer \'' . $template['customer_login'] . '\' based on template in directory ' . escapeshellarg($indexhtmlpath));
}
else
{
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: cp -a ' . $pathtophpfiles . '/templates/misc/standardcustomer/* ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/'));
safe_exec('cp -a ' . $pathtophpfiles . '/templates/misc/standardcustomer/* ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'] . '/'));
}
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: chown -R ' . (int)$row['data']['uid'] . ':' . (int)$row['data']['gid'] . ' ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'])); $cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: chown -R ' . (int)$row['data']['uid'] . ':' . (int)$row['data']['gid'] . ' ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname']));
safe_exec('chown -R ' . (int)$row['data']['uid'] . ':' . (int)$row['data']['gid'] . ' ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname'])); safe_exec('chown -R ' . (int)$row['data']['uid'] . ':' . (int)$row['data']['gid'] . ' ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname']));
@@ -166,7 +167,7 @@ while($row = $db->fetch_array($result_tasks))
} }
/** /**
* TYPE=4 MEANS THAT SOMETHING IN THE BIND CONFIG HAS CHANGED. REBUILD syscp_bind.conf * TYPE=4 MEANS THAT SOMETHING IN THE BIND CONFIG HAS CHANGED. REBUILD froxlor_bind.conf
*/ */
elseif ($row['type'] == '4') elseif ($row['type'] == '4')
{ {

View File

@@ -17,6 +17,133 @@
* @version $Id$ * @version $Id$
*/ */
function awstatsDoSingleDomain($domain, $outputdir)
{
global $cronlog, $settings;
$returnval = 0;
$domainconfig = makeCorrectFile($settings['system']['awstats_conf'].'/awstats.' . $domain . '.conf');
if(file_exists($domainconfig))
{
$outputdir = makeCorrectDir($outputdir . '/' . $domain);
if(!is_dir($outputdir))
{
safe_exec('mkdir -p ' . escapeshellarg($outputdir));
}
/**
* check for correct path of awstats_buildstaticpages.pl
*/
$awbsp = makeCorrectFile($settings['system']['awstats_path'].'/awstats_buildstaticpages.pl');
if (!file_exists($awbsp)) {
echo "WANRING: Necessary awstats_buildstaticpages.pl script could not be found, no traffic is being calculated and no stats are generated. Please check your AWStats-Path setting";
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Necessary awstats_buildstaticpages.pl script could not be found, no traffic is being calculated and no stats are generated. Please check your AWStats-Path setting");
exit;
}
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Running awstats_buildstaticpages.pl for domain '".$domain."' (Output: '".$outputdir."')");
safe_exec($awbsp.' -update -config=' . $domain . ' -dir='.escapeshellarg($outputdir));
/**
* index file is saved like 'awstats.[domain].html',
* so link a index.html to it
*/
$original_index = makeCorrectFile($outputdir.'/awstats.'.$domain.'.html');
$new_index = makeCorrectFile($outputdir.'/index.html');
if(!file_exists($new_index)) {
safe_exec('ln -s '.escapeshellarg($original_index).' '.escapeshellarg($new_index));
}
/**
* statistics file looks like: 'awstats[month][year].[domain].txt'
*/
$file = makeCorrectFile($outputdir.'/awstats'.date('mY', time()).'.'.$domain.'.txt');
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Gathering traffic information from '".$file."'");
if (file_exists($file)) {
$content = @file_get_contents($file);
if ($content !== false) {
$content_array = explode("\n", $content);
$count_bdw = false;
foreach($content_array as $line)
{
if(trim($line) == '' // skip empty lines
|| substr(trim($line), 0, 1) == '#' // skip comments
) {
continue;
}
$parts = explode(' ', $line);
if(isset($parts[0])
&& strtoupper($parts[0]) == 'BEGIN_DOMAIN'
) {
$count_bdw = true;
}
if ($count_bdw) {
if(isset($parts[0])
&& strtoupper($parts[0]) == 'END_DOMAIN'
) {
$count_bdw = false;
break;
} elseif (isset($parts[3])) {
$returnval += floatval($parts[3]);
}
}
}
}
}
}
return $returnval;
}
function callAwstatsGetTraffic($domain, $outputdir, $caption, $usersdomainlist)
{
global $settings, $db, $cronlog;
$returnval = 0;
foreach($usersdomainlist as $domainid => $singledomain)
{
// as we check for the config-model awstats will only parse
// 'real' domains and no subdomains which are aliases in the
// model-config-file.
$returnval += awstatsDoSingleDomain($singledomain, $outputdir);
}
/**
* as of #124, awstats traffic is saved in bytes instead
* of kilobytes (like webalizer does)
*/
$returnval = floatval($returnval / 1024);
/**
* now, because this traffic is being saved daily, we have to
* subtract the values from all the month's values to return
* a sane value for our panel_traffic and to remain the whole stats
* (awstats overwrites the customers .html stats-files)
*/
$customerid = getCustomerIdByDomain($domain);
if($customerid !== false)
{
$result = $db->query_first("SELECT SUM(`http`) as `trafficmonth` FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid` = '".(int)$customerid."'
AND `year`='".date('Y', time())."'
AND `month`='".date('m', time())."'");
if(is_array($result)
&& isset($result['trafficmonth'])
) {
$returnval = ($returnval - floatval($result['trafficmonth']));
}
}
return floatval($returnval);
}
/** /**
* Function which make webalizer statistics and returns used traffic since last run * Function which make webalizer statistics and returns used traffic since last run
* *
@@ -29,7 +156,7 @@
function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlist) function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlist)
{ {
global $settings; global $settings, $cronlog;
$returnval = 0; $returnval = 0;
if(file_exists($settings['system']['logfiles_directory'] . $logfile . '-access.log')) if(file_exists($settings['system']['logfiles_directory'] . $logfile . '-access.log'))
@@ -37,6 +164,7 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
$domainargs = ''; $domainargs = '';
foreach($usersdomainlist as $domainid => $domain) foreach($usersdomainlist as $domainid => $domain)
{ {
// hide referer
$domainargs.= ' -r ' . escapeshellarg($domain); $domainargs.= ' -r ' . escapeshellarg($domain);
} }
@@ -69,7 +197,16 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
$verbosity = '-Q'; $verbosity = '-Q';
} }
safe_exec('webalizer ' . $verbosity . ' -p -o ' . escapeshellarg($outputdir) . ' -n ' . escapeshellarg($caption) . $domainargs . ' ' . escapeshellarg($settings['system']['logfiles_directory'] . $logfile . '-access.log')); $we = '/usr/bin/webalizer';
// FreeBSD uses other paths, #140
if(!file_exists($we))
{
$we = '/usr/local/bin/webalizer';
}
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Running webalizer for domain '".$caption."'");
safe_exec($we . ' ' . $verbosity . ' -p -o ' . escapeshellarg($outputdir) . ' -n ' . escapeshellarg($caption) . $domainargs . ' ' . escapeshellarg($settings['system']['logfiles_directory'] . $logfile . '-access.log'));
/** /**
* Format of webalizer.hist-files: * Format of webalizer.hist-files:
@@ -80,6 +217,7 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
$httptraffic = array(); $httptraffic = array();
$webalizer_hist = @file_get_contents($outputdir . 'webalizer.hist'); $webalizer_hist = @file_get_contents($outputdir . 'webalizer.hist');
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Gathering traffic information from '".$webalizer_hist."'");
$webalizer_hist_rows = explode("\n", $webalizer_hist); $webalizer_hist_rows = explode("\n", $webalizer_hist);
foreach($webalizer_hist_rows as $webalizer_hist_row) foreach($webalizer_hist_rows as $webalizer_hist_row)
{ {
@@ -108,6 +246,7 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
reset($httptraffic); reset($httptraffic);
$httptrafficlast = array(); $httptrafficlast = array();
$webalizer_lasthist = @file_get_contents($outputdir . 'webalizer.hist.1'); $webalizer_lasthist = @file_get_contents($outputdir . 'webalizer.hist.1');
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Gathering traffic information from '".$webalizer_lasthist."'");
$webalizer_lasthist_rows = explode("\n", $webalizer_lasthist); $webalizer_lasthist_rows = explode("\n", $webalizer_lasthist);
foreach($webalizer_lasthist_rows as $webalizer_lasthist_row) foreach($webalizer_lasthist_rows as $webalizer_lasthist_row)
{ {
@@ -229,4 +368,3 @@ function safeSQLLogfile($domains, $loginname)
$db->query("DELETE FROM access_log " . $where); $db->query("DELETE FROM access_log " . $where);
return true; return true;
} }

View File

@@ -165,9 +165,16 @@ while($row = $db->fetch_array($result))
unset($domainlist[$row['customerid']][$domainid]); unset($domainlist[$row['customerid']][$domainid]);
} }
if($settings['system']['awstats_enabled'] == '1')
{
$httptraffic+= floatval(callAwstatsGetTraffic($domain, $row['documentroot'] . '/awstats/', $domain, $domainlist[$row['customerid']]));
}
else
{
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'] . '-' . $domain, $row['documentroot'] . '/webalizer/' . $domain . '/', $domain, $domainlist[$row['customerid']])); $httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'] . '-' . $domain, $row['documentroot'] . '/webalizer/' . $domain . '/', $domain, $domainlist[$row['customerid']]));
} }
} }
}
reset($domainlist[$row['customerid']]); reset($domainlist[$row['customerid']]);
@@ -176,8 +183,15 @@ while($row = $db->fetch_array($result))
safeSQLLogfile($domainlist[$row['customerid']], $row['loginname']); safeSQLLogfile($domainlist[$row['customerid']], $row['loginname']);
} }
if($settings['system']['awstats_enabled'] == '1')
{
$httptraffic+= floatval(callAwstatsGetTraffic($caption, $row['documentroot'] . '/awstats/', $caption, $domainlist[$row['customerid']]));
}
else
{
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'], $row['documentroot'] . '/webalizer/', $caption, $domainlist[$row['customerid']])); $httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'], $row['documentroot'] . '/webalizer/', $caption, $domainlist[$row['customerid']]));
} }
}
/** /**
* Webalizer might run for some time, so we'd better check if our database is still present * Webalizer might run for some time, so we'd better check if our database is still present

View File

@@ -26,7 +26,7 @@ $yesterday = time() - (60 * 60 * 24);
require (dirname(__FILE__) . '/../lib/class.phpmailer.php'); require (dirname(__FILE__) . '/../lib/class.phpmailer.php');
$mail = new PHPMailer(); $mail = new PHPMailer();
$mail->From = $settings['panel']['adminmail']; $mail->SetFrom($settings['panel']['adminmail'], 'Froxlor Administrator');
// Warn the customers at 90% traffic-usage // Warn the customers at 90% traffic-usage
@@ -82,15 +82,26 @@ while($row = $db->fetch_array($result))
AND `templategroup`='mails' AND `templategroup`='mails'
AND `varname`='trafficninetypercent_mailbody'"); AND `varname`='trafficninetypercent_mailbody'");
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr)); $mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
$mail->From = $row['adminmail'];
$mail->FromName = $row['adminname'];
$mail->Subject = $mail_subject;
$mail->Body = $mail_body;
$mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']);
if(!$mail->Send()) $_mailerror = false;
try {
$mail->SetFrom($row['adminmail'], $row['adminname']);
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML($mail_body);
$mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']);
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if($_mailerror)
{ {
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo); $cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $_mailerror);
standard_error('errorsendingmail', $row["email"]); standard_error('errorsendingmail', $row["email"]);
} }
@@ -150,15 +161,25 @@ while($row = $db->fetch_array($result))
AND `templategroup`='mails' AND `templategroup`='mails'
AND `varname`='trafficninetypercent_mailbody'"); AND `varname`='trafficninetypercent_mailbody'");
$mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr)); $mail_body = html_entity_decode(replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficninetypercent']['mailbody']), $replace_arr));
$mail->From = $row['email'];
$mail->FromName = $row['firstname'] . " " . $row['name'];
$mail->Subject = $mail_subject;
$mail->Body = $mail_body;
$mail->AddAddress($row['email'], $row['name']);
if(!$mail->Send()) $_mailerror = false;
{ try {
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo); $mail->SetFrom($row['email'], $row['firstname'] . " " . $row['name']);
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML($mail_body);
$mail->AddAddress($row['email'], $row['name']);
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $row["email"]); standard_error('errorsendingmail', $row["email"]);
} }
@@ -189,15 +210,25 @@ while($row = $db->fetch_array($result))
$mail_body.= '---------------------------------------------' . "\n"; $mail_body.= '---------------------------------------------' . "\n";
$mail_body.= sprintf('%-15s', $row['loginname']) . ' ' . sprintf('%-12d', $row['traffic_used_total']) . ' (' . sprintf('%00.3f%%', (($row['traffic_used_total'] * 100) / $row['traffic'])) . ') ' . $row['traffic'] . "\n"; $mail_body.= sprintf('%-15s', $row['loginname']) . ' ' . sprintf('%-12d', $row['traffic_used_total']) . ' (' . sprintf('%00.3f%%', (($row['traffic_used_total'] * 100) / $row['traffic'])) . ') ' . $row['traffic'] . "\n";
$mail->From = $row['email'];
$mail->FromName = $row['name'];
$mail->Subject = $mail_subject;
$mail->Body = $mail_body;
$mail->AddAddress($row['email'], $row['name']);
if(!$mail->Send()) $_mailerror = false;
{ try {
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mail->ErrorInfo); $mail->SetFrom($row['email'], $row['name']);
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML($mail_body);
$mail->AddAddress($row['email'], $row['name']);
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$cronlog->logAction(CRON_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $row["email"]); standard_error('errorsendingmail', $row["email"]);
} }

View File

@@ -0,0 +1,48 @@
$header
<form method="post" action="$filename">
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="id" value="$id" />
<input type="hidden" name="send" value="send" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable">
<tr>
<td class="maintitle" colspan="2"><b><img src="images/title.gif" alt="" />&nbsp;{$lng['admin']['cronjob_edit']}</b></td>
</tr>
<tr>
<td class="maintitle_apply_left">
<b><img src="images/title.gif" alt="" />&nbsp;{$lng['cronjob']['cronjobsettings']}</b>
</td>
<td class="maintitle_apply_right" nowrap="nowrap">
<input class="bottom" type="reset" value="{$lng['panel']['reset']}" /><input class="bottom" type="submit" value="{$lng['panel']['save']}" />
</td>
</tr>
<tr>
<td class="main_field_name">Cronjob:</td>
<if $change_cronfile == 1 >
<td class="main_field_display" nowrap="nowrap"><input type="text" name="cronfile" value="{$result['cronfile']}" /></td>
<else>
<td class="main_field_display" nowrap="nowrap">{$result['cronfile']}</td>
</if>
</tr>
<tr>
<td class="main_field_name">{$lng['admin']['activated']}:</td>
<td class="main_field_display" nowrap="nowrap">{$isactive}</td>
</tr>
<tr>
<td class="main_field_name">{$lng['cronjob']['cronjobinterval']}:</td>
<td class="main_field_display" nowrap="nowrap">
<input type="text" name="interval_value" value="{$interval_value}" />&nbsp;
<select class="dropdown_noborder" name="interval_interval">$interval_interval</select>
</td>
</tr>
<tr>
<td class="maintitle_apply_right" nowrap="nowrap" colspan="2">
<input class="bottom" type="reset" value="{$lng['panel']['reset']}" /><input class="bottom" type="submit" value="{$lng['panel']['save']}" />
</td>
</tr>
</table>
</form>
<br />
<br />
$footer

View File

@@ -4,25 +4,30 @@ $header
<input type="hidden" name="page" value="$page"/> <input type="hidden" name="page" value="$page"/>
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable"> <table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
<tr> <tr>
<td class="maintitle_search_left" colspan="4"><b><img src="images/title.gif" alt="" />&nbsp;{$lng['admin']['cron']['cronsettings']}</b></td> <td class="maintitle"><b><img src="images/title.gif" alt="" />&nbsp;{$lng['admin']['warning']}</b></td>
<td class="maintitle_search_right" colspan="2">{$searchcode}</td> </tr>
<tr>
<td class="field_name_border_left">
<span style="font-weight: bold; color: #ff0000;">
{$lng['cron']['changewarning']}
</span>
</td>
</tr>
</table>
<br />
<br />
<table cellpadding="5" cellspacing="0" border="0" align="center" class="maintable">
<tr>
<td class="maintitle" colspan="5"><b><img src="images/title.gif" alt="" />&nbsp;{$lng['admin']['cron']['cronsettings']}</b></td>
</tr> </tr>
<tr> <tr>
<td class="field_display_border_left">{$lng['cron']['description']}</td> <td class="field_display_border_left">{$lng['cron']['description']}</td>
<td class="field_display">{$lng['cron']['lastrun']}&nbsp;&nbsp;{$arrowcode['c.lastrun']}</td> <td class="field_display">{$lng['cron']['lastrun']}</td>
<td class="field_display">{$lng['cron']['interval']}&nbsp;&nbsp;{$arrowcode['c.interval']}</td> <td class="field_display">{$lng['cron']['interval']}</td>
<td class="field_display">{$lng['cron']['isactive']}&nbsp;&nbsp;{$arrowcode['c.isactive']}</td> <td class="field_display">{$lng['cron']['isactive']}</td>
<td class="field_display_search" colspan="2">{$sortcode}</td> <td class="field_display">{$lng['panel']['options']}</td>
</tr> </tr>
$crons $crons
<if $pagingcode != ''>
<tr>
<td class="field_display_border_left" colspan="6" style=" text-align: center; ">{$pagingcode}</td>
</tr>
</if>
<tr>
<td class="field_display_border_left" colspan="6"><a href="$filename?page=$page&amp;action=add&amp;s=$s">{$lng['admin']['cron']['add']}</a></td>
</tr>
</table> </table>
</form> </form>
<br /> <br />

View File

@@ -4,5 +4,4 @@
<td class="field_name">{$row['interval']}</td> <td class="field_name">{$row['interval']}</td>
<td class="field_name">{$row['isactive']}</td> <td class="field_name">{$row['isactive']}</td>
<td class="field_name"><a href="$filename?s=$s&amp;page=$page&amp;action=edit&amp;id={$row['id']}">{$lng['panel']['edit']}</a></td> <td class="field_name"><a href="$filename?s=$s&amp;page=$page&amp;action=edit&amp;id={$row['id']}">{$lng['panel']['edit']}</a></td>
<td class="field_name"><if $vendor != 'froxlor'><a href="$filename?s=$s&amp;page=$page&amp;action=delete&amp;id={$row['id']}">{$lng['panel']['delete']}</a></if></td>
</tr> </tr>

View File

@@ -22,7 +22,7 @@ $header
<td class="field_display">{$lng['customer']['mysqls']}<br />{$lng['customer']['ftps']}</td> <td class="field_display">{$lng['customer']['mysqls']}<br />{$lng['customer']['ftps']}</td>
<td class="field_display">{$lng['customer']['emails']}<br />{$lng['customer']['subdomains']}</td> <td class="field_display">{$lng['customer']['emails']}<br />{$lng['customer']['subdomains']}</td>
<td class="field_display">{$lng['customer']['accounts']}<br />{$lng['customer']['forwarders']}</td> <td class="field_display">{$lng['customer']['accounts']}<br />{$lng['customer']['forwarders']}</td>
<td class="field_display">{$lng['admin']['deactivated']}</td> <td class="field_display">{$lng['admin']['deactivated']}<br />{$lng['admin']['lastlogin_succ']}</td>
<td class="field_display_search">{$sortcode}</td> <td class="field_display_search">{$sortcode}</td>
</tr> </tr>
$customers $customers

Some files were not shown because too many files have changed in this diff Show More