Compare commits

...

3372 Commits

Author SHA1 Message Date
Michael Kaufmann
88ee76e4c9 setting version to 0.10.3 for upcoming release
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-25 14:48:13 +02:00
Michael Kaufmann
90d921ebb5 preserve downward compatibility for 0.10.1 updaters regarding specialsettings for ssl-enabled domains; fixes #739
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-24 18:14:51 +02:00
Michael Kaufmann
7b162c4bd0 added tls-settings per domain for admins with change_serversettings-flag set; fixes #519
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-22 16:45:03 +02:00
Michael Kaufmann
32e2d48aed fallback to /tmp/froxlor.log if file-log is activated but no file given or not writeable; fixes #737
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-22 15:06:41 +02:00
Michael Kaufmann
1fdc524171 correct permissions
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-19 11:08:55 +02:00
Michael Kaufmann
4704798379 setting version to 0.10.2 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-18 13:39:23 +02:00
Michael Kaufmann
e5c1e8350d set default_theme value in settings-array to 'Sparkle' as it is in install/froxlor.sql; improve language strings for adding php-configurations and fpm-versions
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-17 18:40:53 +02:00
Michael Kaufmann
f0b36c03ad fix registration and termination date to flip between empty-value and 0000-00-00, thx to dxd
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-17 09:35:33 +02:00
Michael Kaufmann
79056f20ee display API in the list of features the customer is allowed to use; display total diskspace used by customer (web, mail and mysql) on customers dashboard, fixes #733
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-16 12:44:23 +02:00
Michael Kaufmann
5d6aa4d2bb Merge pull request #732 from TimoStramann/patch-1
fixing typo
2019-10-16 06:32:13 +02:00
Timo Stramann
f803276ca2 fixing typo
wrong variable name
2019-10-16 00:11:30 +02:00
Michael Kaufmann
5cf2d32e8a reverse parameter for Domains.add() into so users have to explicitly pass the parameter if they do NOT want the default ssl-ip to be used if left empty, so it behaves like the non-ssl ipandport parameter - if left empty, the system default is being used, thx J-BBB
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-15 14:35:42 +02:00
Michael Kaufmann
9430f77c2e Setting system.leapiversion exists and just needs to be updated, no added
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-15 07:22:41 +02:00
Michael Kaufmann
302fe994b7 adjust ip/port settings for downward compatibility when adding new ssl-specialsettings related settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-14 14:26:13 +02:00
Michael Kaufmann
9b122bc003 order tasks by type descending to create bind and webserver configs at the end of the run; cleanUp configs files after creation of certificates to minimize downtime, thx to SCD for testing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-14 13:56:55 +02:00
Michael Kaufmann
9410356bc7 fix output of acme command when upgrading
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-14 10:12:26 +02:00
Michael Kaufmann
5d5cc3dda3 fix array to string conversion
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-13 22:49:03 +02:00
Michael Kaufmann
a7ccb7007f add Unit-test for DomainZones.listing()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-13 14:47:39 +02:00
Michael Kaufmann
5680c88da0 implement DomainZones.listing() to actually return custom stored dns entries for a given domain, fixes #731
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-13 14:40:04 +02:00
Michael Kaufmann
cf01a587c7 fix typo in updater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 14:53:13 +02:00
Michael Kaufmann
b6367e1be1 forgot to add the ssl-default-vhostconf-domain fields in ipsandports
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 14:39:58 +02:00
Michael Kaufmann
93aa8bff1e add default-ssl-vhost settings and optionally allow including of non-ssl default-vhost settings, fixes #727
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 14:34:18 +02:00
Michael Kaufmann
15fa035dc4 check for minimum required php version in autoupdater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 14:04:43 +02:00
Michael Kaufmann
057f4aaa10 Passing the and parameters in reverse order to implode has been deprecated since PHP 7.4
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 10:22:11 +02:00
Michael Kaufmann
f588927bc5 check for existence of certificate files created by acme.sh
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 08:17:04 +02:00
Michael Kaufmann
03d2a76dd0 clean up language and code for dropped let's encrypt ACMEv1 support
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-11 20:53:34 +02:00
Michael Kaufmann
0d0e557715 force Let's Encrypt ACMEv2 API, fixed #728
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-11 18:17:05 +02:00
Michael Kaufmann
fb54b887f2 remove unneeded apihelp-page code in admin/customer_index; set explicit version to api-doc URL; check for acme.sh cronjob and uninstall it, as froxlor manages that itself
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-10 16:42:32 +02:00
Michael Kaufmann
9167608794 set version to 0.10.1 for maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-10 14:55:45 +02:00
Michael Kaufmann
050af61082 show success in updater when there are no more old files to delete and exec() is disallowed (showed empty list)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-09 12:05:04 +02:00
Michael Kaufmann
2c23431daf show on API keys page wether api access is allowed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-09 11:52:55 +02:00
Michael Kaufmann
4543c73b4f add possibility to enable/disable api access on a per user base
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-09 11:43:22 +02:00
Michael Kaufmann
88d85fc02e fix curly bracket array access (deprecated)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-09 07:59:38 +02:00
Michael Kaufmann
6102fabcb6 allow setting http2 flag for (sub)domains in customer view, fixes #725
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-09 07:59:11 +02:00
Michael Kaufmann
d7a7412973 Merge pull request #724 from kionez/add-ssl-expirationdate
Add expiration date to SSL certificates loaded via API request, fixes #723
2019-10-08 18:59:27 +02:00
kionez
1b3029b826 Fix typo 2019-10-08 18:50:10 +02:00
Michael Kaufmann
26cb53c8fb correctly validate that a domain has not a certificate in Certificates.add(), refs #722
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 18:44:42 +02:00
Michael Kaufmann
b4999fcc83 Throw exception if domain used to call Certificates.get() does not have a certificate, fixes #722
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 18:01:59 +02:00
kionez
05f602d457 Fix for null expiration date and coding style 2019-10-08 17:44:41 +02:00
Michael Kaufmann
89b95d61d2 return empty array in FroxlorAPI.php example class if last call was unsuccessful, fixes #722
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 17:36:42 +02:00
kionez
9ec03bade7 Add expiration date to SSL certificates loaded via API request 2019-10-08 17:32:03 +02:00
Michael Kaufmann
20699a15a6 update composer dependencies
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 12:54:15 +02:00
Michael Kaufmann
9b8a6e7e67 more php-7.4 compatibility
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 12:38:22 +02:00
Michael Kaufmann
3a8d5a9517 correct Mysql.add phpDoc to produce correct api-doc, fixes #721
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 12:11:00 +02:00
Michael Kaufmann
557b28a69d more php-7.4 compatibility
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 12:08:36 +02:00
Michael Kaufmann
0f1c5506e2 do not create username@domain ftp user if the default-ftp-user is being created in Ftps.add, fixes #720
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 12:04:10 +02:00
Michael Kaufmann
c6a93fa336 fix possible php-7.4 notice 'Trying to access array offset on value of type bool'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 11:26:05 +02:00
Michael Kaufmann
466ea0fa99 show update steps for version updates (forgot that once or twice); add fallback for file deletion if exec() is not allowed; fix php7.4 warnings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 10:54:08 +02:00
Michael Kaufmann
8f850ee7f3 simplify config-templates for cronjob setup
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-06 22:54:54 +02:00
Michael Kaufmann
55d21e475d set low timeout for version-check and output message if check is not possible (due to connection error, downtime of server, etc.)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-06 18:53:30 +02:00
Michael Kaufmann
fa3e3da7ac only flush privileges if anything at all happened
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-06 14:47:04 +02:00
Michael Kaufmann
05d66c034e update min-required version of php in composer.json
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-06 09:04:18 +02:00
Michael Kaufmann
98f0839664 Merge branch 'master' of github.com:Froxlor/Froxlor 2019-10-06 09:01:15 +02:00
Michael Kaufmann
4d52c6b6d0 Update README.md 2019-10-04 21:48:10 +02:00
Michael Kaufmann
eb5ea51da1 add explicit tlsv1.3 ciphersuite setting (used for apache-only as of now) 2019-10-04 17:43:11 +02:00
Michael Kaufmann
4b555b4ef2 set version to 0.10.0 for upcoming stable release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-03 12:35:42 +02:00
Michael Kaufmann
1657af8719 updating external libraries prior to release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-03 12:31:27 +02:00
Michael Kaufmann
c9d30654e0 update link to openssl-ciphers manual, thx to lod
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-02 09:12:06 +02:00
Michael Kaufmann
47ca350127 increase php requirement to 7.0 as 5.6 is way too old
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-27 12:55:14 +02:00
Michael Kaufmann
cc04e44031 add possibility to add customer using a hosting-plan instead of specifying resources
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-27 12:54:43 +02:00
Michael Kaufmann
eabad4917b correct try_files in NginxFcgi, fixes #717
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-26 09:50:13 +02:00
Michael Kaufmann
6188e5b0e3 Merge pull request #716 from Bobselp/patch-1
fix MysqlHandler user field
2019-09-25 20:18:22 +02:00
Bobselp
13ab7a598b fix MysqlHandler user field
See lib/Froxlor/FroxlorLogger.php:152
2019-09-25 20:03:16 +02:00
Michael Kaufmann
bf2584da65 Merge pull request #714 from Bobselp/patch-1
Get mailbox size with maildirsize file
2019-09-24 19:16:58 +02:00
Bobselp
31cebccd5d fix calc, add check if quota is enabled 2019-09-24 18:16:07 +02:00
Michael Kaufmann
3728e9b22c Merge pull request #715 from z3dm4n/master
lng/english.lng.php: fix typo
2019-09-24 12:55:45 +02:00
Erik Zettel
8a145eca92 lng/english.lng.php: fix typo 2019-09-24 12:44:33 +02:00
Bobselp
14914fce44 Get mailbox size with maildirsize file 2019-09-23 21:08:16 +02:00
Michael Kaufmann
6e3fdc1cf9 Merge pull request #713 from Bobselp/patch-1
fix missing namespaces in PowerDNS cron
2019-09-22 18:05:48 +02:00
Bobselp
6ca68f6a2d fix missing namespaces in PowerDNS cron
Some getDB calls were missing the `\Froxlor\Dns\` prefix
2019-09-22 17:59:21 +02:00
Michael Kaufmann
fd4d3cbcfd specify pop3_logout_format explicitly for dovecot to satisfy maillogparser
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-19 13:06:32 +02:00
Michael Kaufmann
75f49e2ee2 added HostingPlans ApiCommand + unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-16 12:31:02 +02:00
Michael Kaufmann
aca22a9c94 only add lets encrypt certificate if cert is valid; display acme.sh output if --debug is specified
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-15 15:40:13 +02:00
Michael Kaufmann
5a8ae0f75f do not log multiple times due to pushing log-handlers multiple times
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-15 13:49:40 +02:00
Michael Kaufmann
6ef2be8c1a fixed typo
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-15 13:42:32 +02:00
Michael Kaufmann
1b968c885b remove old files from 0.9.x to avoid conflicts and errors; change mod_proxy-usage and ACMEv2 default values to true
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-15 10:28:19 +02:00
Michael Kaufmann
dc3f159c90 correctly trigger re-generation of let's encrypt certificates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-15 10:22:25 +02:00
Michael Kaufmann
6ebb8dabc4 re-create certificate if SAN list or domain changes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-12 12:30:47 +02:00
Michael Kaufmann
9e2dcf51d7 also remove let's encrypt certificate for froxlor-hostname when updating to acme.sh; make installation more mysql/mariadb compatible
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-09 17:16:41 +02:00
Michael Kaufmann
2d8b0181b3 add gitter notifications for travis-ci
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-08-22 16:20:42 +02:00
Michael Kaufmann
accd6e7416 Update README.md 2019-08-22 16:15:17 +02:00
Michael Kaufmann
f5027695dd Create FUNDING.yml 2019-08-22 15:45:00 +02:00
Michael Kaufmann
34696df700 Merge pull request #711 from TimoStramann/patch-1
Remove unnecessary slash for SSL redirect
2019-08-18 16:15:50 +02:00
Timo Stramann
8e9ddd3d50 Remove unnecessary slash for SSL redirect
Remove slash after hostname since requests directly to the hostname do not require a slash at the end and all other content goes to `$request_uri` which starts with shlash, hence no longer doubleslashes on hostname only queries.
2019-08-18 16:07:59 +02:00
Michael Kaufmann
eca941bdae Merge pull request #710 from TimoStramann/patch-1
Updating another fastcgi_param SCRIPT_FILENAME
2019-08-18 15:19:42 +02:00
Timo Stramann
bd6aba8875 Updating another fastcgi_param SCRIPT_FILENAME
Use $request_filename instead of $document_root$fastcgi_script_name as described in: https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#use-request-filename-for-script-filename
2019-08-17 13:04:18 +02:00
Michael Kaufmann
58f6b558df Merge pull request #709 from TimoStramann/patch-1
Updating fastcgi_param SCRIPT_FILENAME
2019-08-17 07:51:12 +02:00
Michael Kaufmann
7ba72269a4 add dovecot stats service and use correct permissions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-08-11 11:12:53 +02:00
Michael Kaufmann
76c4486d26 fix subcanemaildomain parameter for Domains.update(); allow exec() in froxlor default vhost php.ini or logfiles-viewer feature
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-08-11 10:31:33 +02:00
Michael Kaufmann
69d7889f02 do not require codecoverage to pass checks
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-08-09 17:55:39 +02:00
Timo Stramann
04898c6114 Updating fastcgi_param
Use $request_filename instead of $document_root$fastcgi_script_name as described in: https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#use-request-filename-for-script-filename
2019-08-09 09:40:55 +02:00
Michael Kaufmann
7364dca53d fix homedir of automatically added ftp-user for new customers, thx Gamerboy59 for finding this
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-08-07 14:01:05 +02:00
Michael Kaufmann
90e7f7af0c correct language-array and minor formatting in serversettings.caa_entry_custom
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-30 10:05:26 +02:00
Michael Kaufmann
878be08563 Merge pull request #706 from makuser/master
Implement CAA DNS records
2019-07-30 09:53:46 +02:00
Michael Kaufmann
a98ae562b2 change mysql-username-test so it generates a loginname that fails depending on the mysql/mariadb version
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-30 08:48:44 +02:00
Michael Kaufmann
2aec6a10ed argh, mixed up the If statement for mysql-version check
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-30 08:31:03 +02:00
Michael Kaufmann
70ac914a86 fix drop database on mysql-5.6 as there is no 'if exists' for 'drop user' prior to mysql-5.7
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-30 07:34:42 +02:00
Michael Kaufmann
169353c429 Merge branch 'makuser-travis-test' 2019-07-30 07:30:56 +02:00
Marc-André Kolly
ede19946c2 Tell ant to fail the build when a php unit test fails 2019-07-29 16:29:39 +02:00
Marc-André Kolly
dd488106af Remove lib/userdata.inc.php.bak 2019-07-29 16:09:11 +02:00
Marc-André Kolly
2489658353 Extrawurst 2.0. 2019-07-29 16:03:27 +02:00
Marc-André Kolly
61b12e3f25 Extrawurst. 2019-07-29 15:47:45 +02:00
Marc-André Kolly
c2ffb6d6bd Update Travis CI to run database tests on MySQL 5.6, 5.7 and 8.0 and on MariaDB 10.3 and 10.4. 2019-07-29 15:12:35 +02:00
Marc-André Kolly
4ef78df27f Update Travis CI 2019-07-29 15:07:18 +02:00
Marc-André Kolly
84d80d695a Add Url and Domain validation for CAA records using native Froxlor function 2019-07-29 15:02:13 +02:00
Marc-André Kolly
3cba61a8d8 Simplify unit tests for CAA entry validation 2019-07-29 14:30:39 +02:00
Marc-André Kolly
16ccc273a9 Don't actually enclose CAA records in brackets 2019-07-29 14:27:44 +02:00
Marc-André Kolly
95d47eb6c9 Add unit tests for CAA entry validation 2019-07-29 11:53:00 +02:00
Marc-André Kolly
bfb3fb0a92 Add Regex to check for invalid CAA entry 2019-07-29 11:36:34 +02:00
Marc-André Kolly
78ef2a4e23 Fix serversettings field 2019-07-29 07:41:09 +02:00
Marc-André Kolly
a377c1e6c5 Split l18n string into title and description 2019-07-29 07:39:21 +02:00
Marc-André Kolly
e67e2a85de Implement test for Domain Zone CAA record 2019-07-28 20:05:55 +02:00
Marc-André Kolly
be0470aec1 Revert per-domain CAA settings 2019-07-28 19:49:56 +02:00
Marc-André Kolly
240178eba7 Implement global CAA settings 2019-07-28 19:49:32 +02:00
Marc-André Kolly
358ca61a26 Implement validators to prevent breaking DNS server when adding newly introduced RR types 2019-07-28 18:47:47 +02:00
Marc-André Kolly
b427212b00 Properly implement migrations for caa field in TABLE_DOMAIN_DNS using showUpdateStep() and lastStepStatus() 2019-07-28 18:12:00 +02:00
Marc-André Kolly
5eef98fdfd Bump DB Version to 201907270 2019-07-28 18:10:01 +02:00
Marc-André Kolly
57ac337ef7 Add a few more commonly used RR types to DNS editor 2019-07-28 16:52:05 +02:00
Marc-André Kolly
64fe300e42 Implement general CAA DNS records for all issuers 2019-07-28 16:28:29 +02:00
Marc-André Kolly
d4e5e32c14 Implement CAA DNS record for letsencrypt.org 2019-07-27 17:36:31 +02:00
Michael Kaufmann
d5e4182878 beautification and minor fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-26 07:49:17 +02:00
Michael Kaufmann
dd87a7374e fix ftp-group not added correctly when new customer is added
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-26 07:45:38 +02:00
Michael Kaufmann
7bc57ed269 set password directly when adding new mysql user
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-26 07:34:32 +02:00
Michael Kaufmann
5658717653 fix wrong parameter for acme.sh --delete when ecc certificates are used
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-19 11:43:14 +02:00
Michael Kaufmann
6c0fb007e4 travis changed the default OS to xenial, set it to the previous trusty which works
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-19 08:43:42 +02:00
Michael Kaufmann
0b898b9936 Merge branch 'master' of github.com:Froxlor/Froxlor 2019-07-19 08:42:31 +02:00
Michael Kaufmann
a261e84830 Merge pull request #705 from MDXDave/patch-2
Disable mail redirections if customer is disabled, fixes #704
2019-07-19 08:28:40 +02:00
Dave
7e9b373a58 Update xenial.xml 2019-07-19 01:43:07 +02:00
Dave
5698f8360e Update rhel_centos.xml 2019-07-19 01:42:49 +02:00
Dave
de7c438315 Update gentoo.xml 2019-07-19 01:42:31 +02:00
Dave
0669450676 Update bionic.xml 2019-07-19 01:42:14 +02:00
Dave
507a62f52d Update trusty.xml 2019-07-19 01:41:54 +02:00
Dave
77a7037072 Update jessie.xml 2019-07-19 01:41:24 +02:00
Dave
577e9d3b70 Update buster.xml 2019-07-19 01:40:55 +02:00
Dave
2526512069 Update stretch.xml 2019-07-19 01:39:01 +02:00
Michael Kaufmann
e91debcbb1 buster dovceot has ssl enabled by default
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-14 09:41:46 +02:00
Michael Kaufmann
065fa0b58b do not store punycode-notation of email-account domain, fixes #703
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-13 09:09:39 +02:00
Michael Kaufmann
db3c95ea10 set last run of letsencrypt cron when called in webserver-cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-11 08:39:26 +02:00
Michael Kaufmann
8b417c044c let nginx auto-detect the best ecdh-curve to use, fixes #652
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-11 08:13:00 +02:00
Michael Kaufmann
5e3cfaf847 insert task to regenerate config files after removing old-format lets encrypt certificates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-10 09:58:12 +02:00
Michael Kaufmann
0f0dd91246 combine Let's Encrypt cron with webserver-vhost-generation but allow manually execution using --debug/--force
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-09 07:50:11 +02:00
Michael Kaufmann
fd912dd161 combine webserver-reload command to parent class to avoid repeating code
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-09 07:13:02 +02:00
Michael Kaufmann
98325a0f40 don't need NSCD when using libnss-extrausers
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-03 18:07:02 +02:00
Michael Kaufmann
c43915c09d show task 12 in admin dashboard overview if active
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-03 12:00:47 +02:00
Michael Kaufmann
01bf814496 remove domain ssl information from acme.sh and filesystem on deletion to avoid trying to renew certificates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-01 20:32:13 +02:00
Michael Kaufmann
2ce517e84a use Fts.add when adding new Customers to reduce duplicate code
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-28 15:15:17 +02:00
Michael Kaufmann
e209989f2a use EmailAccounts.delete API call in Emails.delete instead of repeating the code
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-28 11:07:29 +02:00
Michael Kaufmann
5dfb74701c improve error message display on missing vendor-folder
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-25 11:10:32 +02:00
Michael Kaufmann
bdd583d251 Merge branch 'drexlma-patch-2' 2019-06-25 10:59:06 +02:00
Michael Kaufmann
fd8a1d8dc2 Merge branch 'patch-2' of https://github.com/drexlma/Froxlor into drexlma-patch-2 2019-06-25 10:58:57 +02:00
Michael Kaufmann
d2818f8020 Merge branch 'drexlma-patch-3' 2019-06-25 10:58:20 +02:00
Michael Kaufmann
80a0a34b46 Merge branch 'patch-3' of https://github.com/drexlma/Froxlor into drexlma-patch-3 2019-06-25 10:57:45 +02:00
Michael Kaufmann
6e41c0ad2c add codecov.io to travis build for code-coverage stats - yay
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-17 14:11:40 +02:00
Michael Kaufmann
a07a9e6a88 more unit-testing, enhancements in Store-functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-11 12:10:56 +02:00
Michael Kaufmann
7a94a43053 started \Settings\Store unit tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-10 13:37:22 +02:00
Michael Kaufmann
028524291e test improvements and preparation for more tests later
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-10 11:38:47 +02:00
Michael Kaufmann
1ac304e5ac fix missing domainname parameter when manually adding ssl-certificates for a domain, fixes #700
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-10 11:36:05 +02:00
Michael Kaufmann
f266bb05c9 testing \Froxlor\Settings\FroxlorVhostSettings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-06 13:04:43 +02:00
Michael Kaufmann
d8a8f76dc9 update dev-environment to use more recent versions, requries php-7.3 now (dev-only)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-06 10:18:03 +02:00
Michael Kaufmann
0afbe3d13b add validation tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-05 20:52:37 +02:00
Michael Kaufmann
4917b9c057 added first validation tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-05 09:07:21 +02:00
Michael Kaufmann
13bfd62ac5 move validateUrl function to correct file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-05 06:50:06 +02:00
Michael Kaufmann
97703e7a0c add a few tests for Settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-05 06:39:44 +02:00
Michael Kaufmann
13086d91d8 only validate and process ip-list if given at all
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-04 15:14:51 +02:00
Michael Kaufmann
b7a10fdeda fix vhost(parts)-merging in nginx cron, fixes #669
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-03 11:59:56 +02:00
Michael Kaufmann
6806f896d6 fix proftp path of rhel/centos config template, fixes #636
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-31 08:02:03 +02:00
Michael Kaufmann
87a2f86365 do not set default ssl-ips if the frontend values are left empty; if default ssl-ips are specified, preset them in the form when adding a domain, fixes #697
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-30 17:44:08 +02:00
Michael Kaufmann
a647d48fbe fix up testing/production switch and challengepath for lets encrypt, fixes #696
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-27 17:48:33 +02:00
Daniel Drexlmaier
6ea91f55e5 Update install.php 2019-05-27 15:47:30 +02:00
Daniel Drexlmaier
fb87129e29 Update init.php 2019-05-27 15:46:39 +02:00
Daniel Drexlmaier
79e5113e12 Update init.php 2019-05-27 15:28:08 +02:00
Daniel Drexlmaier
b75c9ddff6 Update install.php 2019-05-27 15:27:28 +02:00
Michael Kaufmann
35e14fde14 set version to 0.10.0-rc2 for second release candidate
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-27 11:47:58 +02:00
Michael Kaufmann
68f55f9596 dont allow bootstrap.php file from tests/ to be called via browser
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-27 08:33:36 +02:00
Michael Kaufmann
3fec579f85 Merge pull request #683 from discordier/hotfix/pcre-maillog
Fixes #682 - mail log parsing regex character group
2019-05-13 20:03:49 +02:00
Christian Schiffler
e2d69c664a Fixes #682 - mail log parsing regex character group
The mail log parsing regex was incorrectly using a character group of `\A`
2019-05-13 19:53:55 +02:00
Michael Kaufmann
72016a5735 fix integrity-check language-file entries
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-07 14:03:37 +02:00
Michael Kaufmann
eba163fc4a Merge pull request #677 from pquerner/#646
allow auth basic in URL, fixes #646
2019-04-30 07:14:48 +02:00
Michael Kaufmann
8df6654ad0 Merge pull request #676 from pquerner/#675
use correct validate-ip function in \Froxlor\Validate\Validate::validateUrl, fixes #675
2019-04-30 07:09:20 +02:00
Pascal
1a5e43b6f7 fixes #646
change regex by using well tested regex from here:
https://mathiasbynens.be/demo/url-regex

by @diegoperini
https://gist.github.com/dperini/729294
2019-04-30 00:08:32 +02:00
Pascal
c4c7f4b636 fixes #675
fix call to static method
2019-04-29 23:39:10 +02:00
Michael Kaufmann
9aa0de16be Merge branch 'foliengriller-annotationsAPI' 2019-04-26 12:24:15 +02:00
Michael Kaufmann
cb636fe2c9 Merge branch 'annotationsAPI' of https://github.com/foliengriller/Froxlor into foliengriller-annotationsAPI 2019-04-26 12:23:58 +02:00
Michael Kaufmann
f93dc5643f fix error that wildcard-domains and lets-encrypt are not possible when using ACMEv2; fixes #674
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-25 14:20:02 +02:00
Michael Kaufmann
974b151d02 add Debian 10 (Buster) and Ubuntu 18.04 (Bionic) config-templates for TESTING
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-25 14:04:15 +02:00
Michael Kaufmann
8835dd0b65 remove deprecated config-templates for Ubuntu 12.04 (Precise); mark Debian 7 (Jessie) and Ubuntu 14.04 (Trusty) as deprecated
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-25 14:03:39 +02:00
Michael Kaufmann
626b791c67 remove recursor options in powerdns config template for gentoo, as recursion has been removed in pdns >=4.1.0; fixes #673
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-25 13:56:42 +02:00
Michael Kaufmann
82508587b3 update mysql-table engines to InnoDB; fixes #671
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-25 13:31:18 +02:00
Michael Kaufmann
0d7fa5728c fix auto-delete of cetificates when no domain exists anylonger, thx to an error-report
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-14 08:13:34 +02:00
Michael Kaufmann
29365838b3 set version to 0.10.0-rc1 for upcoming release candidate
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-10 08:24:04 +02:00
Michael Kaufmann
13ac7ef66c Merge pull request #666 from sokai/sokai-patch-1
logrotate snipet: (more) GDPR ‚compliant‘; fixes #665
2019-03-16 18:10:19 +01:00
Michael Kaufmann
6764747fa9 use system.defaultttl setting also for SOA record; fixes #667
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-03-16 18:09:21 +01:00
sokai
91df02916c logrotate snipet: GDPR ‚compliance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:08:44 +01:00
sokai
bf400fc5f8 logrotate snipet: GDPR ‚compliance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:07:49 +01:00
sokai
6cd73c9ebf logrotate snipet: GDPR ‚compliance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:07:14 +01:00
sokai
ed9ab39c5e logrotate snipet: GDPR ‚complieance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:05:54 +01:00
sokai
678bd1bcdc logrotate snipet: GDPR ‚complieance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:05:11 +01:00
sokai
90fe548901 logrotate snipet: GDPR ‚complieance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:04:26 +01:00
sokai
a158d4bfb9 logrotate snipet: GDPR ‚complieance‘
see https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:02:01 +01:00
Michael Kaufmann
4028e3ba5c testing with new IdnaConverter seems to require php-7.1
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-03-10 17:16:59 +01:00
Michael Kaufmann
f7d24e8870 IdnaConverter repository changed url
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-03-10 17:13:51 +01:00
Michael Kaufmann
b1bbb1847d put log_format directive in correct context (http-context only); refs #663
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-03-08 13:23:38 +01:00
Michael Kaufmann
fb6e231f77 avoid passing non-variable as reference
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-03-01 10:40:01 +01:00
Michael Kaufmann
5786644c76 fix installation for current development for now; fixes #661
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-25 17:13:13 +01:00
Michael Kaufmann
51efba0a8d Check for SSL enabled vhost-container for ssl-related settings in froxlor-vhost-settings; fixes #642
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-24 09:03:03 +01:00
Michael Kaufmann
2f38de90e5 use DbManager for updating the password of a mysql-db
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-24 08:52:50 +01:00
Michael Kaufmann
410bfe2c97 fix typo in phpdoc
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-22 12:59:11 +01:00
Michael Kaufmann
cfae5b7516 fix deleting of certificate when certificate is froxor-vhost-certificate
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 14:18:00 +01:00
Michael Kaufmann
6e81c235d9 fix SAN domains for froxlor-vhost-aliases in let's encrypt
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 13:51:34 +01:00
Michael Kaufmann
0257149316 fix generation of serveralias in froxlor vhost
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 13:41:23 +01:00
Michael Kaufmann
ef331ccc81 Add setting to specify domain aliases for the froxlor-vhost (and add them to the SAN list of let's encrypt certificates if enabled)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 12:54:53 +01:00
Michael Kaufmann
b187114c50 output real names in libnss-extrausers passwd file, fixes #659
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 10:31:05 +01:00
Michael Kaufmann
fdefd4f1fe fix re-enabling of database users after being deactivated, fixes #660
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 10:19:58 +01:00
Michael Kaufmann
4ec32c0972 set keysize to the former default and the default from installation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-19 10:26:33 +01:00
Michael Kaufmann
111e9bf64b fix typo for getting Settings of lets encrypt keysize when not using ECC
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-19 09:58:28 +01:00
Michael Kaufmann
7d3577d649 fix superfluous ssl_key directive in dovoecot for stretch and xenial
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-18 19:14:48 +01:00
Michael Kaufmann
a8fb0a6d88 check for non-empty required field 'name' in hosting plans, which are still not fully migrated to API, refs #658
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-18 13:07:58 +01:00
Michael Kaufmann
8d628daf83 fix update of acmesh class in cronjobs_run
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 21:41:19 +01:00
Michael Kaufmann
010f30bc9e check for upgrade of acme.sh prior to issue/renew certifice, refs #657
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 20:48:11 +01:00
Michael Kaufmann
2273a11978 remove unneeded let's encrypt settings; self-update acme.sh only once a day
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 20:36:18 +01:00
Michael Kaufmann
5c36b79277 honor setting for let's encrypt key size if needed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 19:47:51 +01:00
Michael Kaufmann
f5127eccd1 outsource acmesh-command to reduce duplicate code
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 19:43:12 +01:00
Michael Kaufmann
e962f76b32 Merge branch 'master' of github.com:Froxlor/Froxlor 2019-02-17 19:34:33 +01:00
Michael Kaufmann
6d8521d8dc Merge pull request #657 from patschi/patch-1
Run acme.sh upgrade just once when cron starts
2019-02-17 19:34:21 +01:00
Patrik Kernstock
7b231bb755 Run acme.sh upgrade just once when cron starts
Only run acme.sh upgrade command once when cronjob starts, and not everytime when there's a certificate going to be renewed.
2019-02-17 19:30:03 +01:00
Michael Kaufmann
459cbcc0dd keep re-use old-key setting for Let's Encrypt
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 19:25:23 +01:00
Michael Kaufmann
44433ef86e only variables can be passed by reference
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 18:24:31 +01:00
Michael Kaufmann
cb8e83bdfa use new AcmeSh class also in froxlor.sql
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 17:56:14 +01:00
Michael Kaufmann
84eec155de only empty the certificates if there's actually something to empty
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 16:57:03 +01:00
Michael Kaufmann
73a059b318 usinng acme.sh for issuing Let's Encrypt certificates now; please test thoroughly; fixes #651
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 16:17:35 +01:00
Michael Kaufmann
39d38eea8d fix missed cronlog variable usage in LetsEncrypt cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-15 13:58:29 +01:00
Michael Kaufmann
bfb7f28ff0 add linebreak after LogLevel
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-15 13:21:50 +01:00
Michael Kaufmann
036ec68651 fix unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-13 21:59:01 +01:00
Michael Kaufmann
8cebcc8a5d allow DnsZone functions only if dns-editor is enabled AND the customer is allowed to use it
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-13 21:51:24 +01:00
Michael Kaufmann
fbcba3ef4e remove unnecessary if-statement in nginx when redirecting to https, thx to patschi; fixes #653
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-13 15:32:41 +01:00
Michael Kaufmann
fca7b95579 meh it's february already :P
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-12 17:42:36 +01:00
Michael Kaufmann
73c05fb231 add setting for customzing webserver error-log level, fixes #650
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-12 17:38:46 +01:00
Michael Kaufmann
d0fb77f3e9 Merge pull request #648 from princeofnaxos/Fix-english-typos
Corrections to the English texts
2019-02-11 16:18:50 +01:00
Edwin Boersma
32cf6dfaef Re-added missing line. 2019-02-11 16:17:17 +01:00
Michael Kaufmann
8ab86a05b2 disable settings in 'froxlor vhost settings' that wont have any effect if no IP/port has the 'create vHost container' option enabled; fixes #642
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-11 16:08:34 +01:00
Edwin Boersma
79b913131e Corrections to the English texts 2019-02-11 15:59:29 +01:00
Michael Kaufmann
8fd910a92e use correct settings-class
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-10 22:54:05 +01:00
Michael Kaufmann
2ce1a5abb5 ups, where did they go? :P
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-10 22:49:32 +01:00
Michael Kaufmann
8448a7141a do not add task 11 (delete domain from pdns db) if namserver is disabled and dns-server is not PowerDNS
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-09 11:56:15 +01:00
Michael Kaufmann
21f9a24780 remove 'change_date' field from pdns-records table as it is being removed in pdns >=4.2; fixes #645
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-08 07:59:02 +01:00
Michael Kaufmann
1b5e31e59d fallback to default froxlor newsfeed when no custom newsfeed (rss) is given if newsfeed is shown on customer dashboard
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-07 10:05:41 +01:00
Michael Kaufmann
03afbc902d fix static method not being declared as such
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-02 09:05:14 +01:00
Michael Kaufmann
83b760a43b add missing description for task 11
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-01 14:17:54 +01:00
Michael Kaufmann
c0e67dc240 fix incorrect usage of class-constant
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-30 12:32:06 +01:00
Michael Kaufmann
2166999fef fix logging in Nginx cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-26 10:23:56 +01:00
Michael Kaufmann
7bb7cc6a00 fix isbinddomain/zonefile field saving when editing domain, fixes #639
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-22 08:29:13 +01:00
Michael Kaufmann
8b96912ab4 correctly use system-setting of default-ttl, thx to K1rk
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-17 09:26:04 +01:00
Michael Kaufmann
de33ec509b move_to_admin is not a binary value, fixes #637
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-16 19:21:50 +01:00
Michael Kaufmann
5ecb43ba73 correct increasing/decreasing of admin-resources
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-16 15:14:22 +01:00
Michael Kaufmann
97ff3485b7 fix deletion of admins; fixes #638
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-16 10:59:32 +01:00
Michael Kaufmann
98daef7224 Merge pull request #635 from heavygale/patch-3
htpasswd only on configured paths
2019-01-14 06:31:42 +01:00
Max
2983aa5737 htpasswd only on given paths
Only apply htpasswd rules to (sub)domains if the rule's path begins with the domain's document root.
2019-01-14 00:18:26 +01:00
Michael Kaufmann
9a906427e7 ensure the replacing of the stdsubdomain url on update is encoded correctly
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-11 08:55:55 +01:00
Michael Kaufmann
7841eebf08 correct handling of storeSettingHostname when system.stdsubdomain is changed; refs #633
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-11 00:06:44 +01:00
Michael Kaufmann
b4597d54af create full dns zone if main-but-subdomain has dns enabled but maindomain to that domain does not, fixes #632
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-08 12:52:10 +01:00
Michael Kaufmann
19ffc9587a issubof Parameter in Domains.add and Domains.update is not boolean
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-08 11:18:53 +01:00
Michael Kaufmann
bbe0a0b3a5 Merge pull request #630 from princeofnaxos/master
Corrections to the Dutch translations
2019-01-07 11:12:37 +01:00
Edwin Boersma
0d30f71097 Corrections to the Dutch translations 2019-01-07 11:06:25 +01:00
Michael Kaufmann
0cc5693180 damn typo
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-06 08:54:49 +01:00
Michael Kaufmann
045a62a9db remove duplcate visible-field in admin-edit formfield; fixes #625
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-06 08:48:24 +01:00
Michael Kaufmann
725372b6ae add 4th parameter $step to Admins::increaseUsage(); fixes #628
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-06 08:45:24 +01:00
Michael Kaufmann
9e77fecc29 removed deprectated create_function statement; fixes #623
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-06 08:39:56 +01:00
Michael Kaufmann
44c47fa6eb Merge pull request #629 from PHPGangsta/composer_sugg
added ext-apcu and ext-readline to composer.json suggest block
2019-01-05 16:22:07 +01:00
Michael Kliewe
448de78ea5 added ext-apcu and ext-readline to composer.json suggest block 2019-01-05 13:31:26 +01:00
Michael Kaufmann
f3859052e5 fix getParamListFromDoc() for api doc
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-05 07:56:55 +01:00
Michael Kaufmann
2b4199e558 drop ADSP support, fixes #622
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-04 20:58:20 +01:00
Michael Kaufmann
b7585585dc also include table-definitions in external api.php
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-02 18:46:38 +01:00
Michael Kaufmann
92b133b11d fix Froxlor::listFunction() api-call after namespacing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-02 18:36:01 +01:00
Michael Kaufmann
5dda57458a fix incorrect variable
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-28 15:18:56 +01:00
Michael Kaufmann
16efd1191a forgot to remove require of formfield-constants
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-26 21:12:58 +01:00
Michael Kaufmann
1c9d76725c get rid of last function file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-26 20:54:00 +01:00
Michael Kaufmann
4ee735a81f Merge branch 'namespaces' 2018-12-26 20:38:05 +01:00
Michael Kaufmann
2ba8fa2785 Merge branch 'master' into namespaces 2018-12-26 20:37:47 +01:00
Michael Kaufmann
e64e8cafa6 define logger constants in logger class
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-26 15:51:26 +01:00
Michael Kaufmann
3949a6858b fixed to Cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-26 12:00:32 +01:00
Michael Kaufmann
792d25fdd8 add MysqlHandler for Monolog-Logger
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-25 08:48:28 +01:00
Michael Kaufmann
af5ef4b9dc Merge pull request #617 from JB1985/patch-3
Update logfiles_viewer.php
2018-12-25 07:54:10 +01:00
JB1985
bd79022475 Update logfiles_viewer.php
typo
2018-12-24 20:50:38 +01:00
Michael Kaufmann
684130871b forgot one function in Froxlor\PhpHelper
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 14:04:52 +01:00
Michael Kaufmann
7416a41a42 get rid of most of the checkstyle warnings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 13:50:45 +01:00
Michael Kaufmann
30f5902b88 fix some more checkstyle issues
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 13:21:35 +01:00
Michael Kaufmann
35c631946d more and more checkstyle fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 12:59:40 +01:00
Michael Kaufmann
585d42f1b8 more checkstyle fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 12:02:26 +01:00
Michael Kaufmann
c3d44b4558 Minor enhancements and starting to comply with checkstyle
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 09:35:05 +01:00
Michael Kaufmann
04e87cce98 forgot to add a few statics... :p
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-23 19:49:10 +01:00
Michael Kaufmann
4cd005051b fixed last remaining function calls which are class-methods now
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-23 19:34:32 +01:00
Michael Kaufmann
e1987af34d [CI] add composer to build.xml; run PHPCompatibility check; run only phpunit in travis
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-23 10:39:27 +01:00
Michael Kaufmann
17c6b11a1b remove superfluous inserttask
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 21:11:43 +01:00
Michael Kaufmann
7170fab884 fix build-testing on jenkins
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 20:32:36 +01:00
Michael Kaufmann
7f82038255 fix up some cron related things
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 20:01:10 +01:00
Michael Kaufmann
c1cd0004bf fix saving of settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 15:52:20 +01:00
Michael Kaufmann
b43a63d665 also regenerate quota and cron.d if settings have changed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 13:44:41 +01:00
Michael Kaufmann
3794003e63 minor fixes here and there
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 13:42:10 +01:00
Michael Kaufmann
13aa19e5f4 got rid of all global functions, I guess
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 13:28:51 +01:00
Michael Kaufmann
28bb614489 begin refactoring of form-stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 11:57:54 +01:00
Michael Kaufmann
085d25346d remove unneeded include of functions.php
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 10:37:33 +01:00
Michael Kaufmann
685267d6fc fix CLI scripts
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 10:36:01 +01:00
Michael Kaufmann
0401e6971a Revert "refactor global array"
This reverts commit c5a58e3f36.
2018-12-22 08:15:31 +01:00
Michael Kaufmann
7e39a7bc60 Revert "refactor global array"
This reverts commit 370ccbdb74.
2018-12-22 08:15:31 +01:00
Michael Kaufmann
c800e89414 Revert "fix wrong usage of \Froxlor\User::getAll()"
This reverts commit 48ff2e6b6d.
2018-12-22 08:15:31 +01:00
Michael Kaufmann
e719731de0 Revert "argh..."
This reverts commit fed9efff41.
2018-12-22 08:15:30 +01:00
Michael Kaufmann
fed9efff41 argh...
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 21:00:35 +01:00
Michael Kaufmann
48ff2e6b6d fix wrong usage of \Froxlor\User::getAll()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 20:56:47 +01:00
Michael Kaufmann
370ccbdb74 refactor global array
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 20:51:44 +01:00
Michael Kaufmann
c5a58e3f36 refactor global array
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 20:31:17 +01:00
Michael Kaufmann
5fa0f4b87e ugh, where was 2fa integration gone?
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 19:25:06 +01:00
Michael Kaufmann
7c68fa7bd0 fixed a few functions I've missed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 19:16:49 +01:00
Michael Kaufmann
7563907df5 convert html-related functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 18:31:06 +01:00
Michael Kaufmann
def3d6d19e forgot generateDkimEntries()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 17:56:23 +01:00
Michael Kaufmann
59453a47fa fix dns-related function calls
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 17:51:29 +01:00
Michael Kaufmann
1b090377ee even more function to class conversion
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 17:41:22 +01:00
Michael Kaufmann
b0e11f5708 and more and more and more
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 17:00:54 +01:00
Michael Kaufmann
a819d81ef2 more function reducing and fixing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 16:53:04 +01:00
Michael Kaufmann
0a28ef2af6 minor changes for unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 16:32:44 +01:00
Michael Kaufmann
1ba4164028 add new PHPMail Wrapper to avoid multiple setting of properties
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 14:49:55 +01:00
Michael Kaufmann
f9ad392e39 remove refactored functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 13:00:39 +01:00
Michael Kaufmann
97b5439c0d auto-format all files; add table-definitions to test-bootstrap file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 12:24:07 +01:00
Michael Kaufmann
1ff784198c adjust paths to classes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 11:31:41 +01:00
Michael Kaufmann
05402a4a1c add new namespaces branch to travis testing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 11:26:25 +01:00
Michael Kaufmann
dd8fbf0900 add new namespaces branch to travis testing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 11:25:48 +01:00
Michael Kaufmann
c0e89bbd05 refactor UI functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 11:22:03 +01:00
Michael Kaufmann
b0df4e46d6 convert validate/check functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-20 21:00:39 +01:00
Michael Kaufmann
5888927239 get rid of more functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-20 12:38:18 +01:00
Michael Kaufmann
f263175802 more function reduction
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-20 09:57:00 +01:00
Michael Kaufmann
bed069f269 more function moving
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-20 08:33:32 +01:00
Michael Kaufmann
8c896d60d6 get rid of some more functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-20 07:43:40 +01:00
Michael Kaufmann
adc627ca4e minor fixes to template engine for now
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 20:38:29 +01:00
Michael Kaufmann
d654b18517 get rid of storeSetting*-functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 19:58:14 +01:00
Michael Kaufmann
26510f0745 removing more ticket-stuff; update all unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 19:42:50 +01:00
Michael Kaufmann
60f1db5caf LetEncrypt cronjob refactoring
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 17:31:03 +01:00
Michael Kaufmann
549ccda166 use safe_exec from class now
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 17:19:56 +01:00
Michael Kaufmann
c4024c8107 use correct makeCorrect(Dir/File) everywhere
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 17:13:41 +01:00
Michael Rosenberger
98f6ad183e Corrects annotations in API 2018-12-19 16:58:52 +01:00
Michael Kaufmann
8e84a4ff44 correct use of Database use
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 16:57:03 +01:00
Michael Kaufmann
2c893fef25 adjustments in settings-arrays
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 14:54:46 +01:00
Michael Kaufmann
e4a0cc73bd convert three more dns-related functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 14:38:45 +01:00
Michael Kaufmann
4c4b2a6df3 use TwoFactorAuth via composer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 14:12:42 +01:00
Michael Kaufmann
28f24fda72 ported CLI stuff to namespaces-layout
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 13:59:11 +01:00
Michael Kaufmann
3ff20e327f removed ticketsystem; lots of work on cron stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 13:09:14 +01:00
Michael Kaufmann
903b775f79 make cronjobs also classes and began to refactor the whole cronjob stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 08:55:23 +01:00
Michael Kaufmann
a25150babf use correct Settings-class in templates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 15:53:08 +01:00
Michael Kaufmann
a2f205bae3 Update class.SImExporter.php 2018-12-18 15:52:19 +01:00
Michael Kaufmann
a0125bb93e Update function.setCycleOfCronjob.php 2018-12-18 15:51:48 +01:00
Michael Kaufmann
6329042d40 use namespaces in modules
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 13:45:05 +01:00
Michael Kaufmann
9d314aaa3f use Monolog via composer instead of our own implementation, @TODO MySQL logging-handler
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 12:16:48 +01:00
Michael Kaufmann
fc0a495f2d use PHPMailer via composer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 10:49:18 +01:00
Michael Kaufmann
c9ee2ae7e0 use IdnaConvert from composer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 10:40:16 +01:00
Michael Kaufmann
4c27efa4ae put Api-Commands into namespaces
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 09:46:36 +01:00
Michael Kaufmann
c7e5df95e7 add psr-4 autoload to composer.json
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 08:40:04 +01:00
Michael Kaufmann
c3cc3d1f62 started to refactor functions to classes and use PSR-4 autoloader and namespacing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 08:38:34 +01:00
Michael Kaufmann
ba93265ac6 Merge branch 'ServiusHack-write_no_log' 2018-12-17 12:22:02 +01:00
Michael Kaufmann
bf7df9a8d6 Merge branch 'write_no_log' of https://github.com/ServiusHack/Froxlor into ServiusHack-write_no_log 2018-12-17 12:21:49 +01:00
Michael Kaufmann
8b0966d332 do not generate ssl vhost with fallback ssl-certificate if file does not exist, fixes #614
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-16 20:21:53 +01:00
Michael Kaufmann
aa90747089 fix deleting of Certificates as admin with customer_see_all flag
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-16 09:27:31 +01:00
Michael Kaufmann
efe54d8b56 enhance config-services script a bit
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-15 22:22:37 +01:00
Michael Kaufmann
1e816de8cf refactor domainValidate() function; allow underscore in CNAME and SRV entries
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-14 11:51:19 +01:00
Michael Kaufmann
e3a78f0f84 Merge pull request #612 from foliengriller/install
Checks Mysql version only if no fatal error occured
2018-12-12 21:12:12 +01:00
Michael Rosenberger
d0c7706840 Checks Mysql version only if no fatal error occured
Otherwise it is not possible to install current master due to fatal error.
2018-12-12 20:54:56 +01:00
Michael Kaufmann
1a15cef76d when using --force on the cronjob it will now also re-set quotas if enabled
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-12 19:49:46 +01:00
Michael Kaufmann
dc44c67f86 do not show 'override fpmconfig' checkbox when not using php-fpm in php-configs
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-12 19:48:56 +01:00
Michael Kaufmann
ab819129dd return the subdomain-names in PhpSettings::listing() instead of only the amount
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-11 11:45:39 +01:00
Michael Kaufmann
8d966aebee Show number of subdomains that use a php-config; fixes #532
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-11 10:12:37 +01:00
Michael Kaufmann
4988600881 added new indicator whether services/system has been configured (on new installations); show alternative configuration possibility via config-services.php script
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-10 20:34:43 +01:00
Michael Kaufmann
d381528c06 reload fpm before nginx
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-09 11:51:43 +01:00
Michael Kaufmann
3d647a2c2e fix read in correct fpm-daemon config-id for nginx and lighttpd own-vhost, thx again to heavygale
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-09 11:05:36 +01:00
Michael Kaufmann
7e6180fed8 read in correct fpm-daemon config-id for nginx and lighttpd, thx to heavygale
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-09 10:45:22 +01:00
Michael Kaufmann
9e4ed645f7 use correct page title for php-fpm versions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-09 10:29:19 +01:00
Michael Kaufmann
9522e0cfb1 fix typo and fix '"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"' warning (as of php-7.3)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-09 08:31:21 +01:00
Michael Kaufmann
db36d57683 fix an issue where the isemaildomain flag for a main-domain can be set to false when edited by customer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-08 12:46:17 +01:00
Michael Kaufmann
ddddbdfb18 Merge pull request #609 from foliengriller/annotations
Improves annotations in /lib/classes/api/
2018-12-04 22:03:07 +01:00
Michael Rosenberger
df3ad9ed12 Improves annotations for API 2018-12-04 21:58:46 +01:00
Michael Kaufmann
456875905d set password compatibility for mysql8
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 19:52:18 +01:00
Michael Kaufmann
1707b5e7fd fix create user for mysql8 for good, thx to bimmer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 17:33:58 +01:00
Michael Kaufmann
034d1b1c8e correct syntax for CREATE USER when using mysql8
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 15:42:05 +01:00
Michael Kaufmann
5dd915736b changed all boolean parameters to getBoolParam-function
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 14:40:11 +01:00
Michael Kaufmann
07d7908f6e added wrapper for boolean api-parameters, Domains-Module for now, more later; fixes #597
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 13:27:21 +01:00
Michael Kaufmann
cf53365007 update README and CONTRIBUTING files; added PULL_REQUEST_TEMPLATE; database user-creation fix for MySQL8
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 10:52:49 +01:00
Michael Kaufmann
1f2c1c1d2f Merge pull request #608 from foliengriller/openssl1
Ads missing extension openssl to composer.json
2018-12-03 21:41:30 +01:00
Michael Kaufmann
51390d8add Merge pull request #607 from foliengriller/caseMissmatch1
Corrects case missmatch of function calls
2018-12-03 21:37:35 +01:00
Michael Rosenberger
98120de7e1 Ads missing extension openssl to composer.json 2018-12-03 21:37:17 +01:00
Michael Rosenberger
88a2cb37c9 Case missmatch of function calls 2018-12-03 21:30:12 +01:00
Michael Kaufmann
ec4d34d37a let's see if that works :P
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-03 17:29:42 +01:00
Michael Kaufmann
0b3d532028 ups, how did these get lost?
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-03 17:18:44 +01:00
Michael Kaufmann
4a0be40f92 require php-5.6 for 0.10.0; fixes #606 and remove invalid value NO_AUTO_CREATE_USER in mysql-attributes for mysql8
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-03 17:15:54 +01:00
Michael Kaufmann
2da59f1055 do not rely on fixed order of import-file for domains-import; first line now has to be the names of the api-parameters used for Domains.add, see https://api.froxlor.org/doc/0.10.0/#v-Domains, fixes #544
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-02 20:06:53 +01:00
Michael Kaufmann
1ca1314ac4 fix typo in updater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-02 19:27:50 +01:00
Michael Kaufmann
426e46a2df show registration date of domain (if given) in admin and customer domain-list, fixes #553
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-02 11:50:45 +01:00
Michael Kaufmann
212cb0140d ups minor CSS typo, refs #603
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-01 15:06:16 +01:00
Michael Kaufmann
8291c7d2ab Allow access to webserver logs via weinterface, if activated for customer; todo: view more content dynamically; fixes #603
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-01 13:33:08 +01:00
Michael Kaufmann
1bd4c00631 forgot to replace frontend variables with replacer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-30 13:55:08 +01:00
Michael Kaufmann
69495b94af add 2FA mechanism, fixes #547
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-30 13:45:17 +01:00
Michael Kaufmann
29c754e700 add new CUSTOMER_HOMEDIR replacer for php-configs, thx to rubberduck for the hint
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-29 09:37:18 +01:00
Michael Kaufmann
fd69fc22db format composer.json and add php-7.0 as dev-requirement (phpunit6); add unit-test for Backup.add() when customer passes / as path value
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-28 13:17:44 +01:00
Michael Kaufmann
c7bee4edf2 update 0.9.x updater according to latest bugfix-release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-27 18:53:37 +01:00
Michael Kaufmann
9756c792d7 disable sending of emails when running tests completely when run on travis
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-27 12:05:56 +01:00
Michael Kaufmann
a86f10a4b4 fix typo in function name, refs #601
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-27 11:49:32 +01:00
Michael Kaufmann
946c2507c5 last try before i branch for testing this - next time, really
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 22:00:50 +01:00
Michael Kaufmann
56ac4b5c26 last try before i branch for testing this :P
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 21:57:15 +01:00
Michael Kaufmann
e4becfb1dd add missing php-invoker stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 21:50:35 +01:00
Michael Kaufmann
6129768711 actually use the required phpunit version pulled from composer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 21:38:36 +01:00
Michael Kaufmann
72690e311f add specific phpunit version to dev-requirements
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 21:33:40 +01:00
Michael Kaufmann
2ef067e12d set a few settings according to the test-system
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 21:05:57 +01:00
Michael Kaufmann
ae71e3ad2a new try with travis-ci #last-really
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:29:27 +01:00
Michael Kaufmann
745621c416 new try with travis-ci #last
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:23:56 +01:00
Michael Kaufmann
069ccd24e6 new try with travis-ci #3
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:16:15 +01:00
Michael Kaufmann
76b5f813c5 new try with travis-ci #2
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:12:32 +01:00
Michael Kaufmann
9ad6616fa3 new try with travis-ci
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:09:27 +01:00
Michael Kaufmann
4dca2d6217 travis-ci testing...
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:00:40 +01:00
Michael Kaufmann
eab88abd54 Merge pull request #596 from foliengriller/composer-json
Adds first composer.json file
2018-11-26 20:00:08 +01:00
Michael Kaufmann
ea3c49befe Update composer.json 2018-11-26 19:56:39 +01:00
Michael Kaufmann
e1bfb2690d Update composer.json 2018-11-26 19:53:34 +01:00
Michael Kaufmann
091f92400b move integer-conversion of array to the place where the array is known
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 12:21:02 +01:00
Michael Kaufmann
18df961381 ensure allowed_phpconfigs parameter for Customers.add() and Customers.edit() is an integer-array, fixes #598
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 12:14:53 +01:00
Michael Kaufmann
18c49e4c48 Merge pull request #595 from foliengriller/gitignore
Improves gitignore and deletes unused .keep in /logs
2018-11-26 06:51:53 +01:00
Michael Rosenberger
4da9d4c7c0 Adds first composer.json file 2018-11-25 23:24:30 +01:00
Michael Rosenberger
9a528532d2 Improves gitignore and deletes unused .keep in /logs 2018-11-25 21:49:41 +01:00
Michael Kaufmann
96addebdf3 Merge pull request #594 from Broatcast/patch-1
Change formfield id for new admins
2018-11-25 17:42:06 +01:00
Michael Kaufmann
49adcb6886 Merge branch 'heavygale-master' 2018-11-25 17:38:05 +01:00
Michael Kaufmann
ed86c2a892 Merge branch 'master' of https://github.com/heavygale/Froxlor into heavygale-master 2018-11-25 17:37:52 +01:00
Robert Kuntz
7c7ef5be09 Change formfield id for new admins
little Bug, requested "new_loginname" instead of "loginname"
2018-11-25 17:30:48 +01:00
Michael Kaufmann
c269cd5c5c added unit-tests for version-check; implemented settings import/export in API; minor variable declarations
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-25 11:17:56 +01:00
Michael Kaufmann
f6e0298d25 more api-documentation and code-formatting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-25 10:04:09 +01:00
Michael Kaufmann
983e1ce6ad add more api documenation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-24 19:49:27 +01:00
Michael Kaufmann
a87f1c5561 trim ip-addresses for validation as they are invalid with leading/trailing spaces
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-24 07:53:08 +01:00
Michael Kaufmann
9d82f0d269 Merge pull request #593 from foliengriller/master
Improves CSS in installer
2018-11-23 14:55:14 +01:00
Michael Rosenberger
32b5bef221 Improves CSS in installer
Correct alignment of radio options
Fixes design-problem with chrome
2018-11-23 14:34:11 +01:00
Michael Kaufmann
50eec8d8a7 Merge pull request #592 from foliengriller/master
Some minor CSS improvements
2018-11-23 11:18:45 +01:00
Michael Kaufmann
fc8373f6b6 fix unit-test testCustomerEmailForwardersDelete() to comply with new testCustomerEmailForwardersAddWithSpaces()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-23 09:06:23 +01:00
Michael Kaufmann
1d3d8d0f28 trim email address when added as forwarder, fixes #591
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-23 09:03:35 +01:00
Michael Rosenberger
b9e4adc634 Some minor CSS improvements
- Removes unit if value is 0
- Uses shorthand notation where possible

Signed-off-by: Michael Rosenberger <mr@simpelwebservice.de>
2018-11-22 23:38:54 +01:00
Michael Kaufmann
3a3b35b2eb add ipv6 support for resolving nameserver-hostnames
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-21 19:26:19 +01:00
Michael Kaufmann
8a565532b2 more api-doc
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-19 20:38:18 +01:00
Michael Kaufmann
02ba4b5f67 Merge branch 'master' of github.com:Froxlor/Froxlor 2018-11-18 20:35:47 +01:00
Michael Kaufmann
b032f5b2ba add dhparams for webserver/ssl, refs #519
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-18 20:35:27 +01:00
Michael Kaufmann
758111a7c1 Merge pull request #589 from heavygale/patch-2
Update list.tpl
2018-11-18 15:20:34 +01:00
Max
ba124c99af Update list.tpl 2018-11-18 15:09:59 +01:00
Michael Kaufmann
776bb56b24 add more phpdoc to DomainZones ApiCommand; minor fixes in DirOptions and DirProtections
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-18 15:07:06 +01:00
Michael Kaufmann
d2024e06ff more phpdoc in DirOptions and DirProtections
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-18 14:54:20 +01:00
Michael Kaufmann
8c8be45769 added more phpdoc for api-documentation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-18 14:39:20 +01:00
Michael Kaufmann
892d259805 Also remove DNS zones of deleted Subdomains, refs #581
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-17 20:19:29 +01:00
Michael Kaufmann
13c624400e remove domain from pdns database if removed or updated so nameserver is disabled (remove) or update of db triggered when isemaildomain option is disabled, fixes #581
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-17 20:14:58 +01:00
Michael Kaufmann
e184201327 minor cosmetic changes and new create_customer api example
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-13 08:30:41 +01:00
Michael Kaufmann
059e36aa78 finish testing of Traffic ApiCommand
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-12 07:44:35 +01:00
Michael Kaufmann
18aa8eb5d2 added Traffic.listing ApiCommand; added first Unit-Tests for Traffic-Api; SQL IN-clause cannot be prepared, replaced all occurances accordingly; added --no-fork parameter to traffic-cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-11 21:51:39 +01:00
Michael Kaufmann
41acbc745c Merge remote-tracking branch 'origin/0.10.0' 2018-11-10 12:03:23 +01:00
Michael Kaufmann
ab81004bf2 Merge branch 'master' into 0.10.0 2018-11-10 11:58:17 +01:00
Michael Kaufmann
d80cf6525c Merge remote-tracking branch 'origin/master' into 0.10.0 2018-11-10 11:55:39 +01:00
Michael Kaufmann
247efb1c0a set version to 0.9.40 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-10 11:34:50 +01:00
Michael Kaufmann
e1b62d3af4 outsource apihelp to api.froxlor.org
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-10 07:17:13 +01:00
Michael Kaufmann
b340221055 update Traffic Api-Command
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-29 08:56:23 +01:00
Michael Kaufmann
e16ea186dc add some more unit-tests for Cronjobs and PhpSettings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-28 13:47:19 +01:00
Michael Kaufmann
ce2722d429 forgot to tell phpunit which files is being covered, stupid copy'n'paste
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-28 09:00:04 +01:00
Michael Kaufmann
e0a195e3bc forgot to add tests/Cronjobs to the unit-test directories
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-28 08:57:43 +01:00
Michael Kaufmann
899a7ac189 add Cronjobs API command ad unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-28 08:53:25 +01:00
Michael Kaufmann
fb4d379047 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-10-27 19:57:55 +02:00
Michael Kaufmann
98c55435ae Merge pull request #583 from heavygale/patch-1
Update archive.tpl
2018-10-27 17:14:28 +02:00
Max
981f5840b3 Update archive.tpl 2018-10-27 14:57:27 +02:00
Michael Kaufmann
4efdb0cd66 add example of API usage
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-27 10:56:42 +02:00
Max
06dcaeacb5 Update german.lng.php 2018-10-21 12:02:10 +02:00
Max
14112bf5d7 Update german.lng.php 2018-10-20 16:39:21 +02:00
Max
c55ef54937 Update german.lng.php 2018-10-20 16:37:24 +02:00
heavygale
2e65de176b Update lng/german.lng.php 2018-10-20 16:10:27 +02:00
Michael Kaufmann
3b31cd8432 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-10-20 14:06:19 +02:00
Michael Kaufmann
c1809fc084 Merge pull request #579 from quthla/patch-1
Add TLSv1.3
2018-10-20 14:02:17 +02:00
quthla
090bdaaea8 Add TLSv1.3 2018-10-20 13:29:25 +02:00
Michael Kaufmann
611bec6849 Merge pull request #578 from stweil/lgtm
Fix warnings from LGTM
2018-10-17 11:55:36 +02:00
Stefan Weil
8cf797374d Add missing variable declarations
This fixes warnings from LGTM:

    Variable i is used like a local variable,
    but is missing a declaration.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-17 11:49:59 +02:00
Stefan Weil
20177e06fc Add missing semicolons
This fixes warnings from LGTM:

    Avoid automated semicolon insertion (91% of all statements
    in the enclosing function have an explicit semicolon).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-17 11:45:25 +02:00
Severin Leonhardt
d76df274f4 Make writing AccessLog and ErrorLog optional 2018-10-11 19:07:09 +02:00
Michael Kaufmann
95b305b865 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-10-11 14:57:53 +02:00
Michael Kaufmann
aa6f3d33eb clearify description and enhance validation for path-field in backup-job-planning
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-11 14:52:45 +02:00
Michael Kaufmann
b6e4dbd70a fix saving of apikey allowed-from setting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-09 10:37:27 +02:00
Michael Kaufmann
854986abcb add some more function-doc; add setting to enable/disable api in system-settings; added last three api-command classes (empty so far)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-08 09:35:15 +02:00
Michael Kaufmann
c35407bc94 fix undefined debug-flag if not present
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-30 10:18:19 +02:00
Michael Kaufmann
5752f7b64e Merge remote-tracking branch 'origin/master' into 0.10.0 2018-09-30 10:04:15 +02:00
Michael Kaufmann
23d4bee184 add override-required info to php-config edit formfields like in add formfields, refs #573
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-28 11:00:56 +02:00
Michael Kaufmann
37988fa645 forgot to add override_fpmconfig flag to panel_phpconfigs, refs #573
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-28 10:57:43 +02:00
Michael Kaufmann
6c7ee0c222 add possibility to specify pm-related settings per php-config (if override of fpm-daemon settings is set to yes), fixes #573
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-28 10:55:08 +02:00
Michael Kaufmann
108c4c25b3 move 'enable http/2' setting from froxlor-vhost-settings to webserver-settings, fixes #575
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-26 13:29:30 +02:00
Michael Kaufmann
095e54d88d fix missing update in version.inc.php
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-25 08:17:31 +02:00
Michael Kaufmann
70cb760862 fix missing update in version.inc.php
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-25 08:16:54 +02:00
Michael Kaufmann
738e629eec Merge remote-tracking branch 'origin/master' into 0.10.0 2018-09-25 08:14:16 +02:00
Michael Kaufmann
bd036a0fde remove unnecessary string-break; use standardlanguage-variable as fallback language for installer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-25 08:12:21 +02:00
Michael Kaufmann
f766c6f920 Merge pull request #572 from markuspetermann/master
Fixed class.lescript_v2.php to work with ACMEv2
2018-09-25 08:09:16 +02:00
Markus Petermann
4588bc7f5c Merge branch 'master' of github.com:markuspetermann/Froxlor 2018-09-19 15:14:46 +02:00
Markus Petermann
9e289a2380 Fixed class.lescript_v2.php to work with ACMEv2
Account(kid) needs to be saved for future requests.
Install/Update part is untested.
2018-09-19 15:11:27 +02:00
Michael Kaufmann
f0edf97ac7 do not follow url location/redirect when using LE selfcheck
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-19 11:15:42 +02:00
Michael Kaufmann
91195fda89 check for all needed php extensions and mysqldump tool in setup process, fixes #569
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-19 11:15:03 +02:00
Michael Kaufmann
6161ad1bd3 make CURLOPT_FOLLOWLOCATION optional in HttpClient::urlGet
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-19 11:09:27 +02:00
Michael Kaufmann
f72d87228b restrict sending of emails when user is locked
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-19 11:07:54 +02:00
Markus Petermann
4f0acd176a Fixed class.lescript_v2.php to work with ACMEv2
Account(kid) needs to be saved for future requests.
Install/Update part is untested.
2018-09-18 02:20:17 +02:00
Markus Petermann
5f29b2cc4a Fixed class.lescript_v2.php to work with ACMEv2
When requesting a certificate for multiple Domains/SANs, the request must be done in a single order.
2018-09-18 00:53:51 +02:00
Michael Kaufmann
164f1a921e Merge pull request #570 from markuspetermann/patch-1
Fixed class.lescript_v2.php to work with ACMEv2
2018-09-15 13:25:01 +02:00
markuspetermann
94c4d52476 Fixed class.lescript_v2.php to work with ACMEv2
As GET /document never returns any Reply-Nonce Header, getLastNonce() caused an infinite loop.
The Content-Type for v2 must be application/jose+json.
2018-09-15 12:41:27 +02:00
Michael Kaufmann
174739bc0c Merge remote-tracking branch 'origin/master' into 0.10.0 2018-08-15 10:59:36 +02:00
Michael Kaufmann
b777053133 allow a higher amount of diskspace and traffic to be entered in the forms, fixes #560
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-08-15 10:59:16 +02:00
Michael Kaufmann
d0c2888508 Merge pull request #494 from xelaz/master
extend nginx letsencrypt (.well-known) redirect regex to https
2018-08-15 08:03:45 +02:00
Michael Kaufmann
ff8afef614 Merge pull request #563 from Froxlor/revert-561-patch-1
Revert "acme challenges can include hyphens (-)"
2018-08-12 18:11:45 +02:00
Michael Kaufmann
a28b2e8115 Revert "acme challenges can include hyphens (-)" 2018-08-12 18:11:36 +02:00
Michael Kaufmann
b0e348a2c5 Merge pull request #561 from oliverrahner/patch-1
acme challenges can include hyphens (-)
2018-08-12 17:09:03 +02:00
Oliver Rahner
512abda38d acme challenges can include hyphens (-)
made a small adjustment so that acme challenges like "CrgFuFZU-U7mwXxjjHZi8if851XGVjdPRtWN91LTWmM" also don't get redirected
2018-08-09 16:33:27 +02:00
Michael Kaufmann
963c7c4616 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-07-10 09:47:20 +02:00
Michael Kaufmann
1690cadab9 show link to clear plaintext email account passwords if enabled; set store-plaintext-passwords default to 'off'; fixes #557
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-07-10 09:47:01 +02:00
Michael Kaufmann
9e7715430b fix editing api-keys as customer
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-23 09:27:56 +02:00
Michael Kaufmann
4f69571e1c do not reload current page after apikey modification to prevent unwanted actions being executed (addKey)
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-22 10:13:48 +02:00
Michael Kaufmann
d4312fc481 update jquery/jquery-ui; fininshed api_key editing (needs a bit more validating); added PhpSettings-Unit-test
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-22 10:05:04 +02:00
Michael Kaufmann
f1d91dfef8 interface adjustments for apikey interaction
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-21 08:21:27 +02:00
Michael Kaufmann
f198833f8c Merge remote-tracking branch 'origin/master' into 0.10.0 2018-06-21 08:12:00 +02:00
Michael Kaufmann
da99398561 update jquery-ui
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-21 07:55:35 +02:00
Michael Kaufmann
436d141bd1 fix ticket access when posting answer
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-21 07:52:11 +02:00
Michael Kaufmann
aa881560cc deny access to tickets not owned by current user, thx to chbi
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-19 21:46:11 +02:00
Michael Kaufmann
06ef81cc5b adjust year in copyright in std-customer-index file, thx to demlak
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-17 09:41:31 +02:00
Michael Kaufmann
4a99e4ba57 Merge pull request #556 from nachtgeist/master
fix triggering an LE CSR when changing www on a main domain, fixes #526
2018-06-05 07:52:03 +02:00
Daniel Reichelt
2ba4137e7d fix triggering an LE CSR when changing www on a main domain
Prior to this, LE CSRs were triggered only when the wwwserveralias was
changed on alias domains, but not on main domains.

Fixes #526
2018-06-05 06:51:20 +02:00
Daniel Reichelt
72835c56ad trim trailing whitespace 2018-06-05 06:51:10 +02:00
Michael Kaufmann
d39cebc70e Merge remote-tracking branch 'origin/master' into 0.10.0 2018-06-01 08:01:09 +02:00
Michael Kaufmann
b80bdcbc4f forgot to add version file
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-29 15:54:44 +02:00
Michael Kaufmann
c1e62e6be7 get rid of serialization completely to avoid possible code execution, fixes #555
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-29 15:47:41 +02:00
Michael Kaufmann
10330f8a7a fix fallback redirect code when customredirect is enabled and default is selected
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-24 17:44:36 +02:00
Michael Kaufmann
18fb422a69 correct order of settings
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-24 14:50:52 +02:00
Michael Kaufmann
f8236dff7b fix not quite correctly webserver-log-piping
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-24 14:44:59 +02:00
Michael Kaufmann
8ccb898aa9 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-05-24 13:25:24 +02:00
Michael Kaufmann
bad680cfdb enhancements for webserver-log settings
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-24 13:23:37 +02:00
Michael Kaufmann
5a070d6d91 add settings to customize webserver logs
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-24 11:36:13 +02:00
Robert Förster (Dessa)
07a3f76568 remove wheezy configs 2018-05-10 16:42:27 +02:00
Michael Kaufmann
d07d63e240 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-05-07 10:57:55 +02:00
Michael Kaufmann
67b95a301b check only for existing .conf files when trying to find out whether a fpm pool config directory is empty; fixes #543
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-06 14:38:18 +02:00
Michael Kaufmann
926914788f Merge remote-tracking branch 'origin/master' into 0.10.0 2018-04-25 12:30:00 +02:00
Michael Kaufmann
6f9187d1bb Merge branch 'master' of github.com:Froxlor/Froxlor 2018-04-25 12:29:41 +02:00
Michael Kaufmann
84b8cda7ac allow usage of up to 255 characters in a txt record, fixes #548
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-04-25 12:29:30 +02:00
Michael Kaufmann
75616cc727 fix typo in german language file
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-04-25 12:27:59 +02:00
Michael Kaufmann
b3d018c506 corrected usage of default redirect code from settings; fixes #546
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-04-25 12:27:40 +02:00
Robert Förster (Dessa)
2508d855e3 deprecate precise, as xenial configs are now available 2018-04-03 13:12:32 +02:00
Erik
a21f3c5a3f added xenial.xml (#533)
* added xenial.xml

* fixed touch commands as in commit 3c802038f2

* changed a2dismod php to a2dismod php7.0

* fixed overlooked a2dismod php to a2dismod php7.0
2018-04-03 12:59:14 +02:00
Michael Kaufmann (d00p)
060115c5e9 added new ApiParameterTest
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-04-01 10:35:55 +02:00
Michael Kaufmann (d00p)
697d972fba Merge remote-tracking branch 'origin/master' into 0.10.0 2018-04-01 10:35:33 +02:00
Michael Kaufmann (d00p)
3f69c97874 opzimize ApiParameter::getModFunctionString(); corrected FpmDaemons::update(); added a few more unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-04-01 10:31:38 +02:00
Michael Kaufmann (d00p)
85407abfb4 optimize stats-folder-decision in Customers-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-04-01 09:59:25 +02:00
Michael Kaufmann
20d9be537a Merge pull request #542 from d00p/patch-1
Update README.md
2018-03-29 13:11:11 +02:00
Michael Kaufmann
30d39d622d Update README.md 2018-03-29 13:10:33 +02:00
Michael Kaufmann (d00p)
e58192edc2 show whether curl extension is installed when trying to check for a new version in admin-dashboard
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-29 11:11:39 +02:00
Michael Kaufmann (d00p)
d15e4a8270 more unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-27 14:43:24 +02:00
Michael Kaufmann (d00p)
45d7307a8f fix phpunit test for FpmDaemonTest
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-26 14:33:43 +02:00
Michael Kaufmann (d00p)
bf3ae3009f add tests/PhpAndFpm to phpunit-testsuite
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-26 14:28:32 +02:00
Michael Kaufmann (d00p)
cb3d5f3488 unit-test FpmDaemons-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-26 14:26:05 +02:00
Michael Kaufmann (d00p)
efb416ae7c phpdoc for Admins-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-26 10:13:51 +02:00
Michael Kaufmann (d00p)
c98be3c04f finished unit-tests for Mysqls-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-26 09:53:09 +02:00
Michael Kaufmann (d00p)
6006b16c95 added first test for Mysqls-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-25 12:38:57 +02:00
Michael Kaufmann (d00p)
c149cbacf7 more DomainZones unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-23 13:35:50 +01:00
Michael Kaufmann (d00p)
48d7110779 add first unit tests for DomainZones ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-22 14:56:18 +01:00
Michael Kaufmann (d00p)
bd7f2c2654 add unit-tests for CustomerBackup-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-21 20:22:43 +01:00
Michael Kaufmann (d00p)
5123b5fccd fix error-display in dns_editor.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-20 08:55:14 +01:00
Michael Kaufmann (d00p)
190c95baca created DomainZones ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-19 21:25:23 +01:00
Michael Kaufmann (d00p)
975d46044d added unit-tests for DirOptions
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-19 20:38:59 +01:00
Michael Kaufmann (d00p)
bf589cdec8 forgot to check for customer-id in CustomerBackups.delete()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-19 10:52:38 +01:00
Michael Kaufmann (d00p)
715e5f7a64 fix update of domain as admin if domain is a std-subdomain; fix update of mysql-entry; add CustomerBackups-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-19 10:45:12 +01:00
Michael Kaufmann (d00p)
dfcb7160cb fix global lng-array
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-18 08:45:20 +01:00
Michael Kaufmann (d00p)
f5654d5931 fix var-names in DirOptions-ApiCommand; fix pmd issues
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-18 08:42:22 +01:00
Michael Kaufmann (d00p)
2bf5fde0e5 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-16 09:19:52 +01:00
Michael Kaufmann (d00p)
be0099bf01 add duplicate check to switch-server-ip script
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-16 09:18:02 +01:00
Michael Kaufmann (d00p)
7a68dfc450 DirProtections and DirOptions stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-15 19:35:56 +01:00
Michael Kaufmann (d00p)
858a9ba6a4 added DirProtections.update() and various unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-15 11:01:17 +01:00
Michael Kaufmann (d00p)
f2809c47ac finished DirProtections.add() and some basic tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-14 19:41:12 +01:00
Michael Kaufmann (d00p)
616fb77de5 check for installed/configured froxlor in api.php and return 404 if not
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-14 18:13:32 +01:00
Michael Kaufmann (d00p)
b03d41087a Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-14 11:41:42 +01:00
Michael Kaufmann (d00p)
724e88b94f rename handler php5-fastcgi to php-fastcgi, just cosmetics; fixes #536
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-14 11:37:45 +01:00
Michael Kaufmann (d00p)
3c802038f2 split touch-command for multiple files into single ones, fixes #535
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-14 11:35:03 +01:00
Michael Kaufmann (d00p)
fe385b7800 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-13 10:41:01 +01:00
Michael Kaufmann (d00p)
38b57117e2 minor fixes in froxlor-sql file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-13 10:40:45 +01:00
Michael Kaufmann (d00p)
7e47383ee3 ignore NumberOfChildren pmd warning
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 22:12:16 +01:00
Michael Kaufmann (d00p)
ae3d954766 started work on DirProtections-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 22:07:51 +01:00
Michael Kaufmann (d00p)
52da7ad40f exclude some irritating pmd rules #2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 21:47:14 +01:00
Michael Kaufmann (d00p)
309e613c83 exclude some irritating pmd rules
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 21:40:19 +01:00
Michael Kaufmann (d00p)
05857985f8 add more tests for Email-ApiCommands
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 21:29:03 +01:00
Michael Kaufmann (d00p)
a7523bbdea add domainid to result-list of Emails.get(); fix typo in EmailAccounts.add(); enhance debugging in Database-class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 15:52:34 +01:00
Michael Kaufmann (d00p)
54deec87d0 add a few emails-apicommand unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 15:41:08 +01:00
Michael Kaufmann (d00p)
f0e084ef0e minor fixes in EmailAccounts.update()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 14:17:45 +01:00
Michael Kaufmann (d00p)
fa7bb53d58 added EmailAccounts-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 14:13:35 +01:00
Michael Kaufmann (d00p)
6fc8cce8f5 add EmailAccounts.add; added wrapper function ApiCommand.getMailTemplate() to reduce code-duplication
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 13:44:44 +01:00
Michael Kaufmann (d00p)
2e597ef7d9 remove unused local variables
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 11:09:30 +01:00
Michael Kaufmann (d00p)
ff611fa8dc fix parameter for ApiCommand::getCustomerData()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 10:57:31 +01:00
Michael Kaufmann (d00p)
c920bf6a63 some code-reduction
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 10:45:46 +01:00
Michael Kaufmann (d00p)
66ebfaf21b Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-12 10:23:53 +01:00
Michael Kaufmann (d00p)
349fa7a761 avoid possible undefined index if no issuer-organisation is set in a certificate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 10:22:50 +01:00
Michael Kaufmann (d00p)
81bd9d945d fix parameter customerid for Emails.add() in unit-test
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-11 10:26:05 +01:00
Michael Kaufmann (d00p)
b205f8ea5d add EmailFowarders ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-11 10:24:17 +01:00
Michael Kaufmann (d00p)
7b52c0c78c fix default value of panel.no_robots settings; add phpdoc for Database-class-methods
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-08 17:03:17 +01:00
Michael Kaufmann (d00p)
164650adc3 added Emails.update() and Emails.delete() commands
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-08 11:49:28 +01:00
Michael Kaufmann (d00p)
9e97e82990 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-06 21:08:02 +01:00
Michael Kaufmann (d00p)
cd5cef51e8 allow config and settings json file for config-services.php to be downloaded from a remote url
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 21:07:08 +01:00
Michael Kaufmann (d00p)
231159a6c6 added first methods of Emails ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 14:02:27 +01:00
Michael Kaufmann (d00p)
a83031504f implement generating of api-key for customer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 12:43:24 +01:00
Michael Kaufmann (d00p)
893fd0774c implement deleting of api-keys via webinterface
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 12:26:41 +01:00
Michael Kaufmann (d00p)
704188fe27 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-06 11:06:31 +01:00
Michael Kaufmann (d00p)
a621fd3b09 run cronjob at the end of config-services script (when using --apply), thx v3ng
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 11:05:26 +01:00
Michael Kaufmann (d00p)
0c43c5d2b5 backport config-services --import-settings parameter from 0.10.0
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 10:52:57 +01:00
Michael Kaufmann (d00p)
864331d371 code reduction; added unit-tests for Certificates-Command; minor fixes here and there
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-05 23:35:00 +01:00
Michael Kaufmann (d00p)
f5ec759d99 added Certificates-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-05 14:21:36 +01:00
Michael Kaufmann (d00p)
b2e2590324 implemented SubDomains.update; minor fixes and enhancements in Domains-Command and validateUrl-function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-05 12:13:01 +01:00
Michael Kaufmann (d00p)
ae4a7ff943 wrap ip-validating in Domains-ApiCommand to reduce duplicate code
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-05 08:12:08 +01:00
Michael Kaufmann (d00p)
a869bc58cd fix wrong variable-name in SubDomains.listing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-04 19:47:48 +01:00
Michael Kaufmann (d00p)
cfa07bab47 simplified and wrapped internal api calls
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-04 18:30:16 +01:00
Michael Kaufmann (d00p)
b664917147 fix sql variable in Admins.delete
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-04 12:44:31 +01:00
Michael Kaufmann (d00p)
b12392f0a9 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-04 12:40:55 +01:00
Michael Kaufmann (d00p)
b07d6ceeaa started UI api-key management
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-04 12:40:47 +01:00
Michael Kaufmann
aff6d82321 Merge pull request #531 from Crease29/patch-1
Link domains to HTTPS in certificate list
2018-03-04 12:11:12 +01:00
Kai Neuwerth
91cecf8c1e Link domains to HTTPS in certificate list
As an admin I want to check if the certificate of a website is working.
Therefore I click on the domain in the SSL certificate list and have to prepend "https" to the URL later.
In this case I'd link the domain to HTTPS initially.
2018-03-04 11:43:50 +01:00
Michael Kaufmann (d00p)
702b52d13e forgot to save again
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 21:42:34 +01:00
Michael Kaufmann (d00p)
bb3fddb08f optimize phpmd config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 21:39:51 +01:00
Michael Kaufmann (d00p)
7cc17b9ca5 fix short variables
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 21:29:16 +01:00
Michael Kaufmann (d00p)
f30887e3c0 removed unused local variables
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 21:26:37 +01:00
Michael Kaufmann (d00p)
0d7afc5c24 fixes in move-domain-to-another-customer functionality in Domains.update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 21:10:58 +01:00
Michael Kaufmann (d00p)
826f1378d2 minor fixes to Domains.update + another unit-test
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 15:55:23 +01:00
Michael Kaufmann (d00p)
6d8b22dccf Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-03 14:58:46 +01:00
Michael Kaufmann
26c3c8e6f0 Merge pull request #527 from JB1985/patch-2
Update german.lng.php
2018-03-03 14:58:38 +01:00
Michael Kaufmann (d00p)
0f6cc05089 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-03 14:58:06 +01:00
Michael Kaufmann
08814f8c9a Merge pull request #530 from michaelzangl/fix-hostname-error-message
Fix hostname error message
2018-03-03 14:57:22 +01:00
Michael Kaufmann
632eb98df9 Merge pull request #529 from michaelzangl/fix-installer-path
Froxlor installer: Use same file path for chmod.
2018-03-03 13:05:59 +01:00
Michael Zangl
909c983aec Fix invalidhostname error message (de). 2018-03-03 11:49:58 +01:00
Michael Zangl
8642254175 Fix invalidhostname error message. 2018-03-03 11:48:26 +01:00
Michael Zangl
7e81b0bb5a Froxlor installer: Use same file path for chmod. 2018-03-03 11:18:28 +01:00
Michael Kaufmann (d00p)
22a48cac33 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-02 19:37:32 +01:00
Michael Kaufmann (d00p)
20eaa7bc08 fix missing sql-prepared-statement parameter, fixes #528
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-02 19:36:56 +01:00
Michael Kaufmann (d00p)
1605d2af07 enhance phpdox config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-02 18:25:06 +01:00
JB1985
abb94c9189 Update german.lng.php
Übersetzung Änderung von Lets Encrypt
2018-03-02 17:28:30 +01:00
Michael Kaufmann (d00p)
cadb6618ec list() is a reserved php keyword, changed ApiCommand::list() to ApiCommand::listing()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-02 17:22:47 +01:00
Michael Kaufmann (d00p)
594512404f optimized CustomersTest and DomainsTest; minor fixes in SubDomains-ApiCommand; added more tests for SubDomains-Command
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-02 15:24:46 +01:00
Michael Kaufmann (d00p)
aeb8655cc3 fix sql query in Domains.get; minor fixes in Domains.update; first unit-test for Domains.update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-01 19:59:27 +01:00
Michael Kaufmann (d00p)
601d16b17c minor fixes in Domains.add; added more tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-01 19:41:57 +01:00
Michael Kaufmann (d00p)
02616d3080 minor fixes and first tests for Domains-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-01 16:46:47 +01:00
Michael Kaufmann (d00p)
2bf5e90a77 add testsuite parameter to phpunit to respect our required test-order; minor fixes in Domains- and SubDomains Command
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 18:07:43 +01:00
Michael Kaufmann (d00p)
75bc6d32ab minor fixes in SubDomains.add; first Unit-Tests for SubDomains-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 17:10:52 +01:00
Michael Kaufmann (d00p)
3e0b551416 fix copy'n'paste fail
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 15:56:05 +01:00
Michael Kaufmann (d00p)
a038e35e45 added Subdomains.add; minor fixes and enhancements
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 15:54:07 +01:00
Michael Kaufmann (d00p)
6318e5514b ignore some more checkstyle rules
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 10:54:03 +01:00
Michael Kaufmann (d00p)
392db944a2 started work in SubDomains-ApiCommand; minor fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 10:34:37 +01:00
Michael Kaufmann (d00p)
b097c19c0a correct phpcs config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 09:30:57 +01:00
Michael Kaufmann
b46d3a3769 Update README.md
new test :)
2018-02-27 08:59:49 +01:00
Michael Kaufmann
a2172329cd Update README.md
added CI build-status
2018-02-27 08:50:54 +01:00
Michael Kaufmann (d00p)
309b70c0f8 completed Ftps-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 08:23:19 +01:00
Michael Kaufmann (d00p)
4b9ed8ee39 use correct order
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 22:39:06 +01:00
Michael Kaufmann (d00p)
2599f61b32 add jenkins build.xml and more; added first unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 22:35:04 +01:00
Michael Kaufmann (d00p)
9a4359e010 fix IpsAndPorts.delete
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 19:56:03 +01:00
Michael Kaufmann (d00p)
4d89f614e3 remove unnecessary checks as getParam() validates the existance already
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 18:08:43 +01:00
Michael Kaufmann (d00p)
4fad0def1e fix mailer variable and fix typo in Ftps.add and Ftps.delete
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 18:02:18 +01:00
Michael Kaufmann (d00p)
c093783904 forgot the mailobject :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 16:02:09 +01:00
Michael Kaufmann (d00p)
257855b43b fix typo in field-value for ApiCommand::getUserDetail()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 16:00:54 +01:00
Michael Kaufmann (d00p)
55ec20be10 use Ftps.add in webinterface
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 15:55:49 +01:00
Michael Kaufmann (d00p)
b0f355ba2f fixed in Mysqls.add, added Ftps.add
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 15:49:41 +01:00
Michael Kaufmann (d00p)
ceb8619552 preparations for assign-multiple-ips-to-an-admin in Api, not in webinterface yet
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 12:15:48 +01:00
Michael Kaufmann (d00p)
6191ee6fba add Ftps.list and Ftps.delete
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 09:36:58 +01:00
Michael Kaufmann (d00p)
c9256c0020 add 'adminname' to result in Customers.get; fix Customers.move and return customer-data there instead of just true
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 09:01:13 +01:00
Michael Kaufmann (d00p)
592c9ed0b9 automatically trim() all parameters given
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 08:21:56 +01:00
Michael Kaufmann (d00p)
4a1decf359 do not update fields of customer a customer cannot even change; unset custom_notes when admin of customer set custom_notes_show to 0
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 07:51:44 +01:00
Michael Kaufmann (d00p)
ae42e87a64 fix in Admins.update; code-format Customers ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 21:26:51 +01:00
Michael Kaufmann (d00p)
5c330505ea correct Admins.update and Admins.delete
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 20:47:36 +01:00
Michael Kaufmann (d00p)
c65d95c1ef Merge remote-tracking branch 'origin/master' into 0.10.0 2018-02-25 18:29:28 +01:00
Michael Kaufmann (d00p)
2b366c8f23 add field for fullchain to be stored in ssl-certificates-table; create fullchain file if given (it's not used by froxlor); do not generate/renew certificates for disabled customers domains
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 18:22:15 +01:00
Michael Kaufmann (d00p)
e66dde2e64 id <> loginname, grrr
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 17:08:30 +01:00
Michael Kaufmann (d00p)
f32a1921c5 re-read admin/customer when adding/updating so we return the fields from the table, not the placeholders of the prepared-statement
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 17:03:49 +01:00
Michael Kaufmann (d00p)
0958d07f23 fixes in Admins and Customers ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 16:49:24 +01:00
Michael Kaufmann (d00p)
a222114d0a remove unnecessary parameter-checks as they will never happen; make Customers.update callable for customers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 15:02:58 +01:00
Michael Kaufmann (d00p)
243b68cc37 minor changes for testing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 11:47:28 +01:00
Michael Kaufmann (d00p)
2f30d85d32 minor changes in ApiCommand; added Ftps.get ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 20:52:21 +01:00
Michael Kaufmann (d00p)
ca07621de7 reduce mysql-usage counter for admins too when deleting a mysql-database
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 20:12:57 +01:00
Michael Kaufmann (d00p)
e5a1b504d7 consistency replace dbserver with mysql_server everywhere
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 16:52:14 +01:00
Michael Kaufmann (d00p)
20aac1ccd4 finish Mysqls.update, untested
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 16:46:56 +01:00
Michael Kaufmann (d00p)
bda652f947 tiny fixes in Domains.add and Domains.update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 16:26:47 +01:00
Michael Kaufmann (d00p)
87912a9e07 refactored moveCustomerToAdmin() function to Customers.move ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 16:06:53 +01:00
Michael Kaufmann (d00p)
0bf430e0c1 let customers edit password, def-language and theme in Customers.edit
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 15:02:49 +01:00
Michael Kaufmann (d00p)
d2aaf84eff added Mysqls.add
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 12:13:47 +01:00
Michael Kaufmann (d00p)
b5ebe48715 forgot to save this one
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 11:01:29 +01:00
Michael Kaufmann (d00p)
9a61a56732 enhance phpdoc and add @access to specify which usergroup can use the ApiCommands; add --import-settings parameter to config-services.php CLI script to gain even more automatism when setting up
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 10:57:52 +01:00
Michael Kaufmann (d00p)
81d6a856d9 forgot to hit save :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 19:51:06 +01:00
Michael Kaufmann (d00p)
344ca827e4 beautify api-help in webinterface
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 19:46:57 +01:00
Michael Kaufmann (d00p)
1c4ecdffbf use correct dbserver for getting mysql-size info in Mysqls.get()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 18:24:10 +01:00
Michael Kaufmann (d00p)
831ee221f6 make lng, version, dbversion and branding protected variables of ApiCommand to avoid the need of 'global' statement
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 18:18:31 +01:00
Michael Kaufmann (d00p)
6409fb2dbe started working on Mysqls-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 15:17:22 +01:00
Michael Kaufmann (d00p)
662f537a0d fixes in Admins.update(); use ApiCommand for theme-, language- and password-change
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 12:48:17 +01:00
Michael Kaufmann (d00p)
8e0bfe9d09 add Admins.update()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 11:57:29 +01:00
Michael Kaufmann (d00p)
8930d2a1bf check remote-ip when ip-restriction is set in api_keys table
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 11:08:24 +01:00
Michael Kaufmann (d00p)
d9ec214e17 secure included webinterface-modules; add settings-functions to Froxlor-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 21:05:58 +01:00
Michael Kaufmann (d00p)
dfb5d33a56 add Admins.add()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 16:51:56 +01:00
Michael Kaufmann (d00p)
b42a7b1b26 show basic api doc in webinterface (top-menu - options - API help)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 13:41:28 +01:00
Michael Kaufmann (d00p)
a468fe50df filter deactivated users who want to use the API; fix error-output in Customers::update()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 11:42:13 +01:00
Michael Kaufmann (d00p)
c1875132ef fix unchecked-checkbox value passed to API
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 11:34:40 +01:00
Michael Kaufmann (d00p)
332e29be24 lots of phpdoc; fix Customers::update()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 11:16:55 +01:00
Michael Kaufmann (d00p)
c93e2678f7 make Customers::update() also work with loginname as an alternative to the id
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 10:47:14 +01:00
Michael Kaufmann (d00p)
f8fe4be3ef fix parameters for checkboxes when passed via webinterface
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 14:52:23 +01:00
Michael Kaufmann (d00p)
689ca853c3 minor fixes in Customers and Domains ApiCommands, added list() and get() for Admins-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 14:38:27 +01:00
Michael Kaufmann (d00p)
8310e8554b enable usage of 'domainname' as an alternative to 'id' for Domains::get() and Domains::delete(); enable usage of 'loginname' as an alternative to 'id' for Customers::get() and Customers::delete()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 13:14:54 +01:00
Michael Kaufmann (d00p)
b56414ed0e add sql-query of last statement to sql-debug for debugging purposes; fix default-ssl-ip setting and allow 'none' value
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 12:16:50 +01:00
Michael Kaufmann (d00p)
5480fcbf5d add default-ssl-ip setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 11:50:34 +01:00
Michael Kaufmann (d00p)
26b9c030b5 leave default-values for adding std-subdomain when adding customer from the parameters-array; do not require ipandports parameter when adding domain but rather default to system.defaultip if no ipandport is given
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 10:57:46 +01:00
Michael Kaufmann (d00p)
aef528bea1 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-02-21 08:54:29 +01:00
Michael Kaufmann (d00p)
d5b9ad3452 darn, stay php-5.3 compatible, thx greppy
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-20 21:37:06 +01:00
Michael Kaufmann (d00p)
5437fcdc89 insert tasks to rebuild configs etc. after import of settings, thx to v3ng for noticing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-20 19:15:55 +01:00
Michael Kaufmann (d00p)
b9653c5abd fix company-required check for good now :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-20 19:11:33 +01:00
Michael Kaufmann (d00p)
eabc78c84f enhance check for requirement of company field
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-20 14:21:40 +01:00
Michael Kaufmann (d00p)
033393880d fix typo in variable name
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-20 14:14:47 +01:00
Michael Kaufmann (d00p)
6bcfb81c6c Merge remote-tracking branch 'origin/master' into 0.10.0 2018-02-19 14:10:42 +01:00
Michael Kaufmann (d00p)
b2ac1fb593 add FpmDaemons ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 13:58:39 +01:00
Michael Kaufmann (d00p)
8c6ae4f3a3 add PhpSettings ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 13:36:15 +01:00
Michael Kaufmann (d00p)
131efc544d fix syntax error in lang file, fixes #522
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 12:27:00 +01:00
Michael Kaufmann (d00p)
5524ff7cae fixes in Customers::update()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 11:36:01 +01:00
Michael Kaufmann (d00p)
603e14913b finished Customer::update(), untested
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 10:45:41 +01:00
Michael Kaufmann
160474f2b6 Merge pull request #521 from JB1985/master
Update german.lng.php
2018-02-19 09:03:32 +01:00
JB1985
168738b23a Update german.lng.php
Statt Benutze Lets Encrypt => SSL Zertifikat erstellen (Let\'s Encrypt)
2018-02-19 09:02:34 +01:00
Michael Kaufmann (d00p)
133af365bd enhance ApiCommand::getParam() to specify required and optional parameter
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 08:59:24 +01:00
Michael Kaufmann (d00p)
532551263d add new api-module to output list of possible modules/functions
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-18 10:19:17 +01:00
Michael Kaufmann (d00p)
bdfd601dae Merge remote-tracking branch 'origin/master' into 0.10.0 2018-02-18 10:17:38 +01:00
Michael Kaufmann (d00p)
9619abdad7 when importing settings with enabled ssl flag, validate that the target system has ssl enabled ip's to avoid unexpected behaviour, tthx v3ng for testing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-17 16:00:50 +01:00
Michael Kaufmann (d00p)
fd287e7be4 add apache restart command after enabling modules in config-templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-17 14:51:04 +01:00
Michael Kaufmann (d00p)
5afdbae83a minor phpDoc fixes in Logger classes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 15:50:31 +01:00
Michael Kaufmann (d00p)
7c96164770 fix lng availability; add returncode for not-found messages
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 15:39:59 +01:00
Michael Kaufmann (d00p)
60defd3cdf fix unlimited flags when adding customer; add debug flag to log all api-requests for testing purposes now
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 14:34:55 +01:00
Michael Kaufmann (d00p)
8978dd3a4b std-subdomain <> ip connection is already handled by Domains::add()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 13:55:12 +01:00
Michael Kaufmann (d00p)
1e45da2410 more work on Customer-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 13:27:31 +01:00
Michael Kaufmann (d00p)
2da2912c9c set update-check-urls to api-version; started working on Customers-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 10:56:27 +01:00
Michael Kaufmann (d00p)
4d12a4f37b Merge remote-tracking branch 'origin/master' into 0.10.0 2018-02-16 09:24:14 +01:00
Michael Kaufmann (d00p)
350e3d733a do not check for options if field is disabled, unset enabled-ownvhost flags for fcgid/fpm if the corresponding other one is activated; fixes #518
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 09:22:34 +01:00
Michael Kaufmann (d00p)
81602f17be add Domains api module
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 14:44:48 +01:00
Michael Kaufmann (d00p)
df5fb963c1 make language strings the language the user uses
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 13:03:30 +01:00
Michael Kaufmann (d00p)
0fc2fbaf09 add language strings (english only currently)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 12:59:34 +01:00
Michael Kaufmann (d00p)
a82d5cf764 minor fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 11:37:38 +01:00
Michael Kaufmann (d00p)
2c1f76e6a4 definetly require json extension now
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 07:56:27 +01:00
Michael Kaufmann (d00p)
d068477a93 set version to 0.10.0
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 07:54:21 +01:00
Michael Kaufmann (d00p)
4663f8c6ec converted IpsAndPorts to API
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 07:48:03 +01:00
Michael Kaufmann (d00p)
dd371c72a2 start api implementation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 07:47:35 +01:00
Michael Kaufmann (d00p)
6f91bece17 fix postfix config for postfix/courier on precise and trusty, fixes #516
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 07:44:54 +01:00
Michael Kaufmann (d00p)
5c30961d3c set version to 0.9.39.5 for bugfix release (imap/pop3 ticks not enabled if active in hosting plan when editing hosting plan)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-14 13:31:39 +01:00
Michael Kaufmann (d00p)
edd5ef0ca0 fix correct display of selected checkbox imap/pop3 when editing hosting plan
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-14 07:40:39 +01:00
Michael Kaufmann (d00p)
6befe85656 fix add/edit domain due to wrong access to settings; setting version to 0.9.39.4 for bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 12:23:05 +01:00
Michael Kaufmann (d00p)
27f8c8b438 show domains of disabled customers also as disabled
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 11:49:15 +01:00
Michael Kaufmann (d00p)
fc0c796b68 avoid undefined variables/indexes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 10:58:06 +01:00
Michael Kaufmann (d00p)
482e8c9a11 set version to 0.9.39.3 for maintenance release and upcoming debian package so the new hosting-plan feature is included
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 09:06:49 +01:00
Michael Kaufmann (d00p)
7a664a9990 clean up panel_diskspace/panel_diskspace_admins when removing customer/admin
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 08:21:45 +01:00
Michael Kaufmann (d00p)
372ab5d9c8 add domain flag to avoid generation of nginx try_files directive in webroot which is not suitable for some applications; fixes #461
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 08:12:58 +01:00
Michael Kaufmann (d00p)
de70dbb888 fix checked-property when applying hosting-plan for allowed-phpconfigs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 14:58:17 +01:00
Michael Kaufmann (d00p)
4d7ceb9efe add missing question-string
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 13:33:29 +01:00
Michael Kaufmann (d00p)
bb792f228f add new hosting-plans feature
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 13:28:13 +01:00
Michael Kaufmann (d00p)
017396197e set version to 0.9.39.2 for bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 07:49:07 +01:00
Michael Kaufmann (d00p)
216f013c96 add script to automatically configure services from shell without the need of copy/paste from the interface
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 07:47:51 +01:00
Michael Kaufmann (d00p)
05f1bf0a1f meh, forgot to uncomment the settings storage for settings-import
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 07:46:38 +01:00
Michael Kaufmann (d00p)
295fbae6f5 create bash script to generate proftpd-certificates in case system does not use /bin/bash as shell
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-11 16:10:10 +01:00
Michael Kaufmann (d00p)
ca4c93ac92 set default dns server in config-templates; separate CmdLineHandler from switch-server-ip script for further usage
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-11 13:57:07 +01:00
Michael Kaufmann (d00p)
13b1503bf2 set version to 0.9.39.1 for maintenance release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-10 16:06:57 +01:00
Michael Kaufmann (d00p)
2980397545 fix include path in lib/ajax.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-10 10:13:55 +01:00
Michael Kaufmann (d00p)
5612720342 only let admin select php-configs that the customer is allowed to use to avoid unwanted php-config changes when customer edits domain, refs #514
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-09 13:57:23 +01:00
Michael Kaufmann (d00p)
4d3fa6eca5 get rid of the need for allow_url_fopen
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-09 10:50:14 +01:00
Michael Kaufmann (d00p)
05b4c58aa8 fix updating wrong column when deleting a fpm configuration
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-09 09:20:46 +01:00
Michael Kaufmann (d00p)
f290497b64 fix selected phpfpm daemon when editing php-configuration, fixes #514
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-09 07:33:28 +01:00
Michael Kaufmann (d00p)
b4dd35eed2 correct description of nsswitch.conf file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-08 07:35:06 +01:00
Michael Kaufmann (d00p)
ec21e28000 use md5() instead of base64_encode for dummy-fpm-socket name to avoid possible equal-sign in string which leads to an invalid socket, fixes #513
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-07 15:10:59 +01:00
Michael Kaufmann (d00p)
0aa707ebc9 set version to 0.9.39 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-06 12:19:21 +01:00
Michael Kaufmann (d00p)
f38a0fd8b6 remove unnecessary and out-of-date info from README, fixed variable typo in lib/init.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-05 08:36:25 +01:00
Michael Kaufmann (d00p)
a6b2daa77d fix typo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-30 14:41:56 +01:00
Michael Kaufmann (d00p)
7ae31496ac add requirement check for php-json as settings import/export uses json_decode/json_encode
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-30 07:58:24 +01:00
Michael Kaufmann (d00p)
c62dd2ecf4 fix mysql-strict-mode issue (hopefully for good), enhance error-reporting when importing froxlor.sql on installation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-29 20:04:54 +01:00
Michael Kaufmann (d00p)
840b5ea229 add new feature: import/export of settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-28 14:33:00 +01:00
Michael Kaufmann (d00p)
d8a3015303 put le acme version setting right above the CA setting, less confusing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-27 11:50:34 +01:00
Michael Kaufmann (d00p)
194b7863b8 fix invalid ipv6 value in mysql-access-host setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-27 11:37:06 +01:00
Michael Kaufmann (d00p)
f034695290 remove '/etc/postfix/master.cf: line x: using backwards-compatible default setting chroot=y' warning; set correct permission for dkim-public key as it should not be group or other writable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-27 11:14:22 +01:00
Michael Kaufmann (d00p)
f896fe11a0 do not split dkim-entry content in generateDkimEntries(); re-add braces to enclose TXT record content
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-27 10:09:43 +01:00
Michael Kaufmann (d00p)
2603a9c869 add new setting to specify values for the PATH env-variable for php-fpm
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-26 17:30:20 +01:00
Michael Kaufmann (d00p)
fcd0dddfd5 Update phpMailer to 5.2.26
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-26 17:18:12 +01:00
Michael Kaufmann (d00p)
3fb92259a8 readd starting and ending quotes which got removed with the braces in #503
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-26 17:17:22 +01:00
Michael Kaufmann
54d7b01ac5 Merge pull request #506 from RipClaw2971/http2_fix
http2 could be set even if http2 is not enabled
2018-01-22 14:43:10 +01:00
Michael Kaufmann (d00p)
ca0ab1f97a add fixed dovecot/conf.d/10-ssl.conf template for debian stretch; update phpMailer to 5.2.26
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-21 23:37:09 +01:00
Michael Kaufmann (d00p)
f3733ca249 set apache-2.4 as default ON also in froxlor.sql; fix wrong DbManagerMySQL::disableUser, fixes #505
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-18 19:50:28 +01:00
Andreas Grundler
7442bf7347 http2 Konfiguration nur einfügen wenn http2 in den Einstellungen aktiviert ist 2018-01-18 18:30:38 +01:00
Andreas Grundler
6ac3cb2014 Revert "http2 Konfiguration nur einfügen wenn http2 in den Einstellungen aktiviert ist"
This reverts commit c3fb6f6a1c.
2018-01-18 18:23:08 +01:00
Andreas Grundler
ca76e572a2 http2 Option darf nur dann zu sehen sein wenn http2 in den Einstellungen aktiv ist 2018-01-18 18:18:30 +01:00
Andreas Grundler
c3fb6f6a1c http2 Konfiguration nur einfügen wenn http2 in den Einstellungen aktiviert ist 2018-01-18 18:16:53 +01:00
Michael Kaufmann
1796a8ff17 Merge pull request #503 from lonesomewalker/patch-1
Update class.DnsEntry.php
2018-01-17 07:54:57 +01:00
lonesomewalker
52c7839b9b Update class.DnsEntry.php
Klammerfehler bei Bind, PowerDNS braucht ja keinen Linesplit.
2018-01-16 14:57:42 +01:00
Michael Kaufmann (d00p)
d16a7b2089 on installation, set apache-2.4 as default if apache is detected; clearify that apache2 is 2.2; output complete folder where the userdata.inc.php file is to be put when necessary to avoid misunderstanding
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-15 07:45:50 +01:00
Michael Kaufmann (d00p)
9a00a67f71 apache2-suexec => apache2-suexec-pristine for debian stretch
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-13 11:33:20 +01:00
Michael Kaufmann (d00p)
6e651200ca Make php.ini flag/value possibilities dynamic (settings)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-11 13:04:38 +01:00
Michael Kaufmann (d00p)
29968e6026 add stretch config-templates, testers/feedback welcome
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-11 10:44:42 +01:00
Michael Kaufmann (d00p)
8c61773280 fix usage of extensions from limit_extensions list in apache-cron
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 17:01:17 +01:00
Michael Kaufmann (d00p)
29433ce963 escape possible dots in extension (e.g. to allow .php.xml or similar)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:49:07 +01:00
Michael Kaufmann (d00p)
eed3a91385 fix (not yet perfect) regex for limit_extension setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:45:21 +01:00
Michael Kaufmann (d00p)
62006d584e fix limit_extensions setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:42:11 +01:00
Michael Kaufmann (d00p)
bba872618a fix ssl-procotols in apache-cron; fix files-match regex in apache-cron
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:28:48 +01:00
Michael Kaufmann (d00p)
941dd14c72 read limit_extensions value from wrong array
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:22:22 +01:00
Michael Kaufmann (d00p)
f2a79d4d96 add new security.limit_extensions setting to fpm-daemon settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:20:19 +01:00
Michael Kaufmann (d00p)
281b131c62 ups, forgot to adjust version in lib/version.inc.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 10:21:02 +01:00
Michael Kaufmann (d00p)
4bcdfc0786 Added option to set the TLS protocol versions to be used in webservers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 10:12:26 +01:00
Michael Kaufmann (d00p)
9312e4967e fix access to idle-timeout setting which moved from global settings to per-fpm-daemon setting, thx to gunnyst for pointing this out
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 08:45:20 +01:00
Michael Kaufmann (d00p)
6b44dfe9b2 well, we should also save the new settings :)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 17:22:20 +01:00
Michael Kaufmann (d00p)
ba58991d11 allow per php-config setting of adding '-pass-header Authorization' / 'CGIPassAuth On' to the domains vhosts
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 17:14:57 +01:00
Michael Kaufmann (d00p)
84abb33e54 exclude wildcard-domains agains also vor ACMEv2 of LE2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 17:12:55 +01:00
Michael Kaufmann (d00p)
07a4f045f1 do not advertise wildcard-certificates as it might never be possible in froxlor (no http-01 challenge)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 16:08:13 +01:00
Michael Kaufmann (d00p)
f49cb81e49 disable wildcard-usage with Let's Encrypt as ACME-v2 only supports the dns-01 challenge for now (pity)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 15:33:23 +01:00
Michael Kaufmann (d00p)
b2b9d4e31a add missing setting-strings for new acme-version setting; allow using let's encrypt with wildcard-alias when using ACME-v2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 14:56:41 +01:00
Michael Kaufmann (d00p)
d40d1f30b6 make it a setting to switch between ACME v1 and v2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 14:50:52 +01:00
Michael Kaufmann (d00p)
9aaadb1f8b implement lets-encrypt api-v02 (testing only currently; not activated in froxlor, test with 'php froxlor_master_cronjob.php --letsencrypt_v2 --debug' but set api endpoint to staging); no chain is returned currently, seems to be a known bug
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 14:40:36 +01:00
Michael Kaufmann (d00p)
3969ef63c5 do not check hide-options 'domains' in customer_tickets, fixes #502
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 11:18:03 +01:00
Michael Kaufmann (d00p)
d8abe30c44 create dummy pool-config whenever a fpm-daemons configdir is empty so it still restarts
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 09:25:56 +01:00
Michael Kaufmann (d00p)
eaa10ce6a5 add option to update php-configs for all subdomains when editing a domain as admin (default: yes)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 15:31:27 +01:00
Michael Kaufmann (d00p)
c434249616 allow admin to set php-configs that can be used by customers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 14:45:00 +01:00
Michael Kaufmann (d00p)
b849a5f29a preparations for php-config select for customers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 13:59:30 +01:00
Michael Kaufmann (d00p)
3dc6a64252 fix pm select when editing fpmdaemon; fix saving of pm value
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 10:22:09 +01:00
Michael Kaufmann (d00p)
ebd636494a fix wrong table constant
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 10:11:38 +01:00
Michael Kaufmann (d00p)
07caf55f79 fixes to multi-fpm in cron
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 09:16:00 +01:00
Michael Kaufmann (d00p)
73868b7947 soften the file cleaning to reduce risk
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-07 23:31:39 +01:00
Michael Kaufmann (d00p)
af55fe5b82 add possibility to add multiple php-fpm instances
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-07 14:55:25 +01:00
Michael Kaufmann
de408347fc Merge pull request #500 from heavygale/patch-1
Update preconfig_0.9.inc.php
2018-01-05 18:26:57 +01:00
heavygale
ea96039128 Update preconfig_0.9.inc.php
fixed a typo
2018-01-05 18:11:23 +01:00
Michael Kaufmann
c49539258e Merge pull request #498 from RipClaw2971/fix
Added "nscd -i passwd" to clear user cache when using libnss-*
2018-01-01 17:45:23 +01:00
Andreas Grundler
64653a2bb1 nscd -i passwd in froxlor_master_cronjob.php eingefügt 2018-01-01 13:54:32 +01:00
Andreas Grundler
732c6e3a78 Added nscd -i passwd to clear user 2017-12-31 22:40:19 +01:00
Michael Kaufmann (d00p)
66a4309fe5 add setting to disable LE self-check; set version to 0.9.38.8 for maintenance/bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-12-31 11:18:59 +01:00
Michael Kaufmann (d00p)
57277eb1e3 also add locked users to the passwd file for quota not to rage :P thx J-BBB
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-12-27 10:36:10 +01:00
Michael Kaufmann (d00p)
148b2fc1be validating config-template parameters; avoid URL misuse, thx to hyp3rlinx for noticing this
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-12-27 10:01:07 +01:00
Michael Kaufmann (d00p)
cf4f15a83c explicitly deactivate TLS (and auto-tls) when setting use-tls is OFF; fixes #496
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-12-19 08:00:39 +01:00
azerr
297f3f638c change sign direction 2017-12-08 17:47:09 +01:00
azerr
d2a9fa8632 extend nginx redirect regex to https 2017-12-08 15:39:05 +01:00
Michael Kaufmann (d00p)
a5251824ae try to reduce weird path-values when people are getting creative, fixes #487
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-27 08:14:31 +01:00
Michael Kaufmann (d00p)
cb31c5258d correct setting for php-fpm peardir, fixes #475
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-27 08:09:33 +01:00
Michael Kaufmann (d00p)
5540b02e35 do not remove Let's Encrypt token when self-check fails but rather give out the information as warning. The self-check fails for many users due to different local configurations and might not always be correct; fixes #480
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-27 07:54:41 +01:00
Michael Kaufmann (d00p)
e725b48c4c add default/global directory options in apache regardless of whether fcgid/fpm is being used or not; fixes #485
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-27 07:48:36 +01:00
Michael Kaufmann (d00p)
45c0915b59 fix ssl integration in lighttpd, thx to black-night for the info
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-17 15:15:09 +01:00
Michael Kaufmann (d00p)
1e03946df7 set sql_mode to disable STRICT_MODE usage for froxlor, thx to albech for the hint
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-08 07:49:40 +01:00
Michael Kaufmann (d00p)
dd3e5e9c6b fix wrong variable name typo, fixes #484
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-06 07:36:51 +01:00
Michael Kaufmann (d00p)
421c29c491 remove each() keyword as it is deprecated as of php-7.2, fixes #479
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-10-31 13:03:06 +01:00
Michael Kaufmann (d00p)
15b62aae04 add inserttask for config regeneration and fix aliasdomain NULL value if empty, fixes #478
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-10-06 09:29:49 +02:00
Michael Kaufmann (d00p)
181848290f move setting to enable usage of libnss-extrausers to 'system' category as mpm-itk + mod_php users might need this too
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-09-04 15:28:12 +02:00
Michael Kaufmann (d00p)
b263b211a5 generate multiline txt-record if content is too long, fixes #472
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-08-28 15:35:07 +02:00
Michael Kaufmann (d00p)
1753d2895b add simple smtp-settings test-page, fixes #464
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-08-25 10:34:59 +02:00
Michael Kaufmann (d00p)
64ebb0ca38 also add http2 flag to domain-import
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-08-24 15:27:47 +02:00
Michael Kaufmann (d00p)
bab982a0e6 add http2 support for froxlor-vhost and per-domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-08-24 13:21:21 +02:00
Michael Kaufmann (d00p)
c2c5178831 remove superfluous character in froxlor.sql file, fixes #471
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-08-23 14:03:39 +02:00
Michael Kaufmann (d00p)
56e8e32965 set correct permissions for extrausers files/folder, fixes #465
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-07-26 07:30:14 +02:00
Michael Kaufmann (d00p)
47cd30a45e use correct logging-level in customer_mail, thx to priority
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-07-19 12:06:36 +02:00
Michael Kaufmann
bd8f659272 Merge pull request #460 from pquerner/patch-libclass-lesscript-dontsendchallengewithouttoken
dont send uri to challenge, if no valid token could be fetched
2017-07-08 16:59:56 +02:00
Pascal Querner
82c719d786 dont send uri to challenge, if no valid token could be fetched 2017-07-07 22:50:39 +02:00
Michael Kaufmann (d00p)
dc22ff6aa3 fix rebuild of libnss-extrausers files when editing/deleting ftp account, fixes #454
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-06-20 16:48:11 +02:00
Michael Kaufmann
c68682b084 Merge pull request #450 from oliverrahner/master
nginx: add index directive to path options for secured directories
2017-06-10 11:47:53 +02:00
Oliver Rahner
aa8a7ee0a9 nginx: add index directive to path options for secured directories
`index` directives are now created for secured directory locations.
2017-06-10 10:59:41 +02:00
Michael Kaufmann (d00p)
e95a917812 allow non fqdn CNAME entries (froxlor appends zone's domain automatically if there's no trailing dot), fixes #434
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-06-04 11:29:21 +02:00
Michael Kaufmann (d00p)
332e627007 fix wildcard entries in dns editor, fixes #447; do not add extra dot at the end of SRV entries, fixes #446
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-06-04 09:31:55 +02:00
Michael Kaufmann (d00p)
a3201481f6 beatufication in generated vhost configs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-06-04 09:30:32 +02:00
Michael Kaufmann (d00p)
dae233dd05 allow adding domains with multiple dashes, that are NOT punycode (xn--)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-06-04 09:17:31 +02:00
Michael Kaufmann (d00p)
9aa2cc269b rename MYSQL_PASSWORD replacer to FROXLOR_MYSQL_PASSWORD in config-templates to avoid false replacement of couriers authmysqlrc, fixes #438
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-05-12 12:23:14 +02:00
Michael Kaufmann (d00p)
434f202832 minor fixes in traffic cron
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-05-12 12:22:04 +02:00
Michael Kaufmann (d00p)
552d58848c fix sql_mode=only_full_group_by in admin_admins.php; fix wrong webserver-user when using FCGID
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-05-09 13:17:50 +02:00
Michael Kaufmann (d00p)
bea1677d5d Add setting for libnss-extrausers to frontend
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-05-05 09:44:37 +02:00
Michael Kaufmann (d00p)
a2e0de23e1 add libnss-extrausers for debian/ubuntu users
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-05-05 09:35:06 +02:00
Michael Kaufmann
ebb33c9cee Merge pull request #436 from nachtgeist/master
doc: extend notes about contributing; add issue template
2017-05-01 21:26:26 +02:00
Daniel Reichelt
22414096ad doc: extend notes about contributing; add issue template 2017-05-01 21:24:48 +02:00
Michael Kaufmann (d00p)
9db7434876 add letsencrypt, HSTS settings, oscp-stapling and phpenabled-flag to Domain-import; fixes #416
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-04-18 16:55:55 +02:00
Michael Kaufmann
9fabfd539d Merge pull request #430 from mkhon/fix-apache24-ocsp-cache-path
Fix apache24_ocsp_cache_path definition
2017-04-18 12:50:40 +02:00
Michael Kaufmann
54f6c3e019 Merge pull request #431 from shyim/mysql-warning
Fixed MySQL Warning while creating a new user
2017-04-17 12:50:16 +02:00
Soner Sayakci
5930ab1c9d Fixed MySQL Warning while creating a new user 2017-04-17 12:34:20 +02:00
Max Khon
3870cc1002 Add default value for apache24_ocsp_cache_path, otherwise saving
SSL settings for !apache24 fails on apache24_ocsp_cache_path validation.
2017-04-17 15:55:49 +07:00
Michael Kaufmann
f880e1c9f1 Merge pull request #429 from mkhon/database-charset-skip-views
Skip views when altering table charsets
2017-04-15 11:28:27 +02:00
Michael Kaufmann
9285a169dd Merge pull request #428 from mkhon/fix-customer-logs
Fix customer logs
2017-04-15 11:27:15 +02:00
Max Khon
95b7b57fc6 Skip views when altering table charsets. 2017-04-15 16:12:29 +07:00
Max Khon
872928fb38 Fix customer logs:
- SQLSTATE[HY000]: General error: mode must be an integer
- customer_logger.php:78 Undefined variable $_actions
2017-04-15 15:58:50 +07:00
Michael Kaufmann
cb2f094e3d Merge pull request #426 from nachtgeist/master
readme: add section about contributing
2017-04-13 16:39:15 +02:00
Daniel Reichelt
b11b423217 readme: add section about contributing 2017-04-13 16:38:17 +02:00
Michael Kaufmann
567827e2cb Merge pull request #422 from nachtgeist/master
add OCSP stapling support for apache2 and nginx
2017-04-11 20:39:00 +02:00
Daniel Reichelt
ec1bd6e19a add OCSP stapling support for apache2 and nginx 2017-04-11 17:09:34 +02:00
Michael Kaufmann (d00p)
d4cd827284 update wiki-urls in language files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-04-09 10:25:39 +02:00
Michael Kaufmann
50f85fb6d0 Merge pull request #417 from ianklemm/patch-1
Correct Wiki links
2017-04-03 20:32:24 +02:00
Vengance
9cc69e5b3d Update README.md 2017-04-03 20:31:50 +02:00
Vengance
d9e8f43298 Correct Wiki links
Correct the links of the no longer existing redmine to Github´s inbuild Wiki
2017-04-03 20:21:44 +02:00
Michael Kaufmann (d00p)
ad7cf52f21 Fix rowcount value for logger
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-03-17 13:05:39 +01:00
Michael Kaufmann (d00p)
398d45deae fix typo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-03-14 13:46:07 +01:00
Michael Kaufmann (d00p)
541ab1fe6e clearify field label for domain termination date; fixes #1728
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-03-11 07:34:13 +01:00
Michael Kaufmann (d00p)
c0fddbce81 use correct pagination in admin-log/customer-log, fixes #1726
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-03-08 14:04:40 +01:00
Michael Kaufmann (d00p)
2284706e0c do not load mod_vroot in proftpd on centos
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-03-02 07:57:47 +01:00
Michael Kaufmann (d00p)
a4f72cbb40 do not show full path of file on php-error; fixes #1720
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-02-12 16:33:00 +01:00
Michael Kaufmann
d1c776b706 Merge pull request #414 from Douks08/patch-1
Update french.lng.php
2017-02-09 14:41:56 +01:00
Douks08
8ef315014c Update french.lng.php
Modification de "billets" en "tickets" qui est plus fréquemment utilisé
2017-02-09 10:19:32 +01:00
Michael Kaufmann (d00p)
2d59e569df fix phpenabled flag for new subdomains added by customers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-30 22:46:53 +01:00
Michael Kaufmann (d00p)
202eb0931f fix auto-update of database in cronjob if activated
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-28 21:20:37 +01:00
Michael Kaufmann (d00p)
4cd1a8d656 Merge branch 'master' of github.com:Froxlor/Froxlor 2017-01-28 21:19:51 +01:00
Vengance
01a363456e Fix libnss config (#412)
* Fix libnss config
2017-01-28 15:47:19 +01:00
Michael Kaufmann (d00p)
8f4da0638e allow underscore in dns labels, fixes #1697
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-25 10:42:18 +01:00
Michael Kaufmann (d00p)
3e6c3d725b set version to 0.9.38.7 for upcoming bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-24 09:43:20 +01:00
Michael Kaufmann (d00p)
95a18be5c5 do not use HTTP_HOST variable if mod_rewrite is not used
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-24 09:41:45 +01:00
Michael Kaufmann (d00p)
8030aae37a fix directory options for deactivated users, fixes #1704
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-23 23:53:01 +01:00
Michael Kaufmann (d00p)
0eaa81b503 use libnss-mysl deb package from froxlor repo as debians 1.5-5 package is not suitable for jessie
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-23 08:17:18 +01:00
Michael Kaufmann (d00p)
c2b864a20f enable/disable php for standard-subdomain when adding a new customer according to the customer-phpenabled value, fixes #1708
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-23 08:14:14 +01:00
Michael Kaufmann (d00p)
e00cb8926d set mail-sender to customer mail address when using mod_php, fixes #1707
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-23 08:12:44 +01:00
Michael Kaufmann (d00p)
afb2bce16d fix missing german language strings, refs #1705
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-23 08:05:48 +01:00
Michael Kaufmann (d00p)
1033f502b1 add missing language strings, fixes #1705
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-19 14:09:51 +01:00
Michael Kaufmann (d00p)
ab18d94053 fix PR #407 - only works for apache-2.4 and missed the entry for customer-vhosts
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-17 11:29:40 +01:00
Michael Kaufmann
9afbe7fb71 Merge pull request #407 from buffcode/ssl-compression
Disable SSLCompression (CRIME attack)
2017-01-17 10:40:19 +01:00
Laurens Stötzel
5e0270e6a8 Disable SSLCompression (CRIME attack)
https://raymii.org/s/tutorials/Strong_SSL_Security_On_Apache2.html#SSL_Compression_(CRIME_attack)
2017-01-17 10:33:22 +01:00
Michael Kaufmann (d00p)
c6962b0992 fix variable-typo to make phpenabled-flag work when adding new domains, thx to micw
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-16 08:43:54 +01:00
Michael Kaufmann (d00p)
9fdcd09089 fix install class, set version to 0.9.38.6
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-15 07:44:58 +01:00
Michael Kaufmann (d00p)
338cf161d2 fix undefined index if let's encrypt is used for the froxlor-vhost
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-14 18:06:04 +01:00
Michael Kaufmann (d00p)
044ce6662a set version to 0.9.38.5 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-13 19:45:17 +01:00
Michael Kaufmann (d00p)
d574233f49 also reseller/admins who can't see all customers were able to delete arbitrary ssl certificates, refs #1699
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-13 19:21:34 +01:00
Michael Kaufmann (d00p)
02c6545c94 update download url for libnss-mysql for debian jessie, fixies #1700
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-10 19:11:01 +01:00
Michael Kaufmann (d00p)
c795cd3320 check for ownership of certificate when deleting as customer, fixes #1699
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-10 08:37:50 +01:00
Michael Kaufmann (d00p)
1ebde2e6a4 return correct default redirectCode when none is set, thx to J-BBB
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-05 11:58:11 +01:00
Michael Kaufmann
78ee141b26 Merge pull request #405 from lobeck/hsts_link_fix
fix hsts removal links
2017-01-02 07:32:45 +01:00
Christian Becker
d11ddd910f fix hsts removal links
without a protocol, they are treated relative which is annoying
2017-01-02 03:06:18 +01:00
Michael Kaufmann (d00p)
437446c49d update phpMailer to 5.2.21
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-29 10:54:25 +01:00
Michael Kaufmann (d00p)
7a603596c5 validate ip address on installation 2016-12-28 20:13:15 +01:00
Michael Kaufmann
c2a91ed623 Merge pull request #403 from pissbeutel/master
Changed SOA refresh intervall to be within recommended values
2016-12-17 15:16:46 +01:00
Michael Kaufmann
3dcd2b9a3e Merge pull request #402 from stweil/doc
Fix description in README.md
2016-12-17 15:16:10 +01:00
pissbeutel
75622d4737 Changed SOA refresh intervall to be compliant within recommended values
See: https://www.denic.de/fileadmin/public/documentation/DENIC-23p.pdf

The recommended values according to DENIC are:
refresh: 3600 - 86400
retry: 900 - 28800
expire: 604800 - 3600000
negTTL: 180 - 86400
2016-12-17 15:14:02 +01:00
Stefan Weil
7a617d0aa4 Fix description in README.md
The entry is called "System", not "Server".

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-17 14:33:28 +01:00
Michael Kaufmann
ccca077df7 Merge pull request #401 from stweil/html
Fix HTML code (unclosed tag)
2016-12-17 13:05:56 +01:00
Stefan Weil
5c008adf16 Fix HTML code (wrong tag)
`<span>` must be terminated by `</span>`.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-17 12:34:15 +01:00
Michael Kaufmann (d00p)
4502f7ddf5 fix Settings::Flush(), thx to Ithariel
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-16 10:17:48 +01:00
Michael Kaufmann (d00p)
f9101f880b use namserver IP's for axfr/pdns-config, also add placeholder AXFRSERVERS for axfr-servers setting; fixes #1691
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-14 09:54:49 +01:00
Michael Kaufmann (d00p)
5ed0c3f2f3 code-formatting and put phpenabled flag on a better position
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-11 09:50:22 +01:00
Michael Kaufmann (d00p)
9907775c0d fix installation sql
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-11 09:43:05 +01:00
Michael Kaufmann
ed9d4a5744 Merge pull request #392 from negrusti/patch-1
Prevent duplicates in ipsandports table
2016-12-11 08:55:47 +01:00
Michael Kaufmann
c1aea2795e Merge branch 'master' into patch-1 2016-12-11 08:55:37 +01:00
Michael Kaufmann (d00p)
3a8996aee2 add missing fields that are only added via update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-11 08:29:54 +01:00
Michael Kaufmann
e67aefe48b Merge pull request #400 from micw/feature/letsencrypt-verbesserungen
Better handling for letsencrypt errors, refs #1661
2016-12-11 08:24:10 +01:00
Michael Kaufmann
602c38dbeb Merge branch 'master' into feature/letsencrypt-verbesserungen 2016-12-11 08:23:46 +01:00
Michael Kaufmann
f1c232cef9 Merge pull request #396 from schallertd/master
Checkbox to enable/disable PHP (vhost settings + fpm pool) for an entire vhost, fixes #1671
2016-12-11 08:20:01 +01:00
Michael Kaufmann
3d4b56b233 Merge branch 'master' into master 2016-12-11 08:19:16 +01:00
Michael Kaufmann
d8994ca65b Merge pull request #399 from hypernics/alias_redirect
Change redirect host from main domain name to requested domain name, refs #1670
2016-12-11 08:05:57 +01:00
Michael Kaufmann (d00p)
18514f0180 fix undefined array when processing specialsettings, fixes #1684
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-10 21:43:28 +01:00
Michael Kaufmann (d00p)
001786dd97 fix incorrect User-Agent header in let's encrypt class, fixes #1683
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-09 13:33:57 +01:00
Michael Kaufmann (d00p)
225539d2e7 show ssl-related settings only if customer has ssl-ip assigned (not yet checked per domain); fix hsts-includeSubdomain setting for fresh installations
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-29 09:34:33 +01:00
Janos Muzsi
1b18ec45be correcting lighttpd settings 2016-11-27 23:18:23 +01:00
micw
7b6bbcec48 Fixed default LE license URL
(removed testing stuff)
2016-11-27 12:45:06 +01:00
Michael Kaufmann (d00p)
56276a19d1 set version to 0.9.38.4 for upcoming bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-27 12:12:22 +01:00
Michael Kaufmann (d00p)
c00abc3b92 move froxlor hsts settings to 'froxlor vhost settings' to make clear it's only for froxlor anbd not a system-wide default for all domains; fix superfluous english text from german language file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-27 11:40:33 +01:00
Michael Kaufmann (d00p)
301dadaa02 fix global hsts-includeSubdomain setting, thx to iam
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-27 10:46:50 +01:00
Michael Wyraz
559bd6d892 Better db update 2016-11-25 10:52:50 +01:00
Michael Wyraz
18b45c749d Better handling for letsencrypt errors after failed registration or changed license 2016-11-25 09:54:47 +01:00
Janos Muzsi
2c00f982d8 Change redirect host from main domain name to requested domain name 2016-11-24 22:55:57 +01:00
Michael Kaufmann (d00p)
54200427ab fix undefined variable when deleting a customer-domain as admin
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-24 10:40:28 +01:00
Michael Kaufmann (d00p)
f8996ad767 catch exception thrown by new IdnaConverter when encoding a non-valid domain, fixes #1678
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-22 15:08:42 +01:00
Michael Kaufmann (d00p)
9838ff4da5 fix hsts settings for lighttpd, fixes #1677
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-22 08:16:35 +01:00
Michael Kaufmann (d00p)
192e00c717 do not show NameVirtualHost in IP/Port overview when using apache-2.4 (as NameVirtualHost does not exist there anymore)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-22 08:04:11 +01:00
Michael Kaufmann (d00p)
43ca4a28e4 add acme.conf alias also to froxlor vhost in case the acme-challenge path is not within the froxlor-docroot; fix empty redirect-code, fixes #1674
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-21 08:19:33 +01:00
Michael Kaufmann (d00p)
16e9fd6bd9 stay php-5.3 compatible
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 21:19:18 +01:00
Michael Kaufmann (d00p)
16f547bce0 last time....0.9.38.3....what a day
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 10:27:11 +01:00
Michael Kaufmann (d00p)
60a482dce6 damn, forgot to save the two files to handle customer-side domain-settings regarding the hsts-includeSubdomain issue; version set to 0.9.38.2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 10:21:02 +01:00
Michael Kaufmann (d00p)
9540cb158c set version to 0.9.38.1 b/c of hsts includeSubdomains flag for domains not being saved; added http2-flag for nginx as setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 10:10:03 +01:00
Michael Kaufmann (d00p)
1984aced9d set db_version correctly everywhere
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 08:52:40 +01:00
Michael Kaufmann (d00p)
ca2949da71 Merge branch 'hypernics-nginx-http2' 2016-11-18 08:50:17 +01:00
Michael Kaufmann (d00p)
eb8449fd79 merge conflicts in update-script
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 08:50:03 +01:00
Michael Kaufmann (d00p)
547140bafb set version to 0.9.38 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 08:36:35 +01:00
Janos Muzsi
d245bca445 correcting the update 2016-11-18 08:32:23 +01:00
Janos Muzsi
5f899a5510 Add support for http2 option to nginx 2016-11-17 22:50:11 +01:00
Michael Kaufmann (d00p)
432645431c allow CIDR values in AXFR setting, fixes #1672
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-15 08:03:34 +01:00
Dominic Schallert
30087548b0 Fixed the checkbox value 2016-11-13 15:33:56 +01:00
Dominic Schallert
d93cfff172 updates always at the end of the file 2016-11-13 15:18:07 +01:00
Dominic Schallert
e5053bad15 Introduced phpenabled_customer and phpenabled_vhost, updated cron scripts, updated dbversion 2016-11-13 15:15:43 +01:00
Dominic
1519db1637 Update update_0.9.inc.php 2016-11-13 14:48:50 +01:00
Dominic Schallert
b0326c640c Feature #1671 Checkbox to enable/disable PHP (vhost settings + fpm pool) for an entire vhost 2016-11-13 14:41:39 +01:00
Michael Kaufmann (d00p)
7e4164da26 do not double validate openbasedir-values, as appendOpenbasedirPath() already takes care of that; also fix /dev/urandom as openbasedir-path-value to be treated as file correctly, fixes #1669
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-10 10:07:00 +01:00
Michael Kaufmann (d00p)
fad607c6e8 set version to 0.9.38-rc2 for second release candidate 2016-11-07 07:28:58 +01:00
Michael Kaufmann (d00p)
d6b56262ce fix unnecessary idn encoding
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-04 18:28:32 +01:00
Michael Kaufmann (d00p)
c409d8a6ba re-enable removing of orphaned entries, fixes #1666
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-03 14:14:33 +01:00
Michael Kaufmann (d00p)
4274b8a737 fix setting of hsts values when security questions are asked; insert config-rebuild task if only hsts stuff changes; fix undefined variable regarding alias domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-03 10:52:33 +01:00
Michael Kaufmann (d00p)
60c1babd93 fix wrong protocol name for apache
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-31 20:44:31 +01:00
Michael Kaufmann (d00p)
ec6ddd054d remove certificate entry for LE if admin/customer disables LE for a domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-31 11:18:40 +01:00
Michael Kaufmann (d00p)
76c200a56c disable tlsv1.1 for ssl settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-31 11:17:56 +01:00
Michael Kaufmann (d00p)
a44be363a6 set domain, letsencrypt-flag and loginname for froxlor-hostname in ssl-overview because the certificate will get removed as invalid otherwise, thx to Tbyte
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-31 10:53:18 +01:00
Michael Kaufmann (d00p)
304926260f PowerDNS does not like multi-line-format, thx to Marc
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-29 14:20:50 +02:00
Michael Kaufmann (d00p)
462fca7328 do not add www.[froxlorfqdn] to SAN list of certificate request for Let's Encrypt froxlor-vhost certificate; fixes #1662
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-28 10:57:51 +02:00
Michael Kaufmann (d00p)
884b2ed913 various fixes for idn converted domains + fix undefined index alias when editing a domain with alias
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-25 12:24:57 +02:00
Michael Kaufmann (d00p)
af77453bfe do not generate ssl-vhost-container without a certificate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-20 09:23:44 +02:00
Michael Kaufmann (d00p)
fa45de6586 fix empty dir parameter for makeCorrectDir() when directory-selection is set to 'Dropdown', thx to D2Red for letting me debug on his system
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-19 19:22:52 +02:00
Michael Kaufmann (d00p)
b4e8458076 enhance findDirs function and filter awstats/webalizer (sub)folders for target-directory selection
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-18 15:32:14 +02:00
Michael Kaufmann (d00p)
979b1b0ad8 forgot to add template for subjectAlternativeName stuff in ssl-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-18 13:23:35 +02:00
Michael Kaufmann (d00p)
2bee58166b show also Subject-alternative-names in ssl-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-18 09:07:20 +02:00
Michael Kaufmann (d00p)
3597a89da3 add missing customer_hide_option for fresh installs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-13 11:08:26 +02:00
Michael Kaufmann (d00p)
f406962dfd allow empty select-value for panel.customer_hide_options
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-13 10:48:28 +02:00
Michael Kaufmann (d00p)
ce31a0b3fd enable custom redirect codes also for lighttpd
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-13 10:16:17 +02:00
Michael Kaufmann (d00p)
fc2ae594cb enable custom redirect codes also for nginx
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-13 09:51:57 +02:00
Michael Kaufmann (d00p)
58c14376d6 set version to 0.9.38-rc1 for upcoming release candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-11 07:50:25 +02:00
Michael Kaufmann (d00p)
91c2d4efbe do not redirect when requesting let's encrypt certificates in nginx (same as we do in apache)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-11 07:49:52 +02:00
Michael Kaufmann
e4c12b2c77 Merge pull request #394 from EleRas/hsts
Fix sslsettings in hsts for nginx
2016-10-07 19:25:40 +02:00
Florian Aders
75d8d0b397 Fix sslsettings in hsts for nginx 2016-10-07 19:08:32 +02:00
Michael Kaufmann (d00p)
f1f7d7dd14 add db-version to error-reporting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-07 16:11:23 +02:00
Michael Kaufmann (d00p)
06e44b6e2b fix sql-query in customer_domains when updating domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-07 16:07:23 +02:00
Michael Kaufmann (d00p)
41c07d5b71 also add new hsts panel settings to froxlor.sql for new installs; refs #1660
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-07 11:54:08 +02:00
Michael Kaufmann (d00p)
d198729222 make the hsts domain settings actually saveable; add hsts domain settings for customer-panel; refs #1660
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-07 11:48:13 +02:00
Michael Kaufmann (d00p)
4a3e02c1f0 add HSTS for domains (admin-side) and froxlor-vhost; fixes #1660
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-07 11:01:45 +02:00
Michael Kaufmann
074d85b40f Merge pull request #390 from FliegenKLATSCH/patch-1
fix group by clause to be more compliant with mysql 5.7
2016-10-04 09:35:24 +02:00
Grigory Morozov
3ff85e167c Update update_0.9.inc.php 2016-09-27 23:08:30 +07:00
FliegenKLATSCH
2e198dbe5c fix default value for domain reg./term. date 2016-09-26 21:08:39 +02:00
Grigory Morozov
dc428b7de2 Adding unique key to ipsandports on upgrade
Please guide on checking the correct Froxlor version, not sure how it works
2016-09-26 23:23:11 +07:00
Grigory Morozov
06a55ef91e Prevent duplicates in ipsandports table 2016-09-26 22:52:03 +07:00
Michael Kaufmann (d00p)
ed0ede645a added ssl-certificate overview for admins and customers to show CN, Issuer, ValidFrom and ValidTo dates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-26 11:48:36 +02:00
Michael Kaufmann
79b839c024 Merge pull request #391 from nachtgeist/master
no longer show NameVirtualHost option for apache 2.4
2016-09-24 23:37:07 +02:00
Daniel Reichelt
02797d9abc no longer show NameVirtualHost option for apache 2.4 2016-09-24 21:59:02 +02:00
FliegenKLATSCH
97d035eee9 fix group by clause to be be compliant with mysql 5.7 2016-09-24 15:30:58 +02:00
Michael Kaufmann (d00p)
9799e05ce4 idna convert the whole URI for uri's in docroot as redirect, fixes #1654
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-22 07:46:50 +02:00
Michael Kaufmann (d00p)
98c8f519a6 validate customer entered subdomains, fixes #1653
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-21 07:38:07 +02:00
Michael Kaufmann (d00p)
6197a97dc1 Add settings to speficy smtp auth data for mails sent by froxlor
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-20 09:41:36 +02:00
Michael Kaufmann (d00p)
6a85c37b48 do not replace multiple quotes with just one, as it leads to possible syntax-errors in php.ini, thx to hp7007
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-19 12:17:56 +02:00
Michael Kaufmann (d00p)
a1e4374ada show detailed information about diskspace-usage (web-, mail-, mysql-usage separated)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-19 11:42:08 +02:00
Michael Kaufmann (d00p)
58835ef81f Warning: Non-standard capitalization of includeSubDomains
Header contains the token . The recommended capitalization is .

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-19 10:03:44 +02:00
Michael Kaufmann (d00p)
16751d7446 correct check for existing user in ftp-members list when adding a new customer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-19 07:47:37 +02:00
Michael Kaufmann
e95710d599 Merge pull request #389 from nachtgeist/cleanups
Cleanups
2016-09-18 13:28:31 +02:00
Daniel Reichelt
b366f04743 re-assign new main domain to remaining mainbutsubto-domains 2016-09-17 08:13:10 +02:00
Daniel Reichelt
f3c74bd718 remove unused code 2016-09-17 08:10:32 +02:00
Daniel Reichelt
8e1a1043a5 don't limit this query to emaildomains
...to catch possibly existing orphaned entries in the mail-user/mail-
forwarding tables
2016-09-17 08:10:31 +02:00
Michael Kaufmann
1664896062 Merge pull request #388 from nachtgeist/cleanups
Cleanups
2016-09-16 19:05:41 +02:00
Daniel Reichelt
ec474e2b4c fix "Could not find class 'System'" exceptions 2016-09-16 18:53:29 +02:00
Daniel Reichelt
84ee5a2192 cron/apache: remove echo'ed messages
they already get logged
2016-09-16 18:53:28 +02:00
Michael Kaufmann
a24db0ca6d Merge pull request #387 from nachtgeist/dashboard
display system hostname and some memory info on dashboard
2016-09-16 09:36:27 +02:00
Daniel Reichelt
56c8e90700 display system hostname and some memory info on dashboard
hostname may be useful in situations where several froxlors are
reverse-proxied on a single webserver
2016-09-16 09:16:19 +02:00
Michael Kaufmann
e9d438f8cf Merge pull request #386 from nachtgeist/issue-1650
fix #1650
2016-09-16 08:00:51 +02:00
Daniel Reichelt
41e769d681 cron/nginx: remove ssl_client_certificate
Adding the CA certificate to an nginx vhost via ssl_client_certificate is
outright wrong. Moreover, the CA certificate data is already written to
the certificate file itself (class.DomainSSL.php:83-85).

fixes #1650
2016-09-16 07:51:18 +02:00
Daniel Reichelt
d8b6d87ade cron/nginx: remove echo'ed messages
they already get logged
2016-09-16 07:51:17 +02:00
Michael Kaufmann
506c5ac27a Merge pull request #385 from nachtgeist/master
fix variable identifier in HttpConfigBase::getMyPath()
2016-09-13 12:41:05 +02:00
Daniel Reichelt
c6ba9df18a fix variable identifier in HttpConfigBase::getMyPath() 2016-09-13 12:01:09 +02:00
Michael Kaufmann (d00p)
4229d8dda4 make path to acme.conf global alias file customizable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-12 11:49:07 +02:00
Michael Kaufmann (d00p)
3b157a8c66 do not hide unavailable options, just disable them so people can see what is actually possible but just not available due to webserver-usage or other settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-12 11:23:29 +02:00
Michael Kaufmann (d00p)
b8c2047379 try to implement ssl-redirect for froxlor-vhost; combine various settings that are froxlor-vhost related into its own category, fixes #1480
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-11 17:48:08 +02:00
Michael Kaufmann
28461de7bc Merge pull request #384 from jakoch/patch-1
fix error, when trying to call function logAction() on undefin…
2016-09-11 13:09:03 +02:00
Jens A. Koch
c51840e760 bugfix for error, when trying to call function logAction() on undefined var $cronlog 2016-09-11 12:00:26 +02:00
Michael Kaufmann
a21d19bdcd Merge pull request #383 from nachtgeist/le-1652
LE: don't re-use old CSRs, always generate new ones; LE: change log level to LOG_INFO; fixes #1652
2016-09-11 08:13:03 +02:00
Michael Kaufmann
6c4d9ccbf7 Merge pull request #382 from nachtgeist/warnings
fix "undefined index" warnings
2016-09-11 08:12:12 +02:00
Daniel Reichelt
d56afda274 fix "undefined index" warnings
PHP Notice:  Undefined index: parentdomainid in
[…]/froxlor/lib/classes/webserver/class.DomainSSL.php on line 49
2016-09-11 02:27:43 +02:00
Daniel Reichelt
b8bfd7ff4c LE: don't re-use old CSRs, always generate new ones
fixes #1652
2016-09-11 00:51:42 +02:00
Daniel Reichelt
d1a3defef0 LE: change log level to LOG_INFO 2016-09-11 00:51:41 +02:00
Michael Kaufmann (d00p)
08f36243e9 only renew froxlor.panel LE cert if required
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-08 12:28:43 +02:00
Michael Kaufmann (d00p)
e4887362ec added let's encrypt for froxlor vhost - untested for now, testers are welcome
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-05 17:01:10 +02:00
Roman Schmerold
290d06e2c4 Merge pull request #379 from oliverrahner/patch-1
Letsencrypt: only update registration when necessary
2016-09-05 07:13:42 +02:00
Oliver Rahner
9260319ac1 Letsencrypt: only update registration when necessary
if no Terms of Service are presented by the ACME server when registering, don't update registration
2016-09-04 21:27:23 +02:00
Michael Kaufmann
78ab90f469 Merge pull request #378 from oliverrahner/patch-1
Remove dependency on hard coded agreement URL for Let's Encrypt
2016-09-02 07:42:26 +02:00
Oliver Rahner
34767a14d5 Remove dependency on hard coded agreement URL for Let's Encrypt
Change the process to first create a new registration, which delivers the current TOS url in the response's header, then modify the newly created registration to accept the agreement.
2016-08-31 16:35:59 +02:00
Michael Kaufmann (d00p)
d7388f20e6 fix idna convert for >=php-5.6 users when customers want to add a subdomain with an idna-encoded domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-31 15:12:01 +02:00
Michael Kaufmann
8f488d7701 Merge pull request #377 from oliverrahner/patch-1
do not die after token self check
2016-08-29 10:47:23 +02:00
Oliver Rahner
7f56e98009 do not die after token self check
We have to finish the challenge request so that the auth does not linger in state "pending", but goes to "invalid". See https://forum.froxlor.org/index.php/topic/13463-lets-encrypt-zertifikate-werden-nicht-erneuert/#entry32895
2016-08-29 10:46:21 +02:00
Michael Kaufmann (d00p)
a840905166 set version specific user-agent in lescript like we do in ajax stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-28 14:07:13 +02:00
Michael Kaufmann
3757db28f4 Merge pull request #376 from w6g23/LE-UserAgent
Set a User Agent in the HTTP request fetching the LE challenge URI
2016-08-28 14:04:01 +02:00
w6g23
d31589ba99 Set a User Agent in the HTTP request fetching the LE challenge URI for self check
A rule (e.g. Wordpress plugin iThemes) might block requests with empty
User Agents.
2016-08-28 12:59:09 +02:00
Michael Kaufmann (d00p)
45b6d8d571 add possibility to allow customers to select a shell for their ftp-users, with great thanks to KAPPER NETWORK-COMMUNICATIONS GmbH - kapper.net
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-26 10:46:15 +02:00
Michael Kaufmann
11b2d0e1d2 Merge pull request #375 from micw/master
Added unit (MiB) to email quota label
2016-08-26 09:44:03 +02:00
Michael Wyraz
d7fc9cde57 Added unit (MiB) to email quota label 2016-08-26 09:42:38 +02:00
Michael Kaufmann (d00p)
b162fb6e99 avoid double encoding of Punycode as with php-5.6 the 'new' idna class throws exceptions, thx to housequake
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-26 09:41:19 +02:00
Michael Kaufmann (d00p)
2f6e34d878 do not ssl-redirect when let's encrypt tries to validate the domain, fixes #1649
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-25 22:08:32 +02:00
Michael Kaufmann
a47ab55cdd Merge pull request #374 from micw/master
append wildcards to search if user did not enter any
2016-08-23 07:27:39 +02:00
Michael Wyraz
dd4cfebe75 append wildcards to search if user did not enter any 2016-08-22 15:55:13 +02:00
Michael Kaufmann (d00p)
818268482e fix typo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-20 22:09:48 +02:00
Michael Kaufmann (d00p)
8431a82f2c check for correct extension for auto-update feature, fixes #1648
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-20 09:16:33 +02:00
Michael Kaufmann (d00p)
2444158bbb do not truncate pdns tables, instead just remove entries that are related to froxlor-managed domains; this allows the admin to create custom zones/records in pdns if needed/wanted
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-12 09:45:26 +02:00
Michael Kaufmann (d00p)
003005f295 keep compatibility and do not generate pdns records/zone when custom zonefile is set
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-07 17:56:03 +02:00
Michael Kaufmann (d00p)
731427255e fix call to undefined method pdns::_generateDomainConfig() in PowerDNS cronjob when using custom zone-file in a domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-07 17:22:28 +02:00
Michael Kaufmann (d00p)
468d20ee57 really reuse old csr if given + code formatting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-06 09:32:03 +02:00
Michael Kaufmann (d00p)
d994379130 do not idna-encode already encoded domain when addin a new email address (only an issue when using >=php-5.6
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-06 07:41:06 +02:00
Michael Kaufmann (d00p)
cd806b19f7 update let's encrypt subscriber agreement to v1.1.1
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-06 07:40:14 +02:00
Michael Kaufmann (d00p)
e17a2eff4a fix auto-generated dns zone when using multiple MX records and superfluous whitespace, fixes #1646
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-06 07:39:37 +02:00
Michael Kaufmann
690b25a6f5 Merge pull request #372 from schallertd/master
Fixed formatting
2016-08-06 07:19:38 +02:00
Dominic
e31c828f35 Fixed formatting
Nothing added, just a formatting fix
2016-08-06 06:31:15 +02:00
Michael Kaufmann (d00p)
cdd97b142f extract auto-update archive to correct folder regardless of the folder being named 'froxlor' or not, future auto-update archives will not have the froxlor-folder prefixed, fixes #1645
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-04 21:49:33 +02:00
Michael Kaufmann (d00p)
b2f815617c Update Let's Encrypt subscriber agreement, fixes #1644
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-04 07:40:08 +02:00
Michael Kaufmann (d00p)
11d358133e Merge branch 'master' of github.com:Froxlor/Froxlor 2016-08-02 13:47:52 +02:00
Michael Kaufmann (d00p)
0e77d5ab94 stay php-5.3 compatible
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-02 13:41:58 +02:00
Robert Förster (Dessa)
51152ef026 fix lintians executable-not-elf-or-script 2016-08-02 11:40:37 +02:00
Michael Kaufmann (d00p)
f5dc8aa1c9 set version to 0.9.37 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-02 08:51:34 +02:00
Michael Kaufmann (d00p)
ceaa0fcf5c Update phpMailer to version 5.2.16
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-02 08:50:22 +02:00
Michael Kaufmann (d00p)
cc372ba89b show DNS editor only if nameserver is activated at all
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-02 07:58:23 +02:00
Michael Kaufmann (d00p)
526eb84b71 Remove superfluous exit-statement
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-01 15:05:58 +02:00
Michael Kaufmann
14e54ff41a Merge pull request #368 from micw/feature-zugang-zu-ausgeblendeten-seiten-sperren
If a customer's page is hidden from menu via settings, redirect the user if he tries to access the page
2016-08-01 15:03:48 +02:00
Michael Kaufmann (d00p)
aa76ae4ddc check for uid/gid or username/groupname correctly in config-xml files, fixes #1642
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-01 08:47:45 +02:00
Michael Kaufmann (d00p)
f1b7d731bd Fix #2 Parameter 3 to getFormFieldDataXXX() expected to be a reference, value given since php-7.0.9
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-29 09:13:34 +02:00
Michael Wyraz
e3587fb346 If a customer's page is hidden from menu via settings, redirect the user if he tries to access the page 2016-07-27 13:45:54 +02:00
Michael Kaufmann (d00p)
e5c649aba3 Add dns-editor icon/link to domain-overview list
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-27 07:48:25 +02:00
Michael Kaufmann
4a3b64b497 Merge pull request #367 from micw/feature-optionen-fuer-kunden-ausblenden
Feature: Panel setting to hide certain menu items and traffic charts from customers
2016-07-25 08:00:37 +02:00
Michael Wyraz
54e2f83b17 function Settings::IsInList that tests if an option of a multi-select setting is set 2016-07-22 10:30:13 +02:00
Michael Wyraz
a95233041e Better translations for new feature to hide menu items and traffic charts from customer panel 2016-07-22 09:56:40 +02:00
Michael Wyraz
5165cac4e2 Hide http/ftp/mail traffic charts based on new settings 2016-07-22 09:44:20 +02:00
Michael Wyraz
d31c4fa37c Hide customer menu items based on new settings 2016-07-22 09:31:20 +02:00
Michael Wyraz
084e72968a Moved new texts to end of language file 2016-07-22 09:30:55 +02:00
Michael Wyraz
6ab8cb1d7c Adding option to hide some elements in customer panel 2016-07-21 15:53:14 +02:00
Michael Kaufmann (d00p)
6589653667 set version to 0.9.37-rc1 for upcoming release candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-18 16:47:19 +02:00
Michael Kaufmann (d00p)
c3753478f2 add newline after custom options to avoid possible syntax error in apache-config, thx to J-BBB for testing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-14 09:14:37 +02:00
Michael Kaufmann (d00p)
b63fc5b508 fix glued strings in german language file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-14 08:45:10 +02:00
Michael Kaufmann (d00p)
3d2cb879b0 actually use the new setting for custom directory options file content, refs #1638
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-14 08:36:14 +02:00
Michael Kaufmann (d00p)
8366e57512 Adding new setting for mod_php users to specify content of the global directory options file, fixes #1638
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-14 08:25:28 +02:00
Michael Kaufmann (d00p)
1c369e5503 add possibility to disable web or traffic cron by setting the max-percentage value to 0, fixes #1639
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-14 07:58:56 +02:00
Michael Kaufmann (d00p)
83f40401be fix change_date for PDNS records
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-11 09:15:21 +02:00
Michael Kaufmann
19456e9b30 Merge pull request #365 from nachtgeist/master
generic html form handling: don't remove leading tabs
2016-06-24 09:09:23 +02:00
Daniel Reichelt
7d2c64ce63 generic html form handling: don't remove leading tabs
(+remove commented out code in the vicinity, probably debugging remnants)
2016-06-24 08:43:02 +02:00
Michael Kaufmann (d00p)
3f790bc334 keep the same structure for every distro + minor permission fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-24 08:03:42 +02:00
Michael Kaufmann (d00p)
164e1108e5 fix for sql changes, refs #1635
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-24 07:49:52 +02:00
Michael Kaufmann (d00p)
8fe20251f3 try to be more strict-mode compatible, fixes #1635
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-24 07:42:23 +02:00
Michael Kaufmann (d00p)
a121363dd2 update pdns-config templates / commands
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-24 07:38:19 +02:00
Michael Kaufmann (d00p)
7ec777c9dd put index back in location-context; try_files not really necessary if not using PHP, also eases use of proxy_pass users; thx to karstenk
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-20 09:55:27 +02:00
Michael Kaufmann
77aa58a0a3 Merge pull request #362 from nachtgeist/master
don't split .gitignore
2016-06-20 06:26:45 +02:00
Daniel Reichelt
1e8bc553b8 fix/add SAPI checks to prevent execution via webserver 2016-06-19 23:43:42 +02:00
Daniel Reichelt
6df08f6b9a don't split .gitignore
they would end up in .deb packages
2016-06-19 23:09:04 +02:00
Michael Kaufmann (d00p)
5e9e2996d7 avoid php-5.6 operator
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-19 22:08:17 +02:00
Michael Kaufmann (d00p)
6f8aa1cbc0 update another idnaconvert related class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-19 20:22:00 +02:00
Michael Kaufmann (d00p)
b22e70804b update new IdnaConvert class with needed fixes in them
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-19 20:15:33 +02:00
Michael Kaufmann (d00p)
5789e9a8a4 re-add old IDNA class so we do not have to force the php-5.6 requirement for froxlor
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-19 18:59:44 +02:00
Michael Kaufmann
6c55a40606 Merge pull request #361 from Froxlor/dns-subzone
Dns subzone fixes by nachtgeist
2016-06-18 08:06:51 +02:00
Daniel Reichelt
b4f90730cc unify "reloading" the dns daemon 2016-06-18 02:33:03 +02:00
Daniel Reichelt
50317da185 dns: no separate zonefiles for ismainbutsubto domains 3/3
replace iteration over $domains array by recursive walkDomainList()
2016-06-18 02:33:02 +02:00
Daniel Reichelt
631e36f4d5 dns: no separate zonefiles for ismainbutsubto domains 2/3
rewrite getDomainList() to contain parent-relations
2016-06-18 01:47:16 +02:00
Daniel Reichelt
a400fc9c65 dns: no separate zonefiles for ismainbutsubto domains 1/3
move log message
2016-06-18 01:47:12 +02:00
Daniel Reichelt
5f9962b6ba dns: fix generation of zone serials 2016-06-17 22:25:35 +02:00
Daniel Reichelt
d6dc71436a dns: fix generation of imap/pop3/mail/smtp A/AAAA-records
The dns-editor introduced a regression where imap/pop3/mail/smtp A-records
would not get created, even tough the setting system.dns_createmailentry was
enabled.

fix A fix
2016-06-17 22:25:21 +02:00
Daniel Reichelt
b6f99958fd dns: fix generation of alias records for subdomains
The checks whether or not to create wildcard/www records for subdomains
wrongly depended on the setting of the parent domain instead of the
subdomain in question.
2016-06-17 19:43:36 +02:00
Michael Kaufmann (d00p)
9a89f06bf0 Merge branch 'master' of github.com:Froxlor/Froxlor 2016-06-16 11:03:10 +02:00
Michael Kaufmann (d00p)
843845a825 Update Idna-Converter to version 1.0.2 (default IDNA standard is now 2008)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-16 11:03:02 +02:00
Michael Kaufmann
0b93ba3dde Merge pull request #360 from nachtgeist/master
cron_traffic: replace echo by log message
2016-06-15 16:33:19 +02:00
Daniel Reichelt
bd36145ad6 cron_traffic: replace echo by log message 2016-06-15 16:15:34 +02:00
Michael Kaufmann (d00p)
88ccf5b869 don't generate unnecessary php-related vhost-entries when php is disabled, thx to karstenk
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-14 07:29:38 +02:00
Michael Kaufmann (d00p)
5866293a25 add script to change ip-addresses in froxlor from CLI and updated corresponding settings. Helpful for VM-template installations or similar. Use at own risk; feedback is appreciated
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-13 13:45:23 +02:00
Michael Kaufmann
d2711889de Merge pull request #359 from flokli/lng-typos
Fix language typos
2016-06-08 06:23:37 +02:00
Florian Klink
82af43f598 lng/english: unify upper/lowercase string in $lng['panel']
Some where lowercase, some uppercase. Especially in the Cancel/save case
this looked weird.

This patch changes all button labels to their uppercase form.
2016-06-07 22:36:45 +02:00
Florian Klink
7a36f5edac lng: fix typo decending -> descending 2016-06-07 22:33:24 +02:00
Michael Kaufmann
480d21f555 Merge pull request #358 from ohader/SecDatabaseInformationDisclosure
[SECURITY] Information disclosure on database failures
2016-06-04 21:47:12 +02:00
Oliver Hader
2e7133d619 [SECURITY] Information disclosure on database failures
In case the database is not responding, e.g. due to "too many connections"
cut-off database credentials might be shown and system path be revealed.
In terms of security this is considered as information disclosure.
2016-06-04 20:41:03 +02:00
Michael Kaufmann
85f707af8a Merge pull request #357 from yaplik/master
fix non-persistent XSS due inproper content escaping
2016-06-03 16:29:28 +02:00
Jiří Zapletal
970a119f23 fix non-persistent XSS due inproper content escaping 2016-06-03 16:20:34 +02:00
Stefan Heid
7faebbb197 BUGFIX: Cleaninstall fails due syntax error in froxlor.sql (missing comma) (#356) 2016-06-02 21:21:40 +02:00
Michael Kaufmann
08d505b308 Merge pull request #355 from Froxlor/dns-editor
Add full dns editor + powerdns to froxlor; fixes #53, fixes #731, fixes #1196,
2016-05-30 09:09:15 +02:00
Michael Kaufmann (d00p)
1b0649d0cf replace CUSTOMER_TMP with the correct tmp-folder, depending what php-interface is being used
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-29 09:56:33 +02:00
Michael Kaufmann (d00p)
e5c16439e1 replace config-template-variables also in commands to be executed, e.g. used in proftpd ssl-cert generation command
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-29 09:41:38 +02:00
Michael Kaufmann (d00p)
151d8f8c5c Merge remote-tracking branch 'origin/master' into dns-editor 2016-05-23 15:55:24 +02:00
Michael Kaufmann (d00p)
08563e9298 add more opcache-php.ini directives for php-fpm, fixes #1624
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-23 13:01:05 +02:00
Michael Kaufmann (d00p)
b51f0821cb show scheduled backup and give customer the possiblity to abort the job
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-22 11:08:44 +02:00
Michael Kaufmann (d00p)
339d84736e no quotation of dns data for powerdns
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-21 09:03:21 +02:00
Michael Kaufmann (d00p)
7ea1de2a92 allow defined non-existing entry for SRV target-value for real now, i guess
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-20 16:21:55 +02:00
Michael Kaufmann (d00p)
be373e278f allow defined non-existing entry for SRV target-value
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-20 16:17:33 +02:00
Michael Kaufmann (d00p)
61eab6fd93 do not validate fqdn of SRV and TXT entries, as they might use underscores
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-20 15:56:06 +02:00
Michael Kaufmann (d00p)
c2b0714b4a powerdns needs the 'whole' record (., e.g. sub.example.com)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-19 13:49:22 +02:00
Michael Kaufmann (d00p)
5c1079e04b Add change_date value to the pdns-record entries
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-19 12:09:04 +02:00
Michael Kaufmann (d00p)
257f65bd1b add powerdns config-templates for distros
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-19 10:29:17 +02:00
Michael Kaufmann (d00p)
96ff346e54 fix powerdns-config template
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-19 09:28:46 +02:00
Michael Kaufmann (d00p)
076b6143ce limit record length
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 15:55:20 +02:00
Michael Kaufmann (d00p)
1e3262d691 do not show dns-editor to customers if not allowed and they enter the URL manually
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 13:54:21 +02:00
Michael Kaufmann (d00p)
94af32fb82 Merge remote-tracking branch 'origin/master' into dns-editor 2016-05-18 13:40:41 +02:00
Michael Kaufmann (d00p)
1f63ea10a0 adjust install sql file for dnsenabled flag and db-version
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 13:39:46 +02:00
Michael Kaufmann (d00p)
fa60c17dbc fix sql-query when editing a customer; check for dnsenabled flag in customer-domain-view template
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 13:32:44 +02:00
Michael Kaufmann (d00p)
b4c7fb574c increase DB version for db-updates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 13:27:56 +02:00
Michael Kaufmann (d00p)
83fa0059de add flag to allow access to dns-editor per customer; clean up dns-entries when domain gets deleted
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 13:25:31 +02:00
Michael Kaufmann (d00p)
d97957e558 array short-syntax is only PHP >= 5.4
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 12:12:34 +02:00
Michael Kaufmann (d00p)
9d16790f5b Update phpMailer to 5.2.15
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 10:43:16 +02:00
Michael Kaufmann (d00p)
b14ab6b1c1 validate record/label in dns-editor; better escaping for soa-admin mail
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 10:35:47 +02:00
Michael Kaufmann (d00p)
b029fe113e Merge remote-tracking branch 'origin/master' into dns-editor 2016-05-18 10:34:14 +02:00
Michael Kaufmann (d00p)
6ea4655fd8 set version to 0.9.36 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 10:32:52 +02:00
Michael Kaufmann (d00p)
477c99b4de Merge remote-tracking branch 'origin/master' into dns-editor 2016-05-18 10:31:05 +02:00
Michael Kaufmann (d00p)
eb70e619c9 also check for punycode when customer adds a subdomain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 10:28:13 +02:00
Michael Kaufmann (d00p)
41e4135f71 do not allow punycode input in domain-names
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 09:03:14 +02:00
Michael Kaufmann (d00p)
1ce5cf6c00 various fixes for dns with froxlor-hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-17 09:12:39 +02:00
Michael Kaufmann (d00p)
f7441df895 add missing file inclusion
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-17 08:43:02 +02:00
Michael Kaufmann (d00p)
69443d95d5 add support for power-dns (untested); most config-templates missing for pdns; create SPF/DKIM entries only if domain is emaildomain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-17 08:30:02 +02:00
Michael Kaufmann (d00p)
11e923453e Merge remote-tracking branch 'origin/master' into dns-editor 2016-05-16 19:59:27 +02:00
Michael Kaufmann (d00p)
b03eab897a show a2enmod commands only when using apache, thx to d4n13L
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-16 18:41:01 +02:00
Michael Kaufmann
25ff78e295 Merge pull request #353 from nachtgeist/le
LE improvements, fixes #1597
2016-05-16 17:42:38 +02:00
Daniel Reichelt
6e2b1773a3 LE: support alias domains
LE CSRs are triggered for the aliasdomain target domain on

* domain deletion

* domain creation

* domain editing when
  * the aliasdomain target changes (CSR triggered both for old and new
    target)
  * wwwalias is disabled or enabled
  * letsencrypt is disabled or enabled (domain-local)

fixes #1597
2016-05-16 17:35:51 +02:00
Daniel Reichelt
f3e05742b5 LE: change semantics of setting.letsencryptreuseold
Previously setting.letsencryptreuseold determined wheter both a domain's
private key and a CSR should be re-generated.

Preparing support of alias domains in LE certificates, this is changed to
only determine the re-generation of the private key. CSRs now are always
re-generated.
2016-05-16 17:35:51 +02:00
Daniel Reichelt
001f10f74e LE: catch error due to rate-limited account registration
and fix bad english in log message
2016-05-16 17:35:51 +02:00
Daniel Reichelt
712aebb864 LE: improve SQL readability 2016-05-16 17:35:51 +02:00
Daniel Reichelt
0ae0178b4c LE: PSR-2 formatting 2016-05-16 17:35:51 +02:00
Michael Kaufmann (d00p)
1d4211a5ce remove wrong a2* commands for rhel/centos
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-16 17:20:49 +02:00
Michael Kaufmann (d00p)
28115e6b1d add missing german language string
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-15 10:08:42 +02:00
Michael Kaufmann (d00p)
68fa0e6576 let createDomainZone() return the DnsZone object for better use later
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-15 09:56:48 +02:00
Michael Kaufmann (d00p)
8d8da0986a fix typo in DnsEntry class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-15 08:53:47 +02:00
Michael Kaufmann (d00p)
e0e748a0bc outsource record-generation and zone-generation to classes for better handling
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-15 08:46:23 +02:00
Michael Kaufmann (d00p)
da785500cc remove invalid self-closing <file /> tag as it produces php-notices and was just added for design reasons
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-14 18:39:18 +02:00
Michael Kaufmann (d00p)
02654a256d fix sql query in getAllowedDomainEntry()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-14 08:59:46 +02:00
Michael Kaufmann (d00p)
552c6e6cf9 add 'enable dns editor'-setting; fix missing isbinddomain index in customer_domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-14 08:32:38 +02:00
Michael Kaufmann (d00p)
86dc57c2cc outsource some dns functions to own files; allow opening of dns-editor only for domains that belong to the user (or the user has permission to edit as admin/reseller)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-13 19:40:37 +02:00
Michael Kaufmann (d00p)
11eb08e031 add enabled-flag; enable dns-editor for customers; add german translations; few more fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-13 13:27:33 +02:00
Michael Kaufmann (d00p)
4a4acc5c01 fix constructor of DnsBase 2016-05-12 14:32:41 +02:00
Michael Kaufmann (d00p)
899663350d fix handling of DKIM multi-line entries; outsource some code to new DnsBase class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-12 13:36:17 +02:00
Michael Kaufmann (d00p)
689a1fdbd2 inform cronjob to regenerate bind-configs on changes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-12 10:18:45 +02:00
Michael Kaufmann (d00p)
cec5f33870 fix checking for existing SPF entry in DNS
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-12 10:14:04 +02:00
Michael Kaufmann (d00p)
bd9ef50e94 correct SPF dns entry for new layout
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-12 09:47:36 +02:00
Michael Kaufmann (d00p)
68d579b629 add SPF and DKIM stuff to DNS
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-12 09:36:33 +02:00
Michael Kaufmann (d00p)
0404618c24 add experimental bind-cron for testing purposes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-11 18:10:17 +02:00
Michael Kaufmann (d00p)
9b5ce83e8b add testing-bind-cron for new dns-stuff (not activated); added main-but-subdomain-stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-11 16:11:23 +02:00
Michael Kaufmann (d00p)
7379398d22 set correct primary nameserver for SOA record
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-11 13:47:36 +02:00
Michael Kaufmann (d00p)
d1106dd984 fix wrong unset of array-element
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-11 07:44:32 +02:00
Michael Kaufmann (d00p)
b775c2f60e minor fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 19:20:01 +02:00
Michael Kaufmann (d00p)
407a7c01aa add createDomainZone function for new dns-editor; dump zone below the editor for testing purposes; all required entries that are not custom entered will be auto-generated like the bind-cron does this for now
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 14:11:01 +02:00
Michael Kaufmann (d00p)
bb9331904e (really) fix PHP notice #2048 Only variables should be passed by reference, thx to baudetail
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 11:55:03 +02:00
Michael Kaufmann (d00p)
64d068659f more validation for NS and SRV records; fix display of long records
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 10:54:59 +02:00
Michael Kaufmann (d00p)
e33d7b756f add missing error-language-string; check whether domain is bind-domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 07:37:42 +02:00
Michael Kaufmann (d00p)
283e272b99 enhance MX validation; fix SRV validation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 07:37:42 +02:00
Michael Kaufmann (d00p)
31d08d532c fix missing auto-increment for new table
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 07:37:42 +02:00
Michael Kaufmann (d00p)
5acd51fdd3 add first part of new dns-editor
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 07:37:42 +02:00
Michael Kaufmann (d00p)
6369e160b8 fix nscd group cache clearing call; refs #1570
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-09 21:33:07 +02:00
Michael Kaufmann (d00p)
5e09d56871 clear nscd group cache after adding a new customer to avoid permission issues of webserver; fixes #1570
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-09 08:27:01 +02:00
Michael Kaufmann (d00p)
0e79e8d670 fix default_server parameter for listen-statement in nginx since this changed since ngninx-0.8.21; fixes #1621
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-09 08:08:59 +02:00
Michael Kaufmann (d00p)
941a25ec9d avoid possible weird behaviour when resultset changes while running (if possible at all)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-05 08:43:28 +02:00
Michael Kaufmann (d00p)
2210d3de12 fix mail-account backup; fix missing job description for admin-dashboard (outstanding tasks); avoid double backup-task insertion when customer presses refresh after scheduling the backup-job
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-05 08:23:46 +02:00
Michael Kaufmann
ae01f2cdb9 Merge pull request #351 from Froxlor/backup
Add Customer Backup Feature, fixes #786, fixes #975, fixes #1544, fixes #1576
2016-04-29 10:32:58 +02:00
Michael Kaufmann (d00p)
e8e980509f fix missing backup-enabled setting entry
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
b2cd992f92 add important information that the customer should protect the backup directory using htaccess
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
7c44c5ea75 handle exit of forked backup-cronjob correctly
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
b1446d366e add possibility to enable/disable backup function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
9bfd5eb17e --exclude is relativ to path given via -C parameter
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
fb555027fd fix -C parameter and --exclude parameter for good now
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
05974de4d5 fix tar -C parameter again...
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
9c9bbb81de fix tar -C parameter and create_backup_tar_data list
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:18 +02:00
Michael Kaufmann (d00p)
ef7da53806 change directory before creating tarball to avoid having complete paths in it
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:18 +02:00
Michael Kaufmann (d00p)
a26ebb375b set db version for changes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:18 +02:00
Michael Kaufmann (d00p)
c8bbefb2bb add simple backup-function for customers (testing state)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:18 +02:00
Michael Kaufmann (d00p)
a485d9f4f9 TLSECCertificateFile and TLSECCertificateKeyFile for proftpds mod_tls require 1.3.5rc4 and later but Ubuntu 14.04 only provides 1.3.5rc3
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-19 13:31:09 +02:00
Michael Kaufmann (d00p)
f8be36d229 fix PHP notice #2048 Only variables should be passed by reference
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-17 13:44:42 +02:00
Michael Kaufmann (d00p)
28f0c3eac4 only include acme.conf to vhosts if system has ssl and LE enabled (might not exist if not)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-15 15:09:11 +02:00
Michael Kaufmann
e8f5fc1a8a Merge pull request #347 from floreno/patch-3
min-height against height fix for ajax-changing-content
2016-04-12 07:36:37 +02:00
Michael Kaufmann (d00p)
a014b5cc2b minor preparations for system-hostname as 'normal' domain (to use ssl/LE/etc.)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-11 09:19:43 +02:00
Michael Kaufmann (d00p)
84f1d94ad6 check for php-curl installed when cron_letsencrypt runs; format source
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-11 08:02:18 +02:00
Michael Kaufmann (d00p)
8565dbce8b insert task 99 (regeneration of /etc/cron.d/froxlor file) to the list of task when clicking on 'Regenerate configfiles'
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-11 08:01:38 +02:00
Michael Kaufmann (d00p)
72d1282651 require php-curl
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-11 08:00:38 +02:00
floreno
d474f2ec8f min-height against height fix for ajax-changing-content 2016-04-11 06:55:48 +02:00
Michael Kaufmann
252b42ee57 Merge pull request #346 from nachtgeist/master
fixes #1615
2016-04-10 19:08:33 +02:00
Daniel Reichelt
0dfaf376c0 remove obsolete language strings 2016-04-10 02:59:23 +02:00
Daniel Reichelt
2a05b89cc8 add explicit warning about sub-zones on usage of zonefiles 2016-04-10 02:59:23 +02:00
Daniel Reichelt
576c94f83c fix #1615 2016-04-10 02:59:22 +02:00
Michael Kaufmann (d00p)
5331127204 set version to 0.9.35.1; fix updater :x
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-08 13:52:06 +02:00
Michael Kaufmann (d00p)
57f9c439f2 set version to 0.9.35 final for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-08 12:54:17 +02:00
Michael Kaufmann (d00p)
c14017c244 fix display of path in customer-extras
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-07 07:56:16 +02:00
Michael Kaufmann
82cd5986a0 Merge pull request #343 from eis-os/simplify_master_cronjob
Simplify master cronjob
2016-03-31 15:43:15 +02:00
eis_os
032a991b8f Simplify master cronjob 2016-03-31 15:02:04 +02:00
Michael Kaufmann
200f589252 Merge pull request #341 from bashgeek/letsencrypt_stagingfix
Let's Encrypt: Always regenerate a new account-key, if staging
2016-03-23 18:40:54 +01:00
Daniel Schmitz
3405c7e313 Let's Encrypt: Always regenerate a new account-key, if staging 2016-03-24 01:26:57 +08:00
Michael Kaufmann (d00p)
30bd81064c make newly added settings available immediately
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-23 00:11:00 +01:00
Michael Kaufmann (d00p)
924a607183 fix isDatabaseVersion if it does not yet exist, thx to andy__
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-23 00:00:35 +01:00
Roman Schmerold
f1460d169d Fixed db query error, fixes #1611 2016-03-16 22:17:30 +01:00
Roman Schmerold (BNoiZe)
f5e2afaa0a Add LE icon to admin domain list
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2016-03-16 17:54:11 +01:00
Michael Kaufmann (d00p)
228d07ca66 output error in case of a server-error from LE, fixes #1609
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-15 17:45:43 +01:00
Michael Kaufmann (d00p)
3294bbf9b4 add a linebreak just in case some customizations did not end their lines with a linebreak
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-15 17:17:06 +01:00
Michael Kaufmann (d00p)
a849f35469 fix duplicate db-updates due to new db-version stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-15 17:14:41 +01:00
Michael Kaufmann (d00p)
104383d31e add a few opcache relevant php-ini directives to be used with php-fpm; add opcache.restrict_api to the default php-config for each domain with the customer's docroot as default value
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-15 17:05:09 +01:00
Michael Kaufmann (d00p)
1dd9bcbbe0 remove superfluous value-tag in visibility-tag (jessie-XML)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-13 19:50:56 +01:00
Michael Kaufmann
05d57a8af7 Merge pull request #340 from nachtgeist/public
jessie configs: override starting order of apache2 and nscd, fixes #1605
2016-03-13 19:49:23 +01:00
Daniel Reichelt
630ecfb148 jessie configs: override start order of webserver and nscd
fixes #1605
2016-03-13 19:02:11 +01:00
Daniel Reichelt
d545734072 ConfigDaemon: add notisfile/notisdir visibility conditions 2016-03-13 19:00:50 +01:00
Michael Kaufmann (d00p)
c903b759bb fix path for acme.conf in debian wheezy apache-2.2, fixes #1604
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-12 09:52:24 +01:00
Michael Kaufmann (d00p)
579854f5a5 handle the case when gethostbynamel() returns false to act like gethostbyname() in support for multi homed name servers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-11 21:23:26 +01:00
Michael Kaufmann
6b032839ce Merge pull request #339 from KZumbusch/feature/support-for-multi-homed-dns-servers
Support for multi homed DNS servers
2016-03-11 21:16:46 +01:00
Michael Kaufmann (d00p)
be1d9a045a actually use the selected value for server-alias when editing a subdomain, thx to Aragorn
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-10 14:13:44 +01:00
Michael Kaufmann (d00p)
8bc19e3893 fix intendation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-10 12:12:19 +01:00
Michael Kaufmann (d00p)
f9740ff545 check whether an email account is to be deleted when re-adding an email account with the same name, fixes #1519
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-10 10:54:32 +01:00
Michael Kaufmann (d00p)
2b2ca99a2b indeed something strange happened here, thx Marco01809
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-09 23:57:35 +01:00
Kay Zumbusch
641ee1f8a6 added check for invalid responses from gethostbynamel
fixed indent
2016-03-09 21:01:47 +01:00
Kay Zumbusch
52448571ea added support for multi homed name servers 2016-03-09 20:40:41 +01:00
Michael Kaufmann (d00p)
7bba4112b9 allow setting the serveralias option also for subdomains (because, why not? Might come in handy for LE users); add a few strings for autoupdate in german language file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-09 20:03:49 +01:00
Michael Kaufmann (d00p)
efd64300c4 clearify that a special config is needed for LE in the webserver
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-08 14:50:31 +01:00
Michael Kaufmann (d00p)
1f3c208f95 show acme.conf only if LE is enabled
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-08 12:44:31 +01:00
Michael Kaufmann (d00p)
4330b08c04 fix acme.conf for apache in wheezy and trusty, fixes #1603
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-08 12:31:57 +01:00
Michael Kaufmann
1c80118117 Merge pull request #336 from nachtgeist/public
fix DB update + some LE-related fixes
2016-03-08 08:37:41 +01:00
Daniel Reichelt
65fd6ac191 fix wrong column name in latest DB update, fixes #1602 2016-03-08 08:21:10 +01:00
Daniel Reichelt
291fae1744 cron/LE: more verbose error message on token error
be more specific about what exactly went wrong when trying to assert the
challenge/response payload (like e.g. http response code, error in DNS
resolution etc.)
2016-03-08 08:21:10 +01:00
Daniel Reichelt
c458ed8b0c cron/LE: fix superfluous CSRs
Depending on the data present, the LE cronscript may cause multiple
entries per domain in domain_ssl_settings.

This is due to $updcert_stmt interfering with the outer loop
while ($certrow = $stmt->fetch()): PDO's DB cursor sees rows newly created
by $updcert_stmt within the loop. As a consequence this also leads to
superfluous CSRs, thus increasing the certificate limit counter on the LE
side.

Solution: manifest the result of @$certificates_stmt@ on the PHP side in
its entirety prior to entering the outer loop.
2016-03-08 08:21:09 +01:00
Michael Kaufmann (d00p)
7ec62401e7 LE is disabled by default so should the cron be; also activate cron if updaters activate LE
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-07 14:08:59 +01:00
Michael Kaufmann (d00p)
be83c99334 show db version on admin-dashboard
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-07 14:01:49 +01:00
Michael Kaufmann (d00p)
7c8dbd370f forgot to check for dbupdates in index.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-07 13:55:14 +01:00
Michael Kaufmann (d00p)
604f37bd17 intriduce DB version (again) so we can keep release-version numbers while updating the database; added enable/disable switch for Let's Encrypt
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-07 13:47:22 +01:00
Michael Kaufmann
9d6ee0d08f Merge pull request #335 from nachtgeist/public
Remove certificate on removal of subdomain, fixes #1596
2016-03-07 11:44:50 +01:00
Michael Kaufmann
7dc2e6cb5f Merge pull request #334 from RipClaw2971/fix_for_cron_letsencrypt.php
ssl_cert_chainfile should only contain the intermediate certificate
2016-03-07 11:44:29 +01:00
Daniel Reichelt
fb5fd5a279 Remove certificate on removal of subdomain, fixes #1596 2016-03-06 18:41:45 +01:00
Andreas Grundler
d3bf80342d use $return['chain'] instead of $return['fullchain'] for ssl_cert_chainfile 2016-03-06 14:10:24 +01:00
Michael Kaufmann (d00p)
77502efce7 enhance description of newsfeed-settings; ask whether to activate the newsfeed on install in case admin does not want any external requests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-05 13:56:34 +01:00
Michael Kaufmann (d00p)
ca34f7a78a fix pagination on logger page (admin and customer)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-04 22:14:59 +01:00
Michael Kaufmann (d00p)
eae8b8835b enhance description of newsfeed-settings; show note on disabled admin-newsfeed on admin's dashboard; todo: ask for activation of newsfeed on install-process
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-04 21:57:49 +01:00
Michael Kaufmann (d00p)
58c6b4edb1 minor language changes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-04 13:51:09 +01:00
Michael Kaufmann (d00p)
86252a22a0 fix wrong timestamp function for last_run value for lets-encrypt cron when updating; put mail/file templates to misc-category in the admin-menu; fix wrong html-tag (typo); enhance info-string for redirect-codes, fixes #1564
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-04 13:23:12 +01:00
Michael Kaufmann
964a1716d7 Merge pull request #329 from HolySephi/master
Set myhostname to $mydomain in postfix correctly
2016-03-04 12:54:02 +01:00
Florian Wicke
06862240f0 Update wheezy.xml 2016-03-04 10:31:13 +01:00
Florian Wicke
3119510ef4 Update trusty.xml 2016-03-04 10:29:54 +01:00
Florian Wicke
b4a8ed8828 Update rhel_centos.xml 2016-03-04 10:29:04 +01:00
Florian Wicke
c182664167 Update precise.xml 2016-03-04 10:28:36 +01:00
Florian Wicke
4bba24801c Update jessie.xml 2016-03-04 10:28:03 +01:00
Florian Wicke
274e556989 Update gentoo.xml 2016-03-04 10:27:16 +01:00
Michael Kaufmann (d00p)
74758818e7 remove vhost-template menu entry
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-04 08:47:15 +01:00
Michael Kaufmann
69a191d4e2 Merge pull request #332 from Froxlor/revert_pull_request_318
Revert "Merge pull request #318 from Churro/froxlorMerge_33ab67a"
2016-03-03 23:39:11 +01:00
Michael Kaufmann (d00p)
f9d949f90c Revert "Merge pull request #318 from Churro/froxlorMerge_33ab67a"
This reverts commit 4f2ee129fd, reversing
changes made to f284d67843.
2016-03-03 23:38:02 +01:00
Michael Kaufmann
130d3e7b16 Merge pull request #331 from Froxlor/revert_pull_request_326
Revert "Merge pull request #326 from Churro/froxlorMerge_vhostTemplates"
2016-03-03 23:32:59 +01:00
Michael Kaufmann (d00p)
f6e519d779 Revert "Merge pull request #326 from Churro/froxlorMerge_vhostTemplates"
This reverts commit 319668d384, reversing
changes made to aa592c7369.

Conflicts:
	install/froxlor.sql
	install/updates/froxlor/0.9/update_0.9.inc.php
	lib/version.inc.php
2016-03-03 23:31:19 +01:00
Michael Kaufmann
ca807583df Merge pull request #330 from Froxlor/revert-328-admin_vhostsettings
Revert "Zeige die neue vHost-Konfiguration auch wenn nur mod_php installiert ist." as part of reverting vhost-templates
2016-03-03 23:24:56 +01:00
Michael Kaufmann
e6df2d5d40 Revert "Zeige die neue vHost-Konfiguration auch wenn nur mod_php installiert ist." 2016-03-03 23:24:14 +01:00
Florian Wicke
82c1f29eba Update wheezy.xml 2016-03-03 17:38:36 +01:00
Florian Wicke
fc78a51235 Update trusty.xml 2016-03-03 17:37:47 +01:00
Florian Wicke
28b3eb9585 Update rhel_centos.xml 2016-03-03 17:37:20 +01:00
Florian Wicke
e9e9214910 Update precise.xml 2016-03-03 17:36:52 +01:00
Florian Wicke
03a1f9b9b1 Update jessie.xml 2016-03-03 17:35:13 +01:00
Michael Kaufmann
bee529b7fa Merge pull request #328 from xWuZaa/admin_vhostsettings
Zeige die neue vHost-Konfiguration auch wenn nur mod_php installiert ist.
2016-03-03 12:30:07 +01:00
xWuZaa
6e9615261e show vhostsettings on mod_php 2016-03-03 11:51:57 +01:00
Michael Kaufmann (d00p)
1fad30a43a check for wildcard-serveralias also when a customer edits the domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-02 16:21:29 +01:00
Michael Kaufmann (d00p)
3d5e6152cd update PHPMailer to 5.2.14
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-02 15:41:12 +01:00
Michael Kaufmann (d00p)
24f7d88a5c set version to 0.9.35-rc1 for upcoming release candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-02 15:32:12 +01:00
Michael Kaufmann (d00p)
d6f42dc88c make letsencrypt cron log to the customer system-log, it might contain important information
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-02 15:20:30 +01:00
Florian Aders
42c28e6590 Update README regarding Let's Encrypt
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-03-02 14:36:50 +01:00
Florian Aders
6d8d01058b Set Let's Encrypt to production
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-03-02 14:35:34 +01:00
Florian Aders
2efe715aa0 Fixed typo, thx Guite
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-03-01 09:40:15 +01:00
Florian Aders
4c4916a661 Do not allow Let's Encrypt with AliasDomain until the certificate - storage is reworked
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-29 17:23:14 +01:00
Michael Kaufmann (d00p)
cf8fbe2224 Merge branch 'master' of github.com:Froxlor/Froxlor 2016-02-28 22:07:04 +01:00
Michael Kaufmann (d00p)
573fd69c95 avoid unknown variable if there are no domains in domain-list
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-28 22:04:57 +01:00
Michael Kaufmann
71f502f508 Merge pull request #325 from Churro/froxlorMerge_proftpd
ProFTPD: enable TLS by default, fixes #1522
2016-02-28 09:12:54 +01:00
Johannes Feichtner
f4a9152d8f Added TLS by default for Gentoo 2016-02-27 21:03:14 +01:00
Michael Kaufmann
319668d384 Merge pull request #326 from Churro/froxlorMerge_vhostTemplates
Vhost templates: Added a field to select the target webserver
2016-02-27 20:43:10 +01:00
Johannes Feichtner
101e791add Vhost templates: Extended the cron scripts to check for the designated webserver and referential integrity 2016-02-27 20:19:50 +01:00
Johannes Feichtner
088eef9728 Vhost templates: Added a field to select the target webserver 2016-02-27 20:18:16 +01:00
Michael Kaufmann (d00p)
aa592c7369 re-arrange menu-entries to be better categorized
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-27 20:03:26 +01:00
Michael Kaufmann (d00p)
b67749bcdc allow private networks in AXFR server list
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-27 20:02:46 +01:00
Michael Kaufmann (d00p)
b05105bfdf fix specialsettingsforsubdomains if security questions are being asked when editing a domain, fixes #1598
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-27 19:57:29 +01:00
Michael Kaufmann (d00p)
6a10020e9b respect 'start_servers value must not be greater than max_spare_servers' correctly, thx to Ragnos for the info
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-27 18:52:14 +01:00
Roman Schmerold
9f85074876 Merge pull request #324 from Churro/froxlorMerge_autoresize
Feature: Added autoresize to shell commands
2016-02-27 14:37:05 +01:00
Johannes Feichtner
45bf41db4c ProFTPD: enable TLS by default. Fixes #1522 2016-02-27 14:22:23 +01:00
Johannes Feichtner
06f4907053 Added autoresize to shell commands 2016-02-27 13:17:39 +01:00
Michael Kaufmann
4f2ee129fd Merge pull request #318 from Churro/froxlorMerge_33ab67a
Feature: vHost templates (version 2)
2016-02-26 19:16:49 +01:00
Johannes Feichtner
373cb912d8 - Hide the option on whether to include default directives with webservers different than nginx
- Typo fix
- Indentation fix
2016-02-26 19:08:08 +01:00
Michael Kaufmann
f284d67843 Merge pull request #323 from Churro/froxlorMerge_autoupdate
Improve autoupdate against HTTP MITM and MD5 collisions
2016-02-23 22:53:58 +01:00
Johannes Feichtner
75172f9e8d Fix autoupdate against HTTP MITM and MD5 collisions 2016-02-23 21:52:35 +01:00
Johannes Feichtner
48a1b9489a Copyright fixed 2016-02-23 21:04:43 +01:00
Michael Kaufmann
2e0cb5050f Merge pull request #322 from WebsiteDeveloper/1585
Correctly redirect when admin hits the timeout and is currently in a customer session, fixes #1585
2016-02-23 17:05:29 +01:00
Bernhard Sirlinger
6ddbb10b5a Fix #1585
Redirect to admin_customers.php
2016-02-23 16:28:58 +01:00
Michael Kaufmann
802e12cf7b Merge pull request #321 from nachtgeist/master
cron/apache
2016-02-22 15:41:02 +01:00
Daniel Reichelt
82b43948b4 cron/apache
- fix mixed indentation
- fix trailing whitespace (code+resulting vhost config)
2016-02-22 15:33:02 +01:00
Florian Aders
36cf003ed6 Fixed LE - alias for nginx in other distributions as well
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-22 12:22:08 +01:00
Florian Aders
2286ea751e Merge pull request #320 from guruevi/master
Various fixes for failing nginx/LetsEncrypt
2016-02-22 12:14:12 +01:00
Florian Aders
deb19f2625 Removed unnecessary exit - calls
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-22 12:10:18 +01:00
Evi Vanoost
83fd1ab0ca class.lescript.php: OpenSSL requires integer for key size. DB returns string. Cast string to integer
trusty.xml: All files in conf.d get automatically included causing the location to be out of place and nginx fails to start
cron_tasks.inc.http.30.nginx.php: Location directives should be included in a host, nginx doesn't have the concept of global location directives in the way apache does
2016-02-21 18:55:02 -05:00
Michael Kaufmann
f00a1ca092 Merge pull request #319 from stweil/fix
Add missing function argument to language-check script
2016-02-21 19:45:01 +01:00
Stefan Weil
152b407cb7 Add missing function argument
The function "print_help" expects an argument.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-21 19:07:56 +01:00
Johannes Feichtner
5c5e736776 Order vhost and php settings ascending by domain 2016-02-21 14:56:03 +01:00
Johannes Feichtner
dc71a582fc Enable standard directives by default 2016-02-21 14:55:48 +01:00
Michael Kaufmann (d00p)
fc92e2655c display update-status the way we always do them; fix language strings for new multiple-default-ips
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-21 14:53:50 +01:00
Johannes Feichtner
abe253bc31 Feature: Vhost templates
Reworked the initial implementation by hpmewes (https://github.com/Froxlor/Froxlor/pull/233) with
- bugfixes all over
- added support for apache and lighttpd also
- added an update sequence (instead of only modifying froxlor.sql)
- added english language variables
- added missing parts in admin_vhostsettings.php
- added parameter replacements as available since PR 244
2016-02-21 14:53:24 +01:00
Michael Kaufmann
0559f3c4d6 Merge pull request #317 from Churro/froxlorMerge_0218b5a
Feature: Enable multiple standard IPs, fixes #1509
2016-02-21 14:35:19 +01:00
Johannes Feichtner
ae2bad5ab4 Declare prepared statement only once 2016-02-21 14:20:30 +01:00
Johannes Feichtner
55df79a79c Fix for previous commit: Also delete occasionally existing entries for the newly defined standard IP entries before re-adding them. They could have been assigned separately 2016-02-21 14:00:53 +01:00
Johannes Feichtner
32c32a7e7a Enable multiple standard IPs 2016-02-21 14:00:26 +01:00
Michael Kaufmann
d7ca3a0f1c Merge pull request #303 from Churro/froxlorMerge
Nginx: Fix for redundantly inserted auth blocks
2016-02-21 13:09:29 +01:00
Michael Kaufmann
e8489e55a1 Merge pull request #304 from Churro/froxlorMerge_f437f92
Apache 2.4: Add AllowOverride All, otherwise Apache ignores .htaccess files
2016-02-21 08:18:44 +01:00
Michael Kaufmann
5c90c3aa97 Merge pull request #315 from Churro/froxlorMerge_d02a076
Nginx: Set default curve to secp384r1
2016-02-21 08:09:06 +01:00
Michael Kaufmann
b5e739620d Merge pull request #310 from Churro/froxlorMerge_fe8093f
Nginx: Avoid multiple index directives (common pitfall)
2016-02-21 08:07:58 +01:00
Johannes Feichtner
a328a95c01 Set default curve to secp384r1 2016-02-21 01:23:18 +01:00
Michael Kaufmann
11b3ac67b0 Merge pull request #311 from Churro/froxlorMerge_c5cf2fa
Set correct error log levels (LOG_ERR instead of LOG_ERROR)
2016-02-20 22:20:45 +01:00
Michael Kaufmann
b8e7122452 Merge pull request #309 from Churro/froxlorMerge_a036bfb
Fix fatal error in phpErrHandler with PHP7 and suit cronjob for various PHP versions
2016-02-20 22:20:23 +01:00
Michael Kaufmann
a6bd323a0e Merge pull request #314 from Churro/froxlorMerge_ce6cc23
Feature: Make the MYSQL_PASSWORD string dynamically definable
2016-02-20 22:17:49 +01:00
Michael Kaufmann
4bec449a26 Merge pull request #313 from Churro/froxlorMerge_8265df4
IPs and Ports: Only show attributes used by the current webserver
2016-02-20 22:16:41 +01:00
Dessa
2176482e4f Merge pull request #312 from Churro/froxlorMerge_typos
Typo fix: German word and title capitalization
2016-02-20 21:59:18 +01:00
Johannes Feichtner
9c7092292b Feature: Make the MYSQL_PASSWORD string definable once in order to be able to copy the fragments without further change 2016-02-20 21:36:30 +01:00
Johannes Feichtner
46eeb65ff0 IPs and Ports: Only show attributes used by the current webserver 2016-02-20 21:13:47 +01:00
Johannes Feichtner
dd79a3a78a German typo fix 2016-02-20 21:04:18 +01:00
Johannes Feichtner
fef9e51c9a Capitalization fixed 2016-02-20 21:03:37 +01:00
Johannes Feichtner
c27589e8c2 Set correct error log levels (LOG_ERR instead of LOG_ERROR) 2016-02-20 20:57:31 +01:00
Johannes Feichtner
1ace011ad2 Nginx: Avoid multiple index directives (common pitfall) 2016-02-20 20:40:38 +01:00
Dessa
c269a3d363 Merge pull request #308 from Churro/froxlorMerge_bca75e9
.gitignore update for Idea or WebStorm files
2016-02-20 20:22:21 +01:00
Johannes Feichtner
387be846f1 Fix fatal error in phpErrHandler with PHP7 and suit cronjob for various PHP versions 2016-02-20 20:21:09 +01:00
Johannes Feichtner
a788660efe .gitignore update for Idea files 2016-02-20 19:58:20 +01:00
Michael Kaufmann
73c8643218 Merge pull request #306 from Churro/froxlorMerge_4aeb06e
Nginx: Change fastcgi IPC dir to a path that is definitely existing
2016-02-20 19:50:37 +01:00
Michael Kaufmann
cd7b65395f Merge pull request #305 from Churro/froxlorMerge_6622deb
Nginx: Security-critical fix for faulty directory protection
2016-02-20 19:46:28 +01:00
Johannes Feichtner
1c467d71c7 Changed fastcgi IPC dir to a path that is definitely existing 2016-02-20 19:34:05 +01:00
Johannes Feichtner
a641dfbfc8 Security-critical fix: Nginx directory protection did not prevent access to
PHP scripts

Although the implemented direction protection posed a prompt when
accessing the http://...com/protectedir/
it was still possible to call http://...com/protectedir/script.php

This vulnerability emerges from the precedence order of "location"
statements. The RegEx matching the PHP script is triggered before the
directory protection is evaluated. As a result, the PHP script is
interpreted and path parsing stops due to the circumflex (see
http://nginx.org/en/docs/http/ngx_http_core_module.html#location).

The fix involves adding a PHP parsing snippet to every protected
block. In order to prevent PHP-related config params repeatedly, the
required section is referenced using a prefix.
2016-02-20 19:25:49 +01:00
Johannes Feichtner
268b188133 Apache 2.4: Add AllowOVerride All, otherwise Apache ignores .htaccess
files
2016-02-20 17:59:34 +01:00
Johannes Feichtner
4692d7ef2a Nginx: Changed inefficient RegEx redirect to equivalent 301 2016-02-20 17:30:26 +01:00
Johannes Feichtner
3b9201fb91 Nginx: Fix for redundantly inserted auth blocks
The problem occurs if a Vhost is assigned multiple different auth names
in Froxlor. Each block is then added repeatedly, leading to an
unparseable configuration
2016-02-20 17:21:54 +01:00
Michael Kaufmann
6e0f18b200 Merge pull request #301 from Churro/froxlorMerge
Fix for case insensitivity bug in Apache 2.4.12 + PHP-FPM
2016-02-20 17:17:41 +01:00
Michael Kaufmann
dfee6873da Merge pull request #302 from stweil/typo
Fix some typos in code comments
2016-02-20 17:17:21 +01:00
Stefan Weil
50e7311390 Fix some typos in code comments
Most of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-20 17:10:24 +01:00
Johannes Feichtner
1c4b88d014 Fix for case insensitivity bug in Apache 2.4.12 + PHP-FPM
With Apache 2.4.12, the FPM socket path is always considered as a
lowercase file path regardless of the used capitalization.
If Froxlor creates a socket file containing uppercase characters, Apache fails to find to the socket.
See https://bz.apache.org/bugzilla/show_bug.cgi?id=57968
2016-02-20 16:58:59 +01:00
Michael Kaufmann
0935a9c193 Merge pull request #300 from Froxlor/revert-299-master
Revert "Changes in the config templates"
2016-02-20 15:25:47 +01:00
Michael Kaufmann
8a99bd1d51 Revert "Changes in the config templates" 2016-02-20 15:24:51 +01:00
Michael Kaufmann
be1a12821e Merge pull request #299 from ianklemm/master
Changes in the config templates
2016-02-20 15:21:37 +01:00
Vengance
bc9bc84f23 Update gentoo.xml 2016-02-20 14:27:53 +01:00
Vengance
e5bb58cd91 Update wheezy.xml 2016-02-20 14:24:35 +01:00
Vengance
074b425ee0 Update precise.xml 2016-02-20 14:23:29 +01:00
Vengance
59e599a952 Update rhel_centos.xml 2016-02-20 14:21:26 +01:00
Vengance
3f523a8b58 Update trusty.xml 2016-02-20 14:20:03 +01:00
Vengance
b4667c92e7 Delete Froxlor-master.rar 2016-02-20 13:14:16 +01:00
Vengance
2ce488c03c Update jessie.xml 2016-02-20 12:49:18 +01:00
Vengance
e1448859c9 Added files via upload 2016-02-20 12:46:48 +01:00
Florian Aders
8abd041f36 Remove certificate on removal of subdomain, fixes #1596
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-19 21:01:48 +01:00
Florian Aders
dabd4a4a4e Merge pull request #298 from nachtgeist/logging
Logging
2016-02-19 20:46:22 +01:00
Daniel Reichelt
6ac274a706 cron/apache: use correct constant for loglevel 2016-02-19 20:32:03 +01:00
Daniel Reichelt
3d2b672feb cron logging: really print messages of level >= LOG_WARNING
also fix mixed indentation
2016-02-19 20:32:02 +01:00
Florian Aders
e621e02f92 Allow selecting new keysize, fixes #1594
Prepare database and cron for HSTS, refs #1593
Added option to re-use key and CSR for Let's Encrypt

Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-19 17:35:44 +01:00
Michael Kaufmann (d00p)
e3a594f3e7 do not post configuration form when nothing is selected, fixes #1595
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-19 16:09:50 +01:00
Florian Aders
5982f86db4 Merge pull request #297 from nachtgeist/le
Le
2016-02-19 14:53:37 +01:00
Daniel Reichelt
b071b8c2d9 LE: remove challenge file on failure, take #2 ;) 2016-02-19 14:44:23 +01:00
Daniel Reichelt
185178a91e LE: whitespace fixes
- fix mixed indentations
- remove trailing whitespace
2016-02-19 14:44:22 +01:00
Florian Aders
9ca31c10ae Only store accountkeys in production
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-19 12:27:17 +01:00
Florian Aders
8784efd063 Adding .well-known to .gitignore
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-19 09:41:47 +01:00
Florian Aders
c828e3b0d9 Fixed comment :P
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 22:40:31 +01:00
Florian Aders
45c081990a We don't need to check for the documentroot anymore
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 22:26:44 +01:00
Florian Aders
51b2dc7c23 Alias - configs for Let's Encrypt I forgot
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 21:54:59 +01:00
Florian Aders
9f54e60056 Answer all Let's Encrypt challenges via alias to a directory in Froxlor itself, enables us to answer challenges before the vhost is set, thx PrfDrDrStullenBr for the idea \(vhost - configs for most distributions untested\)
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 21:43:44 +01:00
Florian Aders
5151f50d49 Renamed "debugHandler" to "logger" to be more specific
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 20:47:47 +01:00
Florian Aders
9b08d67ea7 Remove challengefile if challenge fails, thx nachtgeist
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 20:40:41 +01:00
Florian Aders
b002d687c0 Fixed typo
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 14:56:18 +01:00
Michael Kaufmann
1d2b697742 Merge pull request #296 from nachtgeist/logging
logging: replace hard-coded number by PHP loglevel constant
2016-02-18 10:08:55 +01:00
Daniel Reichelt
ac52802caa logging: replace hard-coded number by PHP loglevel constant 2016-02-18 09:18:42 +01:00
Florian Aders
ef3ab72082 Explain more stuff in the logmessages
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-17 15:50:09 +01:00
Florian Aders
aede590af0 Merge pull request #294 from megaspatz/bugfix-letsencrypt-logging
Edited warning for letsencrypt to show domain instead of ssl_redirect
2016-02-17 15:23:41 +01:00
Stefan Heid
c229c11bdf Edited warning for letsencrypt to show domain instead of ssl_redirect 2016-02-17 12:07:19 +01:00
Michael Kaufmann (d00p)
8356860945 add syslog page for customer; pagination needs to be fixed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-17 08:43:00 +01:00
Michael Kaufmann (d00p)
dd5fa3bfff Merge branch 'nachtgeist-logging' 2016-02-17 08:41:44 +01:00
Michael Kaufmann (d00p)
7b29d43c66 Merge branch 'logging' of https://github.com/nachtgeist/Froxlor into nachtgeist-logging 2016-02-17 08:41:17 +01:00
Michael Kaufmann
8d56478187 Merge pull request #293 from stweil/update
Fix update process from Froxlor version 0.9.28-svn1
2016-02-16 21:55:18 +01:00
Stefan Weil
60740973d7 Fix update process from Froxlor version 0.9.28-svn1
A typo in the name of a local variable prevented database updates.
Fix also an unrelated whitespace issue in an empty code line.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-16 21:17:54 +01:00
Florian Aders
453f11dcc4 Merge pull request #292 from stweil/translation
Fix more typos and other issues in German translation
2016-02-16 20:59:01 +01:00
Stefan Weil
a090e44403 Fix more typos and other issues in German translation
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-16 20:54:41 +01:00
Daniel Reichelt
a68effe4e7 logging: add loglevel to syslog output 2016-02-16 20:19:31 +01:00
Daniel Reichelt
2fb091939f remove unused setting system_send_cron_errors 2016-02-16 18:32:08 +01:00
Daniel Reichelt
71248f0adf cron logging: always print messages of level >= LOG_WARNING 2016-02-16 18:13:30 +01:00
Daniel Reichelt
ca80b6372b cron/logging: add choice to always log cronjobs 2016-02-16 17:33:42 +01:00
Daniel Reichelt
e306425428 remove now superfluous $debugHandler fields 2016-02-16 16:24:07 +01:00
Daniel Reichelt
f86a115c6a cron scripts: replace fwrite'ing to lockfile by logging 2016-02-16 16:24:06 +01:00
Florian Aders
ddaadf81d6 Temporarily deactivate ssl_redirect if a new Let's Encrypt certificate needs to be generated
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-16 14:31:07 +01:00
Michael Kaufmann (d00p)
f65af0067d add --debug parameter for froxlor_master_cronjob, thx to nachtgeist for the idea
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-16 10:07:02 +01:00
Michael Kaufmann (d00p)
5109443346 output error message when letsencrypt is checked and wildcard-serveralias in enabled - not just silently disable letsencrypt, people don't read the description and are confused
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-16 08:51:36 +01:00
Michael Kaufmann (d00p)
29a2c78b3f correct typo in mkdir-statement
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-15 16:04:43 +01:00
Michael Kaufmann (d00p)
9ee661d44c correct current dev-version for new installs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-15 16:04:26 +01:00
Florian Aders
ea2fa3be15 Changed CSR - request generation to 4096 bit
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-14 17:31:28 +01:00
Michael Kaufmann
d7ec7a42ba Merge pull request #289 from stweil/master
Fix some issues in the German translation
2016-02-14 09:22:03 +01:00
Stefan Weil
722aed5148 Fix some issues in the German translation
This patch fixes some typos, grammar and wrong words in the first half
of the German translation.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-14 08:06:44 +01:00
Florian Aders
17100ad56a Fixed README regarding Let's Encrypt environment
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-12 20:10:00 +01:00
Michael Kaufmann
a76032f668 Merge pull request #284 from nachtgeist/functions
add function getFormFieldDataText()
2016-02-11 17:59:54 +01:00
Michael Kaufmann
d8d244541a Merge pull request #282 from nachtgeist/cron_tasks_bind
cron tasks: bind: refactor zone creation
2016-02-11 12:33:18 +01:00
Michael Kaufmann
ba5d4f2f5d Merge pull request #287 from megaspatz/0.9.35-dev3-termination-date
Added termination-date to domains
2016-02-11 12:32:20 +01:00
Michael Kaufmann
dce80c4611 Merge pull request #286 from guruevi/master
Fixes nginx error due to duplicate fastcgi parameters
2016-02-11 11:36:54 +01:00
Stefan Heid
eae9c4d78a Typo correction 2016-02-10 22:23:46 +01:00
Stefan Heid
3f606cd953 Bugfix: termination-date in domain-add dialog 2016-02-10 22:16:09 +01:00
Stefan Heid
ae581c2da7 Added termination-date to domains 2016-02-10 21:22:52 +01:00
root
0fbbd8dae7 Fixes nginx error due to duplicate fastcgi parameters 2016-02-10 13:28:25 -05:00
Daniel Reichelt
f4ef5af63b add function getFormFieldDataText()
Previously webserver configs would contain CRLFs from
system.default_vhostconf on admin_settings.php.

This patch adds a new function which automatically gets recognized by
getFormFieldData() and mangles textarea form elements through
str_replace("\r\n", "\n", ...).
2016-02-09 14:45:08 +01:00
Michael Kaufmann
3244c968b5 Merge pull request #283 from nachtgeist/language
language: add message/spelling
2016-02-09 08:57:09 +01:00
Daniel Reichelt
dd0689c13f language: add message/spelling
- add missing message for let's encrypt integrity check
- small spellfixes
2016-02-09 00:33:01 +01:00
Daniel Reichelt
e327a39eac cron tasks: bind: refactor zone creation
cron_tasks/bind: refactor zone creation

DNS records for subdomains managed as main domains (i.e. have
ismainbutsubto>1) get written to separate zone files for each subdomain.
This does not play well with hidden-master setups, where a quering DNS
server would only request a transfer of the topmost parent zone and ignore
SOA records therein to initiate the potentially required transfers of
subzones.

This patch changes how zonefiles are created, so that DNS records of
"ismainbutsubto>1"-domains end up within the zone of the topmost parent
domain. Obviously this relies on correctly set ismainbutsubto-fields of
all subdomains managed as main domain in Froxlor.

Refactoring summary:

- Previously _generateDomainConfig() would be called for each customer
  domain, handle writing the zone file and accumulate the bind config
  data.

  Now writing the zone files is decoupled and both _generateDomainConfig()
  and generateZone() get called from the main loop over the customer
  domains.

- The main loop over customer domains only considers
  "ismainbutsubto==0"-domains, children are handled via recursion within
  walkDomainList() according to the previously collected relations of
  direct children.

- The recursion accumulates the zone data, storing it in $_bind_conf_file
  (which is now a private member) until it gets written to a zone file.
  The resulting structure is written to the debugHandler.

  -- For "ismainbutsubto==0"-domains, generateZone() returns a SOA record
  and further applicable records as usual.

  -- For "ismainbutsubto>0"-domains, generateZone() returns a "$ORIGIN
  $domain"-line and further applicable records as usual. This now excludes
  NS records, since they're no longer required.

- The boolean parameter $froxlorhost=true to _generateDomainConfig() and
  generateZone() was replaced by the additional field
  $hostname_arr['froxlorhost']
2016-02-08 22:43:57 +01:00
Michael Kaufmann (d00p)
e2b908ed8b correct copyright header :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-08 13:53:08 +01:00
Michael Kaufmann (d00p)
aac9ee3ba7 added auto-update from within the panel; re-organized menu-entries (meaningful)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-08 13:34:24 +01:00
Michael Kaufmann
1cd776f660 Merge pull request #281 from nachtgeist/cron_tasks_bind
cron_tasks/bind: cleanup conditions for creation of mail-related and www DNS records
2016-02-08 09:24:45 +01:00
Daniel Reichelt
427b7492dc cron_tasks/bind: fix conditions for mail-related records
This patch adds isemaildomain==1 as an additional condition for the
creation of mx/imap/smtp/pop3/spf-txt records for a domain.

For the hostname entry, this depends on the system setting
dns_createmailentry.
2016-02-08 00:28:45 +01:00
Daniel Reichelt
627e22a2e6 cron_tasks/bind: fix conditions for writing www records
The bind cronjob awlays creates www A/AAAA records, regardless of a
domain's iswildcarddomain or wwwserveralias settings.

With this patch www records only get created if "www alias" is selected
for a domain, i.e. iswildcarddomain is disabled and wwwserveralias is
enabled.
2016-02-08 00:28:45 +01:00
Michael Kaufmann (d00p)
7bf8b74693 Merge branch 'master' of github.com:Froxlor/Froxlor 2016-02-05 15:54:27 +01:00
Michael Kaufmann (d00p)
c7f4dc9045 fix superfluous dollar-sign
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-05 15:54:07 +01:00
Florian Aders
f8ed70c5f2 Log certificate update in syslog etc
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 17:42:00 +01:00
Florian Aders
94f34aada6 Fixed typo
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 17:26:10 +01:00
Florian Aders
2472a52fed Make some Let's encrypt settings configurable
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 17:21:48 +01:00
Florian Aders
172915b5be Store chains correctly
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 16:47:46 +01:00
Florian Aders
ae276a2a59 Fixed updater - timestamp
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 16:45:32 +01:00
Florian Aders
ae115216f6 Clearify description regading wildcars
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 13:38:40 +01:00
Florian Aders
5691b3a8db Merge pull request #280 from EleRas/master
Added basic let's encrypt - supprt, fixes #1470
2016-02-03 11:53:05 +01:00
Florian Aders
c9815be0c7 German translation and hint that let's enrypt is still beta
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-02 22:15:41 +01:00
Florian Aders
1814407bfd Throw exception if no challenges are returned at all
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-02 11:17:04 +01:00
Florian Aders
40f2fa432b Merge pull request #279 from heaven73/patch-3
Update cron_tasks.php
2016-02-01 22:00:40 +01:00
Chris Energia Positiva
e10732c058 Update cron_tasks.php 2016-02-01 21:53:07 +01:00
Florian Aders
cdb00a76ce Log cert - error in syslog/database
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 21:23:01 +01:00
Florian Aders
efc5f37850 Well, we need a new key if we don't havre one, not if we already have one
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 20:58:49 +01:00
Florian Aders
ba1181e8ff Fixed inserting of certificate if it didn't exist yet and return textbased domainkey, not ressource
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 20:47:16 +01:00
Florian Aders
6023e65f7d Corrected version
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 12:55:08 +01:00
Florian Aders
eff978e5f6 Using different texts in admin and customer interface
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 11:36:20 +01:00
Florian Aders
daf32b8ac4 Froxlor doesn't use namespaces yet :/
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 10:19:31 +01:00
Michael Kaufmann (d00p)
5228e0f3d6 normalize path in appendOpenBasedirPath() after empty check as this results in an assert in makeCorrectDir()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-01 09:35:31 +01:00
Florian Aders
9fc47f55b8 Minor rewording 2
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 16:03:10 +01:00
Florian Aders
435edd53f2 Minor rewording
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 12:27:00 +01:00
Florian Aders
c36fb7e809 Added description on how to activate the production version of Let's Encrypt
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 12:21:21 +01:00
Florian Aders
e74a418405 Fixed description
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 12:13:15 +01:00
Florian Aders
7814499b87 Added cronjob to database and added a hint to the README
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 12:09:54 +01:00
Florian Aders
b62f4ef911 Copied ssl_redirect - integritsycheck for lets encrypt
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 11:49:33 +01:00
Florian Aders
b32c2bb994 Just a small lng - change
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 11:42:16 +01:00
Florian Aders
dd9e540ca3 inserttask(1) after updating certificates, updated install/update - SQL
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 15:19:40 +01:00
Florian Aders
272ba3f74e Display warning about wildcard - domains with let's encrypt
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:54:20 +01:00
Florian Aders
d87fc4c717 Prevent enabling let's encrypt for wildcard - domains
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:46:00 +01:00
Florian Aders
c189ad759b Add Let's Encrypt to admin - GUI
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:34:26 +01:00
Florian Aders
f3a7a9c342 Fix formfield
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:22:32 +01:00
Florian Aders
51d554ab14 Also: use the new icon
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:13:45 +01:00
Florian Aders
cb97ff0dc7 Add icon and fixed list
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:11:58 +01:00
Florian Aders
7b5a425913 Always hide the SSL - editor if using let's encrypt
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:05:12 +01:00
Florian Aders
44d08d6aa9 Add let's encrypt to customer domain - GUI
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 13:59:34 +01:00
Florian Aders
e0e1085c73 Fix your SQL, dude
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 13:14:51 +01:00
Florian Aders
67df9dbf6b Experiment with accountkeys per customer
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 13:06:42 +01:00
Florian Aders
2e7dd6f212 Changed comments to // to match the rest of Froxlor and made small improvements to the accountKey
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 10:56:08 +01:00
Florian Aders
ed2837f1db Added linebreak to logmessage of class
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-29 16:59:00 +01:00
Florian Aders
d45e9e63e6 Fixed a few obvious bugs
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-29 16:52:58 +01:00
Florian Aders
4f0c1894a3 Initial version of let's encrypt renewal cron
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-29 14:29:30 +01:00
Michael Kaufmann
a3032fc62a Merge pull request #278 from hph86/prevent_dir_traversal_in_paths
prevent directory traversal in paths
2016-01-29 07:43:22 +01:00
Hanno Heinrichs
6eeaf66e2c prevent directory traversal in paths 2016-01-28 22:40:54 +01:00
Michael Kaufmann
7f82549e23 Merge pull request #277 from hph86/fix_path_blacklist
fix blacklisting of characters in paths
2016-01-28 22:00:56 +01:00
Michael Kaufmann (d00p)
2bb8f707eb fix second argument for rand() function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-28 21:19:48 +01:00
Hanno Heinrichs
37176aa022 fix blacklisting of characters in paths 2016-01-28 21:14:28 +01:00
Michael Kaufmann (d00p)
ad302fb5c2 display correct path (leading slash missing sometimes)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-28 08:51:17 +01:00
Michael Kaufmann (d00p)
da4ec3e1b5 avoid rand() if possible as it is not generating cryptographically secure values, thx to Hanno for putting some effort into this
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-28 08:27:15 +01:00
Michael Kaufmann
ebedb97fae Merge pull request #275 from stweil/master
Fix typos in comments
2016-01-26 07:41:51 +01:00
Stefan Weil
ddd4c2ad3d Fix typo in comment
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-01-25 17:15:17 +01:00
Stefan Weil
007242e341 Fix typo in comment (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-01-25 17:14:43 +01:00
Roman Schmerold
0932b38364 Merge pull request #274 from stweil/master
README: Update supported Debian versions
2016-01-25 17:09:01 +01:00
Stefan Weil
5c0ba566e0 README: Update supported Debian versions
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-01-24 22:21:26 +01:00
Michael Kaufmann
67b97dbefd Merge pull request #273 from xWuZaa/fastcgi_params
remove Duplicate fastcgi_index
2016-01-21 12:01:25 +01:00
xWuZaa
4d2f72a814 remove duplicate fastcgi_index from fastcgi_params in nginx config templates 2016-01-21 11:51:33 +01:00
Michael Kaufmann
9d1108c2f4 Merge pull request #272 from hypernics/opcache
add new OPCache info page
2016-01-21 07:46:16 +01:00
Janos Muzsi
cd75bb843a wrong variable 2016-01-20 23:52:46 +01:00
Janos Muzsi
fb6393ad8f OPCache info page 2016-01-20 22:12:43 +01:00
Dessa
1ba2800a30 Merge pull request #271 from mmunz/master
German Translations: Fix typo
2016-01-20 13:13:41 +01:00
Manuel Munz
9d78ad70e6 German Translations: Fix typo 2016-01-20 13:10:48 +01:00
Michael Kaufmann (d00p)
98c675792e fix possible undefined values used in templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-18 11:33:41 +01:00
Robert Förster (Dessa)
39b50d05ec fix lintian warning executable-not-elf-or-script 2016-01-18 10:54:46 +01:00
Michael Kaufmann (d00p)
a6182e2def set new version for bugfix release :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-18 10:53:54 +01:00
Michael Kaufmann (d00p)
efdb3623e1 fix return value usage in write-context
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-18 10:51:39 +01:00
Michael Kaufmann
eef6102088 Merge pull request #270 from hypernics/apcuinfo
add PHP APCu Info page
2016-01-18 10:21:05 +01:00
Michael Kaufmann (d00p)
9fe55cb729 set version to 0.9.34.1 for upcoming maintenaince release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-18 08:07:16 +01:00
Janos Muzsi
13870f3ae8 APCu Info page 2016-01-17 01:17:43 +01:00
Michael Kaufmann (d00p)
ca9670e832 update copyright year in static standard-customer-index page
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-15 10:26:00 +01:00
Michael Kaufmann (d00p)
29494b71fa do not create vhost content for ssl-vhosts that do not have a ssl-certificate specified, fixes #1583
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-15 09:40:59 +01:00
Michael Kaufmann (d00p)
f2c3b3f165 ignore errors when deleting old statistics-index-page in case this is the first run and no index.html exists yet
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-11 09:14:09 +01:00
Michael Kaufmann (d00p)
4e402b6378 unset js and css variables of theme after using footer-template so they can be used there instead of the header-template only, fixes #1580
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-11 07:14:57 +01:00
Michael Kaufmann (d00p)
6a22fbbf78 fix wrong webserver-setting when chosing apache-2.4 in the installation process, thx to TByte
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-27 16:26:15 +01:00
Michael Kaufmann (d00p)
27f2217139 fix typo, refs #1578
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-21 14:23:17 +01:00
Michael Kaufmann (d00p)
038bb803db fixing more path-related warnings when editing an ftp-user, refs #1578 2015-12-21 14:12:30 +01:00
Michael Kaufmann (d00p)
67b85e5708 fix path displaying in some cases
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-21 08:32:04 +01:00
Michael Kaufmann (d00p)
a21b1f7df5 correct display of paths in domain- and ftp-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-09 08:49:43 +01:00
Michael Kaufmann (d00p)
eb6e66cbf2 do not double mailbox-paths in postfix config, fixes #1575
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-09 08:49:15 +01:00
Michael Kaufmann
778fe718ed Merge pull request #261 from knox/master
added more php_value and php_flag for suhosin
2015-11-29 20:05:32 +01:00
Michael Kaufmann
ef080cd80e Merge pull request #262 from knox/feature/suexec-workaround
improvements of suexec-workaround
2015-11-29 20:05:10 +01:00
knox
22a4a1824a remove suexec-workaround when removing dir options 2015-11-29 18:21:30 +01:00
knox
56163f66d8 fixed ownership of cgi-bin symlink created by suexec-workaround
see http://manpages.debian.org/cgi-bin/man.cgi?apropos=0&format=html&query=chown&sektion=1&locale=en
2015-11-29 17:24:24 +01:00
knox
73a7e438ec added more php_value and php_flag for suhosin
see https://suhosin.org/stories/howtos.html and https://suhosin.org/stories/configuration.html
2015-11-29 16:08:22 +01:00
Michael Kaufmann
27f4e226f3 Merge pull request #260 from knox/master
added php_flag 'suhosin.session.encrypt' and 'mbstring.func_overload'
2015-11-23 09:38:27 +01:00
knox
7357029a28 added php_flag 'suhosin.session.encrypt' and 'mbstring.func_overload'
these are required for custom php configuration for roundcube webmail
2015-11-22 13:41:06 +01:00
Michael Kaufmann (d00p)
accfd6fa14 allow /dev/urandom to be used in open_basedir path, as some applications may require that (*cough* owncloud), thx to J-BBB
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-20 14:20:15 +01:00
Michael Kaufmann
77dcc37b33 Merge pull request #259 from stweil/master
Don't assign variable from void function
2015-11-15 10:26:39 +01:00
Stefan Weil
5df4b3e7df Don't assign variable from void function
Database::pexecute is based on execute which is a void function.
It does not return a value which can be assigned to a variable.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-15 10:16:33 +01:00
Roman Schmerold
997141efea Merge pull request #257 from stweil/master
templates: Code cleanup
2015-11-14 19:16:11 +01:00
Stefan Weil
6fe0f56e41 templates: Code cleanup
* Remove unneeded semicolon.
* Add missing semicolon.
* Add linefeed at end of file

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-14 19:09:39 +01:00
Michael Kaufmann
8c3b7b518f Merge pull request #256 from lobeck/master
fix ssl setttings for rewrite vhosts on nginx, fixes #1568
2015-11-14 14:14:57 +01:00
Christian Becker
6996f6516c fix ssl setttings for rewrite vhosts on nginx, fixes #1568
- previously the ssl settings were missing in rewrite vhosts
- this caused ssl errors for these hosts as the default certificate has been used instead of the vhost specific cert.
- this seem to only apply for nginx, not apache
2015-11-14 14:10:23 +01:00
Michael Kaufmann
60cc071031 Merge pull request #255 from stweil/typos
Fix typos found by codespell, thx to stweil
2015-11-13 08:05:27 +01:00
Stefan Weil
fe5ab0d8da Fix typos found by codespell
Fix also a grammar issue.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-13 07:56:12 +01:00
Michael Kaufmann (d00p)
0939d032a5 fix wrong vhost creation with nginx when customer is deactivated and no docroot for deactivated users was given, fixes #1565
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:42:32 +01:00
Michael Kaufmann (d00p)
d21391e8ba add apache-2.4 to the installer so apache-2.4 users get the 2.4 mods activated right away, NOTE: we cannot find out whether you're on 2.2 or 2.4 - so you should now what you got and select the correct one, fixes #1566
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:27:07 +01:00
Michael Kaufmann (d00p)
0651dc28c8 fix filename in ubuntu trusty
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:18:46 +01:00
Michael Kaufmann (d00p)
5b8fea9378 introduce warning-progress-bar-color when using -15% of the given web/traffic max-warn level (default 90%), fixes #1567
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:18:28 +01:00
Michael Kaufmann (d00p)
eda055acca Allow always_populate_raw_post_data to be set in php.ini for php-fpm, fixes #1562
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-04 11:35:05 +01:00
Michael Kaufmann
7fb3918773 Merge pull request #253 from github-ivan/master-fixes
Checking for possible duplicate froxlor-local user entries in ftp-group
2015-10-30 15:58:08 +01:00
Krisztian Ivancso
4e38f614f2 Checking froxlor-local user membership in ftp-group
It prevents possible duplication in list.
2015-10-25 11:48:21 +01:00
Robert Förster (Dessa)
c7d8cb6d33 switch postfix default to postfix 3 on gentoo since this is what is stable for a while already (2.x got dropped back to ~arch and will be removed from the template once removed from the tree) 2015-10-20 02:59:44 +02:00
Dessa
e211fb891b Merge pull request #252 from rpasing/master
Fix problems in Dovecot quota configuration:
2015-10-20 02:53:07 +02:00
Rene Pasing
05f3e8f433 Fix problems in Dovecot quota configuration:
1) Since Dovecot 2.x, quota rules are by default in bytes,
  and not in kilobytes (hence multiplicating with 1024 is
  not going to be megabytes). Fixed this by adding 'M' suffix.

2) Since Dovecot 2.x, the quota rule is always named `quota_rule`
  or (for userdb prefetch) `userdb_quota_rule` (there were some
  incorrect namings in the distribution configs).

Ref: http://wiki2.dovecot.org/Quota/Configuration#MySQL
2015-10-20 02:26:28 +02:00
Michael Kaufmann (d00p)
b6949e12b1 correct gentoo.xml config-templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-19 09:04:14 +02:00
Michael Kaufmann
0772952e71 Merge pull request #251 from Commifreak/master
Update froxlor.sql
2015-10-18 18:19:39 +02:00
Robin Kluth
dc4d5c6953 Update froxlor.sql
Did someone forget the M after 128 in the Default PHP-Config? ;)
2015-10-18 18:09:26 +02:00
Robert Förster (Dessa)
9d45f4d534 Revert "ease file-permissions, they sometimes cause issues"
This reverts commit 5ead5e9c90.

part of this commit is reverted as most files shouldn't be world readable
2015-10-08 00:32:13 +02:00
Michael Kaufmann (d00p)
2b8a9a74be move checkCrondConfigurationFile() from cron_init to cron_shutdown so a forced regeneration of the cron.d-file is being handled in the same cronrun
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-05 20:10:55 +02:00
Michael Kaufmann (d00p)
d226af5314 do not select cron.d-file-regeneration task in cron_task as it is not being handled there
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-04 17:30:33 +02:00
Michael Kaufmann (d00p)
be5a13fbb1 crypt() does not seem to like some special-characters in its salts, so we skip'em whenever we are generating a password as a salt-value, thx to Tobse101 for a nice debugging session ;)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-02 17:09:41 +02:00
Michael Kaufmann (d00p)
94b43021ff sort libnss-result by length of name to always return the 'base'user instead of a ftp-user (because select does not have a default order), fixes #1556
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-21 10:26:18 +02:00
Michael Kaufmann (d00p)
0b901af0f0 define array for mod_php users, fixes #1555
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-14 22:23:40 +02:00
Michael Kaufmann (d00p)
5ead5e9c90 ease file-permissions, they sometimes cause issues
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-12 20:33:28 +02:00
Michael Kaufmann (d00p)
1cdaa1d727 revert wrong changes from pull-request
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-10 08:28:12 +02:00
Michael Kaufmann
2c38bca1b5 Merge pull request #250 from blueJack92/patch-3
Fixing (possible) permission problems of configuration files
2015-09-10 08:19:41 +02:00
blueJack92
7c45ca220b Fixing some (big) peanuts
Fixing permission problems with files, which have 0640 as file attributes.
Fixing problems in main.cf (Postfix). setgid_group must be set, otherwise running newaliases will fail.
Moreover I set the missing paths correctly in the main.cf (regard to Debian Jessie).
2015-09-09 23:33:27 +02:00
Michael Kaufmann (d00p)
bdb2115c16 allow one-character usernames (or mysql-prefix)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-09 23:01:24 +02:00
Michael Kaufmann (d00p)
e23bf72006 remove syntax-error from pull-request #249...
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-09 09:32:35 +02:00
Michael Kaufmann
7c63b78bbb Merge pull request #249 from 5nafu/findDirs
Fix Regression from commit 687c5ce for Bug #611
2015-09-09 07:44:14 +02:00
5nafu
b611ebcccb Fix Regression from commit 687c5ce for Bug #611:
Ignore unreadable directiories instead of stoping after first unreadable
directory in function.findDirs.
This Fix comes from php.net user antennen @
http://php.net/manual/en/class.recursivedirectoryiterator.php#101654
2015-09-08 21:29:59 +02:00
Michael Kaufmann (d00p)
722d17b211 [configfiles] correct permissions for froxlor_bind.conf
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-08 08:21:33 +02:00
Michael Kaufmann (d00p)
afbfb810fd [configfiles] don't mv a file that is to be backed up but has mode=append, use cp instead
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-08 08:18:32 +02:00
Michael Kaufmann (d00p)
1d3ae4f2c8 merged current stable 0.9.34 release as master
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-07 15:24:40 +02:00
Michael Kaufmann (d00p)
9bf784f64e set version to 0.9.34 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-07 13:33:22 +02:00
Michael Kaufmann (d00p)
116c0e19b2 add managesieve/sieve config-template for dovecot to Gentoo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-04 19:34:09 +02:00
Michael Kaufmann (d00p)
7939187916 remove old/unused config-template-files (replaced by XML)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-04 10:56:20 +02:00
Piotr Rzeczkowski
9d40e0903b Allow max_input_vars in PHP-FPM configuration 2015-08-30 08:37:57 +02:00
Roman Schmerold
320adad154 Merge pull request #248 from rzeka/master
Allow max_input_vars in PHP-FPM configuration
2015-08-24 17:06:23 +02:00
Piotr Rzeczkowski
c52df5b286 Allow max_input_vars in PHP-FPM configuration 2015-08-24 12:18:56 +02:00
Michael Kaufmann (d00p)
30a25c0e8c comment out unexisting group 'Debian-exim' when exim is not installed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-20 20:50:35 +02:00
Michael Kaufmann (d00p)
95035afe38 comment out unexisting group 'Debian-exim' when exim is not installed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-20 20:49:56 +02:00
Roman Schmerold (BNoiZe)
62559dd2b4 Fixed undefined error in admin_customers.php
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-08-19 07:16:05 +02:00
Roman Schmerold (BNoiZe)
a6473695eb Fixed width of email inputs
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-08-19 07:06:52 +02:00
Frank Gehann
edd60d3331 Fixed composeSslSettings which used variables not available in the function scope. 2015-08-18 11:03:06 +02:00
Michael Kaufmann
c9e4819f3f Merge pull request #247 from Tak0r/master
Fixed unknown variables in composeSslSettings
2015-08-16 20:08:14 +02:00
Frank Gehann
7cf321b24a Fixed composeSslSettings which used variables not available in the function scope. 2015-08-16 15:45:48 +02:00
Michael Kaufmann (d00p)
3b96efc04d forgot to use the new distro-editor variable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-13 15:46:21 +02:00
Michael Kaufmann (d00p)
8a17a90b1a forgot to use the new distro-editor variable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-13 15:45:53 +02:00
Michael Kaufmann (d00p)
4da3a87772 instead of env-variable, show ditro editor which is defined in the xml
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-13 15:42:57 +02:00
Michael Kaufmann (d00p)
ab9b92112d instead of env-variable, show ditro editor which is defined in the xml
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-13 15:37:34 +02:00
Michael Kaufmann (d00p)
161e11a8dd fix subdir-value if homeDir == dirToCreate in mkDirWithCorrectOwnership(), fixes pr #246
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-03 17:50:16 +02:00
Michael Kaufmann (d00p)
967bd45a63 fix subdir-value if homeDir == dirToCreate in mkDirWithCorrectOwnership(), fixes pr #246
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-03 17:46:29 +02:00
Michael Kaufmann (d00p)
e1b80b513d add umask form-field, fixes #1486 (0_9_34)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 13:22:23 +02:00
Michael Kaufmann (d00p)
6abe0bdaec allow customization of umask in php-fcgi-starter scripts, refs #1486
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 13:21:50 +02:00
Michael Kaufmann (d00p)
7b5069f1b9 add umask form-field, fixes #1486 (master)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 13:21:23 +02:00
Michael Kaufmann (d00p)
4429c5e8b2 allow customization of umask in php-fcgi-starter scripts, refs #1486
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 13:20:31 +02:00
Michael Kaufmann
5136824844 Merge pull request #244 from greybyte/vhost_config_variables
Variable substitution in vhost specialconfig
2015-07-31 12:02:40 +02:00
Michael Kaufmann
918e9ed408 Merge pull request #244 from greybyte/vhost_config_variables
Variable substitution in vhost specialconfig
2015-07-31 11:45:30 +02:00
Michael Kaufmann (d00p)
8e8c97f7f9 avoid empty value for makeCorrectDir as the assert-check runs before evaluating to / in certain places
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 10:45:06 +02:00
Michael Kaufmann (d00p)
d86fb7ed23 avoid empty value for makeCorrectDir as the assert-check runs before evaluating to / in certain places
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 10:44:33 +02:00
Michael Kaufmann (d00p)
819db2583b add mpm-itk to the list of dependents of libnss-mysql; fix proftpd-sql config for jessie; update powerdns-config for jessie
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 09:19:47 +02:00
Michael Kaufmann (d00p)
089fb25da7 add mpm-itk to the list of dependents of libnss-mysql; fix proftpd-sql config for jessie; update powerdns-config for jessie
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 09:18:57 +02:00
Michael Kaufmann (d00p)
3d01947f3d fix wrong tpl-variable-name
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-30 11:36:48 +02:00
Chris Vigelius
19d94471d9 Merge branch 'master' into vhost_config_variables, and replace IS_SSL with SCHEME
Conflicts (resolved):
	lng/english.lng.php
	lng/german.lng.php
2015-07-30 11:35:26 +02:00
Michael Kaufmann (d00p)
8d26f583e9 fix wrong tpl-variable-name
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-30 11:35:24 +02:00
Michael Kaufmann (d00p)
12723d4941 add update compatibility for bugfix-release 0.9.33.2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 18:11:14 +02:00
Michael Kaufmann (d00p)
0455cb96ca add update compatibility for bugfix-release 0.9.33.2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 18:09:42 +02:00
Michael Kaufmann (d00p)
532c5d1b9f revert the new formfield-layout for customer-mysql
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 16:03:55 +02:00
Michael Kaufmann (d00p)
565bb55b13 display description of integrity-check rather then just the function-name, makes things clearer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 15:58:53 +02:00
Michael Kaufmann (d00p)
744d85ec4c display description of integrity-check rather then just the function-name, makes things clearer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 15:58:27 +02:00
Michael Kaufmann (d00p)
5e60b96cd6 add tentative jessie config xml file, testers are welcome
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 14:57:56 +02:00
Michael Kaufmann (d00p)
8b6f708b7c remove unused (old) php-configfile-files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 14:57:12 +02:00
Michael Kaufmann (d00p)
5096e2d68d add tentative jessie config xml file, testers are welcome
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 14:56:06 +02:00
Michael Kaufmann (d00p)
b0325983a1 log db errors to syslog and remove tmp-error-logs for reporting in cronrun
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 13:20:10 +02:00
Michael Kaufmann (d00p)
7cd6651895 replace passwords even before logging, not just for display
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 13:20:05 +02:00
Michael Kaufmann (d00p)
4ec376b296 log db errors to syslog and remove tmp-error-logs for reporting in cronrun
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 13:19:32 +02:00
Michael Kaufmann (d00p)
8558533a91 replace passwords even before logging, not just for display
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 13:11:38 +02:00
Michael Kaufmann (d00p)
de4a953bb7 check for existence of ssl-related files for ip/port vhost in order to avoid the webserver to be unable to restart when the cronjob runs; fixes #1485
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 15:44:10 +02:00
Michael Kaufmann (d00p)
26a41a0672 check for existence of ssl-related files for ip/port vhost in order to avoid the webserver to be unable to restart when the cronjob runs; fixes #1485
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 15:41:31 +02:00
Michael Kaufmann (d00p)
a1d38dc05f solve sub-sub-domain-problem by dynamically assigning vhost-number in vhost-filename (the deeper the lower the number thus being included earlier), fixes #1535
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 15:13:32 +02:00
Michael Kaufmann (d00p)
222841f09b solve sub-sub-domain-problem by dynamically assigning vhost-number in vhost-filename (the deeper the lower the number thus being included earlier), fixes #1535
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 15:11:55 +02:00
Michael Kaufmann (d00p)
fce9de7372 remove superfluous call to 'getDomainRedirectCode' as its been called before; allow changing of redirect-code when domain has 'ssl-redirect' = 1 2015-07-28 13:21:02 +02:00
Michael Kaufmann (d00p)
8332b77fcc remove superfluous call to 'getDomainRedirectCode' as its been called before; allow changing of redirect-code when domain has 'ssl-redirect' = 1 2015-07-28 13:20:11 +02:00
Michael Kaufmann (d00p)
f4f1315715 fix undefined-indeces when search-result contained only subdomains in customer-domains
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 08:23:54 +02:00
Michael Kaufmann (d00p)
5d423c9e63 fix undefined-indeces when search-result contained only subdomains in customer-domains
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 08:23:10 +02:00
Michael Kaufmann (d00p)
895be02237 remove unused (old) php-configfile-files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 08:22:00 +02:00
Michael Kaufmann (d00p)
95475f7b52 change default ssl-cipher-list; minor changes in config-xmls, fixes #1541
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-08 16:08:31 +02:00
Michael Kaufmann (d00p)
c3da264cfe change default ssl-cipher-list; minor changes in config-xmls, fixes #1541
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-08 16:04:18 +02:00
Chris Vigelius
89c4b969d1 make sure we fill all context parameters in any case 2015-07-06 21:21:07 +02:00
Chris Vigelius
9dbc04678c correct path for nginx 2015-07-06 17:16:49 +02:00
Chris Vigelius
ed9e524e03 use absolute path and require_once, instead of relative include 2015-07-06 17:09:49 +02:00
Chris Vigelius
c2d75c7030 add description and normalize {IS_SSL} value 2015-07-06 15:09:13 +02:00
Chris Vigelius
de84419035 add nginx and lighttpd support, refactor into common base class 2015-07-06 14:15:01 +02:00
Chris Vigelius
d9e0854bb7 add docroot 2015-07-06 13:45:10 +02:00
Chris Vigelius
558b779944 allow variables in special config 2015-07-06 13:28:09 +02:00
Michael Kaufmann
628b45efeb Merge pull request #243 from greybyte/defuse_dangerous_delete
fix potentially dangerous programming
2015-06-25 14:21:50 +02:00
Chris Vigelius
92cf4c16e3 missing semicolon 2015-06-25 14:08:19 +02:00
Chris Vigelius
3cad16d2b7 fix dangerous code 2015-06-25 13:49:55 +02:00
Michael Kaufmann
e7503c3c7a Merge pull request #242 from andre-luiz-dos-santos/patch-1
Update english.lng.php
2015-06-23 21:33:16 +02:00
André Luiz dos Santos
db8e643c62 Update english.lng.php 2015-06-23 16:22:34 -03:00
Michael Kaufmann (d00p)
a1337df44f do not show error-trace / sensitive data when db-server is down or login credentials are wrong
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-11 21:02:39 +02:00
Michael Kaufmann (d00p)
ee73eaee5c adjust fastcgi conf for php-fpm when using apache-2.4
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-11 21:01:41 +02:00
Michael Kaufmann (d00p)
94f3b99ad0 do not show error-trace / sensitive data when db-server is down or login credentials are wrong
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-11 21:00:45 +02:00
Michael Kaufmann (d00p)
d0c4d5616a adjust fastcgi conf for php-fpm when using apache-2.4
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-11 20:59:41 +02:00
Roman Schmerold (BNoiZe)
38f36841e3 Merge branch '0_9_34' of github.com:Froxlor/Froxlor into 0_9_34 2015-06-10 16:26:49 +02:00
Roman Schmerold (BNoiZe)
340f3bcf8c Add missing LSB tags, thanks to Wuzaa, fixes #1492
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-06-10 15:41:51 +02:00
Michael Kaufmann (d00p)
cd1e03c033 fix openbasedir-path when using mod_php, fixes #1507
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-10 15:31:15 +02:00
Roman Schmerold (BNoiZe)
ba002a1683 Merge commit '97816748498982799832238d1a2ba441ae16b91b' into 0_9_34
* commit '97816748498982799832238d1a2ba441ae16b91b':
  the awstats files live in the non static outputdir.

Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-06-10 15:07:42 +02:00
Roman Schmerold (BNoiZe)
457e378d1e Reverting HTMLform2 changes
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-06-10 14:59:38 +02:00
Michael Kaufmann
9781674849 Merge pull request #241 from m4rcu5/master
Correcting a minor type in Feature #545
2015-06-10 14:59:26 +02:00
Marcus van Dam
d9660e66a8 the awstats files live in the non static outputdir. 2015-06-10 14:43:50 +02:00
Michael Kaufmann
25f4f3900e Merge pull request #240 from m4rcu5/master
access to stats from previous months with awstats, fixes #545
2015-06-01 19:32:14 +02:00
Marcus van Dam
83e904c9f7 Feature #545: Prevent ln from linking withing the current symlink. 2015-06-01 16:24:45 +02:00
Marcus van Dam
9bbdb1b3b9 Feature #545: Include the awstatsGenerateIndex in cronjob.
Seperate the awstats updates output directory from the awstats static
output directory.
Switch to zero padded months.
Symlink current month to 'current' directory (force needed to update
the link if it already exists)
2015-06-01 14:55:43 +02:00
Marcus van Dam
f6cdc0575b Feature #545: function to deploy the index and nav templates
Should deploy the html files with its template variables replaced
into the awstats root.
2015-06-01 14:45:20 +02:00
Marcus van Dam
2017bc9cf6 Feature #545: New index.html and nav.html templates
These templates should later provide the navigation and index for the
per month based awstats.
2015-06-01 14:06:05 +02:00
Marcus van Dam
7e8e28fc90 Move to a generic awstats template directory
We need this generic directory for future changes in Feature #545.
Some line-ending cleanup included.
2015-06-01 13:09:43 +02:00
Michael Kaufmann
30c883c85d Merge pull request #239 from RipClaw2971/apache24_fix
Set require all directive when using mod_proxy_fcgi, fixes #1533
2015-05-12 08:24:01 +02:00
Andreas Grundler
16568c11f1 Fix für Apache 2.4 + mod_proxy_fcgi 2015-05-11 22:23:49 +02:00
Michael Kaufmann
f90982347a Merge pull request #238 from xWuZaa/master
Add custom port to userdata.inc.php
2015-05-07 20:17:11 +02:00
xWuZaa
bd5647351e Add custom port to userdata.inc.php 2015-05-07 19:58:48 +02:00
Michael Kaufmann (d00p)
ec77e47cd6 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-05-06 15:37:46 +02:00
Michael Kaufmann (d00p)
565866c529 adjust default memory_limit to php's default (128M)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-05-06 15:37:38 +02:00
Michael Kaufmann
e4a262eb7b Merge pull request #235 from rzeka/master
Better customers sorting based on name and company
2015-04-28 14:25:40 +02:00
rzeka
a3f2fa1b16 Better customers sorting based on name and company 2015-04-28 14:14:12 +02:00
Michael Kaufmann (d00p)
e0ef3e9984 fix mpm-itk stuff, thx to Ithariel; minor fixes in updater 2015-04-22 15:58:04 +02:00
Michael Kaufmann (d00p)
bf30c1a3d7 fix escaping of shell commands in new xml-config-template-files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-11 16:51:56 +01:00
Michael Kaufmann (d00p)
c2c573902f separate dovecot for postfix and exim4 as exim4 needs 'special treatment'...
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-11 16:42:22 +01:00
Michael Kaufmann (d00p)
d874ebf1b0 use correct username of bind-daemon in debian wheezy config templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-11 14:30:22 +01:00
Michael Kaufmann (d00p)
8ef6032570 also re-generate bind configs (if enabled) when using --force with the cronjob
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-11 11:21:17 +01:00
Michael Kaufmann (d00p)
b32a6951da add Debian-exim group to dovecots Exim4-unix_listener, fixes #1513 2015-03-11 09:44:43 +01:00
Robert Förster (Dessa)
b7bc347323 fix language string 2015-03-10 20:35:33 +01:00
Michael Kaufmann
07e49e53c5 Merge pull request #231 from dadadom/master
Add missing table definition for table 'mail_autoresponder' for older updaters
2015-03-08 13:56:45 +01:00
Dominik Sandjaja
b87db2a82b Add missing table definition for table 'mail_autoresponder'.
Add the define for the mail_autoresponder table. This define is needed in the update_0.9.inc.php script which is used when updating from an early version of froxlor or from SysCP.
2015-03-08 13:54:36 +01:00
Michael Kaufmann (d00p)
c150d559c7 enhance domain-importer, fixes #1512
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-06 20:28:41 +01:00
Michael Kaufmann (d00p)
5dce0db661 dont create 'require all granted' if the directory is protected by a customer (htaccess), fixes #1455 (again); thx to Laryllian
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-02 20:25:41 +01:00
Michael Kaufmann (d00p)
27514d32de visible-tag needs to respect the do_show-value in case websrv_avail set do_show to false already
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-02 13:41:14 +01:00
Michael Kaufmann (d00p)
fe718ef67f add requirement for mbstring-extension as we need to be multibyte-character-safe in generatePassword(); adjust special-character-default setting to be the same as on a fresh install; outsource version-definition to separate file; set version to 0.9.34-dev3
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-23 12:23:44 +01:00
Michael Kaufmann (d00p)
e132723475 PDOStatement::rowCount is a function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-20 11:56:24 +01:00
Michael Kaufmann (d00p)
72fc9db38d add integrity check for user/group membership when fcgid/fpm is used, refs #1491
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-20 09:58:24 +01:00
Michael Kaufmann (d00p)
1374e08cd4 make sql-fields for ssl-certs larger as there are ca-bundle-certs larger then 64k; add new settings for apache-itk-mpm integration, fixes #1400
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-18 16:05:28 +01:00
Michael Kaufmann (d00p)
03e48927a3 add optional support for apache-itk-mpm (mod_php only)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-18 16:01:38 +01:00
Michael Kaufmann (d00p)
bbf05fa6fd remove smarty-remnant; remove unnecessary variable assignment
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-17 13:27:30 +01:00
Roman Schmerold (BNoiZe)
6dad29cae7 Even more HTMLform2 migrations
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-16 17:56:37 +01:00
Roman Schmerold (BNoiZe)
52afba5a86 Migrate to new HTMLform2 class
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-16 16:55:56 +01:00
Roman Schmerold (BNoiZe)
913a53e436 Improve new htmlform class
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-16 16:18:39 +01:00
Michael Kaufmann (d00p)
4fd68a4153 fieldset is in subfileblock, not in file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-16 16:02:08 +01:00
Michael Kaufmann (d00p)
fae58078f8 update ftp_groups table in case webserver-/fcgid-/fpm-user changes, refs #1491 (i guess)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-16 14:56:08 +01:00
Michael Kaufmann (d00p)
1d319e001c group file-relevant commands into the fieldset; enhance layout
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-16 13:29:01 +01:00
Michael Kaufmann (d00p)
927e6fe23a add update compatibility for 0.9.33.1 users
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-16 09:45:55 +01:00
Michael Kaufmann (d00p)
b85eb98303 clear group-cache of nscd as this solves issues with webserver/php-fpm most of the time
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-16 08:21:33 +01:00
Roman Schmerold (BNoiZe)
643f124e8b Fixing a bug with linebreaks, fixes #1498
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-15 19:07:01 +01:00
Michael Kaufmann (d00p)
6fe4027de5 fix typo of vmail-user in rhel/centos config-template for dovecot
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-15 16:26:32 +01:00
Michael Kaufmann (d00p)
f9d79ba5a6 use correct PEAR directory setting in fpm-interface, fixes #1500
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-15 15:43:45 +01:00
Michael Kaufmann (d00p)
2382f526b2 reduce code - unnecessary complicated
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-15 07:54:34 +01:00
Michael Kaufmann (d00p)
1581e08594 show only hash algorithms that are available on the system
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-15 07:51:58 +01:00
Michael Kaufmann (d00p)
37ca78913c respect possible empty-value when validating string::validate_ip
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-12 13:02:50 +01:00
Michael Kaufmann (d00p)
df3b97c5dd change comments for better understanding, fixes #1496
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-12 09:22:59 +01:00
Michael Kaufmann (d00p)
953e3f5ba6 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-02-11 21:21:13 +01:00
Michael Kaufmann (d00p)
74b73c6446 rename 'MySQL User' to 'Froxlor Customer' as username for users read from db via libnss; fix language strings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-11 21:21:09 +01:00
Roman Schmerold (BNoiZe)
bc80fb71df Restyling configfiles with textareas instead of pre
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-11 19:35:18 +01:00
Michael Kaufmann (d00p)
b0279025d0 add numbrows to commands and files for BNoiZe's template magic; added possibility to use sql-data inside xml-config; updates xml-configs a bit when socket is used (not 100% done)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-11 14:30:30 +01:00
Roman Schmerold (BNoiZe)
a45712198b Update configfiles templates
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-11 13:01:48 +01:00
Michael Kaufmann (d00p)
704a0fce08 make integritycheck in update-procedure more clear whether there actually is a problem or not (if it's been fixed for example), fixes #1493
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-11 12:08:58 +01:00
Michael Kaufmann (d00p)
d6c708e6ee only show restart command of php-fcgi for nginx if fcgid/fpm is not used
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-11 08:25:19 +01:00
Michael Kaufmann (d00p)
1f24ca9ba2 split codename and version from version field in config-xml file as this eases automation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-11 07:15:05 +01:00
Michael Kaufmann (d00p)
c482db8c89 prepare database-class to have a separate socket-option, not as replacement for 'host'
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-10 16:13:14 +01:00
Michael Kaufmann (d00p)
c356639ce9 fix move-customer-to-admin
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-10 16:12:47 +01:00
Michael Kaufmann (d00p)
8b0572add1 fix visibility of fields in admin/formfields.admin.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-10 16:11:35 +01:00
Michael Kaufmann (d00p)
61b1adfb3d fix typo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-10 16:11:08 +01:00
Michael Kaufmann (d00p)
2f5ea4b305 added postfix-3.x configs for gentoo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-10 08:39:05 +01:00
Michael Kaufmann
ccc321be8a Merge pull request #230 from junkpad92/patch-1
"discard changes" and "save" on top of each other in security options; there was missing this additional template to fix the bug definitely, fixes #1488
2015-02-09 22:53:22 +01:00
junkpad92
b68861c175 Fix Bug #1488
"discard changes" and "save" on top of each other in security options; there was missing this additional template to fix the bug definitely.
2015-02-09 22:49:40 +01:00
Roman Schmerold (BNoiZe)
2ffcba78cc Remove another remainent of Smarty
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-09 15:00:21 +01:00
Michael Kaufmann (d00p)
855226d01a sort distribution-names in admin_configfiles, it's confusing otherwise; display the default/recommended daemon of every service; fix small c'n'p error (courier is not our recommended default)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-09 14:49:53 +01:00
Michael Kaufmann (d00p)
b8e548d1df clean variable after subfile-block
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-09 14:28:24 +01:00
Michael Kaufmann (d00p)
095f1df947 add Ubuntu Precise 12.04 XML-config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-09 13:55:10 +01:00
Michael Kaufmann (d00p)
4bd91a811d change admin_configfiles to handle the new XML-configs instead of the old php-arrays
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-09 13:54:55 +01:00
Michael Kaufmann (d00p)
c3b45a62ca use native word for the different languages
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 19:59:24 +01:00
Michael Kaufmann (d00p)
7b354eec0f fix template->language issues (not html-encoded special-characters in language-name), set version to 0.9.34-dev1 due to db structure change / update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 19:45:15 +01:00
Roman Schmerold (BNoiZe)
677ed371a9 Remove another template we only used for webftp
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-08 19:01:03 +01:00
Roman Schmerold (BNoiZe)
987caa632b Add Cancel-Button to template selection
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-08 19:00:21 +01:00
Michael Kaufmann (d00p)
3df581152d remove webftp.php as it: pulls smarty-tplengine we don't use anywhere else, is unknown to most of our users, a possible security-issue, etc. etc. etc.; just don't use webftp stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 18:56:31 +01:00
Michael Kaufmann (d00p)
f0ca931dfc update idna_convert class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 18:49:32 +01:00
Michael Kaufmann
52541f18f1 Merge pull request #229 from stweil/typos
Fix typos found by codespell, thx to stweil
2015-02-08 18:34:32 +01:00
Stefan Weil
4ee200e9f6 english: Fix typos found by codespell
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-02-08 17:52:53 +01:00
Stefan Weil
47ef9f74a7 classes: Fix typos
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-02-08 17:52:53 +01:00
Stefan Weil
92478d0e4f smarty: Fix typo
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-02-08 17:52:53 +01:00
Stefan Weil
0fc73b2bbb Fix typos found by codespell
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-02-08 17:52:45 +01:00
Michael Kaufmann (d00p)
909c6a8bdf allow private-network ip-addresses for database-connection, fixes #1489
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 17:35:31 +01:00
Michael Kaufmann (d00p)
be387ccf35 show whether a customer is deavtivated after successful login rather then nothing at all
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 16:07:24 +01:00
Michael Kaufmann (d00p)
6f73afe265 don't use -1 for standard-subdomains as the parentdomainid field is declared as unsigned int and therefore converted to 0 anyways
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 15:21:19 +01:00
Michael Kaufmann (d00p)
65d548d4f9 fix undefined variable in cases 'custom-notes-show' is not set when adding/editing an admin/a customer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 12:43:04 +01:00
Florian Aders (EleRas)
682b27fdd8 Added when to execute an autogenerated file in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-08 12:05:22 +01:00
Roman Schmerold (BNoiZe)
d213d65a24 Fixed buttons on top of each other, fixes #1488
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-08 12:01:05 +01:00
Robert Förster (Dessa)
36780d53c2 remove some useless executable bits spotted by lintian 2015-02-08 05:12:37 +01:00
Michael Kaufmann (d00p)
5a3bbd928a fix nscd restart command in rhel/centos XML
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 23:29:38 +01:00
Michael Kaufmann (d00p)
69854a8e0c minor fixes to rhel-configfiles + new rhel/centos config-XML
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 17:54:08 +01:00
Michael Kaufmann (d00p)
78667ce08b update config-file-xml's: gentoo.xml and wheezy.xml; added trusty.xml
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 15:32:07 +01:00
Michael Kaufmann (d00p)
0ef5749925 use correct restart commands for trusty
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 15:29:50 +01:00
Michael Kaufmann (d00p)
218104e6e2 add new configuration-template-XML-files for future use (they will replace [dist].inc.php + text-file-templates)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 10:59:28 +01:00
Michael Kaufmann (d00p)
38b7d44e3a remove unuused lang-indeces
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 10:56:22 +01:00
Florian Aders (EleRas)
332cb64b71 Group file-commands for easier processing in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-07 10:41:54 +01:00
Michael Kaufmann (d00p)
f1360d8792 set version to 0.9.33 for upcoming stable release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 09:57:06 +01:00
Florian Aders (EleRas)
269c24a398 Added file - parameter to command if command was created by expanding file - attributes in ConfigDaemon 2015-02-06 13:27:01 +01:00
Michael Kaufmann
bad427bfba Merge pull request #228 from HolySephi/master
fixed some rhel/centos 7 config issues, thx to Sephi
2015-02-06 10:56:23 +01:00
HolySephi
4256546115 fixed mysql file permissions for postfix-files 2015-02-06 10:46:37 +01:00
HolySephi
67fb2e1f59 removed DebugLevel, changed umask 2015-02-06 10:42:46 +01:00
HolySephi
8fab2ae8f0 fixed some minor problems 2015-02-06 10:39:16 +01:00
HolySephi
2f80477f7d Update etc_postfix_master.cf
spamassassin-line is not needed by default froxlor installation
2015-02-06 10:34:41 +01:00
Michael Kaufmann (d00p)
71bb3ccc40 update italian.lng.php, thx to Heaven73
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-06 10:34:35 +01:00
HolySephi
4d89dbfaa3 Update rhel7.inc.php
corrected and secured dovecot-sql.conf.ext
2015-02-06 10:31:40 +01:00
Florian Aders (EleRas)
2b9d6dc9c4 Added grouping - functionality for configfiles
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-05 20:28:11 +01:00
Florian Aders (EleRas)
75fb18bcec Trim the values of the distribution - xml at sane places
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-05 20:07:22 +01:00
Florian Aders (EleRas)
44bf843797 Added usernotexists / groupnotexists to ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-05 15:20:53 +01:00
Florian Aders (EleRas)
37cedafa8f Added userxists / groupexists to ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-05 15:20:09 +01:00
Florian Aders (EleRas)
09adbf8717 Added "equals" to visibility and "const." to placeholder in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-05 15:11:02 +01:00
Roman Schmerold (BNoiZe)
56b619b777 Update generation of unlimited fields
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-05 09:40:23 +01:00
Florian Aders (EleRas)
96e7a3ad8c Added "mode" for file - tag in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-04 10:19:57 +01:00
Michael Kaufmann (d00p)
859665fbd0 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-02-03 21:39:13 +01:00
Michael Kaufmann (d00p)
d6f3bf112b some minor tweaks to configfiles
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-03 21:38:57 +01:00
Roman Schmerold (BNoiZe)
67c02dcc40 Fixed missing values, removed old files
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-03 21:37:32 +01:00
Roman Schmerold (BNoiZe)
4fccc86b03 Updated HTMLform2 with some tweaks
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-03 21:32:23 +01:00
Florian Aders (EleRas)
a5d041926a Converted customer_mysql to HTMLform2
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 20:57:54 +01:00
Florian Aders (EleRas)
c971d3fafe Fixed $lng in ConfigParser
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 20:04:31 +01:00
Florian Aders (EleRas)
7c153d5e76 Remove debug in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 20:03:50 +01:00
Michael Kaufmann (d00p)
7071b812b6 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-02-03 19:56:01 +01:00
Michael Kaufmann (d00p)
a0a2977b7f allow to disable fcgid also with lighttpd because we allow it to be enabled with lighttpd
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-03 19:55:46 +01:00
Florian Aders (EleRas)
a63cc0759f Improved _parseContent and use it where needed in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 19:45:40 +01:00
Florian Aders (EleRas)
4c10eed3b1 Updated comments and various small improvements in ConfigParser - classes
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 18:52:37 +01:00
Florian Aders (EleRas)
827b3cc5f6 Added configuration - descriptions to ConfigParser, only parse complete file at first access
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 18:14:00 +01:00
Florian Aders (EleRas)
ac34bfdad2 Added basic distribution - XML - config - parser - classes, needs to be improved
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 17:45:40 +01:00
Roman Schmerold (BNoiZe)
72ce20224d Take values as parameter when editing something
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-02 19:13:52 +01:00
Roman Schmerold (BNoiZe)
609bd557c5 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-02-02 17:44:49 +01:00
Roman Schmerold (BNoiZe)
87fe3669a1 Migrate to new HTMLform2-class
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-02 17:43:53 +01:00
Michael Kaufmann (d00p)
6df6fc2361 pid of cronjob is the part after the last dash (we did not have more then one before), fixes #1483
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-02 16:13:07 +01:00
Roman Schmerold (BNoiZe)
48eaab89ba Add missing space in sed command
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-02 13:57:23 +01:00
Roman Schmerold (BNoiZe)
a0b0fa48bb Fix that name is not returned for admins
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-02 11:01:26 +01:00
Michael Kaufmann (d00p)
6534dbf47b doc-fixes; fix hardcoded installation-path in centos-cron-configtemplate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-01 20:09:24 +01:00
Michael Kaufmann (d00p)
f4dff676d6 do not allow to enable fcgid/fpm at the same time when both are set to 'yes' simultaneously in settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-01 18:02:29 +01:00
Michael Kaufmann (d00p)
77ae3aa387 generate only password that match our complexity-settings in customer_email.php; don't use md5() for the admin password in the installation process
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-01 13:57:06 +01:00
Michael Kaufmann (d00p)
99bed23b95 another md5() leftover
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-01 13:12:24 +01:00
Michael Kaufmann
5b012a33c3 Merge pull request #226 from RipClaw2971/bug_1482
use new password-hashes everywhere, fixes #1482
2015-02-01 13:05:10 +01:00
Andreas Grundler
28f26cce72 fix for bug #1482 2015-02-01 12:25:26 +01:00
Robert Förster (Dessa)
23b091ea82 add virtual_transport parameter which i somehow missed in my last commit, refs #1465 2015-02-01 03:08:18 +01:00
Michael Kaufmann (d00p)
e92b5e2c05 set version to 0.9.33-rc3 due to the password-hash-update-issue
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-31 12:54:00 +01:00
Michael Kaufmann (d00p)
4d60b19194 only update hash if password matches, fixes #1479
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-31 12:51:20 +01:00
Michael Kaufmann (d00p)
7680cd441c force integer conversion for domainimport-offset-field, as POST sends it as string; filter IP-addresses that are unknown to froxlor when importing domains.
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-30 17:55:27 +01:00
Michael Kaufmann (d00p)
d7f8586413 allow language-check against a specific language file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-30 17:54:06 +01:00
Michael Kaufmann (d00p)
83e062c845 remove unused Minify_HTML class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-30 17:53:43 +01:00
Michael Kaufmann (d00p)
c6c950596a use better error-message for misuse of froxlor.hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-28 22:01:16 +01:00
Michael Kaufmann (d00p)
4714a458fe don't allow a customer to add the froxlor-hostname as subdomain in case the froxlor-hostname is sub.dom.tld and the customer has dom.tld assigned, thx to chrisalexthomas for 'finding' this :)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-28 21:55:46 +01:00
Michael Kaufmann (d00p)
1672b01426 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-01-28 13:25:08 +01:00
Michael Kaufmann (d00p)
36c7527b2a add function to validate different password-hashes and update them to the currently set hash if login successfull and hash differs, set default hash to SHA256, fixes #1289 - add custom-notes field to admin/customer, fixes #1471 - set version to 0.9.33-rc2 for upcoming second release-candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-28 13:24:36 +01:00
Roman Schmerold (BNoiZe)
00e74a05cb Disable input if unlimited is checked
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-28 04:54:00 +01:00
Michael Kaufmann (d00p)
7904946862 push some upcoming changes (still holding back db changes b/c of version jump to rc2)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-27 23:04:46 +01:00
Roman Schmerold (BNoiZe)
88ace5785e Fix broken custom newsfeed, newsfeed redesign
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-27 22:43:52 +01:00
Robert Förster (Dessa)
614d9c127b fix mail delivery for dovecot, closes #1465 2015-01-27 17:55:46 +01:00
Dessa
f0551ac122 Merge pull request #212 from junkpad92/master
Fixing deprecated Postfix templates & Providing Dovecot2 Sieve-Configs
2015-01-27 17:52:36 +01:00
Michael Kaufmann (d00p)
bdfbe4947a fix undefined variables introduced in commit #b1acc9a8efc01a5139b042f8f9e97881e4a52b83
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-27 11:23:03 +01:00
Michael Kaufmann (d00p)
7b8341d826 add function to validate different password-hashes and update them to the currently set hash if login successfull and hash differs (unimplemented yet because of required db-updates which are hold back until 0.9.33-rc2), refs #1289
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-27 11:09:27 +01:00
Michael Kaufmann
9d008efabc Merge pull request #224 from heaven73/master
Pure-FTPd template for FreeBSD
2015-01-26 22:15:35 +01:00
Chris Energia Positiva
6c3f6fd57f Update freebsd.inc.php 2015-01-26 22:09:47 +01:00
Chris Energia Positiva
533279ec25 Create usr_local_etc_pureftpd-mysql.conf 2015-01-26 22:07:39 +01:00
Chris Energia Positiva
68d678aff8 Create usr_local_etc_pure-ftpd.conf 2015-01-26 22:06:12 +01:00
Roman Schmerold (BNoiZe)
6767edfaff Merge branch 'master' of github.com:Froxlor/Froxlor 2015-01-26 17:20:05 +01:00
Roman Schmerold (BNoiZe)
b1acc9a8ef Make the side navigation more styleable
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-26 17:19:40 +01:00
Michael Kaufmann (d00p)
16dde03f96 get rid of almost never used HTMLPurifier library and beautify subject display on ticket-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-25 08:34:03 +01:00
Michael Kaufmann (d00p)
5a7462972f revert commit 84ff476dfa from Lednerb, as the cron-reload command is being read from the settings (and can be adjusted)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-22 08:19:50 +01:00
Dessa
4c60b40c64 Merge pull request #220 from Lednerb/master
Ubuntu 14.04 Integration
2015-01-22 07:51:12 +01:00
Dessa
90bcaee2c9 Merge pull request #202 from antedaxara/rhel7
Added RHEL 7 configfiles
2015-01-22 07:50:56 +01:00
Michael Kaufmann (d00p)
a4973c9c38 don't add rewritecond for https off if this is a ssl-vhost
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-21 16:51:36 +01:00
Roman Schmerold (BNoiZe)
6c39ac80e6 Optimized images
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-16 21:16:50 +01:00
Roman Schmerold (BNoiZe)
979c5e7c0c Tidied up the code
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-16 21:11:17 +01:00
Michael Kaufmann (d00p)
2250b3c37a show custom-notes correctly on admin/customer index when activated + tiny fixes, refs #1471
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-15 22:19:28 +01:00
Michael Kaufmann (d00p)
e578a29058 add option to display the custom-notes to the user and actually save the custom-note
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-15 22:10:37 +01:00
Michael Kaufmann (d00p)
4c50d35945 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-01-15 21:30:35 +01:00
Michael Kaufmann (d00p)
7b8885c05e add custom-notes field to admins and customers, fixes #1471
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-15 21:30:15 +01:00
Roman Schmerold (BNoiZe)
1e6df86b7b Add new small info icon
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-15 20:27:11 +01:00
Michael Kaufmann (d00p)
4e9b2d0e97 replace DB_SRV with the hostname/ip and not the caption of the mysql-server, thx to rzeka for noticing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-15 17:29:49 +01:00
Roman Schmerold (BNoiZe)
67f3263a2e Don't remove custom comments, add newline after blocks
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-14 00:20:04 +01:00
Roman Schmerold (BNoiZe)
f61567be81 Changed the way php-fpm is included, fixes #1427
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-13 20:37:57 +01:00
Michael Kaufmann (d00p)
3ee8f6ac25 use generatePassword() for generating passwords as it respects the settings; fix user-modification under freebsd as there is no 'usermod'
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-12 20:24:55 +01:00
Sascha Brendel
5eb630d858 Merge pull request #6 from Lednerb/testing-1
Testing 1
2015-01-12 14:36:14 +01:00
Lednerb
e7d07c7924 Deleted unnecessary config template 2015-01-12 14:32:00 +01:00
Lednerb
ab44d27914 Deleted unnecessary config prompts 2015-01-12 14:25:10 +01:00
Lednerb
1889958e2b added missing php5-cli to installation script 2015-01-11 22:19:49 +01:00
Michael Kaufmann (d00p)
b78729319c added logging to integry-check so admins know what exactly was wrong when monkeys ate the integrity :)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-11 20:32:18 +01:00
Lednerb
7d478fd378 dovecot Installation angepasst 2015-01-11 16:36:50 +01:00
Lednerb
1cb237e8e1 Test zum Entfernen 2015-01-11 16:01:58 +01:00
Lednerb
8a3745aee8 updated service restart at courier imap/pop3 server 2015-01-11 15:42:01 +01:00
Lednerb
84ff476dfa check Cron reload config 2015-01-11 13:22:35 +01:00
Michael Kaufmann (d00p)
b3935bfda8 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-01-11 09:31:49 +01:00
Lednerb
2ae64d0abe Added Trusty 2015-01-11 00:06:14 +01:00
Lednerb
e21b923194 Added Ubuntu 14.04 Trusty, didn't check if the configfiles are working 2015-01-10 23:46:37 +01:00
Michael Kaufmann
9ab90aa3b9 Merge pull request #219 from Lednerb/master
Updated language files
2015-01-10 18:19:14 +01:00
Sascha Brendel
797db9aa8b Merge pull request #5 from Lednerb/patch-8
Update swedish.lng.php
2015-01-10 18:15:04 +01:00
Sascha Brendel
982421b9b3 Merge pull request #4 from Lednerb/patch-7
Update portugues.lng.php
2015-01-10 18:14:44 +01:00
Sascha Brendel
d0d7e7f369 Merge pull request #3 from Lednerb/patch-4
Update french.lng.php
2015-01-10 18:14:25 +01:00
Sascha Brendel
0b35c833f3 Merge pull request #2 from Lednerb/patch-5
Update italian.lng.php
2015-01-10 18:14:03 +01:00
Sascha Brendel
aef58921ce Merge pull request #1 from Lednerb/patch-6
Patch 6
2015-01-10 18:13:36 +01:00
Sascha Brendel
b681d9ba90 Update swedish.lng.php 2015-01-10 18:11:26 +01:00
Sascha Brendel
caedb34d00 Update portugues.lng.php
removed duplicated entry
2015-01-10 18:09:37 +01:00
Sascha Brendel
251fa70228 Update english.lng.php 2015-01-10 18:06:12 +01:00
Sascha Brendel
ced2f0c3d4 Update italian.lng.php
Removed duplicated entries
2015-01-10 17:58:04 +01:00
Michael Kaufmann
25514e1030 Merge pull request #217 from Lednerb/patch-2
Update english.lng.php
2015-01-10 17:28:31 +01:00
Michael Kaufmann
196454c7ab Merge pull request #216 from Lednerb/patch-1
Update german.lng.php
2015-01-10 17:22:01 +01:00
Sascha Brendel
331b65e384 Update french.lng.php
Commented & Removed doubled entries.
The uncommented versions were the newer ones.
2015-01-10 17:20:49 +01:00
Sascha Brendel
794140f3c1 Update english.lng.php
Removed multiple definitions.
If in doubt, more recent entries have been used.
2015-01-10 16:52:40 +01:00
Sascha Brendel
22eeeaf231 Update german.lng.php
Doppelte Einträge entfernt, im Zweifelsfall aktuellere Einträge übernommen.
2015-01-10 15:48:14 +01:00
Michael Kaufmann (d00p)
aff531a274 set from and reply to from settings in usage-report-mails
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-10 07:33:40 +01:00
Michael Kaufmann (d00p)
c1ff010283 allow 'localhost' or any local-hostname for db-connection
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-08 14:39:52 +01:00
Michael Kaufmann (d00p)
bb3376d1aa update Smarty to version 3.1.21
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-07 18:18:16 +01:00
Michael Kaufmann (d00p)
bcd49186fb update phpMailer to 5.2.9
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-07 18:12:27 +01:00
Michael Kaufmann (d00p)
c0f2745d30 of course, still allow localhost/127.0.0.1 as valid-ip xD
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-07 16:34:58 +01:00
Michael Kaufmann (d00p)
64959c75fe clear out whether pcntl extension is not installed or just pcntl_fork is unavailable, fixes #1469
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-07 15:36:35 +01:00
Michael Kaufmann (d00p)
82fdb84e61 give possibility to specify a socket-file as 'host' in userdata.inc.php to connect via mysql-socket instead of hostname; not a setting because this might break some other stuff (mysql-access-hosts -> problems when adding mysql-users/databases, etc.)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-07 15:13:32 +01:00
Michael Kaufmann
10acd16e17 Merge pull request #215 from junkpad92/patch-1
Fixing spelling mistake
2015-01-06 16:05:41 +01:00
junkpad92
21adfeed89 Update german.lng.php 2015-01-06 15:31:51 +01:00
junkpad92
791f12401f Fixing spelling mistake 2015-01-06 15:31:08 +01:00
Michael Kaufmann (d00p)
55c7b2aedf use separate escapeshellarg()-calls as it leads to 'group user' as being recognized as the group only
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-05 18:16:51 +01:00
Michael Kaufmann (d00p)
40d51dc7ef fix possible undefined variable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-04 09:16:19 +01:00
Michael Kaufmann
378d66f36a Merge pull request #213 from stweil/master
Improve German translation
2014-12-30 17:50:13 +01:00
Stefan Weil
fd26beb941 Improve German translation
* Grammar fix dass -> das.
* Consistent spelling Email -> E-Mail.
* Typo Addresse -> Adresse.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2014-12-30 16:56:21 +01:00
Michael Kaufmann (d00p)
c7dc68c848 add froxlor-group to customer-group in case fcgid/fpm is used for froxlor
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-30 16:44:52 +01:00
Michael Kaufmann (d00p)
6ae3691f20 dont show apache-needed stuff for php-fpm when not using apache
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-30 12:15:18 +01:00
Michael Kaufmann (d00p)
5d5062c262 make ownership-hint a bit larger like the db-error-page; add theme-fallback to database-error-function to avoid this stupid 'we are sorry, but a MySQL - error occurred'-message
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-29 21:42:28 +01:00
Michael Kaufmann (d00p)
509033e2b8 put install-css-stuff into the correct install.css file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-29 21:23:21 +01:00
Michael Kaufmann (d00p)
7584b0acc4 remove google-webfont-stuff (just create your own theme or overwrite Sparkle to use another font); remove more inline css and remove unnecessary JS in hints-templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-29 21:08:01 +01:00
Michael Kaufmann (d00p)
dd34ab8d9b fix inline-css (violation of Content Security Policy)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-29 20:48:56 +01:00
Michael Kaufmann (d00p)
c6f3b03891 do some sql-minor-fixing, refs #1486 - set version to 0.9.33-rc1 for possible upcoming release-candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-29 14:59:58 +01:00
Michael Kaufmann (d00p)
d765cc8633 fix possible undefined variable if session timed out after login and re-login with another user
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-27 18:35:31 +01:00
Michael Kaufmann (d00p)
4b0507c4d3 secure scripts which should not be called directly (install/update stuff); avoid url-manipulation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-27 15:13:25 +01:00
Michael Kaufmann (d00p)
4523ef87b7 show correct errormessage when sql-prefix is wrong
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-23 13:56:49 +01:00
Michael Kaufmann (d00p)
2b55ceba7a rework updateCounters
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 14:47:56 +01:00
Michael Kaufmann (d00p)
b2eeef8d38 beautification and fallback just in case
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 14:14:53 +01:00
Michael Kaufmann (d00p)
d674f4dd70 same alias-ip-stuff when adding a new domain and aliasdomain is selected
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 13:37:35 +01:00
Michael Kaufmann (d00p)
0406948c4b remove unneeded functions; fix ip-assigning when a domain is an alias of another domain and the ip's from the alias-domain are being read, no check for ssl/non-ssl was made resulting in an integrity constraint violation in the database
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 13:32:37 +01:00
Michael Kaufmann (d00p)
366e0f6061 various permission fixes when using fcgid / fpm and customerdocroots having 0770 and sockets are 0660
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 09:51:55 +01:00
Michael Kaufmann (d00p)
3c12e825f5 fix progress-bar value of >100%; fixes #1467
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 08:50:23 +01:00
Michael Kaufmann (d00p)
925afbd03f fix design-issues when no add-link is present in overviews; fixes #1466
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 08:06:26 +01:00
Michael Kaufmann (d00p)
bfa9478649 password-reset fix
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-19 14:11:17 +01:00
Michael Kaufmann (d00p)
19f5f2a7a4 remove static copyright-year in templates; fix possible undefined theme-variable in phpErrHandler by specifying a fallback-default
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-19 09:49:33 +01:00
Michael Kaufmann (d00p)
c1ca72dd3c fix validation of offset-value in domain import + minor fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-19 09:29:25 +01:00
Michael Kaufmann (d00p)
495a48bc87 avoid undefined variable in case the admin has unlimited domain-contingent
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-19 07:51:44 +01:00
Michael Kaufmann (d00p)
687c5cea08 enhance findDirs() to avoid exceptions on unreadable directory
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-18 08:51:54 +01:00
Michael Kaufmann (d00p)
b0c0918580 let the documentation-link for domain-import open in a new window
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-17 18:28:03 +01:00
junkpad92
d78fde88ce Merge branch 'master' of https://github.com/junkpad92/Froxlor 2014-12-17 17:22:23 +01:00
junkpad92
56b652d185 Fixing deprecated Postfix templates & Providing Dovecot2 Sieve-Configs 2014-12-17 17:21:28 +01:00
junkpad92
c69d023685 Install dovecot-managesieved and dovecot-sieve 2014-12-17 17:18:21 +01:00
junkpad92
99a249ac5c Install dovecot-managesieved and dovecot-sieve
Added also config files.
2014-12-17 17:13:22 +01:00
junkpad92
060f10f064 Fixing deprecated Postfix templates & Providing Dovecot2 Sieve-Configs 2014-12-16 21:42:16 +01:00
Michael Kaufmann (d00p)
1e5f80ace6 re-work findDirs()-function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-16 15:14:57 +01:00
Michael Kaufmann (d00p)
cd5e8801e4 add domain-bulk-import, fixes #1452
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-15 14:49:34 +01:00
Michael Kaufmann (d00p)
7dd6f9b97c explicitly set charset / collation of database when installing + new integrity-check-function to validate the database charset / collation and optionally fix it; fixes #1426
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-13 19:19:10 +01:00
Marco Vogt (vogti)
28b7cd6e90 bugfixing template-variables list when editing mail-templates; refs #496
Signed-off-by: Marco Vogt (vogti) <mail@mdvogt.de>
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-12 20:54:59 +01:00
Marco Vogt (vogti)
6bfa95f8a8 Import default subject/body for e-mails templates; fixes #496
Signed-off-by: Marco Vogt (vogti) <mail@mdvogt.de>
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-12 19:26:06 +01:00
Michael Kaufmann (d00p)
b0d5049e68 fix -> self in pFlush() in Settings-class, fixes #1464
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-10 17:40:04 +01:00
Michael Kaufmann (d00p)
5a9fa8592a bugfixing frxDirectory-class 2014-12-09 08:50:12 +01:00
Marco Vogt (vogti)
bc4cb480be improved traffic report
Signed-off-by: Marco Vogt (vogti) <mail@mdvogt.de>
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-08 14:43:15 +01:00
Michael Kaufmann (d00p)
897a8a084e Merge branch 'master' of github.com:Froxlor/Froxlor 2014-12-06 19:47:35 +01:00
Michael Kaufmann (d00p)
afe2041e94 set max-age for Strict-Transport-Security header to >180days, thx to priority
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-06 19:47:27 +01:00
Michael Kaufmann
ad1d8d3cd2 Merge pull request #208 from Churro/master
Fix for duplicate .htpasswd entries (Nginx)
2014-12-02 23:21:39 +01:00
Churro
4fe33a0b7a Fix for duplicate htpasswd entries (Nginx) 2014-12-02 22:29:54 +01:00
Roman Schmerold (BNoiZe)
d927ede388 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-12-02 17:28:38 +01:00
Roman Schmerold (BNoiZe)
6f5f69db2b Made tablesorter work without inline-js
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-12-02 17:27:41 +01:00
Michael Kaufmann
e64846b2c1 Merge pull request #207 from Churro/master
Nginx cronjob improvements; show realm-name on directory-protection
2014-12-02 08:42:30 +01:00
Churro
8842c02136 Fixed indentation of location-block in Nginx Vhosts 2014-12-01 22:50:07 +01:00
Churro
adbc4bc402 Basic auth realms now work for Nginx Vhosts too 2014-12-01 22:48:54 +01:00
Michael Kaufmann (d00p)
3be43c4848 outsource a few directory-functions in a class; make apache-2.4 not create 'require all granted' if there is an active directory-protection or option set for the customerroot-dir, possibly fixes #1455
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-01 08:07:28 +01:00
Michael Kaufmann
e24e8297f1 Merge pull request #206 from Commifreak/master
Markup fix in templates.
2014-11-30 12:55:21 +01:00
Robin Kluth
c58446359c Update templates_edit.tpl
Replaced <i> with <em> to match the rest of the form
2014-11-30 12:19:04 +01:00
Robin Kluth
dc5e13d13c Update templates_add_2.tpl
Replaced <i> with <em> to match the rest of the form
2014-11-30 12:17:14 +01:00
Michael Kaufmann (d00p)
cf7c11a106 keep original template filename for the possible error message to show the correct file that was not found
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-29 08:22:36 +01:00
Michael Kaufmann (d00p)
b0d1290e66 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-11-29 07:43:38 +01:00
Michael Kaufmann (d00p)
60d48f2002 make template-fallback work for overwriting themes partially
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-29 07:43:33 +01:00
Roman Schmerold (BNoiZe)
9627238966 Round percentages to 0 decimals
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-11-28 13:57:33 +01:00
Michael Kaufmann (d00p)
d89f2c87e5 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-11-28 12:46:40 +01:00
Michael Kaufmann (d00p)
242b42ba95 respect special characters in redirects
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-28 12:46:28 +01:00
Roman Schmerold (BNoiZe)
b1a9c2bf49 Disabling unsafe-inline for security again
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-11-28 09:12:14 +01:00
Roman Schmerold (BNoiZe)
b6bc386072 Allow inline styles/scripts, otherwise template functions will break
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-11-27 22:04:21 +01:00
Roman Schmerold (BNoiZe)
a1625d1768 Removed another unused image... doh
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-11-27 21:45:42 +01:00
Roman Schmerold (BNoiZe)
1e0cc86288 Removed unneeded header image
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-11-27 21:41:10 +01:00
Michael Kaufmann (d00p)
b4a8418e10 add possibility to move customers to another admin/reseller, fixes #1166
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-25 12:23:30 +01:00
Michael Kaufmann (d00p)
e4ceb962e9 remove trailing slash from mod_proxy stuff, regardless of what the apache-docs say, it works this way!
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-24 18:44:26 +01:00
Michael Kaufmann (d00p)
c6ed0b63c9 fix vhost-block-merging for nginx, fixes #1450
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-19 16:29:05 +01:00
Michael Kaufmann (d00p)
4794c21fb4 show message on display-failure of phpinfo()-page, thx to papa-smurf for the hint
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-18 10:56:25 +01:00
Michael Kaufmann (d00p)
e7f54503c1 fix template-variable for 'forgot password', thx to Nepstar for noticing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-17 10:47:24 +01:00
Michael Kaufmann (d00p)
bdc0a4caf1 fix visibility of fpm-mod_proxy_fcgi-apache-2.4 setting 2014-11-10 12:59:05 +01:00
Michael Kaufmann (d00p)
5499388777 add possibility to use php-fpm over mod_proxy_fcgi with apache >=2.4.9
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-10 11:47:27 +01:00
Michael Kaufmann (d00p)
4cc3c01dcb remove password-suggestion if a custom regex is defined; added password-complexity-settings for non-regex users to define what generated passwords should contain, thx to Marco Vogt; fixes #1216
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-10 10:07:32 +01:00
Michael Kaufmann (d00p)
f5f7bc449a use recent Content-Security-Policy values and header for all browser, secure script/query-string to redirect to after login if given
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-04 13:01:42 +01:00
Roman Schmerold
0fbc2ab821 Merge pull request #204 from junkpad92/patch-1
Fix Safari checkbox-bug
2014-11-03 20:34:25 +01:00
junkpad92
329197902e Fix Safari checkbox-bug
If checkbox is focused (clicking in the checkbox) checkbox shifts downward. I think: Only in Safari on Yosemite. Other browsers not affected.
2014-11-03 18:56:23 +01:00
Michael Kaufmann (d00p)
f303bfdbfd use /etc/crontab directly when on FreeBSD because it does not use anything like /etc/cron.d/ file-inclusion, refs and possibly fixes #1437
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-31 09:48:38 +01:00
Michael Kaufmann (d00p)
0156c3a59d few fixes in inline-css; added mail.log php.ini option and enabled it in default ini-config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-31 09:14:28 +01:00
Michael Kaufmann
6f9f5880ee Merge pull request #203 from Tak0r/master
fix fpm settings for session.auto_start (php_flag -> php_value), nginx poodle "fix", wheezy config for fpm with fpm vhost
2014-10-30 15:02:59 +01:00
Frank Gehann
29d755433f set explicit sslprotocol to react to poodle attack stuff (nginx) 2014-10-30 14:57:04 +01:00
Frank Gehann
c63fa7ec97 wheezy config change to reflect the fpm permission change (add the panel vhost group to the webserver user 2014-10-30 14:54:04 +01:00
Frank Gehann
dc2b690fa4 session.auto_start needs to be a php_value since it gets passed a 0 or 1 and not on/off which causes the fpm to not start at all. 2014-10-30 13:55:56 +01:00
Michael Kaufmann (d00p)
97ec269838 set explicit sslprotocol to react to poodle attack stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-27 11:46:28 +01:00
Michael Kaufmann (d00p)
58ec17ce10 don't allow subdomains as alias-domains as it could lead to a possible dead-end for editing ip/port for the domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-27 10:41:29 +01:00
Roman Schmerold (BNoiZe)
1b00a816e3 Rewrite of merging special vhost settings, fixes #1430
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-10-12 15:34:40 +02:00
Roman Schmerold (BNoiZe)
911d3769f6 Added froxlor logo to footer
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-10-11 14:22:51 +02:00
Roman Schmerold (BNoiZe)
3f3a02147b Update copyright in standard customer index
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-10-11 14:16:19 +02:00
Roman Schmerold (BNoiZe)
a7450dfe37 Fixed duplicate creation of directory protection, fixes #1450
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-10-11 09:08:27 +02:00
Roman Schmerold (BNoiZe)
fe5eff890f Removed another evil if I overlooked
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-10-11 08:18:43 +02:00
Roman Schmerold
539ec529c2 Removing evil if from nginx vhosts
Signed-off-by: Roman Schmerold <bnoize@froxlor.org>
2014-10-11 07:58:01 +02:00
Michael Kaufmann (d00p)
bc8e56e7da fix version_compare 2014-10-07 08:24:40 +02:00
Michael Kaufmann (d00p)
332a6bc550 don't make the fpm-socket readable for all, fixes #1418
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-01 13:39:41 +02:00
Michael Kaufmann (d00p)
480e3a8bfd fix incorrect security check on mail-directories where various special-characters are allowed, fixes #1458
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-01 07:29:25 +02:00
Ante
34f20ffd1a Added RHEL 7 configfiles 2014-09-30 11:07:37 +02:00
Michael Kaufmann (d00p)
cbab67a2fd Merge branch 'master' of github.com:Froxlor/Froxlor 2014-09-22 10:17:46 +02:00
Michael Kaufmann (d00p)
559fb4d4a4 done a few fixes for newer php-versions
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-09-22 10:17:42 +02:00
Roman Schmerold
a47b1e7f5d Merge pull request #201 from Stricted/patch2
Fix nginx auto index, fixes #1446
2014-09-18 09:39:52 +02:00
Stricted
141e728c0f fix last commits 2014-09-16 22:47:07 +02:00
Stricted
024d01b300 fix directory index for folders on nginx #2 2014-09-16 21:24:50 +02:00
Stricted
cbf47f46ea fix directory index for folders on nginx 2014-09-16 21:17:06 +02:00
Michael Kaufmann (d00p)
74c493f39c remove unnecessary fields that have been removed in updater a long time ago
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-09-13 09:32:19 +02:00
Michael Kaufmann (d00p)
37624a912e add task 99 the correct way in installation as the constant FROXLOR_INSTALL_DIR is not set there
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-09-12 07:50:05 +02:00
Michael Kaufmann
997135d7c0 Merge pull request #200 from Stricted/patch-1
fix path_info on nginx cronjob
2014-09-09 09:22:25 +02:00
Stricted
31f3639c15 fix path_info on nginx cronjob 2014-09-08 18:37:14 +02:00
Michael Kaufmann (d00p)
70a9ad2f3d enhanced list of allowed php.ini-directives for php-fpm 2014-09-07 08:21:30 +02:00
Michael Kaufmann (d00p)
b1fe737a03 Merge branch 'HolySephi-master' 2014-09-06 09:41:09 +02:00
HolySephi
6f974c035d Update etc_libnss-mysql.cfg 2014-09-06 08:18:45 +02:00
HolySephi
3c091f9cce Update etc_libnss-mysql.cfg 2014-09-06 08:17:48 +02:00
HolySephi
b2268861b0 Update usr_local_etc_libnss-mysql.cfg 2014-09-06 08:16:47 +02:00
HolySephi
4b5b9e8d1c Update etc_libnss-mysql.cfg 2014-09-06 08:16:03 +02:00
Michael Kaufmann (d00p)
c5c2f735cc code beautification and better documentation 2014-09-06 08:06:33 +02:00
Michael Kaufmann
ed6c78dd50 Merge pull request #196 from privatehosting/patch-1
Fix undefined offset if no entries are in the quotaused-array in cron-tasks
2014-09-06 08:05:32 +02:00
Michael Kaufmann
c303f8a683 Merge pull request #199 from schadowfox/master
added php error log capabilities in php-configuration (php.ini) for php-fpm
2014-09-06 07:58:15 +02:00
schadowfox
1d27a27751 added php error log capabilities
not sure why this is missing in the default config, but with this you can once again have a error log for php files.
2014-09-05 23:26:48 +02:00
Michael Kaufmann (d00p)
9776624c32 honor max_children values for php-fpm
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-08-11 08:24:26 +02:00
Michael Kaufmann (d00p)
2ebb5259a0 after a new installation, insert a task for generating the cron.d file, also let cronjob's --force re-create the cron.d file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-08-05 18:14:04 +02:00
Michael Kaufmann (d00p)
ce88d1caae fix command for creating deactivated-root-dir, thx to oschni
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-08-05 18:12:35 +02:00
Michael Kaufmann (d00p)
80a2b5da34 correct precise postfix-master.cf config-template
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-07-19 14:40:26 +02:00
Michael Kaufmann (d00p)
92eea6d7b2 insert task for rebuilding config files after changing the ips (not perfect yet but better then no task)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-07-09 17:52:16 +02:00
Michael Kaufmann (d00p)
25fa9a8121 various tiny improvements
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-07-09 09:39:26 +02:00
PrivateCityHosting
4c4a39994c Update cron_tasks.php
Fixing: PHP Notice:  Undefined offset: 
if problem: repquota: Einhängepunkt oder Gerät / nicht gefunden oder hat keine aktivierten Quotas.
repquota: Nicht alle angegebenen Mountpunkte verwenden Quotas.
2014-07-07 02:16:13 +02:00
Michael Kaufmann (d00p)
a7a971f444 secure password-reset form against possible header-modification, thx to Hendrik
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-29 11:25:31 +02:00
Michael Kaufmann (d00p)
946e5d28e9 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-06-23 08:51:17 +02:00
Michael Kaufmann (d00p)
addd70dfe8 correct validating list of AXFR-servers, fixes #1440
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-23 08:51:04 +02:00
Michael Kaufmann (d00p)
6a14cb57e6 initialize variables so no warnings/notices are output when the directory is empty (all files deleted); fixes #1435
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-17 11:49:07 +02:00
Michael Kaufmann (d00p)
1c1affa7bd set directory permissions to 0755 for mod_php user as they dont (want to) use libnss-mysql, fixes #1431
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-09 16:21:57 +02:00
Michael Kaufmann (d00p)
8b25ac1685 fix variable in webftp-script
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-08 09:37:29 +02:00
Michael Kaufmann (d00p)
ff549a5ab0 re-add line-breaks for nicer display of ip/port combos in domain::add and domain::edit
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-07 15:05:21 +02:00
Michael Kaufmann (d00p)
74b71bb926 fix validation of system-hostname setting, thx to lando
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-07 15:04:51 +02:00
Michael Kaufmann (d00p)
f1eb5420a7 add option to enable/disable generation of bind-configs for the system-hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-02 12:35:45 +02:00
Michael Kaufmann (d00p)
0d04077d6e Merge branch 'junkpad92-master' 2014-06-02 09:15:54 +02:00
Michael Kaufmann (d00p)
3fe10d8d3d merge pull request #193
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-02 09:15:45 +02:00
Roman Schmerold (BNoiZe)
9b0cc70542 Fix height of #maincontent if newsfeed is shown
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-06-01 22:02:48 +02:00
Roman Schmerold (BNoiZe)
38599ec4b9 Read the custom RSS directly from the settings
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-06-01 21:55:10 +02:00
Roman Schmerold (BNoiZe)
7d4ea57381 Removing obsolete 'language' attribute from script-tags
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-06-01 19:12:14 +02:00
Roman Schmerold (BNoiZe)
538b99055c Removing unwanted files which should be ignored by git anyway
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-06-01 18:50:55 +02:00
Roman Schmerold (BNoiZe)
3acfcd4a95 Adding a custom newsfeed to the customer-dashboard, fixes #1408
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-06-01 18:46:15 +02:00
Michael Kaufmann (d00p)
fd3ab6221c fix wrong grammar in german language file, thx to Nepstar
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-29 13:40:23 +02:00
Michael Kaufmann
e05369ffd9 Merge pull request #194 from Commifreak/master
Some FPM improvements
2014-05-25 13:09:50 +02:00
Robin Kluth
2376200a73 Whoops... 2014-05-25 12:05:17 +02:00
Robin Kluth
7e1e7851cc Changed fpm-config var description...
* start_servers not used if ondemand, same with min and max_spare_servers
[http://www.php.net/manual/de/install.fpm.configuration.php#pm]
2014-05-25 12:04:15 +02:00
Robin Kluth
7a8e345084 Removed unecessary 'start_servers' if pm = ondemand
http://www.php.net/manual/de/install.fpm.configuration.php#pm.start-servers
2014-05-25 12:01:16 +02:00
Robin Kluth
9b42200746 Changed fpm-config var description...
* start_servers not used if ondemand, same with min and max_spare_servers
[http://www.php.net/manual/de/install.fpm.configuration.php#pm]
2014-05-25 11:55:14 +02:00
Michael Kaufmann (d00p)
e8e2731c6f use reload-commands from settings also for wheezy :)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-24 09:13:33 +02:00
Michael Kaufmann (d00p)
4167451da6 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-05-24 09:12:06 +02:00
Michael Kaufmann (d00p)
48f288789f use reload-commands from settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-24 09:12:02 +02:00
Michael Kaufmann
0574a9733c Merge pull request #192 from Commifreak/master
Minor fixes
2014-05-24 08:39:42 +02:00
Robin Kluth
67bee6d620 Added restart hint after PHP-FPM configuration 2014-05-23 23:06:40 +02:00
Robin Kluth
72dd7fb138 Fixing double question mark for german language 2014-05-23 23:04:42 +02:00
Robert Förster (Dessa)
92f9cf3621 bump phpmailer to 5.2.8 2014-05-23 12:24:02 +02:00
Robert Förster (Dessa)
aafea237f3 forgot to change the status of squeeze, bah. 2014-05-23 12:11:28 +02:00
Robert Förster (Dessa)
a130013c5d some os deprecations
- SLE10 will be replaced by SLE11
- opensuse11 will be replaced by opensuse13 once i managed to clean up the configs from upstream
- ubuntu lucid will be replaced by ubuntu trusty once i get to it
2014-05-23 12:08:23 +02:00
Robert Förster (Dessa)
9a1b0e6ea8 update jquery to 1.11.1 2014-05-23 11:58:24 +02:00
Michael Kaufmann (d00p)
acbaedb44f setting version to 0.9.32 for release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-23 08:29:28 +02:00
Robert Förster (Dessa)
ab667d0bc8 forgot to sync the css 2014-05-20 20:05:45 +02:00
Robert Förster (Dessa)
73acfb5d7c update js folder
- add images from jquery-ui to css folder, the stylesheet expects them being around even though we don't use them, adding them and not using them is better then editing the stylesheet and then forgetting about it again after every jquery-ui update, i suppose..
- fix html5shiv name, it was minified to begin with
- bump flot to 0.8.3, fix plugin name (no functional changes for us)
- bump tablesorter to 2.16.4 (likewise)
2014-05-20 19:50:57 +02:00
Michael Kaufmann
641c0a09e5 Merge pull request #191 from andre-luiz-dos-santos/patch-1
Small translation corrections
2014-05-20 07:26:33 +02:00
André Luiz dos Santos
e053a22f1b More missing translations 2014-05-19 23:51:56 -03:00
André Luiz dos Santos
8d3046269b Missing translation, small corrections
Two repeated vowels: AAtiva, Iinformações.
Translate message 'loginnameiswrong2'.

contem => contém
http://wp.clicrbs.com.br/sualingua/2009/05/18/tem-e-tem-contem-contem/
2014-05-19 23:37:24 -03:00
André Luiz dos Santos
14620d9b52 Small translation corrections
voce => você
http://michaelis.uol.com.br/moderno/ingles/index.php?lingua=portugues-ingles&palavra=voc%EA

dominio => domínio
http://michaelis.uol.com.br/moderno/ingles/index.php?lingua=portugues-ingles&palavra=dom%EDnio
2014-05-19 22:58:26 -03:00
Roman Schmerold (BNoiZe)
ca4dd8a75d Remove comments from special vhost settings, fixes #1422
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-05-18 12:38:50 +02:00
Michael Kaufmann (d00p)
41f971a4d5 also, fight stupidity in development, my bad :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-18 11:20:22 +02:00
Michael Kaufmann (d00p)
3c8bf348d1 fight stupidity - teach your customers not to use password == username
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-18 11:16:35 +02:00
Michael Kaufmann (d00p)
6e4ff4705b just because people are stupid...really, there are people doing this - thanks for a wonderful afternoon fighting spam
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-17 19:10:28 +02:00
Michael Kaufmann (d00p)
d73b069944 delete connections between domain and ip's after deleting a customer completely
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-15 14:18:39 +02:00
Michael Kaufmann (d00p)
9c500f290e when cleaning strings, actually return them after that or it's senseless
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-15 08:20:52 +02:00
Michael Kaufmann
f82fe620dd Merge pull request #188 from junkpad92/master
Improved translations for customer section (mainly)
2014-05-14 08:24:22 +02:00
junkpad92
de89610011 Improved translations for customer section 2014-05-13 23:37:02 +02:00
Roman Schmerold (BNoiZe)
c15fb4043b Removed unneeded height setting on checkboxes
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-05-07 13:59:53 +02:00
Roman Schmerold (BNoiZe)
7f5c74b502 Forgot to add the two new values together. D'Oh
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-05-07 09:46:23 +02:00
Roman Schmerold
0d1fc17db9 Changed regex to match new logformat, fixes #1398
Signed-off-by: Roman Schmerold <bnoize@froxlor.org>
2014-05-07 09:34:34 +02:00
Michael Kaufmann (d00p)
32ff9840b8 Merge branch 'junkpad92-master' 2014-05-07 09:13:51 +02:00
Michael Kaufmann (d00p)
07e5385fa2 merging pull-request #187, set log format for dovecot in froxlor config and updated German translations
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-07 09:13:44 +02:00
Michael Kaufmann (d00p)
fb3d0269a1 when redirecting to an uri, don't use a trailing slash in order for the redirect to be correct, fixes #1411
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-02 08:49:27 +02:00
Michael Kaufmann (d00p)
fceffc05e7 fix double line-break in ticket-message, fixes #1413
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-02 08:34:14 +02:00
Florian Aders (EleRas)
4a3043e113 Ignore an empty adminid (should fix user-errorreport) 2014-05-02 08:10:53 +02:00
Michael Kaufmann
aa90a4aec8 Merge pull request #183 from hildende/master
Added support for new/longer TLDs (up to 63 characters allowed)
2014-05-01 10:47:19 +02:00
Roman Schmerold
2f9744fe9d Merge pull request #184 from junkpad92/patch-1
Update german.lng.php, fixes #1406
2014-04-28 21:12:50 +02:00
junkpad92
8fe3945c4c Update german.lng.php
Removed double spaces.
2014-04-28 20:50:59 +02:00
junkpad92
db00ef83c0 Update german.lng.php 2014-04-28 20:29:39 +02:00
Dennis Hildenbrand
40fd5cd41e added support for new TLDs that are longer than 6 characters like .photography 2014-04-28 19:51:33 +02:00
Michael Kaufmann (d00p)
4dc774c11c also, add french to the available language-files for install-process
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-28 17:22:46 +02:00
Michael Kaufmann (d00p)
f48d97e132 add french language file for installation-process, thx to hurl for translating; fixes #1415
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-28 14:06:10 +02:00
Michael Kaufmann (d00p)
b341228dd9 fix invalid sql in very old update-procedure (happens when you update from 0.9.7-svn1 to 0.9.7-svn2)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-27 09:23:36 +02:00
Michael Kaufmann (d00p)
813a534b41 fix missing user-array for output in ticket-overview, fixes #1412
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-26 08:32:17 +02:00
Michael Kaufmann (d00p)
086cd21cea Merge branch 'master' of github.com:Froxlor/Froxlor 2014-04-14 14:35:59 +02:00
Michael Kaufmann (d00p)
69ec85ef19 fix setting of passwords in case mysql-access-hosts list gets changed, fixes #1407
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-14 14:35:12 +02:00
Roman Schmerold (BNoiZe)
0336f7ccf8 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-04-14 09:49:37 +02:00
Roman Schmerold (BNoiZe)
4994a90be9 Removing old languages from database, pushing version to 0.9.32-rc3
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-04-14 09:48:39 +02:00
Michael Kaufmann (d00p)
d73e5f8dc7 fix prepending of domain-name to domain.documentroot if admin has 'edit-server-settings == false' when adding a new domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-12 09:37:51 +02:00
Michael Kaufmann (d00p)
3d44d381bc correct permissions after creating cron.d-file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-07 09:55:04 +02:00
Roman Schmerold (BNoiZe)
39dd832c84 Removed languages with more than 20% missing
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-03-28 15:33:34 +01:00
Michael Kaufmann
1ae58837db Merge pull request #182 from mainboarder/patch-1
Update cron_usage.inc.diskspace.php
2014-03-23 18:37:49 +01:00
mainboarder
739c279526 Update cron_usage.inc.diskspace.php
Line 176 another $resul(t)2_data typo
2014-03-23 13:04:53 +01:00
Roman Schmerold (BNoiZe)
8b7dc057e1 Removed linebreak after checkboxes, fixes #1397
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-03-19 13:16:16 +01:00
Michael Kaufmann (d00p)
9c87792c63 keep known_filenames as it results in no zone-file being generated (d'oh); also use all available ip's for the froxlor-hostname config, thx a lot to vali for testing, really fixes #1090 this time
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-11 11:07:14 +01:00
Michael Kaufmann (d00p)
31fa23a388 create a dns-config for the froxlor-hostname, fixes #1090
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-11 10:18:23 +01:00
Michael Kaufmann (d00p)
08ce6be3ff fix 'field does not have a default value' error reported via email
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-05 08:11:56 +01:00
Michael Kaufmann (d00p)
2d68216699 remove old and unused setting from install-sql-file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-05 08:00:04 +01:00
Michael Kaufmann (d00p)
0002056e51 fix wrong variable name which causes wrong theme to be stored for new customers, fixes #1392
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-05 07:59:32 +01:00
Michael Kaufmann (d00p)
4636409724 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-03-04 10:57:30 +01:00
Michael Kaufmann (d00p)
3b7fa93e72 set lastguid to system-lastguid in case there are no customers yet, thx to Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-04 10:57:16 +01:00
Roman Schmerold (BNoiZe)
d10a2764af Improving display of new ticket icon
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-03-01 16:21:13 +01:00
Florian Aders (EleRas)
718a313673 Added new (debian) way for dovecot - IMAP - traffic-report, thx devil65
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-02-26 08:44:23 +01:00
Michael Kaufmann (d00p)
d00cdec296 added cronjob-auto-update-feature (beware and READ), fixes #1342; remove old backup-ftp-users on update, fixes #1381
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-25 07:48:46 +01:00
Michael Kaufmann (d00p)
e650be3814 fix quota on freebsd, thanks to skotti's patch. fixes #1377
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-21 08:04:26 +01:00
Michael Kaufmann (d00p)
c59fe0e4ad fix wrong variable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-20 11:18:46 +01:00
Roman Schmerold (BNoiZe)
b191b67f21 Removed translations of the unlimited char
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-20 10:46:52 +01:00
Roman Schmerold (BNoiZe)
9c09cb874e Updated jQuery-UI to latest version
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-20 10:42:46 +01:00
Florian Aders (EleRas)
b661547817 Correcting PDO - Constant, fixes #1382
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-02-20 08:29:26 +01:00
Michael Kaufmann (d00p)
2d7ca2a7db fix Call to undefined method when updating mysql-access-hosts-setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-19 16:13:50 +01:00
Michael Kaufmann (d00p)
d6fdf887ce don't add session-id to external redirects, thx to Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-19 11:08:43 +01:00
Michael Kaufmann (d00p)
4f4689c4e9 also check for php.configs that are set as default on deletion; emphasize default config in overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-18 17:13:25 +01:00
Michael Kaufmann (d00p)
8ff2c930ee show and check whether a php-config is used by the system-hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-18 17:01:02 +01:00
Michael Kaufmann (d00p)
bad1183f42 set correct default php-ini for own-vhost, thx Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-14 14:08:58 +01:00
Michael Kaufmann (d00p)
20d54d5a04 put cron.d-generation task directly to froxlor.sql as there might be no userdata.inc.php after the installation (only in /tmp or plaintext for copy'n'paste) so the database action fails
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-14 11:18:02 +01:00
Michael Kaufmann (d00p)
938bb429d8 insert task to generate cron.d file after installation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-14 11:03:08 +01:00
Michael Kaufmann (d00p)
57a9f3747b fix incorrect description text of ip/port add/edit, thx to Sephi and Thomas
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-13 12:06:07 +01:00
Roman Schmerold (BNoiZe)
8d601a065e Removed unused stuff from jQuery-UI
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-12 10:33:22 +01:00
Roman Schmerold (BNoiZe)
125b648af7 Made the headers in froxlor theme a little more pleasent to view
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-12 10:01:52 +01:00
Roman Schmerold (BNoiZe)
97154d2065 Fixed dashboard table header in Froxlor theme
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-12 09:50:39 +01:00
Florian Aders (EleRas)
b4b80dd0cf Add integritycheck for ssl_redirect where parentdomains have no SSL (leftovers from a bug recently fixed by d00p)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-02-11 19:17:25 +01:00
Michael Kaufmann (d00p)
cdd1f0bb65 fix sql-error in new code from previous commit
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-11 18:20:43 +01:00
Florian Aders (EleRas)
e3e4dba90d Added manuel integritycheck for admins
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-02-11 16:40:53 +01:00
Michael Kaufmann (d00p)
b726a8528b when ssl-ip/port is being removed from a main-domain, set ssl_redirect to 0 as it cannot be changed with no ssl-ip/port afterwards
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-11 15:39:24 +01:00
Roman Schmerold (BNoiZe)
b5a3567238 D'oh, forgot to redo the customer dashboard
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-08 17:47:43 +01:00
Roman Schmerold (BNoiZe)
dff26e68b9 Improving the dashboard styling, fixed missing border-radius
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-08 17:41:10 +01:00
Florian Aders (EleRas)
d7c94726fd Add a basic integritychecker after every update
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-02-07 18:25:35 +01:00
Roman Schmerold (BNoiZe)
0aeadb37af Fixed missing linebreak on lists of ip addresses
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-07 17:21:47 +01:00
Michael Kaufmann (d00p)
ec7d006069 forgot the 'TABLE' in the query
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-07 16:48:50 +01:00
Michael Kaufmann (d00p)
a1aa87940b fix non-default value of data-field in tasks-table (thx to an error-report), set version to 0.9.32-rc1 for upcoming release candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-07 15:49:40 +01:00
Michael Kaufmann (d00p)
031a80cd88 remove formtoken from the query as it is unused, fixes #1378
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-07 15:43:17 +01:00
Roman Schmerold (BNoiZe)
3f7819f6bb Optimized the Dashboard CSS/HTML
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-06 07:33:57 +01:00
Michael Kaufmann (d00p)
c5cb91a882 add comment to cron.d-template; fix linker class to void double-slash after redirectTo, fixes #1372
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-30 11:42:16 +01:00
Michael Kaufmann (d00p)
658a9288f1 read allowed max-file-size from php.ini in webftp script, fixes #1370
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-29 11:41:22 +01:00
Roman Schmerold (BNoiZe)
b050e3dcd4 Fixing display of mailquota in dashboard, fixes #1369
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-28 21:13:18 +01:00
Roman Schmerold (BNoiZe)
9dd63fd1e1 Fixed a missing icon
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-27 23:28:57 +01:00
Roman Schmerold (BNoiZe)
b5d56f9992 Fixed problems with merging oneline blocks, fixes #1360
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-27 20:26:45 +01:00
Roman Schmerold (BNoiZe)
c69a05efa5 Redesigned tables to use less CSS
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-27 19:57:03 +01:00
Michael Kaufmann (d00p)
ff06513115 and another variable typo, fixes #1364
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-27 17:41:27 +01:00
Michael Kaufmann (d00p)
65bab15c7f add missing quota-modules to freebsd's proftpd config-template, fixes #1361
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-27 10:56:54 +01:00
Michael Kaufmann (d00p)
fe5922c0a0 code beautification and variable-name-fix
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-26 20:53:31 +01:00
Roman Schmerold (BNoiZe)
5991c5de30 Finally really fixing dropdowns
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-24 18:34:51 +01:00
Roman Schmerold (BNoiZe)
c107652e9a fixing tables and dropdowns in froxlor theme
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-24 17:48:30 +01:00
Roman Schmerold (BNoiZe)
397c6e9c50 Various design fixes
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-24 15:14:57 +01:00
Michael Kaufmann (d00p)
d2a51b4bca enhance error-display on missing php-extension in webftp.php - thx to boonkerz
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-23 14:10:42 +01:00
Michael Kaufmann (d00p)
019da862dd use the same cron.d-name as in the config-template as the 'default' cronjob is not needed after the first generation of the new one; generate different lockfiles for the different jobs to avoid unnecessary conflicts
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-23 13:59:09 +01:00
Michael Kaufmann (d00p)
6d1899d72e fix typo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-23 13:25:03 +01:00
Michael Kaufmann (d00p)
abcdfb03d9 add cron-daemon reload command in order for new cron.d file to be applied, fixes #858
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-23 13:22:11 +01:00
Michael Kaufmann (d00p)
d66e375d8a remove connections domain<->ip when removing subdomains as customer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-22 10:02:17 +01:00
Michael Kaufmann (d00p)
2a72ae073a fix wrong 'You cannot set less resources of X than this user already used' message when editing admins/reseller, fixes #1359
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-22 08:18:06 +01:00
Florian Aders (EleRas)
d4e856d437 Fixing permissions a better way, thx crazy4chrissi, fixes #532
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-01-18 14:22:45 +01:00
Michael Kaufmann (d00p)
b7cf58e167 fix errormessage-format when used more than once, fixes #1356
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-18 07:41:56 +01:00
Michael Kaufmann (d00p)
00a0a4337e fix nginx configs-generation when setting is 'one file', thx to pcdummy
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-17 11:12:37 +01:00
Michael Kaufmann (d00p)
52536e0e45 fix unwanted NULL value when logging a cleaned string, thx to an error-reporter
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-16 18:46:34 +01:00
Michael Kaufmann (d00p)
7d8da2c399 month starts at 1 not 0
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-14 10:25:31 +01:00
Michael Kaufmann (d00p)
f96a38f8d6 fix cron.d ... again
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-14 09:55:04 +01:00
Michael Kaufmann (d00p)
1448796fa7 traffic runs daily
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-14 09:38:26 +01:00
Michael Kaufmann (d00p)
5065f5e7e4 fix cron.d-timing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-14 09:31:25 +01:00
Michael Kaufmann (d00p)
f4e2449822 add missing panel-text for task #8 and #99
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-14 07:35:14 +01:00
Michael Kaufmann (d00p)
4e095aaeb4 d'oh
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-13 17:33:51 +01:00
Michael Kaufmann (d00p)
84eb3c64fd fix variables etc. 2014-01-13 17:03:35 +01:00
Michael Kaufmann (d00p)
e671d01ff2 ugh, what happened there?
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-13 13:44:16 +01:00
Michael Kaufmann (d00p)
17255de669 bugfix new cron.d-file generation and don't overwrite our master, refs #858
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-13 13:42:02 +01:00
Michael Kaufmann (d00p)
4be52f76eb introducing new way of controling the cronjobs by creating a cron.d-file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-13 08:55:39 +01:00
Roman Schmerold (BNoiZe)
c5efe9fd7f Fixed a bug which made the function always return false, fixes #1348
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-08 16:07:13 +01:00
Roman Schmerold (BNoiZe)
7101655ed7 Cleaning up unnessesary js code, removing inline js
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-07 13:39:29 +01:00
Roman Schmerold (BNoiZe)
7fc3ac587a Redirect to last URL after relogin when session timed out, fixes #443
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 22:35:26 +01:00
Roman Schmerold (BNoiZe)
fdc29ee8c2 Adding icon for touch devices
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 19:52:24 +01:00
Roman Schmerold (BNoiZe)
ba9d185eb4 Improving favicon
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 19:33:27 +01:00
Roman Schmerold (BNoiZe)
ec69af7938 Added a reset button to searchfields, improved js code
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 19:16:56 +01:00
Roman Schmerold (BNoiZe)
39b1980509 Only use header css if webfont is enabled, fixes navigation padding
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 18:41:48 +01:00
Roman Schmerold (BNoiZe)
d6d40c8e12 Fixed wrong path to IE stylesheet
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 18:18:21 +01:00
Roman Schmerold (BNoiZe)
d9a5f052a1 Fixed mailparser ignoring last day of year
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 18:16:55 +01:00
Roman Schmerold (BNoiZe)
d5df53bb60 Handle traffic which may be from last year
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 17:26:42 +01:00
Roman Schmerold (BNoiZe)
c288d31762 Fixed usage of wrong fallback fonts if webfonts are enabled
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 17:18:33 +01:00
Roman Schmerold (BNoiZe)
11adf4b196 Fixed webfonts not used if enabled
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 17:12:44 +01:00
Roman Schmerold (BNoiZe)
30add37bd6 Fixed a missing comma (thx Johannes Gilges)
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-05 08:04:04 +01:00
Roman Schmerold
666bc5b036 Merge pull request #179 from 23networks/master
Override fontcolor to obtain readability
2014-01-04 10:57:48 -08:00
Johannes Matheis
f320daa93c make color of input fields consistent to body color 2014-01-04 16:24:02 +00:00
Florian Aders (EleRas)
e20b083f0b Fix date - regex for mail-log - parser
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-01-04 15:43:02 +01:00
Johannes Matheis
2bbfd47ac2 set some more fg colors to obtain readability 2014-01-03 17:14:06 +00:00
Johannes Matheis
d596eb754a override fg color to obtain readability 2014-01-03 17:00:42 +00:00
Florian Aders (EleRas)
ba3d342e2b Fixing executing perl-scripts with apache 2.4 and prevent users to access other users docroot, fixes #532
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-01-03 11:12:33 +01:00
Michael Kaufmann (d00p)
f252f134b2 fix missing space between action and username
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-03 10:56:59 +01:00
Florian Aders (EleRas)
63d5547d1e Fixed typo in updater
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-01-03 08:22:40 +01:00
Roman Schmerold (BNoiZe)
0c2aa8de45 Add description field to FTP accounts, fixes #1340
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-01-02 22:45:30 +01:00
Michael Kaufmann (d00p)
15515f2840 fix typo in variable name, thx to SaneG
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-01-02 20:43:17 +01:00
Florian Aders (EleRas)
2d1fd0c8c5 Delete old froxlor-theme and automatically move users to CSS - version of theme
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-01-01 13:11:27 +01:00
Florian Aders (EleRas)
93d60e4305 Only show description for theme variants, not base-theme - name
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-31 10:15:31 +01:00
Florian Aders (EleRas)
e98792a6af froxlor.css: move menuitems closer together
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-30 19:27:50 +01:00
Florian Aders (EleRas)
7f1b696edd Removed double tinyform in change language/password/theme
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-30 19:25:46 +01:00
Florian Aders (EleRas)
25649c2aa9 froxlor.css: fixed formatting of formfields
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-30 18:34:12 +01:00
Florian Aders (EleRas)
a2f7025940 froxlor.css: fixed corners of add/edit forms
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-30 18:30:02 +01:00
Florian Aders (EleRas)
3e5e4790bf froxlor.css: fixed dashboard - corners
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-30 18:25:14 +01:00
Florian Aders (EleRas)
41263ab031 froxlor.css: display menu and content on the same height
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-30 18:17:55 +01:00
Florian Aders (EleRas)
e006a69535 Removed a lot of stuff from froxlor.css, load sparkle and modify needed elements for easier maintainabiity
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-30 18:00:02 +01:00
Florian Aders (EleRas)
41b7724d7e Fixed edge-bug in table for froxlor.css
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-30 17:22:22 +01:00
Michael Kaufmann (d00p)
db5a80a7e1 fix version-check to display output text again if a newer version is available
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-30 17:14:26 +01:00
Florian Aders (EleRas)
ffac6e38dc Move the froxlor - theme further to css, nearly done
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-30 17:06:36 +01:00
Michael Kaufmann (d00p)
e97e377723 fix query when admin/reseller has ips != unlimited, fixes #1345
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-30 15:00:36 +01:00
Florian Aders (EleRas)
18547929ca Fixed typo in aliasdomain - SQL, thx rubber
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-30 08:20:58 +01:00
Florian Aders (EleRas)
813c76d55b Added Froxlor - theme based on sparkle in css
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-29 19:26:10 +01:00
Roman Schmerold (BNoiZe)
3621effb36 Fixed a bug where action links where highlighted even if they weren't active
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-29 19:16:22 +01:00
Florian Aders (EleRas)
3d8fa8e7ea Add theme - config for Froxlor until this theme is moved to css-only
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-29 17:43:10 +01:00
Florian Aders (EleRas)
b4a345d182 Allow themes to have various variants
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-29 17:35:03 +01:00
Roman Schmerold (BNoiZe)
675e93b99a Added resize plugin to flot, removed inline css
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-29 16:39:47 +01:00
Roman Schmerold (BNoiZe)
34b4aaa828 Fixed https not used in passwort reset links, fixes #1344
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-29 15:24:42 +01:00
Roman Schmerold (BNoiZe)
5b7fe8cf88 Fixed encoding with new database class, fixes #1343
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-29 15:11:18 +01:00
Michael Kaufmann (d00p)
0fb0d3b2db Merge remote-tracking branch 'origin/0.9.31.2' 2013-12-27 16:46:33 +01:00
Michael Kaufmann (d00p)
01d825fc2a set version to 0.9.31.2 for bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-27 16:20:11 +01:00
Michael Kaufmann (d00p)
9d5d60fa88 bugfix squeeze dovecot.conf and correct wheezy dovecot-15-lda.conf, fixes #1334
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-27 16:18:51 +01:00
Roman Schmerold (BNoiZe)
f3b61ce87c Removed unused plugins, added axis labels
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-27 15:00:38 +01:00
Roman Schmerold (BNoiZe)
5cb0256a58 Improvements to traffic graphs
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-27 14:13:38 +01:00
Roman Schmerold (BNoiZe)
1539ad1344 Fixed a bug which prevented mailtraffic from being written to database
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-27 12:32:12 +01:00
Michael Kaufmann (d00p)
b2ab5629e8 fix 'Invalid parameter number' error, thx to an anonymous report
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-26 13:34:03 +01:00
Roman Schmerold (BNoiZe)
166d75454e Minor interface tweaks, removed unused css
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-24 23:06:29 +01:00
Michael Kaufmann (d00p)
0c9d62977c Merge remote-tracking branch 'origin/0.9.31.2' 2013-12-24 15:41:33 +01:00
Michael Kaufmann (d00p)
d34515b9e0 also add curl check to master-branch, dunno why this was not merged automatically, git is teh shit
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-24 15:35:47 +01:00
Michael Kaufmann (d00p)
da371fa560 Merge remote-tracking branch 'origin/0.9.31.2' and fix install-SQL file 2013-12-24 15:29:57 +01:00
Michael Kaufmann (d00p)
44ae470d7e add check for optional php-curl extension
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-24 14:43:47 +01:00
Michael Kaufmann (d00p)
2dc0bf2104 use better german
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-24 14:36:11 +01:00
Michael Kaufmann (d00p)
3b9727942a we need php-5.3 not 5.2 - check is correct but text was not
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-24 14:34:27 +01:00
Michael Kaufmann (d00p)
cffd16a6a1 re-do all the fixes (git screwed up branches, i don't know, this is a clean one now)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-24 10:13:11 +01:00
Michael Kaufmann (d00p)
9fca6a7953 don't rely on Database-functions for getting sql/sql_root data in error-reporting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-24 09:48:57 +01:00
Michael Kaufmann (d00p)
1ec41d0f77 when adding subdomains as customer, respect the wwwserveralias and iswildcarddomain setting of the parent domain, also when editing a subdomain as customer, pre-set the values that were entered before
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-23 20:46:10 +01:00
Michael Kaufmann (d00p)
0031e19c70 damn automatic merge...stupid thing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-22 19:24:40 +01:00
Michael Kaufmann (d00p)
99c0bda7f2 Merge remote-tracking branch 'origin/0.9.31.1' 2013-12-22 19:21:34 +01:00
Michael Kaufmann (d00p)
d831d06da9 don't show 'nice' error if no is specified and disguise passwords of sql-accounts, fixes #1336
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-22 18:14:55 +01:00
Roman Schmerold (BNoiZe)
429f748ad8 Fixing mailtraffic cron, fixes traffic graph sorting
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-22 10:57:56 +01:00
Roman Schmerold (BNoiZe)
82f3d8d18c Fixes various traffic graph issues
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-20 23:56:48 +01:00
Roman Schmerold (BNoiZe)
308cc0cfb9 Fixed a bug which prevented mailtraffic from being shown
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-20 23:36:09 +01:00
Roman Schmerold (BNoiZe)
9acaa94895 Fixed mailtraffic not using lastrun time
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-20 23:19:50 +01:00
Roman Schmerold (BNoiZe)
a92cdb2926 Added cron for mailtraffic (with EleRas), fixes #69
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-20 23:12:47 +01:00
Roman Schmerold (BNoiZe)
7969edf1b4 Added title-tags to buttons, fixes 1328
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-20 19:14:24 +01:00
Roman Schmerold (BNoiZe)
7af7842fe9 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-12-20 18:28:44 +01:00
Roman Schmerold (BNoiZe)
70dc53db6e Fixed missing template vars
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-20 18:28:36 +01:00
Michael Kaufmann (d00p)
05dad04384 add 0.9.31.1 to updater of 0.9.32-dev
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-19 18:30:00 +01:00
Michael Kaufmann (d00p)
261d6e7d76 backport bugfixes from current master
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-19 18:05:40 +01:00
Michael Kaufmann
119eb5a4b8 Merge pull request #178 from RipClaw2971/sql_fix
SQL fix in install/froxlor.sql
2013-12-19 08:47:47 -08:00
Andreas Grundler
18d93fb07d SQL Fix 2013-12-19 17:26:04 +01:00
Michael Kaufmann (d00p)
984624bdc4 fix initial value of function parameter as it leads to the first condition to be always true, fixes #1330
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-19 12:35:07 +01:00
Michael Kaufmann (d00p)
d1211bdb1a make cronjob category stuff php-5.3 compatible, damn i'm way ahead the current stable versions of php :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-19 12:17:56 +01:00
Florian Aders (EleRas)
996f53786f Fixed bug in webftp regarding email as ftp-login, fixes #1252
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-19 08:29:22 +01:00
Michael Kaufmann (d00p)
0fee9a3480 complete migration to new Settings class, fixes #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-19 07:56:58 +01:00
Michael Kaufmann (d00p)
ec59d3a8e8 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-12-19 07:55:48 +01:00
Roman Schmerold (BNoiZe)
c7d00d4d11 Switched traffic charts from jqPlot to flot
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-18 18:30:57 +01:00
Michael Kaufmann (d00p)
7267c2dec9 Merge remote-tracking branch 'origin/0.9.31' 2013-12-18 09:58:38 +01:00
Michael Kaufmann (d00p)
23a1a55bf2 set version to 0.9.31 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-18 09:40:48 +01:00
Michael Kaufmann (d00p)
7a5be5456d categorize cronjob on cronjob-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-17 09:59:11 +01:00
Michael Kaufmann (d00p)
6902868e58 Merge remote-tracking branch 'origin/0.9.31' 2013-12-17 07:57:58 +01:00
Michael Kaufmann (d00p)
7256d4ff91 fix possible xss-target
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-17 07:57:38 +01:00
Michael Kaufmann (d00p)
bdf03486d2 set better defaults (sites-enabled/* is included in apache by default on most systems)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 18:33:57 +01:00
Michael Kaufmann (d00p)
baac572666 fix missing ::Get when using new Settings-class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 13:37:28 +01:00
Michael Kaufmann (d00p)
6a8cd15456 Merge remote-tracking branch 'origin/0.9.31' 2013-12-16 13:37:01 +01:00
Michael Kaufmann (d00p)
41d33ae538 use correct quoting-character in sql-query
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 13:34:08 +01:00
Michael Kaufmann (d00p)
5be5787afd fix wrong Database method-usage when toggling catchall for e-mail address
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 13:28:03 +01:00
Michael Kaufmann (d00p)
8ad3c79589 add actually a www-alias if set, fixes #1326
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 12:26:10 +01:00
Roman Schmerold (BNoiZe)
dc886c9fc5 added tooltips to webspace/traffic bars
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-16 11:47:25 +01:00
Michael Kaufmann (d00p)
7c0ab217ee Merge remote-tracking branch 'origin/0.9.31' 2013-12-16 11:34:25 +01:00
Michael Kaufmann (d00p)
28fbd2487e backport important changes of makePathfield for 0.9.31
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 11:33:13 +01:00
Michael Kaufmann (d00p)
6ed02e593c display phperror below fixed header in sparkle theme; fix wrong parameter-list and ignorance of in makePathfield
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 11:32:25 +01:00
Michael Kaufmann (d00p)
37a242a679 migrate webftp stuff to new settings-class, refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 11:03:09 +01:00
Michael Kaufmann (d00p)
164b40fef3 fix wrong language-string in settings/180.dkim.php, implemented Settings::Add() for updates later (much better than a manual query etc.), added new php-errorhandler so we can display php errors/warnings/notices (whatever is activated) in a nicer way
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-16 10:43:38 +01:00
Roman Schmerold (BNoiZe)
cd3554eecf migrated the themes to use the nice Settings-class
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-16 10:25:25 +01:00
Michael Kaufmann (d00p)
14311eb8b0 Merge remote-tracking branch 'origin/0.9.31' 2013-12-15 19:45:27 +01:00
Michael Kaufmann (d00p)
f12428f80d don't rely on defined settings, just read in what's in the database, refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 19:43:15 +01:00
Michael Kaufmann (d00p)
2f707974e2 fix missing variable in logger, tmp-fix dkim settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 16:46:15 +01:00
Michael Kaufmann (d00p)
1af06b2413 fix typo, refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 16:26:47 +01:00
Roman Schmerold (BNoiZe)
121669ee69 migrating more files to new Settings-class makes me dance, refs #1325
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-15 15:51:25 +01:00
Michael Kaufmann (d00p)
e7c53e4abb some more migrating to new settings class, refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 15:37:07 +01:00
Michael Kaufmann (d00p)
352749c798 cant stop migrating to new Settings class, refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 15:21:30 +01:00
Roman Schmerold (BNoiZe)
1e87fb8d94 removed whitespace and german strings
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-15 14:55:27 +01:00
Michael Kaufmann (d00p)
7f565c305c migrate more stuff to new Settings class, refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 14:38:53 +01:00
Roman Schmerold (BNoiZe)
bcf187761c still implementing the new Settings-class, refs #1325
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-15 14:35:07 +01:00
Roman Schmerold (BNoiZe)
fd0a2bea2f tweaking the traffic-graphs
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-15 14:21:23 +01:00
Roman Schmerold (BNoiZe)
528082b49f Merge branch 'master' of github.com:Froxlor/Froxlor 2013-12-15 13:16:08 +01:00
Roman Schmerold (BNoiZe)
d5e0484de3 even moar implementations of new Settings-class, refs #1325
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-15 13:15:34 +01:00
Michael Kaufmann (d00p)
52aaedd33a migrated a few functions to new Settings class and removed unused function createAWStatsVhost(), refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 13:05:19 +01:00
Michael Kaufmann (d00p)
558108008a more implementing of new Settings class, refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 12:40:24 +01:00
Roman Schmerold (BNoiZe)
eb33493c79 implemented new Setting-class, refs #1325
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-15 12:24:32 +01:00
Michael Kaufmann (d00p)
276d6b30d1 first few implementations of new Setting-class, refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 11:47:23 +01:00
Michael Kaufmann (d00p)
4667ccbe43 Merge remote-tracking branch 'origin/0.9.31' 2013-12-15 11:40:22 +01:00
Michael Kaufmann (d00p)
b8f963cd29 fix pagination and sorting in customer-tickets, refs #701
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-15 10:48:54 +01:00
Michael Kaufmann (d00p)
b18afacedb Merge remote-tracking branch 'origin/0.9.31' 2013-12-15 08:41:29 +01:00
Roman Schmerold (BNoiZe)
e4142571d7 removed duplicate of overview page (settings)
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-14 19:09:45 +01:00
Roman Schmerold (BNoiZe)
40dbf85f77 added a.active class to the template css
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-14 18:07:15 +01:00
Roman Schmerold (BNoiZe)
491ac02c0d added 'active' to class in navigation when link is active
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-14 16:30:08 +01:00
Michael Kaufmann (d00p)
eb7d7d7316 Merge remote-tracking branch 'origin/0.9.31' 2013-12-14 15:44:34 +01:00
Michael Kaufmann (d00p)
7688f83134 beautify loadConfigArrayDir(); fix pagination and sorting in admin-tickets, fixes #701
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-14 15:43:51 +01:00
Roman Schmerold (BNoiZe)
36b6b6b857 Added logging of faulty login attempts, fixes #1321
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-14 10:28:33 +01:00
Michael Kaufmann (d00p)
296b8b36ab Merge remote-tracking branch 'origin/0.9.31' 2013-12-13 21:33:24 +01:00
Michael Kaufmann (d00p)
83b615bc37 why easy if you could do it the hard way? :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-13 08:14:01 +01:00
Michael Kaufmann (d00p)
682defcbcf fix tiny sql-query error when using APS and correct DbManager-replacers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-13 08:07:52 +01:00
Michael Kaufmann (d00p)
810399d337 Merge remote-tracking branch 'origin/0.9.31' 2013-12-13 07:15:43 +01:00
Michael Kaufmann (d00p)
26b57e2d4d fix sql-query (thx to anonymous report) in admin-customers; fix german language-string (thx to dnano91)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-13 07:15:13 +01:00
Roman Schmerold (BNoiZe)
fcaa2f8aa9 fixed translation of 'traffic' for german
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-12 23:07:18 +01:00
Michael Kaufmann (d00p)
06cff22caa allow custom sendmail_path value in php.ini when using php-fpm, fixes #1323
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-12 14:27:24 +01:00
Michael Kaufmann (d00p)
aa7d1d3f48 show customer name and loginname in ticket-archive if customer-exists
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-12 13:39:18 +01:00
Michael Kaufmann (d00p)
18933ad118 Merge remote-tracking branch 'origin/0.9.31' 2013-12-12 11:38:32 +01:00
Michael Kaufmann (d00p)
8516cbb64d don't show 'there is a newer version of froxlor available' if a customzied (unknown) version is being checked
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-12 11:20:19 +01:00
Michael Kaufmann (d00p)
73f5547a5e add php-config for froxlor-vhost and set it as default for froxlor's vhost when fcgid/fpm is used (and the current default is set, custom settings won't be overwritten)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-12 10:44:32 +01:00
Michael Kaufmann (d00p)
0e6da344ba don't use -b for 'du' command as FreeBSD does not know it, fixes #1320
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-12 09:09:57 +01:00
Michael Kaufmann (d00p)
ce28cb1f0e Merge remote-tracking branch 'origin/0.9.31' 2013-12-12 08:27:10 +01:00
Roman Schmerold (BNoiZe)
911de0727f fixed search not calculating diskspace/traffic if no operator is used
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2013-12-11 17:11:49 +01:00
Michael Kaufmann (d00p)
e7678b8b6a Merge remote-tracking branch 'origin/0.9.31' 2013-12-11 07:30:29 +01:00
Michael Kaufmann (d00p)
7eedf6e694 add logger to dbmanager, thx Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-10 08:18:27 +01:00
Michael Kaufmann (d00p)
7bf0299d33 Merge remote-tracking branch 'origin/0.9.31' 2013-12-10 07:23:42 +01:00
Michael Kaufmann (d00p)
3e54fd765c darn, traffic_used is being calculated in the traffic cron, need to re-check what the heck is wrong there (if after all)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-09 18:49:45 +01:00
Michael Kaufmann (d00p)
220fb17824 add traffic-used when adding a customer; fix sql-error when removing a customer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-09 18:16:47 +01:00
Michael Kaufmann (d00p)
be6c8462f0 use default lenght of 10 characters if no password-minimum is specified
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-09 18:04:47 +01:00
Michael Kaufmann (d00p)
8822067311 fix search for webspace and traffic related values, also, for integer fields (like diskspace) you can now use the following operators when searching: >, < and =; fixes #772
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-09 17:24:11 +01:00
Michael Kaufmann (d00p)
a5b1065195 generate spf-entry also for 'mail'-record when no mxservers are specified, fixes #1314
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-09 13:57:03 +01:00
Michael Kaufmann (d00p)
904f412495 set correct postmaster_address (using <SERVERNAME>-variable) for dovecot config-templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-09 11:52:09 +01:00
Michael Kaufmann (d00p)
2fa6c5cd97 generate more secure password suggestions and respect password-min-length setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-09 10:57:54 +01:00
Michael Kaufmann (d00p)
7bf4cc73b6 Merge remote-tracking branch 'origin/0.9.31' 2013-12-09 09:54:44 +01:00
Michael Kaufmann (d00p)
bafcf07300 adjust gitignore file to not stage error-logs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-09 09:23:54 +01:00
Michael Kaufmann (d00p)
dc666e96b3 outsource monster-query to new WebserverBase class and adjust query which most likely fixes #1295
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-09 09:23:21 +01:00
Michael Kaufmann (d00p)
15bb78d447 remove some special characters from directory-names when validating, fixes #1231 and pull-request 73 partly
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-09 07:49:33 +01:00
Michael Kaufmann (d00p)
0771ccc9a6 Merge remote-tracking branch 'origin/0.9.31' 2013-12-08 22:00:51 +01:00
Michael Kaufmann (d00p)
3b0387901f don't cast mysql-max to integer as for admins-usernames, it may be '' instead of 0
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-08 22:00:23 +01:00
BNoiZe
2b13ae3ad8 fixed a wrong array-index in installation language file 2013-12-08 15:40:07 +01:00
Michael Kaufmann (d00p)
2e9310daf1 set master-branch version to next dev-version, so people don't break their database too early
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-08 14:36:04 +01:00
Michael Kaufmann (d00p)
e7ce62c7ff set version, please don't use this yet, if you're on git-version, switch to '0.9.31' branch
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-08 14:00:28 +01:00
Michael Kaufmann (d00p)
bf4c16b063 first work on permission-improvements by adding webserver-user to ftp-group of customer and therefore make it possible to chown the user-docroot to 750 keeping 'others' out, refs #532
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-08 11:13:43 +01:00
Michael Kaufmann (d00p)
0f80e66a01 Merge remote-tracking branch 'origin/0.9.31' 2013-12-08 10:22:21 +01:00
Michael Kaufmann (d00p)
dde6581f9c create SuexecUserGroup-statement on apache/fpm if customer has perl enabled so perl-scripts run under the same username, fixes #1317
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-08 10:18:18 +01:00
Florian Aders
0c0c8c63a7 Merge pull request #176 from BNoiZe/master
Various improvements
2013-12-06 09:44:36 -08:00
BNoiZe
ecb9fe9d5c Changed id to class 2013-12-06 18:39:55 +01:00
BNoiZe
56f8ca47dc Updated config templates 2013-12-06 18:27:51 +01:00
BNoiZe
29bf2e473d Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-12-06 18:24:10 +01:00
Michael Kaufmann (d00p)
6a6c5db88d forgot the update-status 2013-12-06 14:43:01 +01:00
Michael Kaufmann (d00p)
9f8a6a6f5e set version everywhere so updater takes effect :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-06 14:40:59 +01:00
Michael Kaufmann (d00p)
2035739131 added setting to enable/disable news-feed on admin-dashboard
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-06 14:37:27 +01:00
Michael Kaufmann (d00p)
b762cce94d custom user-agent also for simplexml_load_file-method of reading news-feed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-06 10:31:22 +01:00
Michael Kaufmann (d00p)
a325eb921f Merge remote-tracking branch 'origin/0.9.31' 2013-12-06 10:06:54 +01:00
Michael Kaufmann (d00p)
ce1608ab2c set long-lasting url for news-feed (and switch to inside.froxlor.org, which will be used more often in the future to provide up-to-date content in froxlor) and prefer connection via cURL to pass a custom-useragent for possible version depended news later
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-06 09:44:57 +01:00
Michael Kaufmann (d00p)
14074d066c fix wiki urls in language files, thx to lando
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-06 07:56:54 +01:00
Michael Kaufmann (d00p)
7b1b2ce9d7 Merge remote-tracking branch 'origin/0.9.31' 2013-12-05 14:57:07 +01:00
Michael Kaufmann (d00p)
49b2cf68e9 return the generated user-/databasename after adding the database because it's needed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-05 14:56:36 +01:00
Michael Kaufmann (d00p)
bc1b64a688 Merge remote-tracking branch 'origin/0.9.31' 2013-12-05 14:37:00 +01:00
Michael Kaufmann (d00p)
c3336b7d0f fix correctMysqlUsers() function for new pdo-class, also created new wrapper for dbms-specific queries to possibly give the freedom to use anything else but MySQL (no promises so far)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-05 13:55:01 +01:00
Michael Kaufmann (d00p)
3064477066 remove more aps/autoresponder/backup stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-05 12:17:47 +01:00
Michael Kaufmann (d00p)
93d1e1f24d Merge remote-tracking branch 'origin/0.9.31' 2013-12-05 12:00:54 +01:00
Michael Kaufmann (d00p)
ab4f589816 add new template-variables (SERVER_HOSTNAME, SERVER_IP, SERVER_IP and DOMAINNAME) to create-customer-email-template, fixes #432
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-05 11:50:49 +01:00
Michael Kaufmann (d00p)
85ee0751bd Merge remote-tracking branch 'origin/removal' 2013-12-05 09:02:40 +01:00
Michael Kaufmann (d00p)
eca5265735 more removing of aps/autoresponder/backup
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-05 08:37:58 +01:00
Michael Kaufmann (d00p)
188baaf180 fix escaping of current filename, fixes #1316
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-05 08:12:53 +01:00
Robert Förster (Dessa)
29ae767c17 fix typo 2013-12-05 00:39:42 +01:00
BNoiZe
429be9f774 changed "discard changes" to a more useful "cancel" button
„cancel” will take you back to the last view you were in.
2013-12-04 21:59:33 +01:00
Florian Aders
69ac6c0d73 Merge pull request #175 from BNoiZe/master
fixed scrolling in phpinfo(), various layoutfixes
2013-12-04 12:47:18 -08:00
BNoiZe
50bd0302b6 fixed scrolling in phpinfo(), various layoutfixes 2013-12-04 21:39:56 +01:00
Michael Kaufmann (d00p)
84ab0e5daa fix undefined index if ssl-checkbox is unchecked (still results in correct value being stored, no worries)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-04 21:10:52 +01:00
Florian Aders
d618ef2759 Merge pull request #174 from BNoiZe/master
Fixed a typo in admin_domains, fixed <strong>-tags not being strong in s...
2013-12-04 12:03:49 -08:00
BNoiZe
cd464ed01e Fixed a typo in admin_domains, fixed <strong>-tags not being strong in sparkle 2013-12-04 21:02:15 +01:00
Florian Aders
34dd96ec68 Merge pull request #173 from BNoiZe/master
Newsfeed improvements
2013-12-04 11:04:39 -08:00
BNoiZe
ab7e271f1d Moved date to top, changed date/time format 2013-12-04 19:53:55 +01:00
Florian Aders (EleRas)
f855bb7f4e Removed APS from lng - files
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-12-04 18:56:00 +01:00
Michael Kaufmann (d00p)
2800ca05a1 began to 'clean up' for future releases (APS, Autoresponder and Backup)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-04 18:32:46 +01:00
BNoiZe
0fc77dddd6 Added date to newsfeed 2013-12-04 16:55:08 +01:00
Michael Kaufmann (d00p)
47b1675dea set version to 0.9.31-rc1 for upcoming release-candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-04 14:52:25 +01:00
Michael Kaufmann (d00p)
83a77acc02 fix usage of sql-server description and info in customer-mysql, thx Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-03 22:58:56 +01:00
Michael Kaufmann (d00p)
6c424dff6a fix wrong error message if customer-loginname has invalid characters when unix-names == 1, thx to Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-03 18:57:17 +01:00
Michael Kaufmann (d00p)
9c8ebdd1d3 fix mysqldump for backup (if db exists) on install-process
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-03 15:55:30 +01:00
Florian Aders
419fb1bb81 Create readme.md 2013-12-03 14:47:17 +01:00
Michael Kaufmann (d00p)
61c04d5e31 use better defaults for fpm-slowlog settings, refs #1051
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-03 11:21:22 +01:00
Michael Kaufmann (d00p)
2853d6e1a4 added possibility to enable slowlog for fpm-users in the php-config (domain based logs), fixes #1051
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-03 11:14:32 +01:00
Michael Kaufmann
64137f68a8 Merge pull request #172 from seidler2547/master
add session gc vars to configurable values for php-fpm
2013-12-03 01:24:25 -08:00
Michael Kaufmann (d00p)
cf23980f0b minor fixes in installation-class, better error-handling
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-03 09:46:00 +01:00
seidler2547
dfeefc2e6f add session gc vars to configurable values
session.gc_divisor and session.gc_probability are needed e.g. for Horde to work correctly
2013-12-03 08:52:05 +01:00
Michael Kaufmann (d00p)
84f973ce26 fix html-tag in preconfig, fix missing global in database-class, change description of password-reset-setting accordingly to new activation-link-procedure
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-02 20:39:15 +01:00
Michael Kaufmann (d00p)
30f7d0a070 make send-report an option for admin and customer (section: security)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-02 20:26:39 +01:00
Michael Kaufmann (d00p)
ede732417e remove old and usused postfix config-parameters from freebsd-postfix config-template, fixes #1255
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-02 11:06:38 +01:00
Michael Kaufmann (d00p)
31f2ececa8 loadmodule mysql in freebsd's proftpd config, fixes #1291
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-02 11:02:57 +01:00
Michael Kaufmann (d00p)
96bcb34d81 show correct error-message when loginname has too many characters, fixes #811
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-02 10:57:12 +01:00
Michael Kaufmann
de05bdc968 Merge pull request #171 from markc/markc
Fix typo in Install-class
2013-12-01 22:55:18 -08:00
Mark Constable
b551c931e9 Renamed exceute() to execute() in class.FroxlorInstall.php 2013-12-02 11:38:08 +10:00
Michael Kaufmann (d00p)
f50268c806 update lng-files (thx oschn0r) and fixed dropdown of default-php-config in fcgid/fpm settings (thx Sephi)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-12-01 18:37:17 +01:00
Michael Kaufmann
073c5824bb Merge pull request #170 from BNoiZe/master
Changed password reset to use a activation link, fixes #729
2013-12-01 08:38:20 -08:00
BNoiZe
f74ed8ed93 Added preconfig hint for 0.9.31-dev4 2013-12-01 11:06:33 +01:00
BNoiZe
e5e0ae7527 Fixed some bugs, made activationcode more secure, added update script, merged missing commit 2013-12-01 10:34:31 +01:00
BNoiZe
2a36a0c22f Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-12-01 09:59:16 +01:00
BNoiZe
cd342691ca Updating method to reset password to use a activation link, fixes #729 2013-11-30 21:30:24 +01:00
Michael Kaufmann (d00p)
f8e7f1a975 remove not-functional method 'maildirExists' as maildirs have chmod 700, show 'remove files' on overview-delete if mail-address is an account, fixes #1275
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-30 16:40:27 +01:00
Michael Kaufmann (d00p)
f278b42353 fix wrong parameter-name in admin-customers; check for disabled imap/pop3 when adding mail-accounts as customer, fixes #1298
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-30 16:07:23 +01:00
Michael Kaufmann (d00p)
1e87c21956 removed deprecated db-class (mysql-extension) as it is not needed anymore
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-30 15:32:57 +01:00
Michael Kaufmann (d00p)
b1ae352d88 migrated install-class to new PDO database class, needs testing, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-30 14:25:49 +01:00
Michael Kaufmann (d00p)
cf3de1c657 fix customer-mysql overview, set better email address for error-reports to send to
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-29 23:13:26 +01:00
Michael Kaufmann
380d358a54 Merge pull request #168 from BNoiZe/master
sizes are displayed correctly, fixes #1277
2013-11-29 13:56:28 -08:00
BNoiZe
87bc9432f3 Fixed typos, refs #1287 2013-11-29 18:22:50 +01:00
BNoiZe
7731d69929 Updated to reflect 1024 size calculation systemwide, refs #1277
Fixed decimal places in customer_mysql.php
2013-11-29 18:03:02 +01:00
BNoiZe
d1cb2625ca Made display of database errors wider 2013-11-29 14:24:16 +01:00
BNoiZe
9986c3405e Manually trigger window resize to fix circular missbehaviour on several browsers 2013-11-29 13:55:27 +01:00
Michael Kaufmann
b38479f92d Merge pull request #167 from BNoiZe/master
Updated language definitions for the new error reporting system; added templates for Froxlor-theme
2013-11-29 04:51:12 -08:00
BNoiZe
21f7c82a95 Updated language definitions for the new error reporting system, added templates to "Froxlor" theme 2013-11-29 13:44:57 +01:00
Michael Kaufmann (d00p)
88ec1a15f1 make linker available in Database class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-29 12:55:10 +01:00
Michael Kaufmann (d00p)
3774b967f8 fix minor errors
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-29 11:28:48 +01:00
Michael Kaufmann (d00p)
defdaeee2e first implementation of error-reporting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-29 11:09:16 +01:00
Michael Kaufmann (d00p)
6f61c7b5e7 show std-subdomain (if any) to customer on the dashboard, fixes #1297
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-28 13:07:53 +01:00
Michael Kaufmann (d00p)
4426ab52d3 migrate ALL the crons to new PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-28 12:35:20 +01:00
Michael Kaufmann (d00p)
990e39cadb forgot replacer in prepared statement, thx BNoiZe
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-28 11:01:14 +01:00
Michael Kaufmann (d00p)
4cbd92abf3 migrated lib/init.php to new PDO database class, no more in the frontend now, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-28 10:58:37 +01:00
Michael Kaufmann
7b3937af11 Merge pull request #166 from BNoiZe/master
Fixed an error in webftp template, refs #1312
2013-11-28 01:59:28 -08:00
BNoiZe
fc363925cd Fixed an error in the correct file, refs #1312 2013-11-28 10:56:42 +01:00
BNoiZe
34c6ab3e06 Revert "Fixed an error in webftp template, refs #1312" - Wrong file
This reverts commit 0e977b45cb.
2013-11-27 23:03:47 +01:00
Florian Aders (EleRas)
b748270249 Fixed type
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-11-27 08:59:00 +01:00
Michael Kaufmann (d00p)
25687953c5 correct author :P damn copy'n'paste
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-27 08:36:28 +01:00
Michael Kaufmann (d00p)
4381eff384 check for fcgid being enabled when switching the webserver as only apache2 can handle fcgid (prevent a possible deadlock in the panel)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-27 08:34:49 +01:00
Florian Aders
87fae7f2e4 Merge pull request #165 from BNoiZe/master
Fixed an error in webftp template, refs #1312
2013-11-26 22:02:08 -08:00
BNoiZe
0e977b45cb Fixed an error in webftp template, refs #1312
$linker->getLink() will not work in webftp
2013-11-27 05:27:29 +01:00
Dessa
e47cc86259 Merge pull request #164 from BNoiZe/master
fixed an error, refs #1287
2013-11-26 11:39:18 -08:00
BNoiZe
2d1e7f7756 fixed an error, refs #1287 2013-11-26 20:38:27 +01:00
Michael Kaufmann
35c3f3d71e Merge pull request #163 from BNoiZe/master
More PDO migration. Merge multiple location-blocks of the same directory in ngnix, fixes #1309
2013-11-26 09:25:22 -08:00
Michael Kaufmann (d00p)
567f789dab at this stage in the updater, it's too late to inform about pdo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-26 10:16:19 +01:00
Michael Kaufmann (d00p)
84ed13d791 update-note about php-pdo being used now
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-26 09:41:40 +01:00
Michael Kaufmann (d00p)
81c0771f3b corrected Database::needSqlData() and Database::getSqlData(), refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-26 09:08:27 +01:00
Michael Kaufmann (d00p)
a2dbf56d2e migrated correctMysqlUsers() function to new PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-26 08:13:05 +01:00
BNoiZe
589e422767 Migrated updateCounters to new PDO database class, refs #1287 2013-11-25 22:32:22 +01:00
BNoiZe
fc5c4658d1 Added mergeVhostBlocks() for nginx cron, refs #1309 2013-11-25 19:32:01 +01:00
Michael Kaufmann (d00p)
c5937077c4 add needed sql-root-data to customer-mysql
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-25 10:01:39 +01:00
Michael Kaufmann (d00p)
7297ce88b5 fixed missed statement-fetch in cron-task when adding a new ftp-user
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-25 09:21:51 +01:00
Michael Kaufmann (d00p)
7a3d696c6a migrated DomainSSL-class to new PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-25 09:18:11 +01:00
Michael Kaufmann (d00p)
ae4bc4471e migrated APS parser class to new PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-25 08:47:54 +01:00
Michael Kaufmann (d00p)
c4fc03d7af separate certificate and chainfile by newline, fixes #1307
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-23 15:14:41 +01:00
Robert Förster (Dessa)
94e63e78d1 fix typo
Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2013-11-23 10:28:29 +01:00
Michael Kaufmann (d00p)
02f7a56aeb fix syntax-error in getLanguages, thx to Sephi, refs #1306
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-22 22:46:48 +01:00
Michael Kaufmann (d00p)
000bf6aebc restored missing function and migrated it to new PDO database class, fixes #1306
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-22 15:56:25 +01:00
Florian Aders (EleRas)
fcd537b091 Fixed newsfeed with curl
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-11-21 10:09:05 +01:00
Florian Aders
a9a2d296bf Merge pull request #162 from BNoiZe/master
Added fallback if allow_url_fopen is off
2013-11-21 01:01:11 -08:00
BNoiZe
df95189e87 Added check if curl is enabled 2013-11-21 09:56:06 +01:00
BNoiZe
dc09840f99 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-11-21 08:59:23 +01:00
Michael Kaufmann (d00p)
b8952259ba fix creating of ssl-redirect without ssl-ip/port, fixes #1303
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-21 08:01:43 +01:00
BNoiZe
37e6158b57 Added fallback if allow_url_fopen is off 2013-11-20 18:16:24 +01:00
Michael Kaufmann
254672f2dd Merge pull request #161 from BNoiZe/master
Fixed a typo in a query refs #1287
2013-11-20 07:22:01 -08:00
BNoiZe
59e9af11fc Fixed a typo in a query refs #1287 2013-11-20 15:40:09 +01:00
Michael Kaufmann (d00p)
ee19c268cc migrated ApsInstaller and ApsUpdater, fixed typo in traffic-cron (thx to Sephi), refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-20 15:02:49 +01:00
Michael Kaufmann (d00p)
cf2eea43c9 fix wrong usage of rowCount()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-20 14:14:33 +01:00
Florian Aders
de5f85dacf Merge pull request #160 from BNoiZe/master
Fixed a typo
2013-11-20 03:49:25 -08:00
BNoiZe
0abd2df357 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-11-20 12:30:44 +01:00
BNoiZe
88382d2856 Fixed a typo 2013-11-20 12:29:48 +01:00
Michael Kaufmann (d00p)
7a45a534fc added functions to get sql-data to Database-class, migrated backup-cron to new PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-20 10:01:34 +01:00
Michael Kaufmann (d00p)
60ba3f9127 migrated cron_tasks to new PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-20 09:29:14 +01:00
Michael Kaufmann (d00p)
345ba3a202 migrated autoresponder-cron to new PDO database class, beautify sql-query in paging-class, fix typos in traffic-cron (thx to Dessa), refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-20 08:15:30 +01:00
Dessa
55185aab5c Merge pull request #159 from BNoiZe/master
Fixed a another typo
2013-11-19 06:27:59 -08:00
BNoiZe
f5940db7b1 Fixed a another typo 2013-11-19 15:17:34 +01:00
Michael Kaufmann
e128f3484b Merge pull request #158 from BNoiZe/master
Updated webftp to PDO database class, refs #1287
2013-11-19 04:41:38 -08:00
BNoiZe
74faad408e Fixed a typo refs #1287 2013-11-19 12:44:32 +01:00
BNoiZe
fa027863a2 require is a statement and not a function 2013-11-18 14:49:49 +01:00
BNoiZe
7c9d5ef8dc Merge branch 'master' of git://github.com/Froxlor/Froxlor
Conflicts:
	webftp.php
2013-11-18 14:46:25 +01:00
Michael Kaufmann (d00p)
48de5d7c22 require_once is also a statement and not a function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-18 13:06:43 +01:00
Michael Kaufmann (d00p)
87ccff6a7b more require-statement/function stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-18 13:02:59 +01:00
Michael Kaufmann (d00p)
0db0b3bd88 require is a statement and not a function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-18 12:53:33 +01:00
Michael Kaufmann (d00p)
ca38e20345 migrated traffic-cron and cron-usage-report to new PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-18 11:59:16 +01:00
BNoiZe
2069d150a3 Updated webftp to PDO database class refs #1287 2013-11-18 10:00:28 +01:00
Michael Kaufmann (d00p)
e2ca3873a8 migrated traffic-cron-functions to new PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-18 09:23:09 +01:00
Michael Kaufmann
bb1561b628 Merge pull request #157 from BNoiZe/master
Removed $db from customer paging #refs 1287
2013-11-18 00:12:18 -08:00
BNoiZe
3527177ea9 Removed $db from customer paging #refs 1287 2013-11-18 09:10:18 +01:00
Michael Kaufmann (d00p)
a4ee4be2b4 migrate paging class to new PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-18 09:09:06 +01:00
Michael Kaufmann
17de0ab19e Merge pull request #156 from BNoiZe/master
Migrated customer_email to PDO database class, refs #1287
2013-11-17 23:41:07 -08:00
BNoiZe
c6c87fe55a Fixed a typo, small improvements 2013-11-17 21:51:32 +01:00
BNoiZe
38ebfa364f Migrated customer_email to PDO database class, refs #1287 2013-11-17 21:40:50 +01:00
Michael Kaufmann
5b7920c788 Merge pull request #155 from BNoiZe/master
simplexml check, admin_index-information and more
2013-11-17 10:35:32 -08:00
BNoiZe
c86a3af042 Removed .orig files 2013-11-17 19:32:44 +01:00
BNoiZe
00375949b5 improve admin_index-information part 2/2 2013-11-17 19:30:09 +01:00
Michael Kaufmann (d00p)
ed1c87c521 as fcgid does not add a handler in a separate config such as fpm does, in the ip/port vhost-config of course, this has to be SetHandler instead of AddHandler, thx to quizzi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-17 19:29:35 +01:00
BNoiZe
7e383fcc10 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-11-17 18:41:49 +01:00
Michael Kaufmann (d00p)
5d29ce2ad0 improve admin-index information part 1/2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-17 18:35:38 +01:00
Michael Kaufmann
464ca7a61b Merge pull request #153 from BNoiZe/master
Initial version of newsfeed in admin dashboard, needs a setting to enable/disable
2013-11-17 08:36:37 -08:00
Michael Kaufmann (d00p)
4aa23f1e12 migrated mailboxsize-cron to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-17 12:35:16 +01:00
Michael Kaufmann (d00p)
0b3df4c7d7 removed unused global db-variables
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-17 12:31:15 +01:00
Michael Kaufmann (d00p)
97c6385c36 migrated admin_settings to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-17 11:01:59 +01:00
Michael Kaufmann (d00p)
cf4865828c fix forgotten ->escape in customer_ftp
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-17 10:51:28 +01:00
Robert Förster (Dessa)
50b9eec6c1 fix another typo
Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2013-11-16 22:26:51 +01:00
Dessa
006505b32c Merge pull request #154 from ternes3/patch-1
Update admin_ipsandports.php
2013-11-16 13:06:50 -08:00
Björn Ternes
057e8d5f8e Update admin_ipsandports.php
Fix:  Fatal error: Uncaught exception 'Exception' with message 'Could not find class 'Datbase'' in /var/www/froxlor/lib/functions.php:126 Stack trace: #0 [internal function]: Autoloader->doAutoload('Datbase') #1 /var/www/froxlor/admin_ipsandports.php(379): spl_autoload_call('Datbase') #2 {main} thrown in /var/www/froxlor/lib/functions.php on line 126
2013-11-16 18:50:33 +01:00
BNoiZe
401dd7c96c Added check if simplexml is activated 2013-11-16 17:36:47 +01:00
Michael Kaufmann (d00p)
38563a443c migrated admin_admins to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-16 17:23:51 +01:00
BNoiZe
a431cbcf9e Cleaning up admin newsfeed 2013-11-15 22:50:54 +01:00
BNoiZe
c2bae1f25a Initial version of newsfeed in admin dashboard 2013-11-15 22:11:25 +01:00
Michael Kaufmann (d00p)
f1cfe41d07 fix getCustomerDetail()-query, thx to Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-15 08:29:53 +01:00
Michael Kaufmann (d00p)
e25597106e make fpm socket directory a setting, fixes #1300
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-14 09:29:55 +01:00
Michael Kaufmann (d00p)
12800b730d remove some unused functions and migrated some more functions to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-14 08:27:57 +01:00
Michael Kaufmann (d00p)
868b472b98 fix undefined variable because of re-structuring, thx Dessa
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-13 17:52:00 +01:00
Michael Kaufmann (d00p)
11393abfbe every day is typo day, again...thx oschn0r
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-13 17:41:39 +01:00
Michael Kaufmann (d00p)
c21b767654 every day is typo day...thx oschn0r
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-13 17:22:37 +01:00
Michael Kaufmann (d00p)
5f7ab0330a fix another typo, thx to oschn0r
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-13 16:55:54 +01:00
Michael Kaufmann (d00p)
e07596b642 fix typo, thx to oschn0r
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-13 16:27:27 +01:00
Michael Kaufmann (d00p)
0d7a16ad46 migrated admin_domains to new PDO Database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-13 15:39:20 +01:00
Michael Kaufmann
268bb10d1e Merge pull request #151 from BNoiZe/master
Pushed TableSorter to version 2.13.3
2013-11-11 13:31:11 -08:00
BNoiZe
cbb03b3f44 Pushed TableSorter to version 2.13.3 2013-11-11 22:29:49 +01:00
Michael Kaufmann
d2c363cd81 Merge pull request #150 from BNoiZe/master
Serveral theme improvements and bugfixes
2013-11-11 13:24:36 -08:00
BNoiZe
d5a958353f Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-11-11 22:13:50 +01:00
BNoiZe
af86e0945f Fixed an error 404, removed useless duplicate description 2013-11-11 22:08:34 +01:00
Michael Kaufmann (d00p)
6a2b81bc17 read open_basedir value properly from php.ini template, thx to s_v_e_n
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-11 12:42:50 +01:00
Michael Kaufmann (d00p)
e5bc565d7e also fix 'su' link on admin-traffic page in old theme
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-11 10:02:00 +01:00
Michael Kaufmann (d00p)
101d972a14 fix 'su' on admin-traffic overview, thx Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-11 09:59:03 +01:00
Michael Kaufmann (d00p)
a97c24634b improve logging user-storage, thx oschn0r
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-10 20:56:37 +01:00
BNoiZe
7af2ddca86 Updated WebFTP styling, made login sligthly smaller 2013-11-09 20:54:50 +01:00
BNoiZe
abadb69443 Restyling of several components, small bugfixes 2013-11-09 20:46:34 +01:00
Michael Kaufmann
50bd15c5a8 Merge pull request #149 from BNoiZe/master
Fixed an error 404, pushed jCanvas to newest version, language update
2013-11-09 09:18:15 -08:00
BNoiZe
3f793e8c18 Updated cron_usage_report in english and german 2013-11-09 18:01:18 +01:00
BNoiZe
7f0a70a070 Pushed jcanvas to version 13.11.07 2013-11-09 17:56:09 +01:00
BNoiZe
3eebf840f2 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-11-09 14:54:03 +01:00
Michael Kaufmann (d00p)
d2a8877069 fix query in admin-customers, improve admin-ipsandports, clean up getThemes(), refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-09 13:56:27 +01:00
BNoiZe
f85c0ce495 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-11-09 10:37:08 +01:00
Michael Kaufmann (d00p)
e1253413d5 dont show error-message when removing of database physically failed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-08 14:25:48 +01:00
Michael Kaufmann (d00p)
a152ae3e06 fix some ticket-system issues related with migrating to PDO
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-08 14:25:19 +01:00
Michael Kaufmann (d00p)
d9952f7401 fix pdo stuff in admin-customers, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-08 09:31:51 +01:00
Michael Kaufmann (d00p)
fa5f1900f0 add trace to database error-log-message (it just helps a lot finding the error); fixed queries in fpm und fcgid class; minor cosmetic changes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-08 08:54:44 +01:00
Michael Kaufmann (d00p)
fb8b233560 migrate updateFunctions to PDO and fix version_compare2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-08 08:48:13 +01:00
Michael Kaufmann (d00p)
26d9aa570c remove unused code and database-tables; set version to 0.9.31-dev1
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-07 18:49:16 +01:00
BNoiZe
b56b149bdb Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-11-07 17:01:17 +01:00
Michael Kaufmann (d00p)
aec5eb9161 fix undefined language-string index in add/edit ip
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-07 16:46:19 +01:00
Michael Kaufmann (d00p)
f8d2a76784 fixed queries in admin_templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-07 11:16:38 +01:00
Michael Kaufmann (d00p)
d251509beb fix two queries and corrected escaping of ticket-category, thx to vali
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-07 10:26:54 +01:00
BNoiZe
635681b634 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-11-06 18:05:57 +01:00
BNoiZe
cb1f6307dc FIxed an error 404 2013-11-06 18:04:55 +01:00
Michael Kaufmann (d00p)
3e4697eb51 migrated and improved two functions regarding PDO stuff, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-06 17:21:56 +01:00
Michael Kaufmann (d00p)
f2643103b3 completed migration of ticket-class to PDO database class and bugfixing admin-tickets, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-06 15:24:39 +01:00
Michael Kaufmann (d00p)
941a391c0e bugfixing admin_customers, damn typos
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-06 11:29:40 +01:00
Michael Kaufmann (d00p)
04012e5fff more fixes for migration to PDO, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-06 11:08:48 +01:00
Michael Kaufmann (d00p)
74bb3ccb7e migrate ticket-system to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-06 11:06:03 +01:00
Michael Kaufmann (d00p)
8a9ed3d9f1 change pexecute tp pexecute_first in phpinterface-classes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-06 10:52:20 +01:00
Michael Kaufmann (d00p)
94a5edc1eb implement pexecute_first to PDO database class to return a result right away
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-06 10:51:50 +01:00
Michael Kaufmann (d00p)
2e42ef2043 fix creation of vhosts-config if email_only==1 (means, don't create a config)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-06 09:41:01 +01:00
Michael Kaufmann (d00p)
849da2a423 migrate phpinterface-classes to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-06 09:11:26 +01:00
Michael Kaufmann (d00p)
388156b7b8 migrated admin-customers to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-06 08:46:45 +01:00
Michael Kaufmann (d00p)
96525584e2 fix typo in prepared-statement-replacer, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-05 13:51:05 +01:00
Michael Kaufmann (d00p)
864e6c6139 fix typo in replacer-variable in customer-extras
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-04 22:29:50 +01:00
Michael Kaufmann (d00p)
661c081a77 fix execute of statement if variables != replacers in sql-prepare query
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-04 22:23:49 +01:00
Michael Kaufmann
4b900f9b8f Merge pull request #148 from BNoiZe/master
Migrated index to PDO database class, refs #1287
2013-11-04 07:09:14 -08:00
BNoiZe
9765799bc7 Migrated index to PDO database class, refs #1287 2013-11-04 15:23:52 +01:00
Michael Kaufmann (d00p)
3e7df9cb7a remove parameter from FroxorLogger class and migrated it to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-04 13:28:23 +01:00
Michael Kaufmann (d00p)
222e304c93 add missing language strings to german language file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-04 13:09:56 +01:00
Michael Kaufmann (d00p)
9a187b8e82 removed unused htpasswd-htaccess-remover script; removed non-existing language-string-indeces from langfile
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-04 13:03:53 +01:00
Michael Kaufmann (d00p)
2614c86079 migrated preconfig to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-04 11:38:09 +01:00
Michael Kaufmann (d00p)
af2c068970 migrated update script to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-04 11:34:57 +01:00
Michael Kaufmann (d00p)
8638952afe Merge branch 'master' of github.com:Froxlor/Froxlor 2013-11-04 09:04:20 +01:00
Michael Kaufmann (d00p)
e3750a2988 remove unused upgrade procedures, migrated a few minor functions and files to PDO database, fixed FROXLOR_INSTALL_DIR define for master-cronjob, fixes #1294
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-04 09:03:29 +01:00
Michael Kaufmann
80ebbc9228 Merge pull request #147 from BNoiZe/master
Migrated customer_extras to new PDO database class, refs #1287
2013-11-03 13:49:18 -08:00
BNoiZe
36d65bf7ac Migrated customer_extras to new PDO database class 2013-11-03 21:48:57 +01:00
Michael Kaufmann (d00p)
e549ab2cbb finally removed super-old syscp-update-procedures, we now require the last available syscp for upgrading; migrate some functions to PDO database class, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-03 10:54:43 +01:00
Michael Kaufmann (d00p)
c9d91d178b fix 'NULL' <> null problem when adding/editing a domain as customer, thx to Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-02 12:20:23 +01:00
Michael Kaufmann (d00p)
3ec08a8f48 migrate admin_message, admin_phpsettings and admin_templates to PDO, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-02 12:07:34 +01:00
Michael Kaufmann (d00p)
111804b665 migrated admin_tickets and admin_updates to PDO database, refs #1287
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-02 10:19:19 +01:00
Michael Kaufmann (d00p)
a05fae7b75 remove unnecessary globals from generatePassword() function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-02 10:14:17 +01:00
Michael Kaufmann
d9903e1be2 Merge pull request #146 from BNoiZe/master
Migrated customer_ftp to new database class refs #1287
2013-11-01 06:08:51 -07:00
BNoiZe
36d40f8312 Migrated customer_ftp to new database class refs #1287 2013-11-01 14:04:18 +01:00
Michael Kaufmann (d00p)
08c219a291 fix blowfish hashing on php >=5.3.7, see http://php.net/manual/en/function.crypt.php, fixes #1288
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-11-01 09:29:13 +01:00
Michael Kaufmann
316b132ac5 Merge pull request #145 from BNoiZe/master
Migrated customer_mysql, customer_tickets, customer_traffic to new database class
2013-10-31 09:46:09 -07:00
BNoiZe
b4a2124d1b Migrated customer_mysql, customer_tickets, customer_traffic to new database class 2013-10-31 17:35:57 +01:00
Michael Kaufmann (d00p)
256a714d55 enhanced pdo database class; migrated admin_logger and admin_traffic
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-31 15:46:38 +01:00
Michael Kaufmann
1b03a55dae Merge pull request #144 from coacx/master
update apache path in install/froxlor.sql to reflect apache2 conform standard paths
2013-10-31 07:32:15 -07:00
coacx
c21bf7014e fixed apache path in install/froxlor.sql 2013-10-31 15:03:27 +01:00
Michael Kaufmann
bf0b443d4b Merge pull request #143 from BNoiZe/master
Fixed a bug with tokens
2013-10-31 04:27:20 -07:00
BNoiZe
e8e6471f02 Fixed a bug with tokens 2013-10-31 12:11:50 +01:00
Michael Kaufmann
77af777b89 Merge pull request #142 from BNoiZe/master
Icon cleanup, implement new PDO database class in customer_autoresponder/customer_domains/customer_index
2013-10-31 04:01:59 -07:00
BNoiZe
4735d92a0f Converted to new PDO database class 2013-10-31 11:51:01 +01:00
Michael Kaufmann (d00p)
2057864116 forgot one query in admin_index; converted admin_ipsandports to new pdo database class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-31 08:01:50 +01:00
BNoiZe
122c43c18a Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-30 17:23:37 +01:00
BNoiZe
97cd522726 Removed unused and duplicate icons 2013-10-30 17:14:37 +01:00
Michael Kaufmann
7e5c8bd596 Merge pull request #141 from BNoiZe/master
Moving "add"-links to top, removing unused froxlorclient
2013-10-30 07:02:26 -07:00
BNoiZe
16989a077d Removed unused froxlor client 2013-10-30 14:58:27 +01:00
BNoiZe
2852589598 Moved links fpr adding stuff to top of table, fixed position of search 2013-10-30 14:56:41 +01:00
Michael Kaufmann (d00p)
b618dd4e00 ehance new PDO database class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-30 14:38:04 +01:00
Michael Kaufmann (d00p)
8172cb8fc0 add possibility to use root-mysql-connection to new database class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-29 14:24:50 +01:00
Michael Kaufmann (d00p)
5d8906f1d8 enhance new PDO Database class; converted admin_cronjobs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-29 09:02:49 +01:00
Michael Kaufmann (d00p)
87867edfca Merge branch 'master' of github.com:Froxlor/Froxlor 2013-10-29 08:22:31 +01:00
Michael Kaufmann (d00p)
a14f04c25b Added new database-class based on PHP-PDO to use prepared-statements; implemented new Database-class in admin_index (more to follow, old DB class still in use everywhere else); secure standard_error back-link output
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-29 08:22:17 +01:00
Michael Kaufmann
8b06c897f6 Merge pull request #140 from BNoiZe/master
Many bugfixes and usability improvements (thanks to oschn0r)
2013-10-27 14:18:52 -07:00
BNoiZe
8f7ab2a243 Many bugfixes and usability improvements (thanks to oschn0r) 2013-10-27 22:07:47 +01:00
Michael Kaufmann
23da3259c4 Merge pull request #139 from BNoiZe/master
Fixed bug with small traffic graph
2013-10-27 11:22:47 -07:00
BNoiZe
5b7f68f77d Fixed bug with small traffic graph 2013-10-27 19:21:09 +01:00
Michael Kaufmann
2368267bb8 Merge pull request #138 from BNoiZe/master
Updated translations, more information in dashboard (part 2/2), minor bugfixes...
2013-10-27 10:50:30 -07:00
BNoiZe
09b50b2b48 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-27 18:49:00 +01:00
BNoiZe
59c0207301 Updated translations, more information in dashboard (part 2/2), bugfixes once again 2013-10-27 18:48:46 +01:00
Michael Kaufmann (d00p)
b618e86512 collect more info for the customer-dashboard (part 1/2); check for existance of cronjob (just in case)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-27 18:42:40 +01:00
Michael Kaufmann (d00p)
5d4448b659 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-10-27 16:54:54 +01:00
Michael Kaufmann (d00p)
89877f7ff2 fix wrong error-message of non-existing ip/port combo when a ssl-ip/port exists but not checked when adding a domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-27 16:53:14 +01:00
Michael Kaufmann
32636359e1 Merge pull request #137 from BNoiZe/master
Some more bugfixes, soft animation when resizing window
2013-10-27 05:22:15 -07:00
BNoiZe
9d3f2deef1 Removed useless text 2013-10-27 12:14:57 +01:00
BNoiZe
fc69afcffc Some more bugfixes, soft animation when resizing window
No more oh! (Hopefully)
2013-10-27 11:52:53 +01:00
Michael Kaufmann
af17373afa Merge pull request #136 from BNoiZe/master
Dashboard bugfixes
2013-10-27 02:47:03 -07:00
BNoiZe
c233fbfffb Dashboard bugfixes 2013-10-27 10:44:31 +01:00
Michael Kaufmann
2c08bfcfd1 Merge pull request #135 from BNoiZe/master
First version of the new dashboard, various language- and bugfixes + design improvements
2013-10-27 01:49:32 -07:00
BNoiZe
be9bf3fd34 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-27 09:45:00 +01:00
Michael Kaufmann (d00p)
9d5851e9be deny possible direct call of cronjobs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-27 06:18:09 +01:00
BNoiZe
3e73f6ccb4 First version of the new Dashboard 2013-10-24 22:07:01 +02:00
BNoiZe
33414f4c68 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-24 20:39:53 +02:00
Michael Kaufmann (d00p)
6ac4b87a84 make ssl-cipher-list an option, fixes #1274 ; improve ssl-related language-strings; setting version to 0.9.30 for release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-24 19:45:13 +02:00
BNoiZe
d15242ced7 Fixed footer cell 2013-10-24 17:10:00 +02:00
Michael Kaufmann
b81d163e1d Merge pull request #134 from RipClaw2971/#1281
fixes #1281
2013-10-21 09:11:31 -07:00
Andreas Grundler
d0315b7ed3 RealPath nicht DomainPath 2013-10-21 17:36:44 +02:00
Andreas Grundler
3c76594abb Fixed CleanupData to prevent recursive delete of all data 2013-10-21 16:35:32 +02:00
Andreas Grundler
db5aa1a98c Merge remote-tracking branch 'upstream/master' into apsfix 2013-10-21 07:29:50 +02:00
Andreas Grundler
4a61df8ae7 typo 2013-10-21 07:27:38 +02:00
Andreas Grundler
95da4e9eab Bufix for "chown -R [User]:[User] /" 2013-10-21 07:14:46 +02:00
Michael Kaufmann
510c429956 Merge pull request #133 from BNoiZe/master
Language, Theme, Password - Margin fix
2013-10-20 10:44:33 -07:00
BNoiZe
55d09ac569 Language, Theme, Password - Margin fix 2013-10-20 19:42:25 +02:00
Michael Kaufmann
d2923228da Merge pull request #132 from BNoiZe/master
Some more design fixes
2013-10-20 02:32:52 -07:00
BNoiZe
a86d2d2df3 Some more design fixes 2013-10-20 11:29:54 +02:00
Michael Kaufmann
67c8953a84 Merge pull request #131 from BNoiZe/master
New ticket notification icon
2013-10-20 00:55:41 -07:00
BNoiZe
d4c4e31804 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-20 09:52:58 +02:00
BNoiZe
78807a8ea8 Added new ticket notification icon 2013-10-20 09:52:14 +02:00
Michael Kaufmann
fa4fbdc7c4 Merge pull request #130 from BNoiZe/master
Spanish translation fixes
2013-10-19 11:19:21 -07:00
BNoiZe
036bd61ded Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-19 20:13:43 +02:00
Michael Kaufmann (d00p)
cb556093c1 fix undefined language indeces (add english as fallback as intented in case a string is not defined in the used language)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-19 18:48:08 +02:00
Michael Kaufmann (d00p)
729b52cf0a outsource check for open support-tickets to init.php so that themes may display the info wherever they want
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-19 18:47:02 +02:00
BNoiZe
0e6aec2533 Added missing spanish translations 2013-10-19 16:46:54 +02:00
Michael Kaufmann
993d5114e3 Merge pull request #129 from BNoiZe/master
Img height and autofocus on login, other fixes
2013-10-19 00:21:10 -07:00
BNoiZe
4312ed9181 Many small fixes and beautifications 2013-10-19 09:02:12 +02:00
BNoiZe
0eb8e0c55c Fixed img height on login page, set focus to username 2013-10-18 18:53:52 +02:00
Michael Kaufmann
6a47752665 Merge pull request #128 from BNoiZe/master
Some CSS fixes and header improvements
2013-10-18 06:46:16 -07:00
BNoiZe
5231ae2383 Some CSS fixes and header improvements 2013-10-18 15:16:55 +02:00
Michael Kaufmann (d00p)
03ba127fab use new directory-validator 'confdir'; fix if last ssl-ipport got deactivated and a security question is being asked
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-16 16:23:10 +02:00
Michael Kaufmann (d00p)
6b93b973e2 add new directory-validator 'confdir' to check against disallowed paths (like /, /bin, /home, etc.)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-16 08:54:39 +02:00
Michael Kaufmann
64e646b526 Merge pull request #127 from BNoiZe/master
history.go(-1) fix
2013-10-15 06:13:45 -07:00
BNoiZe
9d66507050 history.go(-1) fix 2013-10-15 15:10:10 +02:00
Michael Kaufmann (d00p)
b10b8df791 output nicer error's also in webftp-script
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-15 15:02:14 +02:00
Michael Kaufmann (d00p)
e40c7289c4 change default path of custom-ssl-certificates as too many people can't read. Also, don't let updaters specify '/' (result of an empty value) as custom-ssl path and let the cron only clean the custom-ssl-path of ssl is enabled (just in case), refs #1279
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-15 14:49:53 +02:00
Michael Kaufmann (d00p)
e38e4532b3 fix update procedure for users who upgraded from syscp (the database field which is to be dropped does not exist for them, just in fresh installs), fixes #1278
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-15 08:50:38 +02:00
Michael Kaufmann
7bd0fdfa6a Merge pull request #126 from BNoiZe/master
WebFTP fixes (sparkle theme related)
2013-10-14 11:13:32 -07:00
BNoiZe
0b6518a751 Fixed linebreaks and icons 2013-10-14 20:05:37 +02:00
BNoiZe
96faf31618 Sparkle as WebFTP default, fixes for WebFTP-Templates 2013-10-14 20:00:35 +02:00
Michael Kaufmann (d00p)
b2d873fe31 set version to 0.9.30-rc1
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-14 16:12:34 +02:00
Michael Kaufmann (d00p)
e0a4c9b8d1 add note for apache2 + php-fpm users that they need to change the fastcgi.conf when updating to 0.9.30; minor improvements of Sparkle-Theme (update templates)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-14 15:47:08 +02:00
Michael Kaufmann (d00p)
207f5c69d4 select correct value for serveralias-option when editing domain; customer now has same options as admin; refs #1147
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-14 10:08:15 +02:00
Michael Kaufmann (d00p)
1a99a272b1 let the admin set the server-alias completely (either wildcard, www. or none), customer option follows, this fixes #1147
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-14 09:50:55 +02:00
Michael Kaufmann (d00p)
e1fa5f6f0a don't link to index.php on sql-error but rather to the page before the error
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-14 09:49:47 +02:00
Michael Kaufmann (d00p)
8c8cb5a0d7 remove sort-by-path as it does not work anyway (and makes not much sense), fixes #692
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-13 16:43:46 +02:00
Michael Kaufmann (d00p)
ff19d7209d fix lighttpd cronjob for multi-stack; add ssl-cipher for nginx; set version to 0.9.30-dev1; fixes #583
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-13 16:08:14 +02:00
Michael Kaufmann (d00p)
92243991bc finally output a nice error-message on mysql-errors
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-13 12:59:43 +02:00
Michael Kaufmann (d00p)
4b5b2db6db check for FQDN before creating db, etc.
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-13 12:59:20 +02:00
Michael Kaufmann (d00p)
26885b0f35 improved error-message on incorrect ownership of lib/userdata.inc.php; set correct copyright in hint-templates; beautify code in lib/init.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-13 11:51:26 +02:00
Michael Kaufmann
4785c19b62 Merge pull request #125 from BNoiZe/master
Styling for new install, CSS fixes & tweaks, corrected icons
2013-10-13 02:33:34 -07:00
BNoiZe
b744447714 Styling for new install 2013-10-13 11:29:01 +02:00
BNoiZe
e0184e2b40 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-13 10:55:50 +02:00
BNoiZe
82b109d170 CSS fixes and tweaks 2013-10-13 10:49:31 +02:00
Michael Kaufmann (d00p)
d055c1ca72 re-work the whole install-process, now templates- and class-based; set Sparkle as default theme; set version to 0.9.29.1-dev4
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-13 10:45:09 +02:00
Michael Kaufmann (d00p)
b480a0be57 a few fixes here and there, imporved autoloader, updated database-class (ugly old php4 style), removed two functions which will be included in the following updated installer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-13 10:39:11 +02:00
BNoiZe
2ba1c1eb42 Fixed wrong icons 2013-10-12 15:09:33 +02:00
BNoiZe
e7871cb5b4 Small design improvements 2013-10-11 20:44:31 +02:00
Michael Kaufmann (d00p)
72fcad5007 remove unnecessary removal of fcgid-configs (done in ConfigIO) and remove old logs from customer if file-deletion is wanted
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-11 18:27:26 +02:00
Michael Kaufmann
0b0126ed68 Merge pull request #122 from BNoiZe/master
Removed dataTables
2013-10-11 09:27:09 -07:00
BNoiZe
0651238e41 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-10 17:01:01 +02:00
Michael Kaufmann (d00p)
6a76e8a53f remove build-in logrotate feature and provide logrotate-script
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-09 16:23:59 +02:00
Michael Kaufmann (d00p)
da0ae9040a fixes for php-5.4 (strict standard)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-09 16:12:54 +02:00
Michael Kaufmann (d00p)
b779a67e60 create sql-error.log file for database errors so support/debugging will be easier
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-09 15:58:05 +02:00
Michael Kaufmann (d00p)
e670065a0f clean phpfpm-aliasconfig-directory so old data is being removed, fixes #1273
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-09 10:43:04 +02:00
Robert Förster (Dessa)
d74d61826f bump Smarty to 3.1.15 2013-10-07 23:43:52 +02:00
Robert Förster (Dessa)
ed08303ec6 bump html5shiv to 3.7.0 2013-10-07 14:04:35 +02:00
Robert Förster (Dessa)
af136cf1f0 - add mod_quotatab_sql to wheezy proftpd fixes #1268
- replace a stray tab with a space
2013-10-07 13:42:44 +02:00
Michael Kaufmann (d00p)
cbe7792929 clean-up for fpm (remove unecessary stuff), thx to tomreyn & Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-06 18:59:10 +02:00
Michael Kaufmann (d00p)
b8960149ff really fix deletion of ip/port combo (typo && wrong field-name)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-06 18:22:59 +02:00
BNoiZe
553eca9b29 Removed dataTables 2013-10-06 15:14:58 +02:00
Michael Kaufmann (d00p)
16917505af fix domain-cross-check when deleting a IP/port combo, thx to datenfalke
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-06 14:13:36 +02:00
Michael Kaufmann (d00p)
e078d39f2d improve design for ssl-certificate descriptions, also increase size of textareas to fit a certificate-width
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-06 13:57:39 +02:00
Michael Kaufmann (d00p)
56ef9e1992 enhance customer set ssl-certificates and improve description, this should fix #1244
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-06 13:41:01 +02:00
Michael Kaufmann (d00p)
455aa33d14 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-10-06 11:36:51 +02:00
Michael Kaufmann (d00p)
475e2bf735 provide full path to 'nice'-executable in cron-configuration-templates, fixes #1272
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-06 11:36:34 +02:00
Michael Kaufmann
4584afe5fd Merge pull request #120 from BNoiZe/master
Fixed natural sorting
2013-10-06 01:24:01 -07:00
BNoiZe
6af5608f0f Added natural dynamic sorting
New attributes for sortable tables: sort-column (0 ... x) for default
sort col in template and sort-direction (asc, desc) for default sort
order on load
2013-10-06 09:43:01 +02:00
BNoiZe
718c19f230 Fixed a bug which made the edit link unclickable 2013-10-05 23:30:48 +02:00
Michael Kaufmann
11380a9819 Merge pull request #119 from BNoiZe/master
Sorting, unlock link, greyed out customer
2013-10-05 11:14:01 -07:00
BNoiZe
933a47cf7f Merge branch 'master' of https://github.com/BNoiZe/Froxlor 2013-10-05 20:09:05 +02:00
BNoiZe
521acfbe5c Added unlock link and greyed out customer if deactivated 2013-10-05 20:06:23 +02:00
BNoiZe
08e9f3ebd0 Dynamic sorting for theme Sparkle 2013-10-05 18:15:31 +02:00
Michael Kaufmann
fc0a069a74 Merge pull request #118 from BNoiZe/master
CSS tweaks
2013-10-04 10:47:24 -07:00
BNoiZe
1acf7d852d Merge branch 'master' of https://github.com/BNoiZe/Froxlor 2013-10-04 19:40:13 +02:00
BNoiZe
015e688a0e Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-04 19:39:06 +02:00
BNoiZe
939c1950ea CSS tweaks 2013-10-04 19:27:37 +02:00
BNoiZe
57e0d84d69 Removed error file created by git 2013-10-04 19:02:50 +02:00
BNoiZe
9e633d6e11 Merge branch 'master' of https://github.com/BNoiZe/Froxlor
Conflicts:
	templates/Sparkle/assets/css/main.css
2013-10-04 18:57:25 +02:00
BNoiZe
6d12ad9986 Merge pull request #117 from BNoiZe/master
Fixes for installtion screen
2013-10-04 18:56:18 +02:00
Michael Kaufmann (d00p)
205f80ff8d Merge branch 'master' of github.com:Froxlor/Froxlor 2013-10-04 18:54:24 +02:00
Michael Kaufmann (d00p)
30e664e8ea remove unecessary sed-command on debian wheezy (fpm), fixes #1269
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-04 18:53:31 +02:00
Michael Kaufmann
21020fecc4 Merge pull request #117 from BNoiZe/master
Fixes for installtion screen
2013-10-04 06:50:07 -07:00
BNoiZe
c649970f4d Fixes for installtion screen 2013-10-04 15:42:01 +02:00
Michael Kaufmann
c5dc953071 Merge pull request #116 from BNoiZe/master
CSS & HTML cleanup, usage of $linker->getLink() in header.tpl (sparkle theme)
2013-10-03 13:19:41 -07:00
BNoiZe
6ca09a3ca0 Replaced static links with $linker->getLink() 2013-10-03 21:51:59 +02:00
BNoiZe
0c3aa5c0be CSS & HTML cleanup 2013-10-03 21:21:54 +02:00
Michael Kaufmann
ee38a99b19 Merge pull request #115 from BNoiZe/master
Fixed heading of replaceable vars
2013-10-03 11:17:26 -07:00
BNoiZe
ce403a855a Fixed heading of replaceable vars 2013-10-03 20:10:34 +02:00
Michael Kaufmann (d00p)
c2b35d81c6 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-10-03 16:11:01 +02:00
Michael Kaufmann (d00p)
0ca935b553 fix incorrect strings for AXFR in updater, thx to Max
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-03 16:09:59 +02:00
Michael Kaufmann
b985e6c0f2 Merge pull request #113 from BNoiZe/master
New PHPinfo template and Default Page (Sparkle theme)
2013-10-02 13:42:03 -07:00
BNoiZe
fda66945b5 Removed static text for testing purposes 2013-10-02 21:47:13 +02:00
BNoiZe
8c2276da64 New Default Page 2013-10-02 18:56:43 +02:00
BNoiZe
5684cd8a9f New PHPinfo table 2013-10-02 18:29:31 +02:00
Michael Kaufmann (d00p)
b43a55b9b8 fix incorrect path to awstats_buildstaticpages.pl on Ubuntu Precise, thx to get
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-02 17:14:14 +02:00
Michael Kaufmann (d00p)
47d595edda fix checklastguid, thx oschni
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-02 10:23:58 +02:00
Michael Kaufmann (d00p)
10dc017dd1 add phpinfo() in admin-panel, thx to EleRas; fixes #1270
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-02 09:48:24 +02:00
Michael Kaufmann (d00p)
91ed3cb128 fix has_certs == 3 which is old (it's the default which is 0)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-01 22:16:36 +02:00
Michael Kaufmann
83743eef8c Merge pull request #112 from BNoiZe/master
Fixes and cleanup
2013-10-01 13:16:44 -07:00
BNoiZe
e5304d1cc1 Code cleanup 2013-10-01 22:02:44 +02:00
BNoiZe
f44395a001 Fixed css 2013-10-01 22:00:37 +02:00
BNoiZe
b56149f3f3 Added scroll to top button 2013-10-01 21:52:43 +02:00
BNoiZe
d55cccda39 Added background to options dropdown 2013-10-01 21:37:30 +02:00
BNoiZe
63bfea75a5 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-01 21:28:59 +02:00
BNoiZe
413b34bf34 Show type of certificate 2013-10-01 21:28:44 +02:00
BNoiZe
bc83e65a50 Replaced wrong customer-icon 2013-10-01 21:27:56 +02:00
Michael Kaufmann
2e503302a8 Merge pull request #111 from BNoiZe/master
Sparkle fixes/updates and lng/english.lng.php update
2013-10-01 12:17:09 -07:00
BNoiZe
993814edd5 Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-01 20:45:37 +02:00
Michael Kaufmann (d00p)
b19e226609 fix webftp template (Froxlor and Sparkle theme)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-01 18:44:09 +02:00
Michael Kaufmann (d00p)
c2831007e7 update sparkle theme to reflect latest changes + some minor bugfixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-01 18:43:41 +02:00
BNoiZe
12bf2b779f Changed old CUST_NAME to new SALUTATION 2013-10-01 18:30:02 +02:00
BNoiZe
c4713f3ebf Replaced static text with language var 2013-10-01 18:03:04 +02:00
BNoiZe
180d711d9c Fixed uppercase of options 2013-10-01 18:02:45 +02:00
BNoiZe
34814e37ea Merge branch 'master' of git://github.com/Froxlor/Froxlor 2013-10-01 17:32:55 +02:00
BNoiZe
d179831033 better readability of green buttons 2013-10-01 17:28:21 +02:00
BNoiZe
8032e6f0d5 if/else bugfix 2013-10-01 16:22:19 +02:00
Michael Kaufmann (d00p)
81ada4c9a4 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-10-01 16:11:27 +02:00
Michael Kaufmann (d00p)
2ca9420bd4 don't show form to add e-mail addresses if no domain exists
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-01 16:11:19 +02:00
Michael Kaufmann
d76e52cfde Merge pull request #110 from BNoiZe/master
multi-stack support for Sparkle-Theme
2013-10-01 07:03:13 -07:00
BNoiZe
a2fb15db68 multi-stack support 2013-10-01 15:58:37 +02:00
Michael Kaufmann (d00p)
38a53e49fd welcome on board new 'Sparkle' theme and also welcome on board BNoiZe as theme maintainer (creater of Sparkle theme)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-01 15:21:35 +02:00
Michael Kaufmann (d00p)
ecdb9ddbdc fix missing file-extension for AddHandler directive
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-01 10:16:13 +02:00
Michael Kaufmann (d00p)
a59fee305a fix php-fcgi starter script for nginx/php, thx to Witalij from Aixit GmbH
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-01 10:08:47 +02:00
Michael Kaufmann (d00p)
09b408c375 make changing default theme in settings recurse through customers and admins if changing themes for them is disallowed, fixes #1233
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-01 10:07:36 +02:00
Michael Kaufmann (d00p)
c109f9098c remove pretty old backwards-compatibility symlinks of cron-files, noone should need them anymore
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-10-01 09:40:01 +02:00
Michael Kaufmann
bde5ef5c90 Merge pull request #109 from tilman19/upstreamfix
Changing SetHandler to AddHandler again
2013-09-30 09:58:42 -07:00
Tilman Klaeger
0ca34daf76 Changing SetHandler to AddHandler again, works for me on my system. 2013-09-30 18:36:45 +02:00
Florian Aders (EleRas)
8c50c21657 Fixed type (add should be edit in edit-case)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2013-09-30 14:12:43 +02:00
Michael Kaufmann (d00p)
2b8d42b418 fix minor spelling error, thx to Talisman
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-30 12:13:31 +02:00
Michael Kaufmann (d00p)
2e52b95d37 fix weird behavior when adding/editing the aliasdomain value and no ssl-ip/port is given, thx datenfalke
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-30 12:12:04 +02:00
Michael Kaufmann (d00p)
5be9861bad respect default_vhostconf_domain setting of all ip/port combinations
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-30 09:59:47 +02:00
Michael Kaufmann (d00p)
de16c9c4a0 don't create a full vhost for every ip/port, just put all the ip's in the <virtualhost>-tag
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-30 08:50:18 +02:00
Michael Kaufmann (d00p)
f9459e92e7 fix redirect to non-standard-ssl port and also implement it for lighttpd
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-30 08:20:03 +02:00
Michael Kaufmann
5e4cb880f7 Merge pull request #108 from tilman19/upstreamfix
Fix for SSL redirect if ssl port != 443
2013-09-29 23:08:24 -07:00
Tilman Klaeger
573ada496a Fix for SSL redirect if ssl port != 443
Before it used to forward to https://site:80 as it only checked for
domain[port] to be !=443, wich the redirecting vhost usualy is.
Now we check for destination port !=443.
Customer still has to be carefull when setting ports and IPs,
different ports on different IPs on same domain will always cause
trouble.

tilman19, tilman@3c7.de
2013-09-30 01:26:08 +02:00
Michael Kaufmann (d00p)
7b918ec982 fix php-fpm on apache2 (update 'AddHandler with SetHandler, etc.), thx to snoopotic from the forum
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-29 20:37:39 +02:00
Michael Kaufmann (d00p)
9d43e64610 domain-hascert state 3 is non-existent, it should be 0, thx EleRas
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-29 19:29:24 +02:00
Michael Kaufmann (d00p)
0b0a515124 show either if domain has a global certificate (via ip/port), a shared certificate (via parentdomain) or it's own certificate (customer-entered), thx to Nico for the artwork
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-29 18:40:25 +02:00
Michael Kaufmann (d00p)
b3280e2264 use same aliasdomain-check queryin 'add' like we do in 'edit' of domains
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-29 18:15:46 +02:00
Michael Kaufmann (d00p)
879302623b dirty fix for adding new domains when alias-domain is set (IP-check etc. were not done in tilman19-master branch), I'll get into that later
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-29 15:08:45 +02:00
Michael Kaufmann (d00p)
94478d7ebc set correct guid when using fcgid and own-vhost for froxlor, thx to snoopotic from the forum
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-29 14:49:35 +02:00
Michael Kaufmann (d00p)
7015ded73a fix missing variable-sign in updater (only regarding nginx users with false fastcgi_param setting updating from 0.9.28.1 to 0.9.29-dev1)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-29 12:10:09 +02:00
Michael Kaufmann (d00p)
5ff3b04679 add SSLVerifyDepth also to the ip/port section
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-28 18:48:56 +02:00
Michael Kaufmann
243e30365f Merge pull request #106 from tilman19/master
Minor additions to ssl per vhost settings
2013-09-28 09:47:14 -07:00
Tilman Klaeger
c90eecba49 Minor additions to ssl per vhost settings:
add ssl CA cert and chainfail to ssl vhost

tilman19, tilman@3c7.de
2013-09-28 18:37:10 +02:00
Michael Kaufmann (d00p)
eca2df275c improve ip-address description in admin_domains, thx to datenfalke and Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-28 12:55:43 +02:00
Michael Kaufmann (d00p)
93ba24374b move a long, these are not the changes you are looking for
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-28 10:44:59 +02:00
Michael Kaufmann
d2c142c07e Merge pull request #105 from tilman19/master
Little addition to phpfpm ondemand, part 1
2013-09-28 01:24:39 -07:00
Tilman Klaeger (tilman19)
fd3852da68 php-fpm in ondemand mode keeps php process as long alive as set in
php_fpm_idle_timeout to prevent reload on every call when setting
startup_servers to 0

tilman19 <tilman@3c7.de>
2013-09-28 03:43:49 +02:00
Michael Kaufmann (d00p)
86d3cf794c re-add ssl.png-icon as it is still used (ssleditor), thx Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-27 17:14:57 +02:00
Michael Kaufmann (d00p)
f7c014e14f remove unecessary and weird conditional (how's that supposed to work?) and fix editing of domain as admin (not always reproducible though...)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-27 16:28:33 +02:00
Michael Kaufmann (d00p)
0727a6bf7b show whether ssl-certs are given for a domain by red or green icon in customer-domains, thx to nico for the icon-work
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-27 11:03:21 +02:00
Michael Kaufmann (d00p)
5b419cb7df add missing copyright notes to cron_mailboxsize; implement untested version of multi-stack for lighttpd-webserver
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-27 10:19:58 +02:00
Michael Kaufmann (d00p)
a3eeb21ae2 create correct SetHandler/FCGID config for froxlor's own vhost when vhostcontainer=1 and fcgid is enabled, thx to snoopotic from our forum
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-26 21:19:22 +02:00
Michael Kaufmann (d00p)
5d4b7e3856 when removing a ip/port combination, also remove the connections to domains
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-25 17:59:36 +02:00
Michael Kaufmann (d00p)
7cdfdda45c allow non-standard ssl-port for ssl-redirects (actually, put the port in there if non-standard is defined in ip/port combination), fixes #201
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-25 17:08:06 +02:00
Michael Kaufmann (d00p)
a993295356 fixes when adding a user with std.subdomain (multi-stack related)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-24 17:32:40 +02:00
Michael Kaufmann (d00p)
bacf60df59 Sephi doesn't like missing B's in KB :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-23 17:38:52 +02:00
Michael Kaufmann (d00p)
1edb3c7874 also, select field 'mboxsize' in customer_email because we want to show it to the user :P, thx Sephi...again...
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-23 17:36:17 +02:00
Michael Kaufmann (d00p)
2a396ffb31 enhance master-cronjob parameter usage, you can now use --force-[cronname] to force any cronjob you like; now show mailbox sizes of emial accounts in the customers email overview, fixes #1007
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-23 16:58:27 +02:00
Michael Kaufmann (d00p)
f9f4773616 properly escape custom-error strings in apache2, fixes #1009
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-23 14:48:02 +02:00
Michael Kaufmann (d00p)
74b48dace2 better error-message when version of files do not match version in database (update needed), thx to 'unknown75' from the Forum
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-23 12:27:11 +02:00
Michael Kaufmann (d00p)
6b3a54995c fix enabling of 'speciallogfile' if security questions are asked when editing a domain, fixes #1213
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-23 09:35:33 +02:00
Robert Förster (Dessa)
bdd2ca2300 embed html5shiv.js locally instead of using a (probably) unreliable source (which also updates it to 3.6.2 final) 2013-09-22 20:35:09 +02:00
Robert Förster (Dessa)
bbab7d7298 we don't use the non-minified versions of the jqplot plugins so we don't need to keep them 2013-09-22 20:35:09 +02:00
Robert Förster (Dessa)
8a5c9dd03b update css folder, use minified versions as we do not change them 2013-09-22 20:35:09 +02:00
Michael Kaufmann (d00p)
6a9de311c7 re-add jqery-stuff - something went wrong the last time
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-22 17:17:00 +02:00
Michael Kaufmann (d00p)
fea16cd108 register our own autoloader and add PHPMailerAutoload so we don't need to patch phpMailer on every update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-21 13:10:04 +02:00
Michael Kaufmann (d00p)
b894e273c7 remove requirement of PHPMailerAutoloader as we have our own
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-21 13:03:04 +02:00
Michael Kaufmann (d00p)
30122d8bf1 just replace the german word for 'unlimited' with the corresponding sign like in the english lang-file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-21 12:48:52 +02:00
Michael Kaufmann (d00p)
fc802f8087 Update all JQuery related libraries to more recent versions 2013-09-21 12:47:53 +02:00
Michael Kaufmann (d00p)
5ceaede1a9 Update Smarty to current stable version 3.1.14 2013-09-21 12:23:33 +02:00
Michael Kaufmann (d00p)
2dfdd6a5f9 Update HTMLPurifier to current stable version 4.5.0 2013-09-21 12:18:55 +02:00
Michael Kaufmann (d00p)
fc8bd2b7af Update phpMailer to current stable release 5.2.7 2013-09-21 12:07:44 +02:00
Michael Kaufmann (d00p)
98f1bc49fd beautify ip-list when editing a domain as customer; correct 'sed'-command for fpm-setup for debian wheezy; add note for ftp-path validation (bug #1231)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-20 10:58:36 +02:00
Michael Kaufmann (d00p)
0475751cee fix minor issues; re-added cronjob for lighttpd-webserver (i swear i don't know what happened :P)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-19 22:13:12 +02:00
Michael Kaufmann (d00p)
9e405dafce merge tilman19-master branch (multistack support) - note: this is a very early stage, don't expect everything to work 100%, use at your own risk. Testers are very very welcome (only apache2 and nginx (even more testing) so far)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-19 19:36:06 +02:00
Michael Kaufmann (d00p)
46e260fc91 correcting variable name, now really fixes #1264
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-19 08:04:25 +02:00
Michael Kaufmann (d00p)
005dfac926 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-09-18 23:30:46 +02:00
Michael Kaufmann (d00p)
a62eff0819 fix deactivating of nameserver-option in admin_domains when editing a domain, fixes #1264
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-18 23:29:41 +02:00
Robert Förster (Dessa)
1d49bfe80e partially revert to a75dad35dd, fixes #1263 2013-09-18 15:46:23 +02:00
Michael Kaufmann (d00p)
23361e64bb setting version to 0.9.29
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-18 12:50:22 +02:00
Michael Kaufmann (d00p)
b5a999ae6b remove mod_tls_memcache module from debian wheezy's proftpd config as it is provided without memcache-support, fixes #1258
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-18 07:38:01 +02:00
Michael Kaufmann (d00p)
2432b7c466 add note for customer-ssl-directory that it will be purged by the cron (just like fcgid-config-dir)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-12 18:45:36 +02:00
Michael Kaufmann (d00p)
075e18def3 add note to customer domain-add/edit to clearify trailing-slash in URLs, corrected apache-rewrite for url-redirects, fixes #1261
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-07 11:32:08 +02:00
Michael Kaufmann (d00p)
cce4bd36ef wrong solution by SCD in #1261. This works as intended for me.
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-07 09:53:02 +02:00
Michael Kaufmann (d00p)
d61fe9e0c0 fix mod-rewrite for redirect to URIs, fixes #1261
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-06 14:00:15 +02:00
Michael Kaufmann (d00p)
daf94c6ec9 regenerate webserver-configuration files after changing ssl-certificates as customer, fixes #1260
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-03 14:40:03 +02:00
Michael Kaufmann (d00p)
77143c7de0 use correct vmail username/groupname variable for postfix/dovecot
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-09-03 10:29:49 +02:00
Michael Kaufmann
ed2949bd21 Merge pull request #104 from nsb2006/patch-1
Update zh-cn.lng.php
2013-09-01 03:54:16 -07:00
nsb2006
427f862dac Update zh-cn.lng.php 2013-09-01 18:50:49 +08:00
Michael Kaufmann (d00p)
c97b3f3e0c add note that opendkim is currently not supported
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-27 11:45:21 +02:00
Michael Kaufmann
e50e9cbd8d Merge pull request #103 from misdoro/master
fix regex-pattern in validateDomain to allow IDN TLDs (punycode), fixes #640
2013-08-25 22:49:41 -07:00
misdoro
d90af956de Update function.validateDomain.php
Fix pattern to support IDN TLDs, like .рф that becomes .xn--p1ai in punycode at this point. (inserted as .рф in domain edit page)
2013-08-25 20:46:08 +02:00
Robert Förster (Dessa)
ef688bd0c0 add htmlpurifier Serializer dir to .gitignore.
Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2013-08-20 07:12:08 +02:00
Michael Kaufmann (d00p)
022b83d881 remove notice of undefined variable when adding/editing a customer as admin
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-20 06:55:56 +02:00
Michael Kaufmann (d00p)
14bd4c927b show real loginname instead of just <froxloruser> so people won't get confused, refs #1251
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-19 12:23:28 +02:00
Michael Kaufmann (d00p)
6bfec9dc40 adding cipher-order to ssl-vhosts when using apache, thx to Marcel
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-19 11:20:39 +02:00
Michael Kaufmann (d00p)
60ddcc221c fix undefined index 'openbasedir' when creating a subdomain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-18 21:17:41 +02:00
Michael Kaufmann (d00p)
c11460cfcc use correct html-characters to display lower-than and greater-than signs in backup-info-text, fixes #1251
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-18 13:00:07 +02:00
Michael Kaufmann (d00p)
a181954864 remove duplicate, old and wrong language entry in dutch language file, fixes #1250
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-18 12:07:08 +02:00
Michael Kaufmann (d00p)
dc57eb1394 remove unknown user 'froxlorftp' and use nobody/nogroup (default) for proftpd on gentoo, fixes #1249
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-18 12:00:28 +02:00
Michael Kaufmann (d00p)
a33b3b3fd9 remove duplicate config-entry in proftpd.conf for gentoo, fixes #1247
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-18 11:55:43 +02:00
Michael Kaufmann (d00p)
e4a4755ed0 add missing icon, thx to novaflash
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-19 12:08:45 +02:00
Michael Kaufmann (d00p)
ab8975ccc3 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-07-14 11:24:17 +02:00
Michael Kaufmann (d00p)
d4d02bfa7d fix undefined variables and domain-edit of php-config when FPM is enabled
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-14 11:23:52 +02:00
Robert Förster (Dessa)
fbb4c81e53 - put proper smtpd_relay_restrictions also in gentoo template, postfix 2.10 is stable for a while now (and the only available version besides masked 2.11 anyway)
- fix 80 char "limit" per line for wheezy postfix templates (only cosmetic)
2013-07-12 09:22:21 +02:00
Michael Kaufmann (d00p)
6d06187df4 make e-mail address and compare-address lowercase, thx to DasTho from the forum
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-10 13:45:52 +02:00
Michael Kaufmann (d00p)
1870a88f6b fix possible undefined variable in error-message, thx to Dessa
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-09 21:46:56 +02:00
Michael Kaufmann (d00p)
d02c739640 fix proftpd-config-templates for debian wheezy, thx to finnq & Spacey
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-09 20:54:06 +02:00
Robert Förster (Dessa)
26326937b1 (probably) fixed postfix configuration
Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2013-07-08 18:40:10 +02:00
Michael Kaufmann (d00p)
3267cdfda7 fix undefined variable in wheezy-config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-05 10:55:42 +02:00
Michael Kaufmann (d00p)
b7a4b69ee0 enhance php-fpm configuration options to use custom-ini-settings, refs #587
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-05 10:54:52 +02:00
Michael Kaufmann
69e2c7dee1 Merge pull request #101 from 23networks/master
"White text on light background"-fix
2013-07-04 10:24:01 -07:00
Michael Kaufmann (d00p)
7589e7a21b fix incorrect database-field regarding Maildir setting, fixes #1242 ; set version to 0.9.29-rc1
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-04 19:20:20 +02:00
Michael Kaufmann (d00p)
272de00af2 php-fpm--config 'log_errors_max_len' belongs to php_value and not php_flag, fixes #1241
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-04 19:03:06 +02:00
Michael Kaufmann (d00p)
ff66f62831 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-07-03 11:34:45 +02:00
Michael Kaufmann (d00p)
68fb822160 give possibility to change php.ini-values for fpm-pool configurations (only pre-defined sections are possible for now), refs #587
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-03 11:34:34 +02:00
Johannes Matheis
c00edd399e override fg color to obtain readability 2013-07-03 08:47:42 +00:00
Robert Förster (Dessa)
a75dad35dd massive update of the wheezy templates, but take them with a grain of salt for now, in particular:
- dkim is broken (pending code changes, this affects *everyone* with opendkim i suppose)
- it has received *no* testing (yet)

other noteworthy stuff:
- nginx should be switched to upstream provided fcgi params file, as its essentially the same.
- dovecot should now work with exim4
- for the most part, configs were switched to the commented version if available, that requires some more reading for the admins, but this isn't a problem for you... right? :)

while i don't think any of this will break horribly, like drinking the beer in your fridge or some other nasty stuff, it will still require testing

Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2013-07-01 15:07:28 +02:00
Dessa
d4e79911cb Merge pull request #100 from evgeni/allow_sieve
allow sieve usage for all mail users
2013-07-01 03:55:30 -07:00
Evgeni Golov
44cfa99c5c allow sieve usage for all mail users 2013-06-30 21:45:58 +02:00
Michael Kaufmann (d00p)
9b60dc09ea add possibility to specify enabled Zend Guard for APS, fixes #1235
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-06-21 10:22:46 +02:00
Michael Kaufmann
04e1ade0d2 Merge pull request #99 from 5nafu/master
Added smtpd_relay_restrictions to all postfix configurations, fixes #1220
2013-06-21 00:06:43 -07:00
Michael Kaufmann
05399ce53e Merge pull request #98 from wb7/master
Updated german grammer
2013-06-21 00:05:46 -07:00
5nafu
3ef481763c Bug #1220: Added smtpd_relay_restrictions to all postfix configurations 2013-06-21 08:57:57 +02:00
Lucas
f842e69d81 Changed sentence @d00p 2013-06-20 13:54:09 +03:00
Lucas
de09d3dd5f Removed tag at the end 2013-06-19 19:48:55 +03:00
Lucas
1793873bbb Updated german grammer #2 2013-06-19 19:46:58 +03:00
Michael Kaufmann
fb04e99dcb Merge pull request #97 from wb7/master
Changed some german sentences
2013-06-19 08:56:03 -07:00
Lucas
817966f4ea Changed some German sentences - grammer 2013-06-19 18:15:56 +03:00
Michael Kaufmann (d00p)
d9e7cd349b fix in display of error for path-field when dropdown is chosen (customer/domains); update change in speciallogfile also for subdomains of that domain, fixes #1223
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-06-09 15:18:38 +02:00
Dessa
95061ecf77 Merge pull request #96 from powerfolder/master
Changed executable dir for Postfix on Gentoo
2013-06-07 04:41:27 -07:00
Florian Lahr
188f189d74 fixes #1152 2013-06-07 12:54:12 +02:00
Michael Kaufmann (d00p)
15ff558d5f don't call a cronjob function from within the panel (safe_exec not allowed), fixes #1227
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-06-07 08:10:45 +02:00
Michael Kaufmann (d00p)
6bde0820c6 update IDNA-class to latest version 0.8.0 2013-06-06 15:07:43 +02:00
Michael Kaufmann
21aabb154d Merge pull request #95 from powerfolder/master
Fixes related to the Awstats/Nginx and Awstats/Gentoo
2013-06-06 07:05:24 -07:00
Florian Lahr
a3ee1430ac Changes related to missing awstats icon location block in Nginx vhosts and Awstats configuration on Gentoo
fixes #1228
fixed #1229
2013-06-06 14:49:21 +02:00
Michael Kaufmann
fc4a93ff6e Merge pull request #94 from yaplik/master
czech translation update
2013-06-06 04:05:22 -07:00
Jiří Zapletal
d595aea7a6 corrections in czech language file 2013-06-06 00:01:09 +02:00
Jiří Zapletal
9ec659be5b fixing encoding of characters in czech language file 2013-06-06 00:00:40 +02:00
Michael Kaufmann (d00p)
cf515ef8be use correct user/group setting for froxlor-fpm-vhost-config, fixes #1225
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-30 17:03:52 +02:00
Michael Kaufmann (d00p)
7d49a76c32 don't show openbasedir-textfield for customers if open-basedir is disabled for this domain (only edit), fixes #1224
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-29 16:25:07 +02:00
Michael Kaufmann (d00p)
8e20d5214b correct sentence's grammar, fixes #1221
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-27 09:38:40 +02:00
Michael Kaufmann (d00p)
537bad3926 improve description of apache-2.4 modification settings as people still activate it even without having >=apache-2.4 installed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-26 11:42:17 +02:00
Michael Kaufmann (d00p)
dee238d6bd allow empty value for Maildir-directory-suffix, fixes #1219
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-24 15:42:19 +02:00
Michael Kaufmann (d00p)
fedb513c29 fix unknown fields as it wasn't selected from the table, fixes #1218
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-24 13:34:05 +02:00
Michael Kaufmann (d00p)
435f4a189a Remove mod_log_sql model for awstats as there's no mod_log_sql anymore
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-24 13:26:52 +02:00
Michael Kaufmann (d00p)
ff218168b9 more work on wheezy configs, added fcgid- and phpfpm-commands for setup; fixed non-working call to mysqldump in backup-cronjob
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-24 10:31:26 +02:00
Michael Kaufmann (d00p)
043422b101 show customer name with su-link on ticket view for admins, and just as plaintext for customers, fixes #1045
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-17 09:50:22 +02:00
Michael Kaufmann (d00p)
a1ff131fd6 use correct sender for usage-email, fixes #1212
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-17 09:28:36 +02:00
Michael Kaufmann (d00p)
fb9ed8b7da implement per-domain-ssl-certificates in the cronjobs, refs #365
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-15 11:55:26 +02:00
Michael Kaufmann (d00p)
42b201c54d prepare ssl-per-domain (customer setable), no cronjob-functionality yet (intended), refs #365
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-14 17:26:30 +02:00
Michael Kaufmann (d00p)
14e9b81995 preparation for wheezy config-templates (just copied for now); fixed missing courier-templates for precise
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-13 18:40:30 +02:00
Michael Kaufmann (d00p)
b5fc0ad532 fix error when security question is being asked when adding a domain as admin, thx to Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-08 16:34:04 +02:00
Michael Kaufmann (d00p)
2d54fb8187 don't use name 'usage' as it is a mysql-reserved word, thx to anbrosius for noticing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-06 17:46:16 +02:00
Michael Kaufmann (d00p)
d234abc19c better calculation of mysql-diskspace usage (like we do in the customer_mysql-overview), thx to KulMaks from the forum
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-06 11:59:10 +02:00
Robert Förster (Dessa)
db8f2a767d fix rpmlints incorrect-fsf-address 2013-05-04 10:32:16 +02:00
Robert Förster (Dessa)
90ea8cfc1b phase out hardy and dovecot1 configs for gentoo 2013-05-04 10:03:44 +02:00
Michael Kaufmann (d00p)
55312a6df4 fix zonefile nameserver-entries when there are no nameservers given (use A/AAAA entries then)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-03 10:45:27 +02:00
Michael Kaufmann (d00p)
e0db240a3f tiny fixes in nginx-cronjob; clean up unused code from lighttpd cronjob
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-03 09:50:07 +02:00
Michael Kaufmann (d00p)
4825c77e2e don't create one giant vhost for all IP's but separate ones for each ip
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-02 13:02:40 +02:00
Michael Kaufmann (d00p)
9691a39102 fix setting of default IP/Port (which still used panel_domain's ipandport-field), don't show ssl-enabled IP/Ports for default-ip (wrong default parameter of function getIpPortCombinations()), smaller fixes in bind- and lighttpdcronjob
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-02 10:38:44 +02:00
Michael Kaufmann (d00p)
257444558f fix rewrite-rule for redirects to URIs, fixes #1043
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-30 11:52:57 +02:00
Michael Kaufmann (d00p)
8aa74a9b90 fixes for dualstack by tilman19
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-29 10:02:44 +02:00
Tilman Klaeger (tilman19)
80f19c7dfb Add multistack options to userpanel, fixes #586 2013-04-29 09:06:40 +02:00
Tilman Klaeger (tilman19)
0d3daace49 Add multistack configuration to Bind nameserver, fixes #585 2013-04-29 08:56:43 +02:00
Tilman Klaeger (tilman19)
af899c290f Add multistack configuration for nginx, fixes #584 2013-04-29 08:54:36 +02:00
Tilman Klaeger (tilman19)
a5048007de Create multistack configuration for Apache, fixes #582 2013-04-29 08:31:32 +02:00
Tilman Klaeger (tilman19)
0ba04fbe42 Change database structure to support multistack, #581 2013-04-29 08:22:25 +02:00
Michael Kaufmann (d00p)
fe638b5f52 fix missing bracket in lighttpd cronjob; update the ssl-listening on nginx, thx to byteworkshosting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-27 10:28:40 +02:00
Michael Kaufmann
e8096b1cb6 Merge pull request #93 from Guite/master
Minor coding-style related changes
2013-04-27 01:05:30 -07:00
Axel Guckelsberger
54fc4758d9 Update admin_message.php 2013-04-27 10:56:34 +03:00
Axel Guckelsberger
2d6d3349cf Update admin_logger.php 2013-04-27 10:48:42 +03:00
Axel Guckelsberger
ee45bd9f14 Update customer_mysql.php 2013-04-27 10:46:49 +03:00
Axel Guckelsberger
9665fe8c1f Update customer_index.php 2013-04-27 10:26:48 +03:00
Axel Guckelsberger
10d1b8063d Update admin_cronjobs.php 2013-04-27 10:22:23 +03:00
Axel Guckelsberger
1f0a2ca358 Update admin_updates.php 2013-04-27 10:18:35 +03:00
Axel Guckelsberger
a7687659cc Update customer_ftp.php 2013-04-27 10:15:36 +03:00
Axel Guckelsberger
016ae12884 Update customer_traffic.php 2013-04-27 10:10:48 +03:00
Axel Guckelsberger
f6a729df87 Update index.php 2013-04-27 10:06:19 +03:00
Axel Guckelsberger
413461364d Update customer_autoresponder.php 2013-04-27 09:59:22 +03:00
Axel Guckelsberger
c14b18ab39 Update customer_aps.php 2013-04-27 09:54:23 +03:00
Axel Guckelsberger
febb8e37bc Update cron_tasks.inc.http.10.apache.php 2013-04-27 09:50:05 +03:00
Axel Guckelsberger
84d87adb9b Update cron_tasks.inc.http.30.nginx.php 2013-04-27 09:32:28 +03:00
Axel Guckelsberger
ed151d5fd8 Update cron_tasks.inc.http.20.lighttpd.php 2013-04-27 09:16:53 +03:00
Michael Kaufmann (d00p)
b93bb806f6 don't use makeCorrectFile() on custom error-pages when it is a URL; also fix include-order for lighttpd vhosts, fixes #833
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-26 18:53:20 +02:00
Michael Kaufmann (d00p)
fb4c809ba4 forgot the extra panel on admin-index
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-25 20:00:49 +02:00
Michael Kaufmann (d00p)
fe1ad85d29 auto-height parent-container if info-panels on customer-index are too big, fixes #1198
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-25 19:58:01 +02:00
Michael Kaufmann (d00p)
7a69cf73ba don't require a port-declaration in validating an URL when an IP address is given, fixes #1179
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-23 15:58:03 +02:00
Michael Kaufmann (d00p)
f2d10046b6 fix axfr-server-stuff (and close allow-transfer block), let updater and settings validate ipv4/ipv6 via function validate_ip
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-22 16:39:35 +02:00
Michael Kaufmann (d00p)
ce9c8a766f set year to 2013 thanks to LeonP
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-20 17:20:28 +02:00
Michael Kaufmann (d00p)
82973267f3 respect deactivation of 'nameserver' yes|no in domain-edit (thx to monumentum); beautify preconfig
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-19 15:32:10 +02:00
Michael Kaufmann (d00p)
7adc2dd35c Update version_compare function; fix syntax-error in bind-config generation, thx to monumentum
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-19 13:55:38 +02:00
Michael Kaufmann (d00p)
1ae7876e44 provide a correct user-salutation for all templates, thanks to Shortie
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-19 11:56:53 +02:00
Michael Kaufmann (d00p)
e97a7c611c add possibility to specify AXFR servers for bind zone-configuration, fixes #100
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-18 16:38:22 +02:00
Michael Kaufmann (d00p)
0001c30a5d added new configio-class to reduce the duplicate code of removing config-files for the webservers (it's all pretty much the same), CAUTION: very untested
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-16 21:39:46 +02:00
Michael Kaufmann (d00p)
d51977af65 move the merging-code for location-/ sections to the end of all possible location-blocks; fixes #1193
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-16 07:57:58 +02:00
Michael Kaufmann (d00p)
e29068f0d8 ups, wrong brakets :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-15 13:19:04 +02:00
Michael Kaufmann (d00p)
8f127e4769 revert last nginx-fix (nonsense) and now respect 'vhost-statement=no' setting for froxlor-vhost (no server-block), fixes #1076
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-15 13:13:36 +02:00
Michael Kaufmann (d00p)
802d59670c add possibility to allow/disallow changing of themes; fixes #1175
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-15 09:54:35 +02:00
Michael Kaufmann (d00p)
3d246d7926 respect listen_statement = 0 setting from ipsandports-table in nginx - use with caution; fixes #1076
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-15 09:05:53 +02:00
Michael Kaufmann (d00p)
25b4826395 show specific templates only if corresponding feature is enabled, fixes #1191
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-15 08:56:50 +02:00
Michael Kaufmann (d00p)
65b3d536b6 just needed it and thought it'd be helpful for all :)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-14 22:57:57 +02:00
Michael Kaufmann (d00p)
5e91e98450 better check the faulty value explicitly so nothing user-customized gets overwritten, refs #1192
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-14 20:28:38 +02:00
Michael Kaufmann (d00p)
39d30644db falsely used makeCorrectDir() where makeCorrectFile() should be used, this concerns updaters with webserver=nginx only, the setting nginx-fastcgiparams can manually be changed of course; fixes #1192
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-14 20:08:24 +02:00
Michael Kaufmann (d00p)
df56cc45fe be sure the nginx-fastcgi_param file is a file; refs #1192
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-14 19:56:20 +02:00
Michael Kaufmann (d00p)
fb045c3fe1 let admin chose what password-hash-algorithm is to be used to crypt() passwords; fixes #852
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-14 18:41:21 +02:00
Michael Kaufmann (d00p)
271e4a660b don't db->escape the password for makeCryptPassword as its result is being db->escaped anyway; refs #852
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-14 11:56:01 +02:00
Michael Kaufmann (d00p)
1c0937f29b don't show subdomains in php-configuration-overview + allow to hide standard-subdomains (they are full-domains) via panel-setting; fixes #744
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-14 11:10:51 +02:00
Michael Kaufmann (d00p)
79b2adea16 fix open_basedir path's for newer php-versions as a trailing slash won't allow the usage of subfolders within the given folder, fixes #797
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-14 10:05:49 +02:00
Michael Kaufmann (d00p)
6da6915cac fix version_compare (why did this work for me in the first place?); fix fallback if user still has 'classic' as theme
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-12 10:48:26 +02:00
Michael Kaufmann (d00p)
e9f3e617c7 fix bug in updater which prevents the updater to finish correctly, fixes #1186
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-12 09:56:02 +02:00
Michael Kaufmann (d00p)
9af43854d9 sh*t - forget the 'table' part in the alter-query
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-11 12:37:16 +02:00
Michael Kaufmann (d00p)
8211a73c15 setting version to 0.9.28 (preparation for release)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-11 12:29:24 +02:00
Michael Kaufmann (d00p)
eb843c5f31 respect decimal-places setting in admin_traffic, thx to HammerFall and Shortie
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-11 11:46:12 +02:00
Michael Kaufmann (d00p)
9cac851ab6 add note to remove the default awstats cronjob as it conflicts with froxlor, fixes #1185
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-11 11:30:49 +02:00
Michael Kaufmann (d00p)
090d4a6835 fix escaping of spaces in dir/filename
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-06 18:57:49 +02:00
Michael Kaufmann (d00p)
3f738f6ecd remove old mod_log_sql language-file-entry
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-06 17:21:24 +02:00
Michael Kaufmann (d00p)
fbaafafdca set dovecot-1 on gentoo deprecated as announced
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-06 17:19:52 +02:00
Michael Kaufmann (d00p)
900df7127c be more specific what 'caneditdomain' field means, thx to fuchsi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-06 14:38:24 +02:00
Michael Kaufmann (d00p)
350e1b2d2d if empty string is allowed for file/folder in settings by definition, really allow empty string; fixes #1160
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-06 13:38:57 +02:00
Michael Kaufmann (d00p)
b0449165f9 when editing an admin/reseller check if the changed resources are still at least as much as the admin/reseller used already
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-04 21:08:47 +02:00
Michael Kaufmann (d00p)
95efc2f3a7 trim path before checking, fixes #927
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-04 16:10:17 +02:00
Michael Kaufmann (d00p)
faa8169964 add -i to the sendmail parameter list (php-default is -t -i anyway), thx to Psi|4ward. A note will be shown on the update screen later; fixes #1134
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-04 12:46:49 +02:00
Michael Kaufmann (d00p)
e96461bd4c add additional commands for postfix installation on freebsd, fixes #1155
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-04 12:29:16 +02:00
Michael Kaufmann (d00p)
67ec8861d7 awstats_configure.pl not available on gentoo and also not even a good idea to use because it breaks our webserver config and more; fixes #1085
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-04 12:21:33 +02:00
Michael Kaufmann (d00p)
551c1616f5 don't include specialsettings or default-vhost-content to ssl-redirects, fixes #1136
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-04 10:29:28 +02:00
Michael Kaufmann (d00p)
3d79564fd2 remove traffic-cron-lockfile after its finished, thx to netsurfer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-03 15:33:48 +02:00
Michael Kaufmann (d00p)
8c8cbc74cf make fcgid and php-fpm config cleaning work for real, fixes #1180
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-01 10:51:42 +02:00
Michael Kaufmann (d00p)
da516ed615 don't insert the ftp-directory-build-permission-task when rebuilding config files - has nothing to do with it and just confuses admins
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-30 23:14:38 +01:00
Michael Kaufmann (d00p)
ab410cc91e don't insert task if feature is disabled even though they are not run but might be irritating for the admin, thx to fuchsi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-29 20:10:37 +01:00
Michael Kaufmann (d00p)
93f320ed6d Merge branch 'master' of github.com:Froxlor/Froxlor 2013-03-29 14:54:20 +01:00
Michael Kaufmann (d00p)
8016bd4ed0 localize 'speciallogfile' and give it a better label/description, thanks to xming
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-29 14:53:54 +01:00
Michael Kaufmann
c4879519fb Merge pull request #90 from madmuffin1/language_cleanup
Removing missed chinese string, include references-file; refs #1171
2013-03-28 10:09:09 -07:00
madmuffin1
66e7e8323b Removing missed chinese string, include references-file (refs #1171) 2013-03-28 16:53:31 +01:00
Michael Kaufmann (d00p)
4e41fd84fe only build dialog if needed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-27 13:05:28 +01:00
Michael Kaufmann (d00p)
a8681b1e7b put the language-string for speciallogwarning to admin_domains, not customer_domains, this fixes an undefined variable and the possibility to edit the 'special-logfile' setting; thx to oschn00r for the hint
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-27 12:30:37 +01:00
Michael Kaufmann (d00p)
a903455ee0 only show 'SSL redirect' checkbox for customers when there really is a ip/port combination for SSL; fixes #1179
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-27 08:34:59 +01:00
Michael Kaufmann (d00p)
c986c08cfb switching users if the user is deactivated lead to a redirect to the login-screen with an undefined variable, just showing a message that the user is deactivated now
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-23 08:59:20 +01:00
Michael Kaufmann (d00p)
a9941fe0a4 include future -dev version-strings in version-check
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-22 20:05:59 +01:00
Michael Kaufmann (d00p)
1fa04c668d use the version compare of version.froxlor.org also in froxlor, thx for the hint to byteworkshosting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-22 19:59:14 +01:00
Michael Kaufmann (d00p)
cce3c0fde3 don't make documentroot include domain-name by default (forgot on update); remove possible undefined index; beautification for template-forms, thx to monumentum
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-22 18:51:12 +01:00
Michael Kaufmann
d5997d5772 Merge pull request #87 from madmuffin1/language_cleanup
Language cleanup, fixes #1171
2013-03-22 09:55:40 -07:00
madmuffin1
f2ecf74d41 Removed error references strings from all language_files, these language files should now be suitable for translation using transifex (refs #1171) 2013-03-22 16:38:56 +01:00
madmuffin1
6a16940aa0 * Removed last real backreference ($lng['dkim']['dkim_keylength']) from language files (refs #1171) 2013-03-22 16:04:12 +01:00
madmuffin1
4675bfe2b9 * removed more backreferences in language files (refs #1171) 2013-03-21 21:50:17 +01:00
Michael Kaufmann (d00p)
3587f6d119 add parameter isRelative=true to call of redirectTo() and it magically fixes #1177
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-20 21:39:07 +01:00
Michael Kaufmann (d00p)
ed3fc0208c fix notice, meh
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-20 21:24:01 +01:00
Michael Kaufmann (d00p)
acfe8a40b7 a bit of beautification, now fixes #536
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-20 21:14:56 +01:00
Michael Kaufmann
d5fd89beb7 Merge pull request #85 from sorinpohontu/Feature#536
use complete domain name as default path for DocumentRoot (a few changes are to be made), refs #536
2013-03-20 12:48:44 -07:00
Sorin Pohontu (frontline)
faada48e38 Feature #536: Use complete domain name as default path for DocumentRoot 2013-03-20 21:37:37 +02:00
Michael Kaufmann (d00p)
236ba6abfb myhostname should be different from mydomain in postfix's main.cf - use mail. to avoid confusion
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-16 11:59:52 +01:00
madmuffin1
2912d0ec4c Fix sprintf/printf confusion. Thanks to @Discordier 2013-03-16 09:03:46 +01:00
madmuffin1
50327e2df6 Removed 6 back-references from language files 2013-03-15 23:05:40 +01:00
Michael Kaufmann (d00p)
d3e902ac63 when a new e-mail address is created, don't use the the customers name, as it might confuse the owner of the account, fixes #1127
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-15 17:13:50 +01:00
Michael Kaufmann (d00p)
71544ccc40 gentoo/proftpd: add use-flag for mysql before emerge and touch proftpd.conf before editing it (makes sense); mark ubuntu hardy as deprecated as it will be removed in 0.9.29
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-15 11:26:01 +01:00
Michael Kaufmann (d00p)
74c5d0718c remove php's safe_mode as it is deprecated since php-5.3 and removed since php-5.4
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-15 09:34:41 +01:00
Michael Kaufmann (d00p)
cbc745ff72 remove mod_log_sql as planned
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-15 08:38:29 +01:00
Michael Kaufmann (d00p)
eaba3c783a make the 'RANDOM'-mysql-naming case insensitive; refs #1050
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-14 09:56:30 +01:00
Michael Kaufmann
8db5e40661 Merge pull request #70 from b-bittner/Ticket1150
Add random SQL-Prefixes to customer DBs when mysql-prefix is set to 'RANDOM', fixes #1150
2013-03-14 01:54:11 -07:00
Michael Kaufmann (d00p)
3895c30ffa clean up language files for a better fresh start on transiflex, or similar; refs #1171
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-13 09:07:04 +01:00
Michael Kaufmann (d00p)
1a9c5f162f respect ip/port-default-vhost-config-for-every-domain and system-defaultvhost-conf setting in nginx and lighttpd, fixes #916
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-13 08:18:15 +01:00
Michael Kaufmann (d00p)
a071811dd0 respect 'access froxlor directly via hostname' and 'custom docroot in ip/port' setting in nginx, refs #920
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-13 08:16:36 +01:00
Dessa
c0322b39f1 Merge pull request #84 from byteworkshosting/master
Providing Dovecot 2.x configuration steps on FreeBSD
2013-03-12 20:44:32 -07:00
Charlie Root
ca7a91d4cf Merge remote-tracking branch 'Froxlor/master' 2013-03-12 20:52:20 +01:00
Michael Kaufmann (d00p)
4d0dfb1c88 allow ip:port in redirections, fixes #1173
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-12 19:26:21 +01:00
byteworkshosting
c6477f345f Providing Bind9 Nameserver configuration steps on FreeBSD 2013-03-12 15:06:14 +01:00
byteworkshosting
c7eccd6086 Providing Nginx Webserver configuration steps on FreeBSD 2013-03-12 12:03:47 +01:00
byteworkshosting
877add851b Providing Dovecot 2.x configuration steps on FreeBSD
(fixes also the FreeBSD-Part of ticket #1015)
- configuration files can be adopted for other os i think
2013-03-12 11:57:50 +01:00
Michael Kaufmann (d00p)
b5fb0da98f escape database name when converting to UTF-8 as it may contain a dash or similar character that needs escaping, fixes #1172
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-12 08:14:52 +01:00
Michael Kaufmann
3ed063dd5c Merge pull request #83 from anbrosius/bugfix-1058
Bugfix when deleting customer, fixes #1058 fixes #758
2013-03-12 00:10:39 -07:00
anbrosius
7733b1e625 Bugfix when deleting customer 2013-03-12 00:39:38 +01:00
Michael Kaufmann (d00p)
66e6a21f77 fix and cleanup polish language file, thx to imachine; fixes #1170 refs #1171
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-11 21:21:55 +01:00
Michael Kaufmann (d00p)
e8c833e16d fix idna conversion for UTF-8, thx to anbrosius (via github)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-11 11:01:30 +01:00
Michael Kaufmann (d00p)
8d7c858931 setting version to 0.9.28-rc1
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-11 10:51:36 +01:00
Michael Kaufmann (d00p)
deee18a7a1 fix awstats/webalizer alias-generation (better solution), this one goes to byteworkshosting, thanks), finally fixes #1067
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-10 18:09:23 +01:00
Michael Kaufmann (d00p)
69e785b5fe php-fpm + apache fixes when using ssl, refs #1048
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-10 15:35:08 +01:00
Michael Kaufmann (d00p)
2897b0374c fix awstats/webalizer alias issue, (hopefully) fixes #1067
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-10 15:18:30 +01:00
Michael Kaufmann (d00p)
9b56b0c29d fix undefined indexes when path already exists and an error is thrown
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-10 14:46:45 +01:00
Michael Kaufmann (d00p)
47481aab56 check if the used froxlor version has already iso-codes in the language-table for this will output undefined variables after updating the files before updating the database in the panel
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-10 10:23:24 +01:00
Michael Kaufmann (d00p)
4b872399ac check for correct array in ApsInstaller, fixes #1098
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-10 09:11:05 +01:00
Michael Kaufmann (d00p)
a76b064a56 display domains one below the other, so you get a better overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-10 08:52:56 +01:00
Michael Kaufmann (d00p)
db81594404 generalize language string
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-10 08:49:52 +01:00
Michael Kaufmann (d00p)
56cc714c2a the link to open the customer-traffic details via admin-panel now uses rel='external' as we do with switch-user
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-10 08:45:01 +01:00
Michael Kaufmann (d00p)
e1e11061c6 activate/deactivate backup-cronjob with the backup-enabled setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-10 08:37:13 +01:00
Michael Kaufmann (d00p)
2a48c2b598 fix fpm-description in english langfile; make --force command really force a regeneration of the config files by inserting the task; beautify nginx customer vhost
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-09 16:59:33 +01:00
Michael Kaufmann (d00p)
b84bd2017c use language file and better description for google-webfont integration
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-09 16:41:11 +01:00
Michael Kaufmann (d00p)
be11f81af4 minor fixes in installation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-09 16:26:07 +01:00
Michael Kaufmann (d00p)
d9ebd7a3f9 fix description of the nginx php-reload and php-backend setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-08 22:59:16 +01:00
Michael Kaufmann (d00p)
e6816c12ef php-fpm sanity checks if pm='dynamic' or pm='ondemand', fixes #955
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-07 15:50:22 +01:00
Michael Kaufmann (d00p)
a048cd96b1 implement php-fpm process-manager 'ondemand', fixes #1035
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-07 15:40:07 +01:00
Michael Kaufmann (d00p)
f1e7c09d96 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-03-07 10:51:29 +01:00
Michael Kaufmann
caf60c6f85 Merge pull request #78 from madmuffin1/ticket1163
* Log customer deletion of database, fixes #1163
* Enable deletion and correct revoking of database for customer, refs #1108
2013-03-07 01:46:33 -08:00
madmuffin1
bd3661d1d4 * Log customer deletion of database (#1163)
* Enable deletion and correct revoking of database for customer (#1108)
2013-03-07 10:31:34 +01:00
Michael Kaufmann (d00p)
011c27101c remove unused variable which causen an undefined-index notice because it is not part of the form, fixes #1133
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-07 09:44:00 +01:00
Michael Kaufmann (d00p)
3b1be99814 use correct linker-property to set the hostname in redirectTo() function, fixes #1151
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-07 09:35:20 +01:00
Michael Kaufmann (d00p)
12e57c5f10 fix maildirExists() function to check also 'old' maildir layout, refs #1103
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-07 09:13:20 +01:00
Michael Kaufmann (d00p)
cb6db7385a escape directories/files correctly - TODO: store the user-inputs in the database correctly (source of the data), checking in the cronjob is only just-in-case, refs #717
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-06 17:56:42 +01:00
Michael Kaufmann (d00p)
debdbf5d41 update FCGIWrapper directive to FcgidWrapper (since mod_fcgid-2.3.2), refs #1138
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-06 15:46:15 +01:00
Michael Kaufmann
2c41ea48c1 Merge pull request #59 from madmuffin1/mysqlrevoke
Patching Revoking Privileges (both when deleting user and disabling user), fixes #1108
2013-03-05 23:40:45 -08:00
Michael Kaufmann (d00p)
e7a0508989 check for errors in database-description before the actual creation of the database to prevent a physical existing database without an entry in the corresponding froxlor-table, fixes #1052
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-05 16:28:54 +01:00
Michael Kaufmann (d00p)
f88c93a301 fix variable typo (undefined variable) in cron_autoresponder; don't use webfonts by default
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-05 15:51:32 +01:00
Michael Kaufmann (d00p)
92aea9d27e fix font-stuff on installation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-05 13:36:24 +01:00
Michael Kaufmann (d00p)
447f61ba78 settings are not available when reading them from the database, let admin set the php-reload command and the php-backend for nginx even if php-fpm is disabled. Added a note to the description, fixes #1075
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-05 10:29:06 +01:00
Michael Kaufmann (d00p)
747b01d141 make path to nginx's fastcgi_params customizable, fixes #1153
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-03-05 09:03:38 +01:00
Dessa
de89a07970 Merge pull request #63 from adlerweb/fix-gentoocfg-dovecot2
[Gentoo] New dovecot configuration
2013-03-04 08:21:54 -08:00
Michael Kaufmann
95faab4a82 Merge pull request #76 from felixww/patch-1
Update scripts/jobs/cron_autoresponder.php
2013-03-04 08:17:34 -08:00
Michael Kaufmann
bbb44bc857 Merge pull request #62 from adlerweb/fix-installtranslation
Fix install translation
2013-03-04 08:14:32 -08:00
Michael Kaufmann (d00p)
59e65b445f respect caneditdomain selection
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-28 09:31:33 +01:00
Michael Kaufmann (d00p)
6b1a4ce84d respect deactivated bind value in formfields
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-28 09:12:45 +01:00
felixww
09e765ba13 Update scripts/jobs/cron_autoresponder.php
Emails used to be read for parsing, using PHP's file() command.
I changed it to read the file line by line, so the script doesn't run into the PHP memory limit. 

Note that this has been a severe bug, since it used to make PHP abort script execution, thus possibly losing many emails for many users (i.e, on a multi domain setup with many autoresponders running).
2013-02-27 12:56:45 +01:00
Michael Kaufmann (d00p)
afd16138e4 remove stupid joke
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 20:58:24 +01:00
Michael Kaufmann (d00p)
d9ac3b535e make the panel more customizable by letting the admin use a google-webfont for it
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 20:54:24 +01:00
Michael Kaufmann (d00p)
cebd5ccf56 be nice to an admin/reseller if they don't have any customer-contingent
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 16:37:00 +01:00
Michael Kaufmann (d00p)
7289ec1459 custom order of ticket-categories has to be admin/reseller-dependend
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 16:20:20 +01:00
Michael Kaufmann (d00p)
204d539041 custom order of ticket-categories has to be admin/reseller-dependend
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 16:11:27 +01:00
Michael Kaufmann (d00p)
0aa6b8ceb8 respect tickets_see_all when editing admins/reseller, update version in tables.inc.php 2013-02-25 16:06:08 +01:00
Michael Kaufmann (d00p)
8b9bc44279 custom order of ticket-categories has to be admin/reseller-dependend
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 15:54:33 +01:00
Michael Kaufmann (d00p)
0c471639b1 don't remove php-fpm-configs after they have been
created, the cron_tasks.php cleans up the directory already *update -> also in apache2 and lighttpd cron*

Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 14:16:37 +01:00
Michael Kaufmann (d00p)
9061bfd9a3 customers should only see the ticket-categories created by their admin/reseller. Also, there now needs to be a 'tickets-see-all' flag for admins
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 14:09:14 +01:00
Michael Kaufmann (d00p)
177e8cf064 backward-compatibility for old mail-folder-structure
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 13:07:35 +01:00
Michael Kaufmann (d00p)
bfcd824799 fix various undefined indexes/variables, respect deactivated bind value, make checkboxes openbasedir/safemode work again
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 11:18:12 +01:00
Michael Kaufmann (d00p)
d7eef7a8b2 add support for the new apache-2.4
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 09:59:26 +01:00
Michael Kaufmann (d00p)
519db12a85 don't remove php-fpm-configs after they have been created, the cron_tasks.php cleans up the directory already
Signed-off-by: Michael Kaufmann (d00p) <mkaufmann@nutime.de>
2013-02-25 09:48:09 +01:00
Benjamin Bittner
bb3716c03e Feature #1150; Add random SQL-Prefixes to customer DBs 2013-01-01 12:50:10 +01:00
Florian Knodt
5612fb1c8d Add a warning related to SSL 2012-12-13 02:16:12 +01:00
Florian Knodt
4155fdfd4b Disable SSL by default so dovecot can start without certificates 2012-12-13 02:14:56 +01:00
Florian Knodt
648f52a262 missed ',' 2012-12-13 02:12:34 +01:00
Florian Knodt
e530e53dcb Fixed missing paths and USE-flags for gentoo/dovecot 2012-12-13 02:05:28 +01:00
Florian Knodt
123cc1336e ...and add a bit of grammar to the german translation... 2012-12-13 01:32:42 +01:00
Florian Knodt
f8e9bf9424 Fixed misplaced translation 2012-12-13 01:25:40 +01:00
madmuffin
3657cf7cc6 Patching Revoking Privileges (both when deleting user and disabling user):
* if manual changes were made or user was created with very old version of SysCP or if MySQL access hosts in settings were altered since creating user/privileges, all privileges will be deleted anyways.
2012-11-19 19:22:21 +01:00
Florian Aders
6b9e6bd842 Merge pull request #57 from squareZ/master
mail criteria added to search form
2012-10-16 23:30:04 -07:00
Florian Aders
39508ca717 Merge pull request #56 from squareZ/48f2c7833d97fb1b711c930be40cc5d01a38bfa5
Disable setting fields to configure nameserver
2012-10-16 23:29:17 -07:00
squareZ
59c65db070 Mail criteria added to search form 2012-10-17 01:06:29 +02:00
squareZ
48f2c7833d Hides nameserver settings for domains if DNS isn't in use
see http://redmine.froxlor.org/issues/964#note-12
2012-10-17 00:51:03 +02:00
Florian Aders
3f41b6d716 Merge pull request #54 from chrisv2/dovecot_allow_login_auth
allow 'login' mech (to support Outlook < 2007, and Outlook Express)
2012-09-26 09:06:09 -07:00
Chris Vigelius
ede92f3065 allow 'login' mech (to support Outlook < 2007, and Outlook Express) 2012-09-26 17:11:54 +02:00
Florian Aders
2e1f282a94 Merge pull request #53 from chrisv2/dovecot_iterate_query
add iterate_query to make doveadm -A work
2012-09-25 05:23:53 -07:00
Chris Vigelius
06db6dad72 add configfile for gentoo 2012-09-25 14:06:34 +02:00
Chris Vigelius
0622eca98e remove unnecessary semicolon at the end 2012-09-25 12:56:14 +02:00
Chris Vigelius
0c383eac50 add iterate_query to make doveadm -A work (see http://wiki2.dovecot.org/AuthDatabase/SQL#User_iteration) 2012-09-25 12:51:10 +02:00
Florian Aders
08bd5f7041 Merge pull request #33 from anbrosius/ssl-with-redirect
Fix bug: with a SSL-enabled domain and redirection Apache won't start, fixes #893 and #1023
2012-09-25 01:21:25 -07:00
Florian Aders
9ea0839426 Merge pull request #52 from chrisv2/logrotate_speciallogfile_undefined_variable
fix: undefined variable $logrotatefile when rotating speciallogfile
2012-09-25 00:27:40 -07:00
Florian Aders
ec537625a5 Merge pull request #51 from SirUli/master
Fix for cron_tasks.inc.http.10.apache.php on 1315
2012-09-25 00:27:17 -07:00
Florian Aders
30b185825c Merge pull request #43 from RipClaw2971/master
fixes #1118 FastCgiExternalServer: redefinition of previously defined class, thx RipClaw2971
2012-09-25 00:25:48 -07:00
Chris Vigelius
10cda9f5a9 fix: undefined variable $logrotatefile when rotating speciallogfile 2012-09-24 10:56:41 +02:00
Uli
bd890e8ebe Fix for cron_tasks.inc.http.10.apache.php on 1315
Error should have been fixed in #24 but the following error still
occured if $this->settings['phpfpm']['configdir'] is not available:

```
PHP Warning:  readdir() expects parameter 1 to be resource, boolean
given in /var/www/froxlor/scripts/jobs/cron_tasks.inc.http.10.apache.php
on line 1315
```

Structure of the fix is the same as in
f5bc81faca but copied to the other
section.
2012-09-24 09:10:57 +02:00
Dessa
24fb46b3d7 Merge pull request #49 from chrisv2/fix_postfix_virtual_transport
fix virtual transport in postfix
2012-09-23 02:25:07 -07:00
Chris Vigelius
8994029b3e fix virtual transport in postfix 2012-09-22 14:20:50 +02:00
Robert Förster (Dessa)
fc91683f5f drop lenny
as announced, lenny is no longer supported by us, as upstream has dropped support in February

Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2012-09-21 17:50:21 +02:00
Robert Förster (Dessa)
76355f5617 fix last commit (conf -> cfg) 2012-09-21 17:45:49 +02:00
Robert Förster (Dessa)
188e80ab2e fix chmod for libnss config files (the PM should have taken care of that when creating the file already but better safe than sorry) 2012-09-21 17:38:11 +02:00
Dessa
ec032c7a15 Merge pull request #48 from chrisv2/postfix-dovecot-ubuntu1204
Fix Postfix & Dovecot for Ubuntu 12.04
2012-09-21 08:34:11 -07:00
Dessa
79ae6da6b5 Merge pull request #47 from chrisv2/libnss-cfg-rename
with libnss-mysql-bg, configfiles end in .cfg (not .conf)
2012-09-21 08:33:42 -07:00
Chris Vigelius
977b887e6b revert disable_plaintext_auth which was changed by mistake 2012-09-21 17:27:06 +02:00
Chris Vigelius
2f1bbf7055 fix Postfix and Dovecot for Precise (Ubuntu 12.04)
- Dovecot config updated for Dovecot2
- postfix delivery method 'dovecot' enabled again
2012-09-21 17:26:45 +02:00
Chris Vigelius
86457e7a93 with libnss-mysql-bg, configfiles end in .cfg (not .conf) 2012-09-21 17:09:07 +02:00
Andreas Grundler
e6a30edd0b Merge remote-tracking branch 'upstream/master' 2012-09-13 10:30:17 +02:00
Andreas Grundler
e2700ce91d Fix for Bug #1118 2012-08-23 11:32:25 +02:00
Florian Aders
251a2ebd96 Merge pull request #42 from bechtoldt/master
Use {$header_logo} within login templates
2012-08-22 05:07:50 -07:00
Arnold Bechtoldt
11e33d855b Use {$header_logo} within login templates
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-22 13:55:54 +02:00
Florian Aders
dcfe3493a2 Merge pull request #37 from Ivaylo-Bachvarov/master
Bulgarian support, thx to Ivaylo-Bachvarov
2012-08-22 03:06:19 -07:00
Florian Aders
65cdb2def0 Merge pull request #40 from bechtoldt/ticket1044
Ticket Center: Link usernames with their user panel, fixes #1044
2012-08-22 03:04:57 -07:00
Arnold Bechtoldt
7d0ae7ebd2 Ticket Center: Link usernames with their user panel, fixes #1044
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-22 11:55:13 +02:00
Ivaylo Bachvarov
2bb7ac9e06 The whole user interface is now done.
The pull request is done. For now i don't have enought time to translate
the admin parth. But user interface is more important so i am done with
this.
2012-08-22 00:49:05 +03:00
Florian Aders
7ba4e6e066 Merge pull request #39 from bechtoldt/ticket1119
Removing Classic Theme Support, fixes #1119
2012-08-21 12:35:01 -07:00
Arnold Bechtoldt
19095cb3ae Update theme setting of active sessions (DB:panel_sessions), refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 21:33:13 +02:00
Arnold Bechtoldt
d196b0b5c8 Change theme when Classic Theme in use only. Fix Froxlor SQL file, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 21:25:56 +02:00
Arnold Bechtoldt
5a276dbf8d Removing Classic Theme Support, fixes #1119
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 20:22:45 +02:00
Florian Aders
733cb43f1c Merge pull request #38 from bechtoldt/ticket1114
Implement *deactivate-catchall*-feature, fixes #1114
2012-08-21 11:11:38 -07:00
Arnold Bechtoldt
78f286cbda Implement *deactivate-catchall*-feature, refs #fixes 1114
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 20:08:20 +02:00
Florian Aders (EleRas)
3655055030 Removed outdated, not needed file
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-08-21 19:25:35 +02:00
Florian Aders
26d93f6308 Merge pull request #36 from bechtoldt/templateoptimization
Move Froxlor to utf8 and various template - optimizations, fixes #1117
2012-08-21 10:09:35 -07:00
Arnold Bechtoldt
f6d47fe96c use UTF-8 as charset during mysql connection, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 18:40:38 +02:00
Arnold Bechtoldt
a91e7009db improving language within preconfig (v0.9.28.svn4). T e m p l a t e O p t i m i z a t i o n D o n e, fixes #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 15:32:53 +02:00
Arnold Bechtoldt
c9a93e95aa change SysCP->Froxlor within Slovak lng translation file, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 15:14:34 +02:00
Arnold Bechtoldt
084069aaf4 change SysCP->Froxlor within Swedish lng translation file, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 15:13:40 +02:00
Arnold Bechtoldt
d006c7ecac converting additional Swedish HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 15:12:16 +02:00
Arnold Bechtoldt
63057fe0ac converting additional Spanish HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 15:07:22 +02:00
Arnold Bechtoldt
9a406e8cec converting additional Slovak HTML numeric entities to actual chars. Some native speakers have to review some special char errors within this file, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 15:06:09 +02:00
Arnold Bechtoldt
36f8e50453 converting additional Portugues HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 15:01:13 +02:00
Arnold Bechtoldt
a7689f5a28 converting additional Polish HTML numeric entities to actual chars. Some native speakers have to review some special errors within this file, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 14:56:20 +02:00
Arnold Bechtoldt
92e4e2d826 converting additional Italian HTML numeric entities to actual chars and removing CR's, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 14:51:40 +02:00
Arnold Bechtoldt
8ce991a249 converting additional Hungarian HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 14:42:32 +02:00
Arnold Bechtoldt
8ab8bc0b42 converting Hungarian HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 14:40:06 +02:00
Arnold Bechtoldt
861376b2a2 converting French HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 14:27:28 +02:00
Arnold Bechtoldt
a45b231a7f converting Dutch HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 14:24:26 +02:00
Arnold Bechtoldt
d9a28d197e converting Czech HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 14:22:34 +02:00
Arnold Bechtoldt
e1a0cca5cc Don't change PHPMailer core just modify public charset object-var, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-21 14:12:15 +02:00
Ivaylo Bachvarov
7ac1240640 The error translating is now done
Still have a lot of translating work  :(
2012-08-21 13:21:58 +03:00
Ivaylo Bachvarov
b8f1118bbc Improve Bulgarian translation.
Almost all of the user interface is translated now. And the BG file is
now structured like the orginal Enlish file.
2012-08-19 02:02:34 +03:00
Arnold Bechtoldt
022d21054c convert data sets to utf8 too when updating to the next version, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-18 11:04:10 +02:00
Arnold Bechtoldt
68308c4fca using more UTF-8, optimized the initial froxlor.sql statements, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-17 15:47:27 +02:00
Arnold Bechtoldt
f575e94ddb converting English HTML [numeric] entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-16 16:11:30 +02:00
Arnold Bechtoldt
26849f89d1 converting Danish HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-16 16:08:02 +02:00
Arnold Bechtoldt
efacd85fdd converting German HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-16 16:07:05 +02:00
Arnold Bechtoldt
e4c1bacb6e converting Russian HTML numeric entities to actual chars, refs #1117
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-16 16:06:02 +02:00
Arnold Bechtoldt
823a09da85 converting zn-cn HTML numeric entities to actual chars, refs #1117 2012-08-16 16:04:27 +02:00
Arnold Bechtoldt
a9dfdb7432 reverting some movements. common css/js should be placed in a common directory
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-16 11:32:34 +02:00
Arnold Bechtoldt
1943747594 adding global variable to buildNavigation() to grant templates of the Classic template access to $theme
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-15 16:52:43 +02:00
Arnold Bechtoldt
31e24050bf fixing some paths within the installer. adding favicon to the installer page.
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-15 15:06:02 +02:00
Arnold Bechtoldt
b1df344390 removing an unecessary variable in webftp and adding favicon to the webftp template
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-14 23:14:54 +02:00
Arnold Bechtoldt
601bf68d09 Implementing the whole template system using Smarty. This commit includes movements of ROOT/js, ROOT/images, etc. to theme specific directories like templates/<THEME>/. If you are attemping to use your own templates you won't need to modify Froxlor's core files. This commit may require additional work.
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-14 23:08:25 +02:00
Arnold Bechtoldt
6d0d1ae015 don't ignore Froxlor's templates
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-14 14:59:43 +02:00
Arnold Bechtoldt
dc558f096a Ignore new templates within templates/
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-08-14 14:57:21 +02:00
anbrosius
38b7d46596 Fix bug: with a SSL-enabled domain and redirect Apache won't start 2012-07-25 17:09:44 +02:00
Andreas Burchert
607cbded7d Merge pull request #26 from avengerx/confscripts
Improve default config files generation
2012-07-25 01:40:52 -07:00
Andreas Burchert
e160ff58ba Merge pull request #32 from scarya/ticket852
Added support for encrypted passwords, refs #852
2012-07-25 01:38:06 -07:00
Andreas Burchert (scarya)
5b15de8e9a Merged upstream/master to encrypted passwords, refs #852
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2012-07-25 09:01:52 +02:00
Andreas Burchert
b8fefe6020 Merge pull request #31 from anbrosius/ticket1068
Fix uncheck specialsettings for subdomains, fixes #1068
2012-07-24 02:19:30 -07:00
anbrosius
cac5f7a204 Fix ticket #1068: uncheck specialsettings for subdomains 2012-07-24 01:06:45 +02:00
Andreas Burchert
da186c0505 Merge pull request #30 from anbrosius/master
Fix bug IMAP/POP3 after reactivating a customer, fixes #1113
2012-07-22 14:00:11 -07:00
anbrosius
437a92d0b5 Fix bug IMAP/POP3 after reactivating a customer 2012-07-22 14:51:02 +02:00
Andreas Burchert
7f7bf62d95 Merge pull request #29 from scarya/master
Added logrotate to speciallogfiles, fixes #1014
2012-07-20 04:12:12 -07:00
Andreas Burchert
68d4264d84 Merge pull request #4 from bechtoldt/ticket1021
Make check of creating e-mail addresses case-insensitive, thanks to d4f, fixes #1021
2012-07-20 04:11:41 -07:00
Andreas Burchert (scarya)
46e788f875 Added support for encrypted passwords, refs #852
Thanks to sardyna12

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2012-07-20 11:35:33 +02:00
Andreas Burchert (scarya)
f0ba09dd93 Changed default niceness of master cronjob to -5 in the templates, fixes #1050
Thanks to crazy4chrissi

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2012-07-20 10:54:24 +02:00
Andreas Burchert (scarya)
9a5b52f609 Added logrotate to speciallogfiles, fixes #1014
Thanks to dahuafschmied

Signed-off-by: Andreas Burchert <andreas.burchert@igd.fraunhofer.de>
2012-07-20 10:20:47 +02:00
Andreas Burchert
288d29de7a Merge pull request #28 from avengerx/new_maildir_structure
New maildir structure fixes #1103
Thanks to avengerx
2012-07-18 03:35:03 -07:00
Andreas Burchert
35a59e9f31 Merge pull request #24 from d00p/master
Various bugtracker-fixes
Thanks to d00p
2012-07-14 05:44:47 -07:00
Fabrício Zimmerer Murta
1c3690a882 Erase full user dir instead of just Maildir/ when erasing customer email data. 2012-07-10 00:54:03 -03:00
Fabrício Zimmerer Murta
72cefb38db Setup froxlor update script. 2012-07-10 00:53:20 -03:00
Fabrício Zimmerer Murta
432e898318 Additional modifications to domain/user/Maildir email file structure
- Added email settings' option to specify Maildir directory (depending
  on postfix version this is ./Maildir/, .maildir/ or, optionally, one
  can choose to leave Maildir file structure directly on user's
  directory.
- Fixed database 'insert' command to describe the new structure using
  specified Maildir directory into new accounts.
- Fixed maildirExists function to the new file structure
- Fixed older bug that email exclusions that were scheduled (task 7)
  were not being displayed on overview.
- Added entries on 'english' language file for the new entries on panel
- Changed task id 6 (delete customer) behavior on scrips/jobs/cron_tasks.php
  to assure email account is owned to mail uid/gid and the target is an
  actual directory before zapping it.
- Fixed task id 7 (delete customer mail data) behavior on script above
  to correctly fill and find Maildir and also do additional paranoid
  checks before zapping the mail account directory. Notice this is not
  the same from above directory-wise: here we erase a single account's
  data, while in task id a entire customer set of accounts and domains
  are eliminated.
2012-07-09 23:46:51 -03:00
root
f7754e2845 Change how email folders are created.
Before it was: customer_dir/mail/customer_login/user@domain/
Now it is: customer_dir/mail/customer_login/domain/user/Maildir/
2012-07-09 23:43:59 -03:00
Florian Aders (EleRas)
0a79ef4e30 Updated updater with new version, refs #1107
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-07-04 08:53:00 +02:00
Florian Aders
30d06584c5 Merge pull request #27 from madmuffin1/master
pull feature #1107 back to trunk, fixes #1107
2012-07-03 23:50:01 -07:00
Patrick Brueckner
bb315b783f Implemented auto-language selection (feature #1107) based on HTTP_ACCEPT_LANGUAGE headers. 2012-07-03 16:26:20 +02:00
avengerx
e7c11bfe5f More fixes for gentoo's confs related to uid/gid.
Gentoo 'mail' user/group has uid/gid 8/12 respectively. This makes
postfix' 'virtual' complain about 'bad uid'. Then the default is set
back to 'vmail' user/group. You can force using the 'mail' user (which
is responsible for the local mail delivery files) by adding to
/etc/postfix/main.cf the following lines:
virtual_minimum_uid = 8
virtual_minimum_gid = 12

  But this is not encouraged, so the default is to create a really
unprivileged 'vmail' user with a high uid/gid (above 1000).

  Due to this, the test for already existent uid/gid is added here (if
you have set uid/gid on froxlor but they don't actually exist, lines to
add the user/group will be added to the config file as it does with the
other distro's files.
2012-07-02 03:11:27 -03:00
avengerx
7a4ce63b75 Update scripts for postfix+courier and postfix+dovecot for gentoo.
Changes here include:
- shorten some repetitive commands (gentoo.inc.php)
- maps uid/gid from database instead of statically on main.cf
- maps 'homedir' from database instead of statically in
  vmail_mailbox_base (concatenates 'homedir' and 'maildir' columns from
  mail_users table)
- update mysql query files to use strictly postfix 2.2+ new format
  (in accordance to http://www.postfix.org/mysql_table.5.html)
2012-07-02 02:51:37 -03:00
avengerx
07e879a9f8 Fix imapd-ssl and pop3d-ssl example files to point to gentoo actual paths. 2012-07-01 20:39:14 -03:00
avengerx
80c4fdeb79 Fix authmysqlrc example config to point to actual mysql columns. 2012-07-01 20:38:02 -03:00
avengerx
1f281a2a9a Minor changes to gentoo-specific default confs for SMTPd
Pointed SSL keys to default (system-installed) keys that would work
out-of-the-box.
  Changed max size of emails from 50MB to 512MB to avoid problems on
default installations (some customers like sending big emails
sometimes).
  Some additional cosmetic changes.
2012-07-01 18:30:11 -03:00
avengerx
a6c5592541 Improve user/group name handling on configuration script generation. 2012-07-01 18:23:34 -03:00
Michael Kaufmann (d00p)
938b6ebf52 correct std-customer index-file so the broder-radius works in all browser supporting it 2012-06-30 13:58:20 +02:00
Michael Kaufmann (d00p)
f5bc81faca check if path could be opened before iterating through it, fixes #1104 2012-06-28 08:53:23 +02:00
Michael Kaufmann (d00p)
d89856fac0 fix some possible undefined indexes due to the change from yesno-selectbox to a checkbox, refs #645 fixes #1105 2012-06-25 09:27:39 +02:00
Michael Kaufmann (d00p)
40d68df86b Fix jquery-ui.css inclusion in templates/Froxlor/header.tpl 2012-06-22 09:29:23 +02:00
Florian Aders
a2c49c3071 Merge pull request #23 from avengerx/42b9964e
Fix 'task id 9' issue. Fixes #1102
2012-06-20 21:38:21 -07:00
Fabrício Zimmerer Murta
42b9964e9c Fix 'task id 9' issue.
Adds a message on Admin's Overview page if a task is of an unknown type.
Removes task '9' adding on function.inserttask and ignores task id 9 on
CronJobFunctions.
2012-06-18 02:05:55 -03:00
Florian Aders
f4738818e6 Merge pull request #20 from avengerx/master
Fixes bug #1097 reported by and with suggestion from d00p
2012-06-10 23:40:41 -07:00
root
12d137aac4 Apply patch from d00p from http://redmine.froxlor.org/issues/1097
Fixes the following error:
Fatal error: Cannot access private property db::$password in
/var/www/froxlor/lib/functions/database/function.correctMysqlUsers.php
on line 27

But ID on Redmine: #1097 2012-05-30
2012-06-07 15:47:05 -03:00
Arnold Bechtoldt
f957a0a04e email address validation: using strtolower() with equal-operator to check if address is not already in use, instead of comparing with LIKE-operator, fixes #1021
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-05-29 10:21:58 +02:00
Florian Aders (EleRas)
4f5186f97c Corrected updater too Froxlor standards, fixes #1089
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-05-23 09:17:16 +02:00
Florian Aders
8f4f0b106b Merge pull request #16 from dschallert/Bug_#693_hide_empty_information_in_customer_control_panel_index
fixes #693 Hide empty information on customerpanel index
2012-05-22 23:39:57 -07:00
Florian Aders
06e672ca2a Merge pull request #17 from blackice2999/fixes-php-fpm-rewrite
Fixes php fpm rewrite, fixes #1089, thx blackice2999
2012-05-22 23:36:20 -07:00
Florian Aders
3119cb01bc Merge pull request #19 from wittich/patch-2
Caused by the update from admin_admins.php, fixes #1095
2012-05-22 23:32:55 -07:00
Florian Aders
3577fa6d5d Merge pull request #18 from wittich/patch-1
Admin progressbar, refs #1095, http://redmine.froxlor.org/issues/1095
2012-05-22 23:32:18 -07:00
wittich
b5556d4f93 Caused by the update from admin_admins.php 2012-05-22 18:51:42 -07:00
wittich
cc6b05840f Admin progressbar, Bug #1095, http://redmine.froxlor.org/issues/1095 2012-05-22 18:46:51 -07:00
dschallert
0d392d64b2 Bug #693 Hide empty information on customerpanel index 2012-05-08 23:17:37 +02:00
blackice2999
173e40b0e4 added new config option for php fpm fixes #1089 2012-05-08 23:12:51 +02:00
blackice2999
1e68766b54 fixes own error... we need later a cleanup 2012-05-08 16:56:03 +02:00
blackice2999
5181f1d801 fixes fpm and redirect loop fpm alias cannot be in docroot 2012-05-08 16:38:25 +02:00
blackice2999
7ca68a3490 wrong php interface calling 2012-05-08 16:34:32 +02:00
blackice2999
6d79b81a89 fixes fpm and redirect loop fpm alias cannot be in docroot 2012-05-08 16:27:32 +02:00
Florian Aders
89fdbbc436 Merge pull request #15 from rtznprmpftl/pangolin
some config files for pangolin
2012-05-07 09:27:23 -07:00
Florian Aders (EleRas)
35c2ba4a76 Tagging 0.9.27
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-05-07 18:04:35 +02:00
Nicolas Berens
157cca0a2c some new configfiles
Dovecot taken from http://forum.froxlor.org/index.php?/topic/1336-dovecot-2-freebsd-configuration/ needs still testing
2012-05-03 23:45:17 +02:00
Nicolas Berens
30e889f93e forgot to rename it to precise 2012-04-26 19:16:02 +02:00
Nicolas Berens
dabae34261 Some additional changes 2012-04-26 09:24:33 +02:00
Nicolas Berens
912940f8c8 just saw that precise pangolin is called precise, not pangolin 2012-04-24 12:37:36 +02:00
Nicolas Berens
6ab5c07036 First batch of config files for pangolin 2012-04-24 09:54:59 +02:00
Florian Aders
fcfb4af3a0 Merge pull request #11 from bechtoldt/ticket1048
Use different filenames for FastCgiExternalServer and Alias (apache2, fcgid/fpm). Thanks to andreas.grundler, fixes #1048
2012-04-04 06:44:46 -07:00
Florian Aders
4abd0bbee0 Merge pull request #10 from bechtoldt/ticket1029
Fix Froxlor-own-vhost. Check if fcgid is still enabled. Thanks to sardyna12, fixes #1029
2012-04-04 06:43:27 -07:00
Florian Aders
4f75355983 Merge pull request #14 from mySeb/master
Fixes #1046
2012-04-01 05:45:01 -07:00
mySeb
c07322de0f fixed issue-1046 2012-04-01 12:37:40 +00:00
Charles Williams (Slydder)
604b1dc912 fixed php-fpm config regeneration when is missing values 2012-03-17 14:27:03 +01:00
Dessa
78dce129ff Merge pull request #13 from bechtoldt/tag0927rc1
Tagging 0.9.27-rc1
2012-03-13 11:50:47 -07:00
Arnold Bechtoldt
06f4f7593a Tagging 0.9.27-rc1
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-03-13 19:28:42 +01:00
Arnold Bechtoldt
1b22447d1c Merge pull request #6 from EleRas/trafficcron
Finally fixing the traffic/mysql - bug in cron, fixes #1025
2012-03-11 11:18:22 -07:00
Arnold Bechtoldt
8ce0da0681 Expanding last commit. The original patch was a bit confusing, refs #1048 2012-03-09 14:09:02 +01:00
Arnold Bechtoldt
ba6cde89ef Use different filenames for FastCgiExternalServer and Alias (apache2, fcgid/fpm). Thanks to andreas.grundler, fixes #1048 2012-03-09 13:48:14 +01:00
Arnold Bechtoldt
e6248cd5a9 Fix Froxlor own vhost. Check if fcgid is still enabled. Thanks to sardyna12, fixes #1019
Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
2012-03-09 13:34:44 +01:00
Arnold Bechtoldt
c0889171a5 Merge pull request #8 from bechtoldt/ticket1030
Use 'Administrator' in the mail body instead of 'Froxlor-Team' within mails. The Chinese lng file may also be updated, fixes #1030
2012-03-08 13:00:41 -08:00
Arnold Bechtoldt
ac3387ded7 Use 'Administrator' in the mail body instead of 'Froxlor-Team' within mails 2012-03-08 21:45:45 +01:00
Arnold Bechtoldt
ea844ee07c Merge pull request #7 from bechtoldt/master
Improve .gitignore file in ROOT directory
2012-03-08 11:36:02 -08:00
Arnold Bechtoldt
7b2dae9d2f Improve .gitignore file in ROOT directory 2012-03-08 20:34:12 +01:00
Florian Aders (EleRas)
3d9bd124b1 And the next try to fix the mysql - bug in cron, refs #1025
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-03-08 19:29:17 +01:00
EleRas
401f5dad8b Merge pull request #5 from bechtoldt/htmlbreaktags
Replace <br> through to the uniform <br /> in the whole code
2012-03-08 09:24:57 -08:00
Arnold Bechtoldt
6b986375e7 Replace <br> through to the uniform <br /> in the whole code 2012-03-08 17:34:01 +01:00
Arnold Bechtoldt
aa22d5c594 Make check of creating e-mail addresses case-insensitive, thanks to d4f, fixes #1021 2012-03-08 17:02:57 +01:00
EleRas
45a3e85829 Merge pull request #2 from bechtoldt/ticket1034
Use 'IF EXISTS' when dropping tables, fixes #1034
2012-03-08 07:37:07 -08:00
Arnold Bechtoldt
77615e71c4 Merge pull request #1 from bechtoldt/master
Provide setting and log rotation for special logfiles after creating domains, fixes #1010
2012-03-08 07:29:57 -08:00
Arnold Bechtoldt
c24b0ab8c3 Use 'IF EXISTS' when dropping tables in some old upgrade files, fixes #1034 2012-03-08 16:12:19 +01:00
Arnold Bechtoldt
832c5d3c89 Use a symlink to access jquery-ui file, refs #1010 2012-03-08 15:40:45 +01:00
Arnold Bechtoldt
3e615f0b68 Just added a comment, refs #1010 2012-03-08 15:29:57 +01:00
Arnold Bechtoldt
d51551989d fixed typo in last commit, refs #1010 2012-03-08 15:14:42 +01:00
Arnold Bechtoldt
454b48f9a8 Provide setting and log rotation for special logfiles after creating domains, fixes #1010 2012-03-08 15:11:25 +01:00
Florian Aders (EleRas)
8f9a323e0b Testing hook successful
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-03-06 19:18:51 +01:00
Florian Aders (EleRas)
c1252fe495 Testing hooks
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-03-06 19:17:30 +01:00
Florian Aders (EleRas)
86e73e268c Always force a new MySQL connection 2012-03-01 15:00:21 +01:00
Robert Förster (Dessa)
511d2699e6 remove some unsets, which are obsolete now
followup for aa7cf38f7e

Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2012-02-28 16:07:38 +01:00
Robert Förster (Dessa)
3352ccffc1 fix 7d6d683e52
we use mod_fcgid and not mod_fastcgi, refs #1017

Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2012-02-28 00:54:20 +01:00
Florian Aders (EleRas)
aa7cf38f7e Trying to fix MySQL server has gone away, thx for all the hints and help - let us hope it works, ref #1025
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-02-27 20:47:21 +01:00
Andreas Burchert (scarya)
4297ed3607 Improve customer default index.html file, fixes #1031
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2012-02-27 20:18:32 +01:00
Florian Aders (EleRas)
5d60b25900 If no pcntl extension is found, do not fork the traffic - cron, fix by d4f, fixes #1028
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-02-27 19:55:12 +01:00
Florian Aders (EleRas)
7ace2a8a4b Fixing call to wrong posix function on customer create, fix by d4f, fixes #1032
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-02-27 19:48:43 +01:00
Florian Aders (EleRas)
0038552955 Remove php-fpm-specific configuration (files) correctly, patch by Slydder, fixes #1022, fixes #914
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-02-27 19:43:56 +01:00
Florian Aders (EleRas)
b83be49980 Fixed sorting of customers, patch by devil65, fixes #1033
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-02-27 19:40:53 +01:00
Florian Aders (EleRas)
ec06768303 Fixed APS template bug, patch by arnoldB, fixes #700
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-02-27 19:38:29 +01:00
Florian Aders (EleRas)
7d6d683e52 Added Fast CGI Idle Timeout, patch by Slydder, fixes #1017
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-02-27 19:27:13 +01:00
Andreas Burchert (scarya)
95b641060d Customer can now see every ticket related to him independent of the referred admin.
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2012-02-27 19:09:55 +01:00
Andreas Burchert (scarya)
d589b77ae0 Fixed that every support ticket could be accessed by every customer and admin, fixes #1037
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2012-02-27 19:09:55 +01:00
Robert Förster (Dessa)
ac74e7e6a7 fix the updater so it actually works now 2012-02-17 12:45:01 +01:00
Robert Förster (Dessa)
2ea9a6bffa fix the fix in 8dfd27a0dc, fixes #992
Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2012-01-20 23:25:43 +01:00
Robert Förster (Dessa)
62dcf6e1a5 Tagging 0.9.26
Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2012-01-18 12:41:44 +01:00
Andreas Burchert (scarya)
c0d2d2dddd Small fix in makeChownWithNewStats().
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2012-01-17 18:42:02 +01:00
Robert Förster (Dessa)
84a84e4907 correct wrong rc-update command for dkim-milter in gentoo config templates, fixes #1013 2012-01-09 18:59:27 +01:00
lowb1rd
11f3ddf54a Apache: ServerAlias length limit not obeyed, fixes #1012
Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2012-01-08 20:37:27 +01:00
Florian Aders (EleRas)
346351ef98 Run cronjob even if nameservers are disabled, thx sinuswave, fixes #1004
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-01-02 14:39:05 +01:00
Florian Aders (EleRas)
4ab80e6144 Corrected year in some copyrights and templates
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2012-01-02 14:36:48 +01:00
Andreas Burchert (scarya)
83ee756ae7 Fixed missing hidden field (Classic), fixes #1002
Thanks to dahuafschmied

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-29 17:26:47 +01:00
Andreas Burchert (scarya)
062cc20877 Fix broken image, fixes #1001
Thanks to dahuafschmied

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-29 17:25:04 +01:00
Florian Aders (EleRas)
fdb633d786 Fixed jquery - paths in templates and removed duplicate jquery.min.js
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-12-22 10:26:08 +01:00
Florian Aders (EleRas)
02cf6285ec Tagging 0.9.26-rc1
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-12-19 17:53:51 +01:00
Florian Aders (EleRas)
ee5b81bcbf Do not send trafficreports as HTML - they are plaintext, fixes #705 @10m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-12-17 11:56:13 +01:00
Florian Aders (EleRas)
67d623cd21 Fixed user_queries for dovecot-quote, fixes #979 @5m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-12-17 11:42:42 +01:00
Florian Aders (EleRas)
cbe8653f5d Fixed alias.url for awstats in lighttpd, fixes #982 @5m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-12-17 11:37:09 +01:00
Florian Aders (EleRas)
f83625655c Fixed aliasdomains in awstats, thx dahuafschmied, fixes #999 @5m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-12-17 11:30:53 +01:00
Robert Förster (Dessa)
3912ea1911 rename our SUSE Linux 10 Templates to SUSE Linux Enterprise 10.
Come on, SUSE 10 is long time EOL upstream, upgrade your stuff.
the Templates should work unmodified on SLE10.
We currently plan to keep the Templates until general support for SLE10 ends (which is mid-2013 as of now) and / or upstream stops building froxlor for SLE10 in the OBS. (this is of course, subject to change.)
2011-12-14 14:09:36 +01:00
Andreas Burchert (scarya)
c947370ddc Fix the updater.
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-12 20:02:41 +01:00
Andreas Burchert (scarya)
8dfd27a0dc Added check in updater if there is more than one entry for backup_enabled, refs #992
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-12 19:39:53 +01:00
Andreas Burchert (scarya)
a76cbbcb55 Another small fix in nginx (ssl_client_certificate).
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-12 18:37:58 +01:00
Andreas Burchert (scarya)
23313282ce Small fix in create_pathOptions().
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-12 18:03:19 +01:00
Andreas Burchert (scarya)
1c9023cdaf Fixed missing php configuration, fixes #990
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-12 16:45:26 +01:00
Andreas Burchert (scarya)
92c54703c5 Fixed small typo, fixes #987
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-06 17:13:05 +01:00
Andreas Burchert (scarya)
b647f71f74 Improved .gitignore
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-06 17:12:49 +01:00
Andreas Burchert (scarya)
b1cb9ba221 Forgot to update updater, refs #964
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-06 16:46:47 +01:00
Andreas Burchert (scarya)
4eee1d0b52 Added check for froxlor-accounts <-> system-accounts, fixes #962
Thanks to d4f

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-06 16:04:35 +01:00
Andreas Burchert (scarya)
e162a1c893 Improved cron_traffic, fixes #977
Thanks to d4f

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-06 15:58:44 +01:00
Andreas Burchert (scarya)
3c1d63cbcb Increased max limit before warnings mails are sent to 150%, fixes #976
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-06 15:54:37 +01:00
Andreas Burchert (scarya)
def4bd9861 Added functionality: disable nameserver, fixes #964
Thanks to bbittner

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-12-06 15:43:34 +01:00
Florian Aders (EleRas)
1d05f66fd4 Improved default PHP - config (Alphabetical order, new disabled functions, new var: force_redirect), fixes #985
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-26 13:31:04 +01:00
Florian Aders (EleRas)
f04bf559a0 Revert "Added missing concatenation, fixes #982"
This reverts commit 3fbe96dc1b.

Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-25 11:30:12 +01:00
Andreas Burchert (scarya)
3fbe96dc1b Added missing concatenation, fixes #982
Thanks to Dessa.

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-11-25 11:16:44 +01:00
Florian Aders (EleRas)
a177c0558e Fixing vuln. in php + nginx - config, thx altmir for reporting, fixes #980
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-19 11:39:40 +01:00
Florian Aders (EleRas)
6e4121d9bb Tagging 0.9.25
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-14 15:47:27 +01:00
Florian Aders (EleRas)
bb7874e68f Fixing undefined index in bind zonefile - generation
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-12 15:26:05 +01:00
Florian Aders (EleRas)
c10320ff9c Don't display empty reload - command, fixes #940
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-12 10:03:39 +01:00
Florian Aders (EleRas)
6c4ecad7f8 Check password validity if customer changes password, fixes #974, thx philnate
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-12 09:55:26 +01:00
Florian Aders (EleRas)
0deb4404d2 Fixing php-notice in cron while setting awstats - permissions, fixes #960, fixes #970, thx d4f
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-12 09:19:50 +01:00
Florian Aders (EleRas)
2b0cfea888 Fixing regex for backup_path, fixes #967
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-12 09:13:25 +01:00
Florian Aders (EleRas)
65a5df507c Tagging 0.9.25-rc1
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-31 12:20:17 +01:00
Florian Aders (EleRas)
af6a80ab76 Revert "fixing mysql-virtual_mailbox_maps.cf regarding postfix-policy in Froxlor, refs #879"
This reverts commit f0d9db420a.
2011-10-31 10:09:36 +01:00
Florian Aders (EleRas)
3d0b0cdbdd Revert "fixing mysql-virtual_sender_permissions.cf regarding postfix-policy in Froxlor, fixes #879"
This reverts commit f49ac9e193.
2011-10-31 10:09:31 +01:00
Florian Aders (EleRas)
6408251c14 Revert "fixing mysql-virtual_alias_maps.cf and mysql-virtual_mailbox_domains.cf regarding postfix-policy in Froxlor, refs #879"
This reverts commit 526dbbd68e.
2011-10-31 10:06:17 +01:00
Christoph Burchert (Chb)
f90b83cb34 Disabled backup per default, fixes #948 @5m
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-30 21:20:57 +01:00
Christoph Burchert (Chb)
491dfccc8e Added my_destination to FreeBSD postfix config, fixes #924 @5m
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-30 21:10:11 +01:00
Florian Aders (EleRas)
89d04a83a0 Fixed calculations in display if customer-traffic, fixes #696 @1h
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-30 16:31:15 +01:00
Florian Aders (EleRas)
3d2ac9af17 Fixed unimplemented lng - strings, refs #696
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-30 15:50:45 +01:00
Florian Aders (EleRas)
0e9044b7ba mysqlnd is sufficient
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-30 13:18:20 +01:00
Florian Aders (EleRas)
64ddddd3d5 Fixing broken changing of hostname, thx philnate, fixes #928 @5m, fixes #946
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-30 12:11:10 +01:00
Christoph Burchert (Chb)
bfd1b6bbef Fixed typo (thanks to arnoldB)
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-19 15:30:43 +02:00
Christoph Burchert (Chb)
ddb179f340 Mini-fix the minor fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-19 15:22:53 +02:00
Andreas Burchert (scarya)
893274c89c Created missing config files for ubuntu and nginx, fixes #932
Thanks to arnoldB

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-10-19 15:10:57 +02:00
Christoph Burchert (Chb)
4fbdb80faf Minor fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-19 10:04:50 +02:00
Christoph Burchert (Chb)
b23ea6bbcc Fixed quota access (thanks to xocii), fixes #926
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-18 13:43:38 +02:00
Andreas Burchert (scarya)
450fff57ff Fix for APS instance overview, fixes #111
Thanks to philnate

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-10-18 13:37:01 +02:00
Andreas Burchert (scarya)
57693f804f Fixed duplicates for nginx, fixes #930
Thanks to epek

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-10-18 13:27:52 +02:00
Christoph Burchert (Chb)
d342300c47 Merge branch 'master' of git.froxlor.org:froxlor 2011-10-18 13:21:54 +02:00
Christoph Burchert (Chb)
b3d01fd6d2 Add www-prefix in bind, fixes #781
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-18 13:21:32 +02:00
Andreas Burchert (scarya)
6d25edab60 Fixed missing chars, fixes #869
Thanks to philnate

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-10-18 13:19:04 +02:00
Florian Aders (EleRas)
36faeb3f09 Moved customer - traffic - charts to JS and with this fixing the display - errors, refs #696
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-07 11:54:45 +02:00
Robert Förster (Dessa)
e460b7cce9 add openSuSE 11 configs, based on the work of Andrej Semen and Wolfgang Rosenauer in the OBS, thanks!
Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2011-10-06 14:27:35 +02:00
Florian Aders (EleRas)
c1e083c8b2 Tagging 0.9.24
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-04 19:03:45 +02:00
Florian Aders (EleRas)
70a077da48 fixed resourcebars, thx philnate, fixes #787
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-04 11:21:38 +02:00
Christoph Burchert (Chb)
c5fb8bee6b Enables to delete customers with already deleted databases (thanks to crazy4chrissi), fixes #872
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-26 04:12:01 +02:00
Christoph Burchert (Chb)
418990e271 Fixes fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-26 03:47:12 +02:00
Christoph Burchert (Chb)
93ab8964f1 Hide backup FTP password (thanks to monotek), fixes #762
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-26 03:43:37 +02:00
Florian Aders (EleRas)
fd599da07e Tagging 0.9.24-rc1
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-19 18:32:55 +02:00
Andreas Burchert (scarya)
369df7af62 Fixes wrong location declaration for nginx, fixes #749
Thanks to altmir
2011-09-19 11:21:11 +02:00
Andreas Burchert (scarya)
bb01dd0d93 Fixes a small syntax error. 2011-09-19 11:17:15 +02:00
Andreas Burchert (scarya)
84f00a2519 Fixes malformed priority in ticket archive search, fixes #714
Note: swedish could not be fixed and my swedish is way to bad to do it on my own
Thanks to philnate
2011-09-19 11:11:26 +02:00
Andreas Burchert (scarya)
8e07768996 Fixes 'unknown user' for disabled accounts (traffic overview), fixes #791
Thanks to monotek
2011-09-19 11:07:09 +02:00
Andreas Burchert (scarya)
9b12025c9f Prevents froxlor from creating a vhost (apache only) for relay mail domains, fixes #848
Thanks to sinuxwave
2011-09-19 11:00:50 +02:00
Andreas Burchert (scarya)
14f9344c50 Prevent empty 'ServerName', fixes #870
Thanks to h4cc
2011-09-19 10:56:27 +02:00
Andreas Burchert (scarya)
af430f9946 modernized bash init-scripts, fixes #889
Thanks to arnoldB.
2011-09-19 10:50:23 +02:00
Christoph Burchert (Chb)
992702870c Fixed customer's backup directory (thanks to monotek and arnoldB), fixes #859
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-15 15:03:55 +02:00
Florian Aders (EleRas)
642cd3da9d Applied patch to fix IPv6 in bind, fixes #799, thx frennkie
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-09 13:57:59 +02:00
Florian Aders (EleRas)
5d2d1ffa1a Improve showing of MySQL - databasesize, refs #834, thx arnoldB
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-09 10:33:33 +02:00
Florian Aders (EleRas)
19bbecb535 Shorten the megabytes, refs #834
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 15:05:18 +02:00
Florian Aders (EleRas)
e636e6eb39 Show database-size in database-overview, fixes #834
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 14:46:01 +02:00
Florian Aders (EleRas)
86ac4708f0 Adding a favicon, fixes #875
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 12:49:17 +02:00
Florian Aders (EleRas)
f49ac9e193 fixing mysql-virtual_sender_permissions.cf regarding postfix-policy in Froxlor, fixes #879
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 08:44:08 +02:00
Florian Aders (EleRas)
f0d9db420a fixing mysql-virtual_mailbox_maps.cf regarding postfix-policy in Froxlor, refs #879
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 08:40:21 +02:00
Florian Aders (EleRas)
526dbbd68e fixing mysql-virtual_alias_maps.cf and mysql-virtual_mailbox_domains.cf regarding postfix-policy in Froxlor, refs #879
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 08:37:07 +02:00
Christoph Burchert (Chb)
9a05a71f6b Fixed typo (thanks to frontline), fixes #880
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-07 19:29:58 +02:00
Florian Aders (EleRas)
e4f3af5d4b fixed htmleating in ticketsystem, thx philnate, fixes #727
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-06 11:02:47 +02:00
Florian Aders (EleRas)
3a7b7c1300 Improved description of values in admin panel, thx philnate, fixes #743
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-06 08:15:44 +02:00
Florian Aders (EleRas)
cdea6cecfb Fixed version in updater for logrotate, refs #16
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-05 19:38:39 +02:00
Christoph Burchert (Chb)
c36a7bf22b Add logrotate support, fixes #16 (thanks to monotek!)
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-05 14:56:50 +02:00
Christoph Burchert (Chb)
ca2a8c9907 Security fix: unescaped commandline argument (thanks to Bernhard Czech (sinuswave))
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-05 14:31:03 +02:00
Florian Aders (EleRas)
4914fc640a Tagging 0.9.23
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-22 17:26:11 +02:00
Florian Aders (EleRas)
f0b073a6f1 Tagging 0.9.23-rc1
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-09 18:11:09 +02:00
Andreas Burchert (scarya)
79f5ff4d35 Used correct function to create tmpdir, fixes #846 @0h5m
Thanks to sreimers.
2011-08-07 15:49:40 +02:00
Florian Aders (EleRas)
8609b2394b Removing PHP - tmpdir on customerdelete if files need to be deleted, fixes #728
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-07 14:46:05 +02:00
Florian Aders (EleRas)
5bb3c16312 Fixed a few bugs in the WebFTP and allowing optional SSL - connection to the server
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-07 14:35:57 +02:00
Florian Aders (EleRas)
df5d3ef66f Added autocomplete="off" to formfields (yeah, it is valid in HTML5), thx sinuswave, fixes #469
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-04 08:29:09 +02:00
Florian Aders (EleRas)
a207f2f936 Fixing catchall - checkbox on email-add, thx sinuswave, fixes #793 @0h1m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-04 07:23:08 +02:00
Andreas Burchert (scarya)
b0bd0836cd Added --froce to mysqldump, fixes #581 @0h5m
Thanks to monotek.
2011-08-02 14:41:24 +02:00
Andreas Burchert (scarya)
475377dd85 Added missing var to formfield, fixes #780 @0h5m
Thanks to sinuswave
2011-08-02 14:32:45 +02:00
Florian Aders (EleRas)
16776ce750 Updated translation of WebFTP
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-16 10:13:13 +02:00
Florian Aders (EleRas)
3861917dbc Fixed an XSS in WebFTP (positive sideeffect: less HTML in the PHP - code ;)), the tomreyn
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-16 09:52:55 +02:00
Andreas Burchert (scarya)
65891eff1c Autoloader now supports interfaces. 2011-07-14 13:07:04 +02:00
Florian Aders (EleRas)
bf9306c641 Fixed typo which prevented to upload files in webftp, fixes #842 @0h1m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-13 12:16:05 +02:00
Florian Aders (EleRas)
666d0db550 Tagging 0.9.22
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 19:31:22 +02:00
Florian Aders (EleRas)
6a41b30e70 Add the correct cache-directories and add .keep, so git will add them
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 17:32:09 +02:00
Florian Aders (EleRas)
0808bacb39 Use exec and silently fail in languagedetection, fixes #831, fixes #830
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 17:28:10 +02:00
Florian Aders (EleRas)
026f8503ab Fixed languageerror, fixes #828
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 17:12:19 +02:00
Florian Aders (EleRas)
19a7e78ebe Force Froxlor - theme for WebFTP until opther themes are available, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 17:10:35 +02:00
Florian Aders (EleRas)
76fb0d2a20 Always use GUID for chown, fixes #838
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 17:07:48 +02:00
Florian Aders (EleRas)
a418e60556 Fixed bug in webftp
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-27 18:45:47 +02:00
Florian Aders (EleRas)
8f760e87bc Tagging 0.9.22-rc1
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-27 18:13:47 +02:00
Florian Aders (EleRas)
0aff176cdc Fixed broken updater
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-27 18:12:14 +02:00
Florian Aders (EleRas)
cdcab6e1f8 Converted french special chars into htmlentities, thx arnoldB, fixes #817 @1m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-25 21:45:27 +02:00
Florian Aders (EleRas)
37d03bdf6a Fixed undefined index on loginpage, refs #794 @0h5m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-25 21:36:59 +02:00
Andreas Burchert (scarya)
4a40870576 Improved backup functionality. Thanks monotek, refs #186 2011-06-24 01:24:13 +02:00
Andreas Burchert (scarya)
35958168a2 You can't set session timeout to 0, fixes #815 2011-06-24 00:39:53 +02:00
Andreas Burchert (scarya)
6badc2ad77 Increased the sorting to 5 chars. Should be enough, fixes #756 2011-06-23 23:44:11 +02:00
Andreas Burchert (scarya)
5184dc9ce7 Language fixes, fixes #813
Thanks to arnoldB!
2011-06-23 23:40:04 +02:00
Andreas Burchert (scarya)
b446575bf0 Removed mod_radius from proftpd conf, fixes #768 2011-06-23 23:29:40 +02:00
Florian Aders (EleRas)
b7114c670a Allow .php5 - files to be edited as well, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 16:32:20 +02:00
Florian Aders (EleRas)
536e66da7c A nicer way to search the errormessage, this may (or may not) be helpful, refs #214
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 16:27:28 +02:00
Florian Aders (EleRas)
9114a98e4c Fixed typos, refs #214
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 16:21:38 +02:00
Florian Aders (EleRas)
9955bed2c1 Log MySQL - errors to syslog and do not print them in public, fixes #214
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 16:18:48 +02:00
Florian Aders (EleRas)
f6af38a2c3 Fixed german translation, thx arnoldB, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 13:30:49 +02:00
Florian Aders (EleRas)
76e886e610 Moved language - selection based on gettext into an own class for easier management
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 13:20:42 +02:00
Florian Aders (EleRas)
6daec3c975 Fixed gettext - support for smarty, now you are able to change the language for real and the translated string is no longer saved in the cached template, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 12:56:18 +02:00
Florian Aders (EleRas)
e9000a7e99 Merge branch 'quota' 2011-06-23 11:18:18 +02:00
Florian Aders (EleRas)
44a53492e6 Moving to smarty - escaping in webftp, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 11:09:44 +02:00
Florian Aders (EleRas)
7cf0fa7284 Destroy session if password was entered wrong in webftp, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 11:02:16 +02:00
Florian Aders (EleRas)
9aa86e1dee Show warnings if login failed, optimized handling of data in session, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 10:47:29 +02:00
Florian Aders (EleRas)
961aad43d1 Added first rework of webftp - module, please not, this still needs a hell lot of work, but anyway: fixes #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 10:30:59 +02:00
Florian Aders (EleRas)
6e84ca4ae4 Added helperscript for smarty - gettext
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 10:29:34 +02:00
Florian Aders (EleRas)
f79e351b72 Added gettext - filter for smarty
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 10:28:52 +02:00
Florian Aders (EleRas)
a24d809428 Added Smarty 3.0.8
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 10:28:00 +02:00
Florian Aders (EleRas)
0fa64ea943 Fixed small bug in JS and navigation - element - template
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 01:04:59 +02:00
Florian Aders (EleRas)
fe0b71b628 Added updated french languagefile, fixes #817
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-21 21:30:38 +02:00
Florian Aders (EleRas)
a23260fb7f Added task 10 to description of outstanding tasks, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-19 13:43:56 +02:00
Florian Aders (EleRas)
eb984c2f4c Moved redundant code into single function, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-19 11:31:00 +02:00
Florian Aders (EleRas)
1836132c28 Use setting instead of hardcoded name, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 23:06:39 +02:00
Florian Aders (EleRas)
aae635bf5d More secure way to get the used quota, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 22:53:27 +02:00
Florian Aders (EleRas)
8599ff775b Tell Froxlor there exists a task-type 10, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 22:53:15 +02:00
Florian Aders (EleRas)
8bfdd0bc14 Update filesystem - quota when config-updates shall be written as well, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 19:54:43 +02:00
Florian Aders (EleRas)
30344b0dce Forgot to add settings, fixes #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 19:52:47 +02:00
Florian Aders (EleRas)
8019629a28 Added task 10 (setting filesystem - quota) where necessary, fixes #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 19:48:16 +02:00
Florian Aders (EleRas)
7a28108475 Added usage of filesystem - quota to diskusage - calculation and added a new task to cron_tasks.php for setting the quota, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 19:42:01 +02:00
Florian Aders (EleRas)
cfa94c5837 Added new settings for disk quota, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 19:03:20 +02:00
Florian Aders (EleRas)
c9c0530461 Removed warning on deactivation of safemode since it is deprecated and will be removed, fixes #812, fixes #556
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 20:54:54 +02:00
Florian Aders (EleRas)
093ebfa457 Fixed a bug for PHP < 5.3.0 (used func_get_arg as argument, which does not work on older PHP versions)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 20:23:59 +02:00
Florian Aders (EleRas)
3800f31823 Added security related HTTP - header for browser which support this (non supporting browsers will just ignore it and everything is fine)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 20:17:44 +02:00
Florian Aders (EleRas)
cc26584f01 Updated jquery to jquery-1.6.1.min.js
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 20:05:14 +02:00
Florian Aders (EleRas)
8131e9e92c Just beautification
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 19:06:49 +02:00
Florian Aders (EleRas)
38e472a623 Use correct JS - file
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 19:05:25 +02:00
Florian Aders (EleRas)
3e21cb0298 Moved inline - javascript to external file in preparation of X-Content-Security-Policy (also, the code looks cleaner, yay)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 18:59:16 +02:00
Florian Aders (EleRas)
b9bb1a1286 A bit better ticket-delete - view (not 100% sufficient, but better than nothing)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 19:10:38 +02:00
Florian Aders (EleRas)
25609a7068 Moved ticket - formfields to correct directory
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 18:47:09 +02:00
Florian Aders (EleRas)
35d8b3f8a1 Moved autoresponder - formfields to own directory
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 18:45:11 +02:00
Florian Aders (EleRas)
d593a217a4 Moved autoresponder - templates to own directory (now following correct schema)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 18:41:18 +02:00
Florian Aders (EleRas)
960fa58799 Renamed ticket - templates to follow the rest of the Froxlor scheme: templatedir = <section> = [admin|customer]_<section>.php
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 18:34:43 +02:00
Florian Aders (EleRas)
76b716d41d redirectTo now uses the new linker class
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 18:22:29 +02:00
Florian Aders (EleRas)
0b3e788b86 Revert "Changed redirectTo to use new link-class"
This reverts commit b88246b112.
2011-06-13 22:08:38 +02:00
Florian Aders (EleRas)
b88246b112 Changed redirectTo to use new link-class
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 21:55:46 +02:00
Florian Aders (EleRas)
4d10c72ae9 Fixed bug in link-class where protocol was added to URL withour hostname
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 21:55:27 +02:00
Florian Aders (EleRas)
0a21ede3d2 Missing linker-link in classic - admin-customers-overview fixed
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 21:15:16 +02:00
Florian Aders (EleRas)
3669822064 Missing linker-links in traffic - files fixed
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 21:12:31 +02:00
Florian Aders (EleRas)
b68f9fe395 Implemented linker - class for admin_setting.php (resource-recalculation) (templates only) 2011-06-13 21:05:52 +02:00
Florian Aders (EleRas)
e101d01e11 Implemented linker - class for customer_tickets.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:56:08 +02:00
Florian Aders (EleRas)
bdce761af0 Implemented linker - class for customer_traffic.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:54:02 +02:00
Florian Aders (EleRas)
784d1a62f7 Implemented linker - class for customer_mysql.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:53:29 +02:00
Florian Aders (EleRas)
c84602d560 Implemented linker - class for customer_ftp.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:51:28 +02:00
Florian Aders (EleRas)
3bcba9fa40 Implemented linker - class for customer_extras.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:50:41 +02:00
Florian Aders (EleRas)
7246dc124e Implemented linker - class for customer_[autoresponder|emails].php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:48:37 +02:00
Florian Aders (EleRas)
fcdcd4d6cb Implemented linker - class for customer_domains.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:40:19 +02:00
Florian Aders (EleRas)
07d981ac25 Implemented linker - class for customer_index.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:38:46 +02:00
Florian Aders (EleRas)
1bf764c5c3 Implemented linker - class for admin_updates.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:36:20 +02:00
Florian Aders (EleRas)
79b886994c Implemented linker - class for admin_traffic.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:35:07 +02:00
Florian Aders (EleRas)
62f8c7d1b6 Implemented linker - class for admin_tickets.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:34:15 +02:00
Florian Aders (EleRas)
6fe0b7f6a4 Implemented linker - class for admin_templates.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:27:08 +02:00
Florian Aders (EleRas)
a55df73281 Implemented linker - class for admin_settings.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:25:36 +02:00
Florian Aders (EleRas)
ce6176ffe4 Implemented linker - class for admin_logger.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:20:05 +02:00
Florian Aders (EleRas)
570ceb8160 Implemented linker - class for admin_ipsandports.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:18:59 +02:00
Florian Aders (EleRas)
163228ff75 Implemented linker - class for admin_domains.php (templates only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 19:35:50 +02:00
Florian Aders (EleRas)
68b9c22938 Implemented linker - class for admin_customers.php (templates only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 18:57:18 +02:00
Florian Aders (EleRas)
7936f72bc1 Implemented linker - class for admin_cronjobs.php (templates only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 18:49:31 +02:00
Florian Aders (EleRas)
81df4f5444 Tiny change in admin_configfiles - template
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 18:36:46 +02:00
Florian Aders (EleRas)
54093a0a9a Implemented linker - class for admin_configfiles.php (templates only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 18:32:31 +02:00
Florian Aders (EleRas)
c5e8786670 Implemented linker - class for admin_admins.php
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 17:57:17 +02:00
Florian Aders (EleRas)
6ebd6db87f Implemented linker - class for admin_index.php -> change_[theme|language|password], more to come
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 17:21:02 +02:00
Florian Aders (EleRas)
68e31962bc Fixed a bug in linker
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 17:05:08 +02:00
Florian Aders (EleRas)
9d24648607 Added more flexibility and temporary fallback for the sessionid
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 16:49:02 +02:00
Florian Aders (EleRas)
c26223a887 Fixed nasty typo
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 16:28:52 +02:00
Florian Aders (EleRas)
444f4b5d1e Added a class where all links will be generated in the future for easy management (First draft)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 16:27:50 +02:00
Andreas Burchert (scarya)
c72b07f690 Changed 'gender' to 'title' 2011-06-10 17:44:49 +02:00
Florian Aders (EleRas)
c318d9e9df We really, really have 2011, thx SZoellner _& arnoldB, fixes #802
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-10 07:22:28 +02:00
Florian Aders (EleRas)
5b6acce822 Fixed permission problem in apache, fixes #800
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-07 09:39:13 +02:00
Florian Aders (EleRas)
9a4b45838a Tagging 0.9.21
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-05-30 18:57:48 +02:00
Andreas Burchert (scarya)
48df1bac4b Moved apache reload to the end of cronjob, fixes #775 2011-05-27 21:56:11 +02:00
Andreas Burchert (scarya)
63aed1e8f4 Fix char-errors in Italian language file, fixes #790
Thanks to arnoldB
2011-05-21 17:23:49 +02:00
Andreas Burchert (scarya)
426e87a337 Forgot curly brackets. 2011-05-18 22:17:58 +02:00
Andreas Burchert (scarya)
cd141ce381 Externalized string. 2011-05-18 22:07:04 +02:00
Andreas Burchert (scarya)
ece63b8a36 Fix some language related strings, fixes #760
Thanks to arnoldB!
2011-05-18 20:55:01 +02:00
Andreas Burchert (scarya)
af423248da Small fix in Classic theme. 2011-05-18 16:49:41 +02:00
Christoph Burchert (Chb)
5ca7e173b0 consequently use Denglish, fixes gonna fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-05-18 14:10:44 +02:00
Christoph Burchert (Chb)
f845f7771a consequently use wrong English, fixes gonna fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-05-18 13:56:18 +02:00
Andreas Burchert (scarya)
500a829161 Update version to -svn2. 2011-05-18 13:30:13 +02:00
Andreas Burchert (scarya)
96c34b9b29 Fix issue with SSL and SSL redirect, fixes #778
Thanks to mnaumann.
2011-05-18 13:19:43 +02:00
Christoph Burchert (Chb)
ec7c19cceb fix the fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-05-18 10:04:23 +02:00
Christoph Burchert (Chb)
7a4501e581 added new setting: backup ftp passive mode, fixes #785
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-05-18 02:08:45 +02:00
Christoph Burchert (Chb)
75c5fae6b2 added options for continuous up- and downloads to proftpd config, fixes #784
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-05-18 01:35:54 +02:00
Andreas Burchert (scarya)
7a5bf65184 Added ISO-3166-2 country codes, refs #471 2011-05-15 21:25:00 +02:00
Andreas Burchert (scarya)
103626e82a Small fix in english language file. 2011-05-13 18:22:09 +02:00
Andreas Burchert (scarya)
ca1a77d883 Set version in froxlor.sql 2011-05-13 18:13:05 +02:00
Andreas Burchert (scarya)
ac68a5d35f Updated froxlor.sql and tables.inc 2011-05-13 17:39:16 +02:00
Andreas Burchert (scarya)
f63f1d947b You should think frist before commiting... 2011-05-13 17:33:39 +02:00
Andreas Burchert (scarya)
5b6aa1aa8d More fixing... 2011-05-13 17:31:01 +02:00
Andreas Burchert (scarya)
12177fd21d Patch the updater. 2011-05-13 17:28:11 +02:00
Andreas Burchert (scarya)
aa4254ad47 Added gender selection to add/edit customer, fixes #280 2011-05-12 18:58:01 +02:00
Andreas Burchert (scarya)
e2076603dd Added language stuff for customer gender, refs #280 2011-05-12 15:34:19 +02:00
Florian Aders (EleRas)
2ea90c1b45 Update italian languagefile, thx to Emilien
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-05-05 17:45:21 +02:00
Florian Aders (EleRas)
cf66dcf38d fixed updater, I now really hate that bitch
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-05-04 14:34:36 +02:00
Andreas Burchert (scarya)
51a83d8b09 Removed @version in file header. This isn't used by git. 2011-05-04 11:59:20 +02:00
Andreas Burchert (scarya)
e467409cbb Added <label> tag to license agreement in aps. 2011-05-01 15:32:59 +02:00
Andreas Burchert (scarya)
05b59621a6 Added trim() to registration date check, fixes #741 2011-05-01 13:27:24 +02:00
Florian Aders (EleRas)
e148e7d584 Update version, try fixing all possible broken states, refs #742
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-28 09:47:22 +02:00
Florian Aders (EleRas)
3fb6d4eac9 Fixed SQL, now the real one, fu, fixes #742
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-28 08:27:35 +02:00
1965 changed files with 111423 additions and 104247 deletions

4
.codecov.yml Normal file
View File

@@ -0,0 +1,4 @@
codecov:
notify:
require_ci_to_pass: no

57
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,57 @@
# Contributing
Before you start working on a PR, contact us via IRC in #froxlor on Freenode or
the forum at https://forum.froxlor.org to get a clue whether someone else isn't
already working on it or if we don not want/need this certain change.
Of course, bugfixes are always welcome.
However, at this stage of the 0.9.x branch, we are not looking for new
features or refactoring, especially not the kind which requires changes to a
lot of files.
Please focus on our API based version 0.10.x (current master).
## Checklist
General rules for PRs are:
* Please save us all some trouble and unnecessary round-trips by _testing_ your
changes.
* Re-write your commit history to provide a CLEAN history!
* i.e. do not provide PRs which contain a commit that changes something,
the next changes it back, a third one changes it again, only a little
differently...
Thanks!
### Webserver changes
If you make changes to the functionality of webserver configuration, please
make sure your implementation covers all supported webservers.
### l10n
If you add new language strings, please make sure you add the english fallback
strings in
* `lng/english.lng.php`
* `install/lng/english.lng.php` (if applicable)
### New settings and database-layout changnes
If you add new settings or layout changes, please make sure you add these to
* `install/froxlor.sql`
* and handle the update (see `install/updates/froxlor/0.10/update_0.10.inc.php`)
* if you have any question on how update-process works, please contact us

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
# These are supported funding model platforms
custom: ['https://paypal.me/Froxlor']

64
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,64 @@
# Bug report vs. support request
If you're unsure of whether your problem is a bug or a configuration error
* contact us via IRC in #froxlor on freenode
* or post a thread in our forum at https://forum.froxlor.org
As a rule of thumb: before reporting an issue
* see if it hasn't been [reported](https://github.com/Froxlor/froxlor/issues) (and possibly already been [fixed](https://github.com/Froxlor/froxlor/issues?utf8=✓&q=is:issue%20is:closed)) first
* try with the git master
# Summary
Please provide a concise summary of the problem you're experiencing...
# System information
* Froxlor version: $version/$gitSHA1
* Web server: apache2/nginx/lighttpd
* DNS server: Bind/PowerDNS (standalone)/PowerDNS (Bind-backend)
* POP/IMAP server: Courier/Dovecot
* SMTP server: postfix/exim
* FTP server: proftpd/pureftpd
* OS/Version: ...
# Steps to reproduce
1.
2.
3.
# Expected behavior
1.
2.
3.
# Actual behavior
1.
2.
3.
# Log files/log entries
syslog:
<pre>
example
</pre>

38
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,38 @@
# Description
Please include a summary of the change and which issue is fixed if any. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
## Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
# How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
- [ ] Test B
**Test Configuration**:
* Distribution:
* Webserver:
* PHP:
* etc.etc.:
# Checklist:
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes

20
.gitignore vendored Normal file
View File

@@ -0,0 +1,20 @@
install/update.log
templates/*
lib/userdata.inc.php
lib/userdata.inc.php.bak
logs/*
!logs/index.html
.buildpath
.project
.settings/
*.diff
*~
.well-known
.idea
*.iml
!templates/Froxlor/
!templates/Sparkle/
!templates/misc/
templates/Froxlor/assets/img/logo_custom.png
vendor/

67
.travis.yml Normal file
View File

@@ -0,0 +1,67 @@
language: php
dist: bionic
services:
- docker
php:
- 7.3
branches:
only:
- master
- namespaces
matrix:
include:
- php: 7.3
env: "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=5.6"
- php: 7.3
env: "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=5.7"
- php: 7.3
env: "DOCKER_MYSQL_TYPE=mysql DOCKER_MYSQL_VERSION=8.0 STARTCMD='mysqld --default-authentication-plugin=mysql_native_password'"
- php: 7.3
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.3"
- php: 7.3
env: "DOCKER_MYSQL_TYPE=mariadb DOCKER_MYSQL_VERSION=10.4"
addons:
apt:
update: true
before_install:
- export MYSQL_DATABASE=froxlor010
- docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=fr0xl0r.TravisCI -e MYSQL_DATABASE=$MYSQL_DATABASE -p 3306:3306 $DOCKER_MYSQL_TYPE:$DOCKER_MYSQL_VERSION $STARTCMD
- sudo apt-get install -y ant
- >
export tries=0;
export max_tries=20;
while [[ true ]]; do
tries=$((tries + 1));
echo "waiting for database server to start up... [$tries]";
sleep 5;
# Now see that today's table is there, which would indicate that the cron job ran.
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -s -e 'SHOW VARIABLES LIKE "%version%";'
look_exit=$?;
if [[ "$look_exit" = "0" ]]; then echo "Database server successfully started"; break; fi;
if [[ "$tries" -ge "$max_tries" ]]; then echo "Database server did not start in time"; exit 1; break; fi;
done;
install:
- mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "CREATE DATABASE IF NOT EXISTS froxlor010;"
- mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "CREATE USER 'froxlor010'@'%' IDENTIFIED BY 'fr0xl0r.TravisCI';"
- mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "GRANT ALL ON froxlor010.* TO 'froxlor010'@'%';"
- mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI froxlor010 < install/froxlor.sql
script:
- ant phpunit
after_success:
- bash <(curl -s https://codecov.io/bash) -f "build/logs/clover.xml"
notifications:
irc: "irc.freenode.org#froxlor"
webhooks:
urls:
- https://webhooks.gitter.im/e/bdf91d1c3f745e51f796
on_success: always
on_failure: always
on_start: never

90
2fa.php Normal file
View File

@@ -0,0 +1,90 @@
<?php
if (! defined('AREA')) {
header("Location: index.php");
exit();
}
use Froxlor\Database\Database;
use Froxlor\Settings;
if (Settings::Get('2fa.enabled') != '1') {
\Froxlor\UI\Response::dynamic_error("2FA not activated");
}
/**
* This file is part of the Froxlor project.
* Copyright (c) 2018 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> (2018-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @since 0.10.0
*
*/
// This file is being included in admin_index and customer_index
// and therefore does not need to require lib/init.php
if (AREA == 'admin') {
$upd_stmt = Database::prepare("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `type_2fa` = :t2fa, `data_2fa` = :d2fa WHERE adminid = :id");
$uid = $userinfo['adminid'];
} elseif (AREA == 'customer') {
$upd_stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `type_2fa` = :t2fa, `data_2fa` = :d2fa WHERE customerid = :id");
$uid = $userinfo['customerid'];
}
$success_message = "";
$tfa = new \Froxlor\FroxlorTwoFactorAuth('Froxlor');
// do the delete and then just show a success-message
if ($action == 'delete') {
Database::pexecute($upd_stmt, array(
't2fa' => 0,
'd2fa' => "",
'id' => $uid
));
\Froxlor\UI\Response::standard_success($lng['2fa']['2fa_removed']);
} elseif ($action == 'add') {
$type = isset($_POST['type_2fa']) ? $_POST['type_2fa'] : '0';
if ($type == 0 || $type == 1) {
$data = "";
}
if ($type == 2) {
// generate secret for TOTP
$data = $tfa->createSecret();
}
Database::pexecute($upd_stmt, array(
't2fa' => $type,
'd2fa' => $data,
'id' => $uid
));
\Froxlor\UI\Response::standard_success(sprintf($lng['2fa']['2fa_added'], $filename, $s));
}
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed 2fa::overview");
if ($userinfo['type_2fa'] == '0') {
// available types
$type_select_values = array(
0 => '-',
1 => 'E-Mail',
2 => 'Authenticator'
);
asort($type_select_values);
$type_select = "";
foreach ($type_select_values as $_val => $_type) {
$type_select .= \Froxlor\UI\HTML::makeoption($_type, $_val);
}
} elseif ($userinfo['type_2fa'] == '1') {
// email 2fa enabled
} elseif ($userinfo['type_2fa'] == '2') {
// authenticator 2fa enabled
$ga_qrcode = $tfa->getQRCodeImageAsDataUri($userinfo['loginname'], $userinfo['data_2fa']);
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("2fa/overview", true) . "\";");

11
COPYING
View File

@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -278,4 +278,3 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

67
README.md Normal file
View File

@@ -0,0 +1,67 @@
[![Build Status](https://travis-ci.com/Froxlor/Froxlor.svg?branch=master)](https://travis-ci.com/Froxlor/Froxlor)
[![Gitter](https://badges.gitter.im/Froxlor/community.svg)](https://gitter.im/Froxlor/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
# Froxlor
The server administration software for your needs.
Developed by experienced server administrators, this panel simplifies the effort of managing your hosting platform.
## Installation
### Fast install
1. Ensure that your webserver serves /var/www
2. Extract froxlor into /var/www
3. Point your browser to http://[ip-of-webserver]/froxlor
4. Follow the installer
5. Login as administrator
6. Adjust "System > Settings" according to your needs
7. Choose your distribution under "System > Configuration"
8. Follow the steps for your services
9. Have fun!
### Detailed installation
https://github.com/Froxlor/Froxlor/wiki/Install-froxlor-from-tarball
## Help
You may find help in the following places:
### IRC
froxlor may be found on freenode.net, channel #froxlor:
irc://chat.freenode.net/froxlor
### Forum
The community is located on https://forum.froxlor.org/
### Wiki
More documentation may be found in the froxlor - wiki:
https://github.com/Froxlor/Froxlor/wiki
## License
May be found in COPYING
## Downloads
### Tarball
https://files.froxlor.org/releases/froxlor-latest.tar.gz [MD5](https://files.froxlor.org/releases/froxlor-latest.tar.gz.md5) [SHA1](https://files.froxlor.org/releases/froxlor-latest.tar.gz.sha1)
### Debian repository
[HowTo](https://github.com/Froxlor/Froxlor/wiki/Install-froxlor-on-debian)
/etc/apt/sources.list.d/froxlor.list
> deb http://debian.froxlor.org {stretch|buster} main
### Gentoo repository
[HowTo](https://github.com/Froxlor/Froxlor/wiki/Install-froxlor-on-gentoo)
https://files.froxlor.org/gentoo/repositories.xml
## Contributing
[see here](.github/CONTRIBUTING.md)

View File

@@ -1,72 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*/
return array(
'groups' => array(
'version' => array(
'fields' => array(
'panel_version' => array(
'settinggroup' => 'panel',
'varname' => 'version',
'type' => 'hidden',
'default' => '',
),
'panel_frontend' => array(
'settinggroup' => 'panel',
'varname' => 'frontend',
'type' => 'hidden',
'default' => '',
),
'system_last_tasks_run' => array(
'settinggroup' => 'system',
'varname' => 'last_tasks_run',
'type' => 'hidden',
'default' => '',
'save_method' => 'storeSettingField',
),
'system_last_traffic_run' => array(
'settinggroup' => 'system',
'varname' => 'last_traffic_run',
'type' => 'hidden',
'default' => '',
),
'system_lastcronrun' => array(
'settinggroup' => 'system',
'varname' => 'lastcronrun',
'type' => 'hidden',
'default' => '',
),
'system_lastguid' => array(
'settinggroup' => 'system',
'varname' => 'lastguid',
'type' => 'hidden',
'default' => 9999,
),
'system_lastaccountnumber' => array(
'settinggroup' => 'system',
'varname' => 'lastaccountnumber',
'type' => 'hidden',
'default' => 0,
),
),
),
),
);
?>

View File

@@ -14,50 +14,77 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* @version $Id$
*
*/
return array(
'groups' => array(
'panel' => array(
'title' => $lng['admin']['panelsettings'],
'fields' => array(
'panel_standardlanguage' => array(
'label' => array('title' => $lng['login']['language'], 'description' => $lng['serversettings']['language']['description']),
'label' => array(
'title' => $lng['login']['language'],
'description' => $lng['serversettings']['language']['description']
),
'settinggroup' => 'panel',
'varname' => 'standardlanguage',
'type' => 'option',
'default' => 'English',
'option_mode' => 'one',
'option_options_method' => 'getLanguages',
'save_method' => 'storeSettingField',
'option_options_method' => array(
'\\Froxlor\\User',
'getLanguages'
),
'save_method' => 'storeSettingField'
),
'panel_default_theme' => array(
'label' => $lng['serversettings']['default_theme'],
'label' => array(
'title' => $lng['panel']['theme'],
'description' => $lng['serversettings']['default_theme']
),
'settinggroup' => 'panel',
'varname' => 'default_theme',
'type' => 'option',
'default' => 'Froxlor',
'default' => 'Sparkle',
'option_mode' => 'one',
'option_options_method' => 'getThemes',
'save_method' => 'storeSettingField',
'option_options_method' => array(
'\\Froxlor\\UI\\Template',
'getThemes'
),
'save_method' => 'storeSettingDefaultTheme'
),
'panel_allow_theme_change_customer' => array(
'label' => $lng['serversettings']['panel_allow_theme_change_customer'],
'settinggroup' => 'panel',
'varname' => 'allow_theme_change_customer',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField'
),
'panel_allow_theme_change_admin' => array(
'label' => $lng['serversettings']['panel_allow_theme_change_admin'],
'settinggroup' => 'panel',
'varname' => 'allow_theme_change_admin',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField'
),
'panel_natsorting' => array(
'label' => $lng['serversettings']['natsorting'],
'settinggroup' => 'panel',
'varname' => 'natsorting',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'panel_no_robots' => array(
'label' => $lng['serversettings']['no_robots'],
'settinggroup' => 'panel',
'varname' => 'no_robots',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'default' => true,
'save_method' => 'storeSettingField'
),
'panel_paging' => array(
'label' => $lng['serversettings']['paging'],
'settinggroup' => 'panel',
@@ -65,8 +92,8 @@ return array(
'type' => 'int',
'int_min' => 0,
'default' => 0,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'panel_pathedit' => array(
'label' => $lng['serversettings']['pathedit'],
'settinggroup' => 'panel',
@@ -74,9 +101,12 @@ return array(
'type' => 'option',
'default' => 'Manual',
'option_mode' => 'one',
'option_options' => array('Manual' => $lng['serversettings']['manual'], 'Dropdown' => $lng['serversettings']['dropdown']),
'save_method' => 'storeSettingField',
'option_options' => array(
'Manual' => $lng['serversettings']['manual'],
'Dropdown' => $lng['serversettings']['dropdown']
),
'save_method' => 'storeSettingField'
),
'panel_adminmail' => array(
'label' => $lng['serversettings']['adminmail'],
'settinggroup' => 'panel',
@@ -85,16 +115,16 @@ return array(
'string_type' => 'mail',
'string_emptyallowed' => false,
'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',
),
'save_method' => 'storeSettingField'
),
'panel_adminmail_return' => array(
'label' => $lng['serversettings']['adminmail_return'],
'settinggroup' => 'panel',
@@ -103,8 +133,8 @@ return array(
'string_type' => 'mail',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'panel_decimal_places' => array(
'label' => $lng['serversettings']['decimal_places'],
'settinggroup' => 'panel',
@@ -113,8 +143,8 @@ return array(
'int_min' => 0,
'int_max' => 15,
'default' => 4,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'panel_phpmyadmin_url' => array(
'label' => $lng['serversettings']['phpmyadmin_url'],
'settinggroup' => 'panel',
@@ -123,8 +153,8 @@ return array(
'string_type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'panel_webmail_url' => array(
'label' => $lng['serversettings']['webmail_url'],
'settinggroup' => 'panel',
@@ -133,8 +163,8 @@ return array(
'string_type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'panel_webftp_url' => array(
'label' => $lng['serversettings']['webftp_url'],
'settinggroup' => 'panel',
@@ -143,43 +173,102 @@ return array(
'string_type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'admin_show_version_login' => array(
'label' => $lng['admin']['show_version_login'],
'settinggroup' => 'admin',
'varname' => 'show_version_login',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'admin_show_version_footer' => array(
'label' => $lng['admin']['show_version_footer'],
'settinggroup' => 'admin',
'varname' => 'show_version_footer',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'admin_show_news_feed' => array(
'label' => $lng['admin']['show_news_feed'],
'settinggroup' => 'admin',
'varname' => 'show_news_feed',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'customer_show_news_feed' => array(
'label' => $lng['admin']['customer_show_news_feed'],
'settinggroup' => 'customer',
'varname' => 'show_news_feed',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'customer_news_feed_url' => array(
'label' => $lng['admin']['customer_news_feed_url'],
'settinggroup' => 'customer',
'varname' => 'news_feed_url',
'type' => 'string',
'string_type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
),
'panel_allow_domain_change_admin' => array(
'label' => $lng['serversettings']['panel_allow_domain_change_admin'],
'settinggroup' => 'panel',
'varname' => 'allow_domain_change_admin',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'panel_allow_domain_change_customer' => array(
'label' => $lng['serversettings']['panel_allow_domain_change_customer'],
'settinggroup' => 'panel',
'varname' => 'allow_domain_change_customer',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
),
),
);
'panel_phpconfigs_hidestdsubdomain' => array(
'label' => $lng['serversettings']['panel_phpconfigs_hidestdsubdomain'],
'settinggroup' => 'panel',
'varname' => 'phpconfigs_hidestdsubdomain',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'panel_customer_hide_options' => array(
'label' => $lng['serversettings']['panel_customer_hide_options'],
'settinggroup' => 'panel',
'varname' => 'customer_hide_options',
'type' => 'option',
'default' => '',
'option_mode' => 'multiple',
'option_emptyallowed' => true,
'option_options' => array(
'email' => $lng['menue']['email']['email'],
'mysql' => $lng['menue']['mysql']['mysql'],
'domains' => $lng['menue']['domains']['domains'],
'ftp' => $lng['menue']['ftp']['ftp'],
'extras' => $lng['menue']['extras']['extras'],
'extras.directoryprotection' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['extras']['directoryprotection'],
'extras.pathoptions' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['extras']['pathoptions'],
'extras.logger' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['logger']['logger'],
'extras.backup' => $lng['menue']['extras']['extras'] . " / " . $lng['menue']['extras']['backup'],
'traffic' => $lng['menue']['traffic']['traffic'],
'traffic.http' => $lng['menue']['traffic']['traffic'] . " / HTTP",
'traffic.ftp' => $lng['menue']['traffic']['traffic'] . " / FTP",
'traffic.mail' => $lng['menue']['traffic']['traffic'] . " / Mail"
),
'save_method' => 'storeSettingField'
)
)
)
)
);
?>

View File

@@ -14,9 +14,8 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'accounts' => array(
@@ -28,91 +27,144 @@ return array(
'varname' => 'sessiontimeout',
'type' => 'int',
'default' => 600,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'session_allow_multiple_login' => array(
'label' => $lng['serversettings']['session_allow_multiple_login'],
'settinggroup' => 'session',
'varname' => 'allow_multiple_login',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'login_domain_login' => array(
'label' => $lng['serversettings']['login_domain_login'],
'settinggroup' => 'login',
'varname' => 'domain_login',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'login_maxloginattempts' => array(
'label' => $lng['serversettings']['maxloginattempts'],
'settinggroup' => 'login',
'varname' => 'maxloginattempts',
'type' => 'int',
'default' => 3,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'login_deactivatetime' => array(
'label' => $lng['serversettings']['deactivatetime'],
'settinggroup' => 'login',
'varname' => 'deactivatetime',
'type' => 'int',
'default' => 900,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'2fa_enabled' => array(
'label' => $lng['2fa']['2fa_enabled'],
'settinggroup' => '2fa',
'varname' => 'enabled',
'type' => 'bool',
'default' => true,
'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',
),
'save_method' => 'storeSettingField'
),
'panel_password_alpha_lower' => array(
'label' => $lng['serversettings']['panel_password_alpha_lower'],
'settinggroup' => 'panel',
'varname' => 'password_alpha_lower',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField'
),
'panel_password_alpha_upper' => array(
'label' => $lng['serversettings']['panel_password_alpha_upper'],
'settinggroup' => 'panel',
'varname' => 'password_alpha_upper',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField'
),
'panel_password_numeric' => array(
'label' => $lng['serversettings']['panel_password_numeric'],
'settinggroup' => 'panel',
'varname' => 'password_numeric',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'panel_password_special_char_required' => array(
'label' => $lng['serversettings']['panel_password_special_char_required'],
'settinggroup' => 'panel',
'varname' => 'password_special_char_required',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'panel_password_special_char' => array(
'label' => $lng['serversettings']['panel_password_special_char'],
'settinggroup' => 'panel',
'varname' => 'password_special_char',
'type' => 'string',
'default' => '!?<>§$%+#=@',
'save_method' => 'storeSettingField'
),
'panel_password_regex' => array(
'label' => $lng['serversettings']['panel_password_regex'],
'settinggroup' => 'panel',
'varname' => 'password_regex',
'type' => 'string',
'default' => '',
/* 'plausibility_check_method' => 'checkValidRegEx', */
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'customer_accountprefix' => array(
'label' => $lng['serversettings']['accountprefix'],
'settinggroup' => 'customer',
'varname' => 'accountprefix',
'type' => 'string',
'default' => '',
'plausibility_check_method' => 'checkUsername',
'save_method' => 'storeSettingField',
'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check',
'checkUsername'
),
'save_method' => 'storeSettingField'
),
'customer_mysqlprefix' => array(
'label' => $lng['serversettings']['mysqlprefix'],
'settinggroup' => 'customer',
'varname' => 'mysqlprefix',
'type' => 'string',
'default' => '',
'plausibility_check_method' => 'checkUsername',
'save_method' => 'storeSettingField',
'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check',
'checkUsername'
),
'save_method' => 'storeSettingField'
),
'customer_ftpprefix' => array(
'label' => $lng['serversettings']['ftpprefix'],
'settinggroup' => 'customer',
'varname' => 'ftpprefix',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'customer_ftpatdomain' => array(
'label' => $lng['serversettings']['ftpdomain'],
'settinggroup' => 'customer',
'varname' => 'ftpatdomain',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'panel_allow_preset' => array(
'label' => $lng['serversettings']['allow_password_reset'],
'settinggroup' => 'panel',
@@ -121,14 +173,14 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
'dependency' => array(
'fieldname' => 'panel_allow_preset_admin',
'fielddata' => array(
'settinggroup' => 'panel',
'varname' => 'allow_preset_admin',
),
'onlyif' => 0
)
),
'fieldname' => 'panel_allow_preset_admin',
'fielddata' => array(
'settinggroup' => 'panel',
'varname' => 'allow_preset_admin'
),
'onlyif' => 0
)
),
'panel_allow_preset_admin' => array(
'label' => $lng['serversettings']['allow_password_reset_admin'],
'settinggroup' => 'panel',
@@ -137,17 +189,25 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
'dependency' => array(
'fieldname' => 'panel_allow_preset',
'fielddata' => array(
'settinggroup' => 'panel',
'varname' => 'allow_preset',
),
'onlyif' => 1
)
),
'fieldname' => 'panel_allow_preset',
'fielddata' => array(
'settinggroup' => 'panel',
'varname' => 'allow_preset'
),
'onlyif' => 1
)
),
),
),
);
'system_backupenabled' => array(
'label' => $lng['serversettings']['backupenabled'],
'settinggroup' => 'system',
'varname' => 'backupenabled',
'type' => 'bool',
'default' => false,
'cronmodule' => 'froxlor/backup',
'save_method' => 'storeSettingField'
)
)
)
)
);
?>

View File

@@ -14,9 +14,8 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'system' => array(
@@ -30,28 +29,58 @@ return array(
'string_type' => 'dir',
'default' => '/var/customers/webs/',
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkPathConflicts'
),
'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check',
'checkPathConflicts'
)
),
'system_documentroot_use_default_value' => array(
'label' => $lng['serversettings']['documentroot_use_default_value'],
'settinggroup' => 'system',
'varname' => 'documentroot_use_default_value',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_ipaddress' => array(
'label' => $lng['serversettings']['ipaddress'],
'settinggroup' => 'system',
'varname' => 'ipaddress',
'type' => 'option',
'option_mode' => 'one',
'option_options_method' => 'getIpAddresses',
'default' => '',
'save_method' => 'storeSettingIpAddress',
'option_options_method' => array(
'\\Froxlor\\Domain\\IpAddr',
'getIpAddresses'
),
'default' => '',
'save_method' => 'storeSettingIpAddress'
),
'system_defaultip' => array(
'label' => $lng['serversettings']['defaultip'],
'settinggroup' => 'system',
'varname' => 'defaultip',
'type' => 'option',
'option_mode' => 'one',
'option_options_method' => 'getIpPortCombinations',
'default' => '',
'save_method' => 'storeSettingDefaultIp',
'option_mode' => 'multiple',
'option_options_method' => array(
'\\Froxlor\\Domain\\IpAddr',
'getIpPortCombinations'
),
'default' => '',
'save_method' => 'storeSettingDefaultIp'
),
'system_defaultsslip' => array(
'label' => $lng['serversettings']['defaultsslip'],
'settinggroup' => 'system',
'varname' => 'defaultsslip',
'type' => 'option',
'option_mode' => 'multiple',
'option_options_method' => array(
'\\Froxlor\\Domain\\IpAddr',
'getSslIpPortCombinations'
),
'default' => '',
'save_method' => 'storeSettingDefaultSslIp'
),
'system_hostname' => array(
'label' => $lng['serversettings']['hostname'],
'settinggroup' => 'system',
@@ -59,40 +88,55 @@ return array(
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingHostname',
),
'system_froxlordirectlyviahostname' => array(
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
'settinggroup' => 'system',
'varname' => 'froxlordirectlyviahostname',
'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check',
'checkHostname'
)
),
'api_enabled' => array(
'label' => $lng['serversettings']['enable_api'],
'settinggroup' => 'api',
'varname' => 'enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_validatedomain' => array(
'label' => $lng['serversettings']['validate_domain'],
'settinggroup' => 'system',
'varname' => 'validate_domain',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_stdsubdomain' => array(
'label' => $lng['serversettings']['stdsubdomainhost'],
'settinggroup' => 'system',
'varname' => 'stdsubdomain',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingHostname',
),
'save_method' => 'storeSettingHostname'
),
'system_mysql_access_host' => array(
'label' => $lng['serversettings']['mysql_access_host'],
'settinggroup' => 'system',
'varname' => 'mysql_access_host',
'type' => 'string',
'default' => '127.0.0.1,localhost',
'plausibility_check_method' => 'checkMysqlAccessHost',
'save_method' => 'storeSettingMysqlAccessHost',
'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check',
'checkMysqlAccessHost'
),
'save_method' => 'storeSettingMysqlAccessHost'
),
'system_nssextrausers' => array(
'label' => $lng['serversettings']['nssextrausers'],
'settinggroup' => 'system',
'varname' => 'nssextrausers',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_index_file_extension' => array(
'label' => $lng['serversettings']['index_file_extension'],
'settinggroup' => 'system',
@@ -100,28 +144,28 @@ return array(
'type' => 'string',
'string_regexp' => '/^[a-zA-Z0-9]{1,6}$/',
'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',
),
'save_method' => 'storeSettingField'
),
'system_httpuser' => array(
'settinggroup' => 'system',
'varname' => 'httpuser',
'type' => 'hidden',
'default' => 'www-data',
),
'default' => 'www-data'
),
'system_httpgroup' => array(
'settinggroup' => 'system',
'varname' => 'httpgroup',
'type' => 'hidden',
'default' => 'www-data',
),
'default' => 'www-data'
),
'system_report_enable' => array(
'label' => $lng['serversettings']['report']['report'],
'settinggroup' => 'system',
@@ -129,39 +173,88 @@ return array(
'type' => 'bool',
'default' => true,
'cronmodule' => 'froxlor/reports',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_report_webmax' => array(
'label' => $lng['serversettings']['report']['webmax'],
'settinggroup' => 'system',
'varname' => 'report_webmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 99,
'int_min' => 0,
'int_max' => 150,
'default' => 90,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_report_trafficmax' => array(
'label' => $lng['serversettings']['report']['trafficmax'],
'settinggroup' => 'system',
'varname' => 'report_trafficmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 99,
'int_min' => 0,
'int_max' => 150,
'default' => 90,
'save_method' => 'storeSettingField',
),
'system_debug_cron' => array(
'label' => $lng['serversettings']['cron']['debug'],
'save_method' => 'storeSettingField'
),
'system_mail_use_smtp' => array(
'label' => $lng['serversettings']['mail_use_smtp'],
'settinggroup' => 'system',
'varname' => 'debug_cron',
'varname' => 'mail_use_smtp',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
),
),
);
?>
'system_mail_smtp_host' => array(
'label' => $lng['serversettings']['mail_smtp_host'],
'settinggroup' => 'system',
'varname' => 'mail_smtp_host',
'type' => 'string',
'default' => 'localhost',
'save_method' => 'storeSettingField'
),
'system_mail_smtp_port' => array(
'label' => $lng['serversettings']['mail_smtp_port'],
'settinggroup' => 'system',
'varname' => 'mail_smtp_port',
'type' => 'int',
'int_min' => 1,
'int_max' => 65535,
'default' => 25,
'save_method' => 'storeSettingField'
),
'system_mail_smtp_usetls' => array(
'label' => $lng['serversettings']['mail_smtp_usetls'],
'settinggroup' => 'system',
'varname' => 'mail_smtp_usetls',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField'
),
'system_mail_smtp_auth' => array(
'label' => $lng['serversettings']['mail_smtp_auth'],
'settinggroup' => 'system',
'varname' => 'mail_smtp_auth',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField'
),
'system_mail_smtp_user' => array(
'label' => $lng['serversettings']['mail_smtp_user'],
'settinggroup' => 'system',
'varname' => 'mail_smtp_user',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField'
),
'system_mail_smtp_passwd' => array(
'label' => $lng['serversettings']['mail_smtp_passwd'],
'settinggroup' => 'system',
'varname' => 'mail_smtp_passwd',
'type' => 'hiddenString',
'default' => '',
'save_method' => 'storeSettingField'
)
)
)
)
);

View File

@@ -0,0 +1,247 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2016 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> (2016-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package \Froxlor\Settings
*
*/
return array(
'groups' => array(
'froxlorvhost' => array(
'title' => $lng['admin']['froxlorvhost'] . (call_user_func(array('\Froxlor\Settings\FroxlorVhostSettings', 'hasVhostContainerEnabled')) == false ? $lng['admin']['novhostcontainer'] : ''),
'fields' => array(
/**
* Webserver-Vhost
*/
'system_froxlordirectlyviahostname' => array(
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
'settinggroup' => 'system',
'varname' => 'froxlordirectlyviahostname',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_froxloraliases' => array(
'label' => $lng['serversettings']['froxloraliases'],
'settinggroup' => 'system',
'varname' => 'froxloraliases',
'type' => 'string',
'string_regexp' => '/^(([a-z0-9\-\._]+, ?)*[a-z0-9\-\._]+)?$/i',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
),
/**
* SSL / Let's Encrypt
*/
'system_le_froxlor_enabled' => array(
'label' => $lng['serversettings']['le_froxlor_enabled'],
'settinggroup' => 'system',
'varname' => 'le_froxlor_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingClearCertificates',
'visible' => \Froxlor\Settings::Get('system.leenabled') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
), true)
),
'system_le_froxlor_redirect' => array(
'label' => $lng['serversettings']['le_froxlor_redirect'],
'settinggroup' => 'system',
'varname' => 'le_froxlor_redirect',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => \Froxlor\Settings::Get('system.use_ssl') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
), true)
),
'system_hsts_maxage' => array(
'label' => $lng['admin']['domain_hsts_maxage'],
'settinggroup' => 'system',
'varname' => 'hsts_maxage',
'type' => 'int',
'int_min' => 0,
'int_max' => 94608000, // 3-years
'default' => 0,
'save_method' => 'storeSettingField',
'visible' => \Froxlor\Settings::Get('system.use_ssl') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
), true)
),
'system_hsts_incsub' => array(
'label' => $lng['admin']['domain_hsts_incsub'],
'settinggroup' => 'system',
'varname' => 'hsts_incsub',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => \Froxlor\Settings::Get('system.use_ssl') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
), true)
),
'system_hsts_preload' => array(
'label' => $lng['admin']['domain_hsts_preload'],
'settinggroup' => 'system',
'varname' => 'hsts_preload',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => \Froxlor\Settings::Get('system.use_ssl') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
), true)
),
/**
* FCGID
*/
'system_mod_fcgid_enabled_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid_ownvhost'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_ownvhost',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2'
),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
))
),
'system_mod_fcgid_httpuser' => array(
'label' => $lng['admin']['mod_fcgid_user'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_httpuser',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingWebserverFcgidFpmUser',
'websrv_avail' => array(
'apache2'
),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
))
),
'system_mod_fcgid_httpgroup' => array(
'label' => $lng['admin']['mod_fcgid_group'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_httpgroup',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2'
),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
))
),
'system_mod_fcgid_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_defaultini_ownvhost',
'type' => 'option',
'default' => '2',
'option_mode' => 'one',
'option_options_method' => array(
'\\Froxlor\\Http\\PhpConfig',
'getPhpConfigs'
),
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2'
),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
))
),
/**
* php-fpm
*/
'system_phpfpm_enabled_ownvhost' => array(
'label' => $lng['phpfpm']['ownvhost'],
'settinggroup' => 'phpfpm',
'varname' => 'enabled_ownvhost',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
))
),
'system_phpfpm_httpuser' => array(
'label' => $lng['phpfpm']['vhost_httpuser'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_httpuser',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingWebserverFcgidFpmUser',
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
))
),
'system_phpfpm_httpgroup' => array(
'label' => $lng['phpfpm']['vhost_httpgroup'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_httpgroup',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
))
),
'system_phpfpm_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_defaultini',
'type' => 'option',
'default' => '2',
'option_mode' => 'one',
'option_options_method' => array(
'\\Froxlor\\Http\\PhpConfig',
'getPhpConfigs'
),
'save_method' => 'storeSettingField',
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') && call_user_func(array(
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
))
),
/**
* DNS
*/
'system_dns_createhostnameentry' => array(
'label' => $lng['serversettings']['dns_createhostnameentry'],
'settinggroup' => 'system',
'varname' => 'dns_createhostnameentry',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => \Froxlor\Settings::Get('system.bind_enable')
)
)
)
)
);

View File

@@ -0,0 +1,66 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2014 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
*
*/
return array(
'groups' => array(
'crond' => array(
'title' => $lng['admin']['cronsettings'],
'fields' => array(
'system_cronconfig' => array(
'label' => $lng['serversettings']['system_cronconfig'],
'settinggroup' => 'system',
'varname' => 'cronconfig',
'type' => 'string',
'string_type' => 'file',
'default' => '/etc/cron.d/froxlor',
'save_method' => 'storeSettingField'
),
'system_croncmdline' => array(
'label' => $lng['serversettings']['system_croncmdline'],
'settinggroup' => 'system',
'varname' => 'croncmdline',
'type' => 'string',
'default' => '/usr/bin/nice -n 5 /usr/bin/php -q',
'save_method' => 'storeSettingField'
),
'system_crondreload' => array(
'label' => $lng['serversettings']['system_crondreload'],
'settinggroup' => 'system',
'varname' => 'crondreload',
'type' => 'string',
'default' => '/etc/init.d/cron reload',
'save_method' => 'storeSettingField'
),
'system_cron_allowautoupdate' => array(
'label' => $lng['serversettings']['system_cron_allowautoupdate'],
'settinggroup' => 'system',
'varname' => 'cron_allowautoupdate',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_debug_cron' => array(
'label' => $lng['serversettings']['cron']['debug'],
'settinggroup' => 'system',
'varname' => 'debug_cron',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
)
)
)
)
);

View File

@@ -13,10 +13,9 @@
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
* @package \Froxlor\Settings
*
*/
return array(
'groups' => array(
'webserver' => array(
@@ -29,26 +28,81 @@ return array(
'type' => 'option',
'default' => 'apache2',
'option_mode' => 'one',
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd', 'nginx' => 'Nginx'),
'save_method' => 'storeSettingField',
'overview_option' => true
'option_options' => array(
'apache2' => 'Apache 2',
'lighttpd' => 'ligHTTPd',
'nginx' => 'Nginx'
),
'save_method' => 'storeSettingField',
'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check',
'checkPhpInterfaceSetting'
),
'overview_option' => true
),
'system_apache_24' => array(
'label' => $lng['serversettings']['apache_24'],
'settinggroup' => 'system',
'varname' => 'apache24',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2'
)
),
'system_apache_itksupport' => array(
'label' => $lng['serversettings']['apache_itksupport'],
'settinggroup' => 'system',
'varname' => 'apacheitksupport',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 0 && \Froxlor\Settings::Get('phpfpm.enabled') == 0),
'websrv_avail' => array(
'apache2'
)
),
'system_http2_support' => array(
'label' => $lng['serversettings']['http2_support'],
'settinggroup' => 'system',
'varname' => 'http2_support',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2',
'nginx'
),
'visible' => \Froxlor\Settings::Get('system.use_ssl')
),
'system_dhparams_file' => array(
'label' => $lng['serversettings']['dhparams_file'],
'settinggroup' => 'system',
'varname' => 'dhparams_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
'visible' => \Froxlor\Settings::Get('system.use_ssl')
),
'system_httpuser' => array(
'label' => $lng['admin']['webserver_user'],
'settinggroup' => 'system',
'varname' => 'httpuser',
'type' => 'string',
'default' => 'www-data',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingWebserverFcgidFpmUser'
),
'system_httpgroup' => array(
'label' => $lng['admin']['webserver_group'],
'settinggroup' => 'system',
'varname' => 'httpgroup',
'type' => 'string',
'default' => 'www-data',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_apacheconf_vhost' => array(
'label' => $lng['serversettings']['apacheconf_vhost'],
'settinggroup' => 'system',
@@ -56,8 +110,8 @@ return array(
'type' => 'string',
'string_type' => 'filedir',
'default' => '/etc/apache2/sites-enabled/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_apacheconf_diroptions' => array(
'label' => $lng['serversettings']['apacheconf_diroptions'],
'settinggroup' => 'system',
@@ -65,17 +119,17 @@ return array(
'type' => 'string',
'string_type' => 'filedir',
'default' => '/etc/apache2/sites-enabled/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_apacheconf_htpasswddir' => array(
'label' => $lng['serversettings']['apacheconf_htpasswddir'],
'settinggroup' => 'system',
'varname' => 'apacheconf_htpasswddir',
'type' => 'string',
'string_type' => 'dir',
'string_type' => 'confdir',
'default' => '/etc/apache2/htpasswd/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_logfiles_directory' => array(
'label' => $lng['serversettings']['logfiles_directory'],
'settinggroup' => 'system',
@@ -83,8 +137,92 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/logs/',
'save_method' => 'storeSettingField'
),
'system_logfiles_script' => array(
'label' => $lng['serversettings']['logfiles_script'],
'settinggroup' => 'system',
'varname' => 'logfiles_script',
'type' => 'string',
'string_type' => '',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2'
)
),
'system_logfiles_piped' => array(
'label' => $lng['serversettings']['logfiles_piped'],
'settinggroup' => 'system',
'varname' => 'logfiles_piped',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2'
)
),
'system_logfiles_format' => array(
'label' => $lng['serversettings']['logfiles_format'],
'settinggroup' => 'system',
'varname' => 'logfiles_format',
'type' => 'string',
'default' => '',
'string_emptyallowed' => true,
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2',
'nginx'
)
),
'system_logfiles_type' => array(
'label' => $lng['serversettings']['logfiles_type'],
'settinggroup' => 'system',
'varname' => 'logfiles_type',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options' => array(
'1' => 'combined',
'2' => 'vhost_combined'
),
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2'
)
),
'system_errorlog_level' => array(
'label' => $lng['serversettings']['errorlog_level'],
'settinggroup' => 'system',
'varname' => 'errorlog_level',
'type' => 'option',
'default' => (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? 'error' : 'warn'),
'option_mode' => 'one',
'option_options' => array(
'emerg' => 'emerg',
'alert' => 'alert',
'crit' => 'crit',
'error' => 'error',
'warn' => 'warn',
'notice' => 'notice',
'info' => 'info',
'debug' => 'debug'
),
'save_method' => 'storeSettingField',
'websrv_avail' => array(
'apache2',
'nginx'
)
),
'system_customersslpath' => array(
'label' => $lng['serversettings']['customerssl_directory'],
'settinggroup' => 'system',
'varname' => 'customer_ssl_path',
'type' => 'string',
'string_type' => 'confdir',
'default' => '/etc/ssl/froxlor-custom/',
'save_method' => 'storeSettingField'
),
'system_phpappendopenbasedir' => array(
'label' => $lng['serversettings']['phpappendopenbasedir'],
'settinggroup' => 'system',
@@ -92,8 +230,8 @@ return array(
'type' => 'string',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_deactivateddocroot' => array(
'label' => $lng['serversettings']['deactivateddocroot'],
'settinggroup' => 'system',
@@ -102,59 +240,95 @@ return array(
'string_type' => 'dir',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_default_vhostconf' => array(
'label' => $lng['serversettings']['default_vhostconf'],
'settinggroup' => 'system',
'varname' => 'default_vhostconf',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField'
),
'system_default_sslvhostconf' => array(
'label' => $lng['serversettings']['default_sslvhostconf'],
'settinggroup' => 'system',
'varname' => 'default_sslvhostconf',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
),
'visible' => \Froxlor\Settings::Get('system.use_ssl') == 1
),
'system_include_default_vhostconf' => array(
'label' => $lng['serversettings']['includedefault_sslvhostconf'],
'settinggroup' => 'system',
'varname' => 'include_default_vhostconf',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_apache_globaldiropt' => array(
'label' => $lng['serversettings']['apache_globaldiropt'],
'settinggroup' => 'system',
'varname' => 'apacheglobaldiropt',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 0 && \Froxlor\Settings::Get('phpfpm.enabled') == 0),
'websrv_avail' => array(
'apache2'
)
),
'system_apachereload_command' => array(
'label' => $lng['serversettings']['apachereload_command'],
'settinggroup' => 'system',
'varname' => 'apachereload_command',
'type' => 'string',
'default' => '/etc/init.d/apache2 reload',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_phpreload_command' => array(
'label' => $lng['serversettings']['phpreload_command'],
'settinggroup' => 'system',
'varname' => 'phpreload_command',
'type' => (getSetting('phpfpm', 'enabled') == '1') ? 'hidden' : 'string',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'websrv_avail' => array(
'nginx'
)
),
'system_nginx_php_backend' => array(
'label' => $lng['serversettings']['nginx_php_backend'],
'settinggroup' => 'system',
'varname' => 'nginx_php_backend',
'type' => (getSetting('phpfpm', 'enabled') == '1') ? 'hidden' : 'string',
'type' => 'string',
'default' => '127.0.0.1:8888',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'system_mod_log_sql' => array(
'label' => $lng['serversettings']['mod_log_sql'],
'settinggroup' => 'system',
'varname' => 'mod_log_sql',
'type' => 'bool',
'default' => false,
'websrv_avail' => array(
'nginx'
)
),
'nginx_fastcgiparams' => array(
'label' => $lng['serversettings']['nginx_fastcgiparams'],
'settinggroup' => 'nginx',
'varname' => 'fastcgiparams',
'type' => 'string',
'string_type' => 'file',
'default' => '/etc/nginx/fastcgi_params',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'websrv_avail' => array(
'nginx'
)
),
'defaultwebsrverrhandler_enabled' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'defaultwebsrverrhandler_err401' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err401'],
'settinggroup' => 'defaultwebsrverrhandler',
@@ -162,8 +336,11 @@ return array(
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'websrv_avail' => array(
'apache2',
'nginx'
)
),
'defaultwebsrverrhandler_err403' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
'settinggroup' => 'defaultwebsrverrhandler',
@@ -171,16 +348,19 @@ return array(
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'websrv_avail' => array(
'apache2',
'nginx'
)
),
'defaultwebsrverrhandler_err404' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'err404',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'defaultwebsrverrhandler_err500' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err500'],
'settinggroup' => 'defaultwebsrverrhandler',
@@ -188,17 +368,19 @@ return array(
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'websrv_avail' => array(
'apache2',
'nginx'
)
),
'customredirect_enabled' => array(
'label' => $lng['serversettings']['customredirect_enabled'],
'settinggroup' => 'customredirect',
'varname' => 'enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'lighttpd')
),
'save_method' => 'storeSettingField'
),
'customredirect_default' => array(
'label' => $lng['serversettings']['customredirect_default'],
'settinggroup' => 'customredirect',
@@ -206,75 +388,10 @@ return array(
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getRedirectCodes',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'lighttpd')
),
),
),
'ssl' => array(
'title' => $lng['admin']['sslsettings'],
'fields' => array(
'system_ssl_enabled' => array(
'label' => $lng['serversettings']['ssl']['use_ssl'],
'settinggroup' => 'system',
'varname' => 'use_ssl',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_ssl_cert_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
'settinggroup' => 'system',
'varname' => 'ssl_cert_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '/etc/apache2/apache2.pem',
'save_method' => 'storeSettingField',
),
'system_ssl_key_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_key_file'],
'settinggroup' => 'system',
'varname' => 'ssl_key_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '/etc/apache2/apache2.key',
'save_method' => 'storeSettingField',
),
'system_ssl_ca_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_ca_file'],
'settinggroup' => 'system',
'varname' => 'ssl_ca_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile'],
'settinggroup' => 'system',
'varname' => 'ssl_cert_chainfile',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_ssl_openssl_cnf' => array(
'label' => $lng['serversettings']['ssl']['openssl_cnf'],
'settinggroup' => 'system',
'varname' => 'openssl_cnf',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
),
),
),
),
);
?>
'option_options_method' => array('\\Froxlor\\Domain\\Domain', 'getRedirectCodes'),
'save_method' => 'storeSettingField'
)
)
)
)
);

View File

@@ -0,0 +1,218 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package \Froxlor\Settings
*
*/
return array(
'groups' => array(
'ssl' => array(
'title' => $lng['admin']['sslsettings'],
'fields' => array(
'system_ssl_enabled' => array(
'label' => $lng['serversettings']['ssl']['use_ssl'],
'settinggroup' => 'system',
'varname' => 'use_ssl',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_ssl_protocols' => array(
'label' => $lng['serversettings']['ssl']['ssl_protocols'],
'settinggroup' => 'system',
'varname' => 'ssl_protocols',
'type' => 'option',
'default' => 'TLSv1,TLSv1.2',
'option_mode' => 'multiple',
'option_options' => array(
'TLSv1' => 'TLSv1',
'TLSv1.1' => 'TLSv1.1',
'TLSv1.2' => 'TLSv1.2',
'TLSv1.3' => 'TLSv1.3'
),
'save_method' => 'storeSettingField'
),
'system_ssl_cipher_list' => array(
'label' => $lng['serversettings']['ssl']['ssl_cipher_list'],
'settinggroup' => 'system',
'varname' => 'ssl_cipher_list',
'type' => 'string',
'string_emptyallowed' => false,
'default' => 'ECDH+AESGCM:ECDH+AES256:!aNULL:!MD5:!DSS:!DH:!AES128',
'save_method' => 'storeSettingField'
),
'system_tlsv13_cipher_list' => array(
'label' => $lng['serversettings']['ssl']['tlsv13_cipher_list'],
'settinggroup' => 'system',
'varname' => 'tlsv13_cipher_list',
'type' => 'string',
'string_emptyallowed' => true,
'default' => '',
'visible' => \Froxlor\Settings::Get('system.webserver') == "apache2" && \Froxlor\Settings::Get('system.apache24') == 1,
'save_method' => 'storeSettingField',
),
'system_ssl_cert_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
'settinggroup' => 'system',
'varname' => 'ssl_cert_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '/etc/apache2/apache2.pem',
'save_method' => 'storeSettingField'
),
'system_ssl_key_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_key_file'],
'settinggroup' => 'system',
'varname' => 'ssl_key_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '/etc/apache2/apache2.key',
'save_method' => 'storeSettingField'
),
'system_ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile'],
'settinggroup' => 'system',
'varname' => 'ssl_cert_chainfile',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
),
'system_ssl_ca_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_ca_file'],
'settinggroup' => 'system',
'varname' => 'ssl_ca_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
),
'system_apache24_ocsp_cache_path' => array(
'label' => $lng['serversettings']['ssl']['apache24_ocsp_cache_path'],
'settinggroup' => 'system',
'varname' => 'apache24_ocsp_cache_path',
'type' => 'string',
'string_type' => 'string',
'string_emptyallowed' => false,
'default' => 'shmcb:/var/run/apache2/ocsp-stapling.cache(131072)',
'visible' => \Froxlor\Settings::Get('system.webserver') == "apache2" && \Froxlor\Settings::Get('system.apache24') == 1,
'save_method' => 'storeSettingField'
),
'system_leenabled' => array(
'label' => $lng['serversettings']['leenabled'],
'settinggroup' => 'system',
'varname' => 'leenabled',
'type' => 'bool',
'default' => false,
'cronmodule' => 'froxlor/letsencrypt',
'save_method' => 'storeSettingField'
),
'system_letsencryptacmeconf' => array(
'label' => $lng['serversettings']['letsencryptacmeconf'],
'settinggroup' => 'system',
'varname' => 'letsencryptacmeconf',
'type' => 'string',
'string_type' => 'file',
'default' => '/etc/apache2/conf-enabled/acme.conf',
'save_method' => 'storeSettingField'
),
'system_leapiversion' => array(
'label' => $lng['serversettings']['leapiversion'],
'settinggroup' => 'system',
'varname' => 'leapiversion',
'type' => 'option',
'default' => '2',
'option_mode' => 'one',
'option_options' => array(
'2' => 'ACME v2'
),
'save_method' => 'storeSettingField'
),
'system_letsencryptca' => array(
'label' => $lng['serversettings']['letsencryptca'],
'settinggroup' => 'system',
'varname' => 'letsencryptca',
'type' => 'option',
'default' => 'testing',
'option_mode' => 'one',
'option_options' => array(
'testing' => 'https://acme-staging' . (\Froxlor\Settings::Get('system.leapiversion') == '2' ? '-v02' : '') . '.api.letsencrypt.org (Test)',
'production' => 'https://acme-v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org (Live)'
),
'save_method' => 'storeSettingField'
),
'system_letsencryptchallengepath' => array(
'label' => $lng['serversettings']['letsencryptchallengepath'],
'settinggroup' => 'system',
'varname' => 'letsencryptchallengepath',
'type' => 'string',
'string_emptyallowed' => false,
'default' => \Froxlor\Froxlor::getInstallDir(),
'save_method' => 'storeSettingField'
),
'system_letsencryptkeysize' => array(
'label' => $lng['serversettings']['letsencryptkeysize'],
'settinggroup' => 'system',
'varname' => 'letsencryptkeysize',
'type' => 'option',
'default' => '2048',
'option_mode' => 'one',
'option_options' => array(
'2048' => '2048',
'3072' => '3072',
'4096' => '4096',
'8192' => '8192'
),
'save_method' => 'storeSettingField'
),
'system_leecc' => array(
'label' => $lng['serversettings']['letsencryptecc'],
'settinggroup' => 'system',
'varname' => 'leecc',
'type' => 'option',
'default' => '0',
'option_mode' => 'one',
'option_options' => array(
'0' => '-',
'256' => 'ec-256',
'384' => 'ec-384'
),
'save_method' => 'storeSettingField'
),
'system_letsencryptreuseold' => array(
'label' => $lng['serversettings']['letsencryptreuseold'],
'settinggroup' => 'system',
'varname' => 'letsencryptreuseold',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField'
),
'system_disable_le_selfcheck' => array(
'label' => $lng['serversettings']['disable_le_selfcheck'],
'settinggroup' => 'system',
'varname' => 'disable_le_selfcheck',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
)
)
)
)
);

View File

@@ -12,14 +12,16 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'fcgid' => array(
'title' => $lng['admin']['fcgid_settings'],
'websrv_avail' => array('apache2', 'lighttpd'),
'websrv_avail' => array(
'apache2',
'lighttpd'
),
'fields' => array(
'system_mod_fcgid_enabled' => array(
'label' => $lng['serversettings']['mod_fcgid'],
@@ -28,19 +30,25 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkFcgidPhpFpm',
'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check',
'checkFcgidPhpFpm'
),
'overview_option' => true
),
),
'system_mod_fcgid_configdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_configdir',
'type' => 'string',
'string_type' => 'dir',
'string_type' => 'confdir',
'default' => '/var/www/php-fcgi-scripts/',
'plausibility_check_method' => 'checkPathConflicts',
'save_method' => 'storeSettingField',
'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check',
'checkPathConflicts'
),
'save_method' => 'storeSettingField'
),
'system_mod_fcgid_tmpdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
'settinggroup' => 'system',
@@ -48,8 +56,8 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/tmp/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_mod_fcgid_peardir' => array(
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
'settinggroup' => 'system',
@@ -59,34 +67,39 @@ return array(
'string_delimiter' => ':',
'string_emptyallowed' => true,
'default' => '/usr/share/php/:/usr/share/php5/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_mod_fcgid_wrapper' => array(
'label' => $lng['serversettings']['mod_fcgid']['wrapper'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_wrapper',
'type' => 'option',
'option_options' => array(0 => 'ScriptAlias', 1=> 'FCGIWrapper'),
'option_options' => array(
0 => 'ScriptAlias',
1 => 'FcgidWrapper'
),
'default' => 1,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'websrv_avail' => array(
'apache2'
)
),
'system_mod_fcgid_starter' => array(
'label' => $lng['serversettings']['mod_fcgid']['starter'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_starter',
'type' => 'int',
'default' => 0,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_mod_fcgid_maxrequests' => array(
'label' => $lng['serversettings']['mod_fcgid']['maxrequests'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_maxrequests',
'type' => 'int',
'default' => 250,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_mod_fcgid_defaultini' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
'settinggroup' => 'system',
@@ -94,50 +107,22 @@ return array(
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_enabled_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid_ownvhost'],
'option_options_method' => array(
'\\Froxlor\\Http\\PhpConfig',
'getPhpConfigs'),
'save_method' => 'storeSettingField'
),
'system_mod_fcgid_idle_timeout' => array(
'label' => $lng['serversettings']['mod_fcgid']['idle_timeout'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_ownvhost',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_httpuser' => array(
'label' => $lng['admin']['mod_fcgid_user'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_httpuser',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_httpgroup' => array(
'label' => $lng['admin']['mod_fcgid_group'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_httpgroup',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_defaultini_ownvhost',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'varname' => 'mod_fcgid_idle_timeout',
'type' => 'int',
'default' => 30,
'save_method' => 'storeSettingField'
)
)
)
);
)
);
?>

View File

@@ -1,161 +1,141 @@
<?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$
*/
return array(
'groups' => array(
'phpfpm' => array(
'title' => $lng['admin']['phpfpm_settings'],
'fields' => array(
'system_phpfpm_enabled' => array(
'label' => $lng['serversettings']['phpfpm'],
'settinggroup' => 'phpfpm',
'varname' => 'enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkFcgidPhpFpm',
'overview_option' => true
),
'system_phpfpm_enabled_ownvhost' => array(
'label' => $lng['phpfpm']['ownvhost'],
'settinggroup' => 'phpfpm',
'varname' => 'enabled_ownvhost',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_phpfpm_httpuser' => array(
'label' => $lng['phpfpm']['vhost_httpuser'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_httpuser',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField'
),
'system_phpfpm_httpgroup' => array(
'label' => $lng['phpfpm']['vhost_httpgroup'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_httpgroup',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField'
),
/*
* @TODO implement if phpfpm knows custom php.ini files
*
'system_phpfpm_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_defaultini',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
),
*/
'system_phpfpm_configdir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
'settinggroup' => 'phpfpm',
'varname' => 'configdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/php-fpm.d/',
'save_method' => 'storeSettingField',
),
'system_phpfpm_tmpdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
'settinggroup' => 'phpfpm',
'varname' => 'tmpdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/tmp/',
'save_method' => 'storeSettingField',
),
'system_phpfpm_peardir' => array(
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
'settinggroup' => 'phpfpm',
'varname' => 'peardir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/usr/share/php/:/usr/share/php5/',
'save_method' => 'storeSettingField',
),
'system_phpfpm_reload' => array(
'label' => $lng['serversettings']['phpfpm_settings']['reload'],
'settinggroup' => 'phpfpm',
'varname' => 'reload',
'type' => 'string',
'default' => '/etc/init.d/php-fpm restart',
'save_method' => 'storeSettingField',
),
'system_phpfpm_pm' => array(
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'settinggroup' => 'phpfpm',
'varname' => 'pm',
'type' => 'option',
'default' => 'static',
'option_mode' => 'one',
'option_options' => array('static' => 'static', 'dynamic' => 'dynamic'),
'save_method' => 'storeSettingField',
),
'system_phpfpm_max_children' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_children'],
'settinggroup' => 'phpfpm',
'varname' => 'max_children',
'type' => 'int',
'default' => 1,
'save_method' => 'storeSettingField',
),
'system_phpfpm_start_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['start_servers'],
'settinggroup' => 'phpfpm',
'varname' => 'start_servers',
'type' => 'int',
'default' => 20,
'save_method' => 'storeSettingField',
),
'system_phpfpm_min_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers'],
'settinggroup' => 'phpfpm',
'varname' => 'min_spare_servers',
'type' => 'int',
'default' => 5,
'save_method' => 'storeSettingField',
),
'system_phpfpm_max_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers'],
'settinggroup' => 'phpfpm',
'varname' => 'max_spare_servers',
'type' => 'int',
'default' => 35,
'save_method' => 'storeSettingField',
),
'system_phpfpm_max_requests' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_requests'],
'settinggroup' => 'phpfpm',
'varname' => 'max_requests',
'type' => 'int',
'default' => 0,
'save_method' => 'storeSettingField',
),
),
),
),
);
?>
<?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 \Froxlor\Settings
*
*/
return array(
'groups' => array(
'phpfpm' => array(
'title' => $lng['admin']['phpfpm_settings'],
'fields' => array(
'system_phpfpm_enabled' => array(
'label' => $lng['serversettings']['phpfpm'],
'settinggroup' => 'phpfpm',
'varname' => 'enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'plausibility_check_method' => array(
'\\Froxlor\\Validate\\Check',
'checkFcgidPhpFpm'
),
'overview_option' => true
),
'system_phpfpm_defaultini' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
'settinggroup' => 'phpfpm',
'varname' => 'defaultini',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => array(
'\\Froxlor\\Http\\PhpConfig',
'getPhpConfigs'
),
'save_method' => 'storeSettingField'
),
'system_phpfpm_aliasconfigdir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['aliasconfigdir'],
'settinggroup' => 'phpfpm',
'varname' => 'aliasconfigdir',
'type' => 'string',
'string_type' => 'confdir',
'default' => '/var/www/php-fpm/',
'save_method' => 'storeSettingField'
),
'system_phpfpm_tmpdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
'settinggroup' => 'phpfpm',
'varname' => 'tmpdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/tmp/',
'save_method' => 'storeSettingField'
),
'system_phpfpm_peardir' => array(
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
'settinggroup' => 'phpfpm',
'varname' => 'peardir',
'type' => 'string',
'string_type' => 'dir',
'string_delimiter' => ':',
'string_emptyallowed' => true,
'default' => '/usr/share/php/:/usr/share/php5/',
'save_method' => 'storeSettingField'
),
'system_phpfpm_envpath' => array(
'label' => $lng['serversettings']['phpfpm_settings']['envpath'],
'settinggroup' => 'phpfpm',
'varname' => 'envpath',
'type' => 'string',
'string_type' => 'dir',
'string_delimiter' => ':',
'string_emptyallowed' => true,
'default' => '/usr/local/bin:/usr/bin:/bin',
'save_method' => 'storeSettingField'
),
'system_phpfpm_fastcgi_ipcdir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['ipcdir'],
'settinggroup' => 'phpfpm',
'varname' => 'fastcgi_ipcdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/lib/apache2/fastcgi/',
'save_method' => 'storeSettingField'
),
'system_phpfpm_use_mod_proxy' => array(
'label' => $lng['phpfpm']['use_mod_proxy'],
'settinggroup' => 'phpfpm',
'varname' => 'use_mod_proxy',
'type' => 'bool',
'default' => true,
'visible' => \Froxlor\Settings::Get('system.apache24'),
'save_method' => 'storeSettingField'
),
'system_phpfpm_ini_flags' => array(
'label' => $lng['phpfpm']['ini_flags'],
'settinggroup' => 'phpfpm',
'varname' => 'ini_flags',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField'
),
'system_phpfpm_ini_values' => array(
'label' => $lng['phpfpm']['ini_values'],
'settinggroup' => 'phpfpm',
'varname' => 'ini_values',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField'
),
'system_phpfpm_ini_admin_flags' => array(
'label' => $lng['phpfpm']['ini_admin_flags'],
'settinggroup' => 'phpfpm',
'varname' => 'ini_admin_flags',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField'
),
'system_phpfpm_ini_admin_values' => array(
'label' => $lng['phpfpm']['ini_admin_values'],
'settinggroup' => 'phpfpm',
'varname' => 'ini_admin_values',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField'
)
)
)
)
);

View File

@@ -12,9 +12,8 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'perl' => array(
@@ -27,8 +26,10 @@ return array(
'type' => 'string',
'default' => '/usr/bin/perl',
'save_method' => 'storeSettingField',
'websrv_avail' => array('lighttpd')
),
'websrv_avail' => array(
'lighttpd'
)
),
'system_perl_suexecworkaround' => array(
'label' => $lng['serversettings']['perl']['suexecworkaround'],
'settinggroup' => 'perl',
@@ -36,8 +37,10 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'websrv_avail' => array(
'apache2'
)
),
'system_perl_suexeccgipath' => array(
'label' => $lng['serversettings']['perl']['suexeccgipath'],
'settinggroup' => 'perl',
@@ -46,8 +49,10 @@ return array(
'string_type' => 'dir',
'default' => '/var/www/cgi-bin/',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'websrv_avail' => array(
'apache2'
)
),
'perl_server' => array(
'label' => $lng['serversettings']['perl_server'],
'settinggroup' => 'serversettings',
@@ -55,11 +60,13 @@ return array(
'type' => 'string',
'default' => 'unix:/var/run/nginx/cgiwrap-dispatch.sock',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
),
),
),
);
'websrv_avail' => array(
'nginx'
)
)
)
)
)
);
?>

View File

@@ -14,9 +14,8 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'statistics' => array(
@@ -29,17 +28,21 @@ return array(
'type' => 'option',
'default' => 2,
'option_mode' => 'one',
'option_options' => array(0 => $lng['admin']['webalizer']['normal'], 1 => $lng['admin']['webalizer']['quiet'], 2 => $lng['admin']['webalizer']['veryquiet']),
'save_method' => 'storeSettingField',
'option_options' => array(
0 => $lng['admin']['webalizer']['normal'],
1 => $lng['admin']['webalizer']['quiet'],
2 => $lng['admin']['webalizer']['veryquiet']
),
'save_method' => 'storeSettingField'
),
'system_awstats_enabled' => array(
'label' => $lng['serversettings']['awstats_enabled'],
'settinggroup' => 'system',
'varname' => 'awstats_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_awstats_path' => array(
'label' => $lng['serversettings']['awstats_path'],
'settinggroup' => 'system',
@@ -47,8 +50,8 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/usr/bin/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_awstats_awstatspath' => array(
'label' => $lng['serversettings']['awstats_awstatspath'],
'settinggroup' => 'system',
@@ -56,8 +59,8 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/usr/bin/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_awstats_conf' => array(
'label' => $lng['serversettings']['awstats_conf'],
'settinggroup' => 'system',
@@ -65,8 +68,8 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/awstats/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_awstats_icons' => array(
'label' => $lng['serversettings']['awstats_icons'],
'settinggroup' => 'system',
@@ -74,11 +77,11 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/usr/share/awstats/icon/',
'save_method' => 'storeSettingField',
)
'save_method' => 'storeSettingField'
)
)
)
);
)
);
?>

View File

@@ -14,9 +14,8 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'mail' => array(
@@ -30,8 +29,8 @@ return array(
'default' => 2000,
'int_min' => 1,
'int_max' => 65535,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_vmail_gid' => array(
'label' => $lng['serversettings']['vmail_gid'],
'settinggroup' => 'system',
@@ -40,8 +39,8 @@ return array(
'default' => 2000,
'int_min' => 1,
'int_max' => 65535,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_vmail_homedir' => array(
'label' => $lng['serversettings']['vmail_homedir'],
'settinggroup' => 'system',
@@ -49,50 +48,107 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/mail/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_vmail_maildirname' => array(
'label' => $lng['serversettings']['vmail_maildirname'],
'settinggroup' => 'system',
'varname' => 'vmail_maildirname',
'type' => 'string',
'string_type' => 'dir',
'default' => 'Maildir',
'string_emptyallowed' => true,
'save_method' => 'storeSettingField'
),
'panel_sendalternativemail' => array(
'label' => $lng['serversettings']['sendalternativemail'],
'settinggroup' => 'panel',
'varname' => 'sendalternativemail',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_mail_quota_enabled' => array(
'label' => $lng['serversettings']['mail_quota_enabled'],
'settinggroup' => 'system',
'varname' => 'mail_quota_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_mail_quota' => array(
'label' => $lng['serversettings']['mail_quota'],
'settinggroup' => 'system',
'varname' => 'mail_quota',
'type' => 'int',
'default' => 100,
'save_method' => 'storeSettingField',
),
'system_autoresponder_enabled' => array(
'label' => $lng['serversettings']['autoresponder_active'],
'settinggroup' => 'autoresponder',
'varname' => 'autoresponder_active',
'type' => 'bool',
'default' => false,
'cronmodule' => 'froxlor/autoresponder',
'save_method' => 'storeSettingField',
),
'system_last_autoresponder_run' => array(
'settinggroup' => 'autoresponder',
'varname' => 'last_autoresponder_run',
'type' => 'hidden',
'default' => 0,
),
'save_method' => 'storeSettingField'
),
),
),
);
'system_catchall_enabled' => array(
'label' => $lng['serversettings']['catchall_enabled'],
'settinggroup' => 'catchall',
'varname' => 'catchall_enabled',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingResetCatchall'
),
'system_mailtraffic_enabled' => array(
'label' => $lng['serversettings']['mailtraffic_enabled'],
'settinggroup' => 'system',
'varname' => 'mailtraffic_enabled',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField'
),
'system_mdaserver' => array(
'label' => $lng['serversettings']['mdaserver'],
'settinggroup' => 'system',
'varname' => 'mdaserver',
'type' => 'option',
'option_mode' => 'one',
'default' => 'dovecot',
'option_options' => array(
'courier' => 'Courier',
'dovecot' => 'Dovecot'
),
'save_method' => 'storeSettingField'
),
'system_mdalog' => array(
'label' => $lng['serversettings']['mdalog'],
'settinggroup' => 'system',
'varname' => 'mdalog',
'type' => 'string',
'string_type' => 'file',
'default' => '/var/log/mail.log',
'string_emptyallowed' => true,
'save_method' => 'storeSettingField'
),
'system_mtaserver' => array(
'label' => $lng['serversettings']['mtaserver'],
'settinggroup' => 'system',
'varname' => 'mtaserver',
'type' => 'option',
'option_mode' => 'one',
'default' => 'postfix',
'option_options' => array(
'exim4' => 'Exim4',
'postfix' => 'Postfix'
),
'save_method' => 'storeSettingField'
),
'system_mtalog' => array(
'label' => $lng['serversettings']['mtalog'],
'settinggroup' => 'system',
'varname' => 'mtalog',
'type' => 'string',
'string_type' => 'file',
'default' => '/var/log/mail.log',
'string_emptyallowed' => true,
'save_method' => 'storeSettingField'
)
)
)
)
);
?>
?>

View File

@@ -14,12 +14,11 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id: 220.ftpserver.php 1 2010-04-07 10:00:00Z monotek $
*
*/
return array(
'groups' => array(
'ftpserver' => array(
'ftpserver' => array(
'title' => $lng['admin']['ftpserversettings'],
'fields' => array(
'ftpserver' => array(
@@ -29,11 +28,14 @@ return array(
'type' => 'option',
'default' => 'proftpd',
'option_mode' => 'one',
'option_options' => array('proftpd' => 'Proftpd', 'pureftpd' => 'Pureftpd'),
'save_method' => 'storeSettingField',
),
),
),
'option_options' => array(
'proftpd' => 'Proftpd',
'pureftpd' => 'Pureftpd'
),
'save_method' => 'storeSettingField'
)
)
)
)
);

View File

@@ -14,14 +14,43 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'nameserver' => array(
'title' => $lng['admin']['nameserversettings'],
'fields' => array(
'nameserver_enable' => array(
'label' => $lng['serversettings']['bindenable'],
'settinggroup' => 'system',
'varname' => 'bind_enable',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_dnsenabled' => array(
'label' => $lng['serversettings']['dnseditorenable'],
'settinggroup' => 'system',
'varname' => 'dnsenabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_dns_server' => array(
'label' => $lng['serversettings']['dns_server'],
'settinggroup' => 'system',
'varname' => 'dns_server',
'type' => 'option',
'default' => 'Bind',
'option_mode' => 'one',
'option_options' => array(
'Bind' => 'Bind9',
'PowerDNS' => 'PowerDNS'
),
'save_method' => 'storeSettingField'
),
'system_bindconf_directory' => array(
'label' => $lng['serversettings']['bindconf_directory'],
'settinggroup' => 'system',
@@ -29,16 +58,16 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/bind/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_bindreload_command' => array(
'label' => $lng['serversettings']['bindreload_command'],
'settinggroup' => 'system',
'varname' => 'bindreload_command',
'type' => 'string',
'default' => '/etc/init.d/bind9 reload',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_nameservers' => array(
'label' => $lng['serversettings']['nameservers'],
'settinggroup' => 'system',
@@ -47,8 +76,8 @@ return array(
'string_regexp' => '/^(([a-z0-9\-\._]+, ?)*[a-z0-9\-\._]+)?$/i',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingFieldInsertBindTask',
),
'save_method' => 'storeSettingFieldInsertBindTask'
),
'system_mxservers' => array(
'label' => $lng['serversettings']['mxservers'],
'settinggroup' => 'system',
@@ -57,8 +86,19 @@ return array(
'string_regexp' => '/^(([0-9]+ [a-z0-9\-\._]+, ?)*[0-9]+ [a-z0-9\-\._]+)?$/i',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_axfrservers' => array(
'label' => $lng['serversettings']['axfrservers'],
'settinggroup' => 'system',
'varname' => 'axfrservers',
'type' => 'string',
'string_type' => 'validate_ip_incl_private',
'string_delimiter' => ',',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
),
'system_dns_createmailentry' => array(
'label' => $lng['serversettings']['mail_also_with_mxservers'],
'settinggroup' => 'system',
@@ -66,7 +106,23 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
),
'system_dns_createcaaentry' => array(
'label' => $lng['serversettings']['caa_entry'],
'settinggroup' => 'system',
'varname' => 'dns_createcaaentry',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField'
),
'caa_caa_entry' => array(
'label' => $lng['serversettings']['caa_entry_custom'],
'settinggroup' => 'caa',
'varname' => 'caa_entry',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField'
),
'system_defaultttl' => array(
'label' => $lng['serversettings']['defaultttl'],
'settinggroup' => 'system',
@@ -75,11 +131,9 @@ return array(
'default' => 604800, /* 1 week */
'int_min' => 3600, /* 1 hour */
'int_max' => 2147483647, /* integer max */
'save_method' => 'storeSettingField',
),
),
),
),
);
?>
'save_method' => 'storeSettingField'
)
)
)
)
);

View File

@@ -14,9 +14,8 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'logging' => array(
@@ -30,7 +29,7 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
),
'logger_severity' => array(
'label' => $lng['serversettings']['logger']['severity'],
'settinggroup' => 'logger',
@@ -38,9 +37,12 @@ return array(
'type' => 'option',
'default' => 1,
'option_mode' => 'one',
'option_options' => array(1 => $lng['admin']['logger']['normal'], 2 => $lng['admin']['logger']['paranoid']),
'save_method' => 'storeSettingField',
'option_options' => array(
1 => $lng['admin']['logger']['normal'],
2 => $lng['admin']['logger']['paranoid']
),
'save_method' => 'storeSettingField'
),
'logger_logtypes' => array(
'label' => $lng['serversettings']['logger']['types'],
'settinggroup' => 'logger',
@@ -48,9 +50,13 @@ return array(
'type' => 'option',
'default' => 'syslog,mysql',
'option_mode' => 'multiple',
'option_options' => array('syslog' => 'syslog', 'file' => 'file', 'mysql' => 'mysql'),
'save_method' => 'storeSettingField',
'option_options' => array(
'syslog' => 'syslog',
'file' => 'file',
'mysql' => 'mysql'
),
'save_method' => 'storeSettingField'
),
'logger_logfile' => array(
'label' => $lng['serversettings']['logger']['logfile'],
'settinggroup' => 'logger',
@@ -59,19 +65,25 @@ return array(
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'logger_log_cron' => array(
'label' => $lng['serversettings']['logger']['logcron'],
'settinggroup' => 'logger',
'varname' => 'log_cron',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'type' => 'option',
'default' => 0,
'option_mode' => 'one',
'option_options' => array(
0 => $lng['serversettings']['logger']['logcronoption']['never'],
1 => $lng['serversettings']['logger']['logcronoption']['once'],
2 => $lng['serversettings']['logger']['logcronoption']['always']
),
),
),
'save_method' => 'storeSettingField'
)
)
)
);
)
);
?>
?>

View File

@@ -13,10 +13,9 @@
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
* @package \Froxlor\Settings
*
*/
return array(
'groups' => array(
'dkim' => array(
@@ -30,7 +29,7 @@ return array(
'default' => false,
'save_method' => 'storeSettingFieldInsertBindTask',
'overview_option' => true
),
),
'dkim_prefix' => array(
'label' => $lng['dkim']['dkim_prefix'],
'settinggroup' => 'dkim',
@@ -38,8 +37,8 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/postfix/dkim/',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'dkim_domains' => array(
'label' => $lng['dkim']['dkim_domains'],
'settinggroup' => 'dkim',
@@ -47,8 +46,8 @@ return array(
'type' => 'string',
'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => 'domains',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'dkim_dkimkeys' => array(
'label' => $lng['dkim']['dkim_dkimkeys'],
'settinggroup' => 'dkim',
@@ -56,8 +55,8 @@ return array(
'type' => 'string',
'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => 'dkim-keys.conf',
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'dkim_algorithm' => array(
'label' => $lng['dkim']['dkim_algorithm'],
'settinggroup' => 'dkim',
@@ -65,9 +64,13 @@ return array(
'type' => 'option',
'default' => 'all',
'option_mode' => 'multiple',
'option_options' => array('all' => 'All', 'sha1' => 'SHA1', 'sha256' => 'SHA256'),
'save_method' => 'storeSettingFieldInsertBindTask',
'option_options' => array(
'all' => 'All',
'sha1' => 'SHA1',
'sha256' => 'SHA256'
),
'save_method' => 'storeSettingFieldInsertBindTask'
),
'dkim_servicetype' => array(
'label' => $lng['dkim']['dkim_servicetype'],
'settinggroup' => 'dkim',
@@ -75,19 +78,28 @@ return array(
'type' => 'option',
'default' => '0',
'option_mode' => 'one',
'option_options' => array('0' => 'All', '1' => 'E-Mail'),
'save_method' => 'storeSettingFieldInsertBindTask',
'option_options' => array(
'0' => 'All',
'1' => 'E-Mail'
),
'save_method' => 'storeSettingFieldInsertBindTask'
),
'dkim_keylength' => array(
'label' => $lng['dkim']['dkim_keylength'],
'label' => array(
'title' => $lng['dkim']['dkim_keylength']['title'],
'description' => sprintf($lng['dkim']['dkim_keylength']['description'], \Froxlor\Settings::Get('dkim.dkim_prefix'))
),
'settinggroup' => 'dkim',
'varname' => 'dkim_keylength',
'type' => 'option',
'default' => '1024',
'option_mode' => 'one',
'option_options' => array('1024' => '1024 Bit', '2048' => '2048 Bit'),
'save_method' => 'storeSettingFieldInsertBindTask',
'option_options' => array(
'1024' => '1024 Bit',
'2048' => '2048 Bit'
),
'save_method' => 'storeSettingFieldInsertBindTask'
),
'dkim_notes' => array(
'label' => $lng['dkim']['dkim_notes'],
'settinggroup' => 'dkim',
@@ -95,37 +107,19 @@ return array(
'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',
),
'save_method' => 'storeSettingFieldInsertBindTask'
),
'dkimrestart_command' => array(
'label' => $lng['dkim']['dkimrestart_command'],
'settinggroup' => 'dkim',
'varname' => 'dkimrestart_command',
'type' => 'string',
'default' => '/etc/init.d/dkim-filter restart',
'save_method' => 'storeSettingField',
),
),
),
),
);
'save_method' => 'storeSettingField'
)
)
)
)
);
?>
?>

View File

@@ -12,9 +12,8 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'spf' => array(
@@ -28,18 +27,18 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
),
'spf_entry' => array(
'label' => $lng['spf']['spf_entry'],
'settinggroup' => 'spf',
'varname' => 'spf_entry',
'type' => 'string',
'default' => '@ IN TXT "v=spf1 a mx -all"',
'default' => '"v=spf1 a mx -all"',
'save_method' => 'storeSettingField'
)
)
)
)
);
)
);
?>

View File

@@ -1,144 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*/
return array(
'groups' => array(
'ticket' => array(
'title' => $lng['admin']['ticketsettings'],
'fields' => array(
'ticket_enabled' => array(
'label' => $lng['serversettings']['ticket']['enable'],
'settinggroup' => 'ticket',
'varname' => 'enabled',
'type' => 'bool',
'default' => false,
'cronmodule' => 'froxlor/ticket',
'save_method' => 'storeSettingField',
'overview_option' => true
),
'ticket_noreply_email' => array(
'label' => $lng['serversettings']['ticket']['noreply_email'],
'settinggroup' => 'ticket',
'varname' => 'noreply_email',
'type' => 'string',
'string_type' => 'mail',
'default' => '',
'save_method' => 'storeSettingField',
),
'ticket_noreply_name' => array(
'label' => $lng['serversettings']['ticket']['noreply_name'],
'settinggroup' => 'ticket',
'varname' => 'noreply_name',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'ticket_reset_cycle' => array(
'label' => $lng['serversettings']['ticket']['reset_cycle'],
'settinggroup' => 'ticket',
'varname' => 'reset_cycle',
'type' => 'option',
'default' => 1,
'option_mode' => 'one',
'option_options' => array(0 => html_entity_decode($lng['admin']['tickets']['daily']), 1 => html_entity_decode($lng['admin']['tickets']['weekly']), 2 => html_entity_decode($lng['admin']['tickets']['monthly']), 3 => html_entity_decode($lng['admin']['tickets']['yearly'])),
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'setCycleOfCronjob',
),
'ticket_concurrently_open' => array(
'label' => $lng['serversettings']['ticket']['concurrentlyopen'],
'settinggroup' => 'ticket',
'varname' => 'concurrently_open',
'type' => 'int',
'default' => 5,
'save_method' => 'storeSettingField',
),
'ticket_archiving_days' => array(
'label' => $lng['serversettings']['ticket']['archiving_days'],
'settinggroup' => 'ticket',
'varname' => 'archiving_days',
'type' => 'int',
'int_min' => 1,
'int_max' => 99,
'default' => 5,
'save_method' => 'storeSettingField',
),
'ticket_worktime_all' => array(
'label' => $lng['serversettings']['ticket']['worktime_all'],
'settinggroup' => 'ticket',
'varname' => 'worktime_all',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'ticket_worktime_begin' => array(
'label' => $lng['serversettings']['ticket']['worktime_begin'],
'settinggroup' => 'ticket',
'varname' => 'worktime_begin',
'type' => 'string',
'string_regexp' => '/^[012][0-9]:[0-6][0-9]$/',
'default' => '',
'save_method' => 'storeSettingField',
),
'ticket_worktime_end' => array(
'label' => $lng['serversettings']['ticket']['worktime_end'],
'settinggroup' => 'ticket',
'varname' => 'worktime_end',
'type' => 'string',
'string_regexp' => '/^[012][0-9]:[0-6][0-9]$/',
'default' => '',
'save_method' => 'storeSettingField',
),
'ticket_worktime_sat' => array(
'label' => $lng['serversettings']['ticket']['worktime_sat'],
'settinggroup' => 'ticket',
'varname' => 'worktime_sat',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'ticket_worktime_sun' => array(
'label' => $lng['serversettings']['ticket']['worktime_sun'],
'settinggroup' => 'ticket',
'varname' => 'worktime_sun',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_last_archive_run' => array(
'settinggroup' => 'system',
'varname' => 'last_archive_run',
'type' => 'hidden',
'default' => '',
),
'ticket_default_priority' => array(
'label' => $lng['serversettings']['ticket']['default_priority'],
'settinggroup' => 'ticket',
'varname' => 'default_priority',
'type' => 'option',
'default' => 2,
'option_mode' => 'one',
'option_options' => array(1 => $lng['ticket']['unf_high'], 2 => $lng['ticket']['unf_normal'], 3 => $lng['ticket']['unf_low']),
'save_method' => 'storeSettingField',
),
),
),
)
);
?>

View File

@@ -1,102 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*/
return array(
'groups' => array(
'aps' => array(
'title' => $lng['admin']['aps'],
'fields' => array(
'aps_enable' => array(
'label' => $lng['aps']['activate_aps'],
'settinggroup' => 'aps',
'varname' => 'aps_active',
'type' => 'bool',
'default' => false,
'cronmodule' => 'froxlor/aps',
'save_method' => 'storeSettingField',
'overview_option' => true
),
'aps_items_per_page' => array(
'label' => $lng['aps']['packages_per_page'],
'settinggroup' => 'aps',
'varname' => 'items_per_page',
'type' => 'int',
'default' => 20,
'save_method' => 'storeSettingField',
),
'aps_upload_fields' => array(
'label' => $lng['aps']['upload_fields'],
'settinggroup' => 'aps',
'varname' => 'upload_fields',
'type' => 'int',
'default' => 5,
'save_method' => 'storeSettingField',
),
'aps_exceptions' => array(
'label' => $lng['aps']['exceptions'],
'type' => 'label',
),
'aps_php-extension' => array(
'label' => $lng['aps']['settings_php_extensions'],
'settinggroup' => 'aps',
'varname' => 'php-extension',
'type' => 'option',
'default' => '',
'option_mode' => 'multiple',
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap', 'json' => 'json', 'ldap' => 'LDAP', 'hash' => 'hash', 'mbstring' => 'mbstring'),
'save_method' => 'storeSettingApsPhpExtensions',
),
'aps_php-function' => array(
'settinggroup' => 'aps',
'varname' => 'php-function',
'type' => 'hidden',
'default' => '',
),
'aps_php-configuration' => array(
'label' => $lng['aps']['settings_php_configuration'],
'settinggroup' => 'aps',
'varname' => 'php-configuration',
'type' => 'option',
'default' => '',
'option_mode' => 'multiple',
'option_options' => array('short_open_tag' => 'short_open_tag', 'file_uploads' => 'file_uploads', 'magic_quotes_gpc' => 'magic_quotes_gpc', 'register_globals' => 'register_globals', 'allow_url_fopen' => 'allow_url_fopen', 'safe_mode' => 'safe_mode', 'post_max_size' => 'post_max_size', 'memory_limit' => 'memory_limit', 'max_execution_time' => 'max_execution_time'),
'save_method' => 'storeSettingField',
),
'aps_webserver-module' => array(
'label' => $lng['aps']['settings_webserver_modules'],
'settinggroup' => 'aps',
'varname' => 'webserver-module',
'type' => 'option',
'default' => '',
'option_mode' => 'multiple',
'option_options' => array('mod_perl' => 'mod_perl', 'mod_rewrite' => 'mod_rewrite', 'mod_access' => 'mod_access', 'fcgid-any' => 'FastCGI/mod_fcgid', 'htaccess' => '.htaccess'),
'save_method' => 'storeSettingApsWebserverModules',
),
'aps_webserver-htaccess' => array(
'settinggroup' => 'aps',
'varname' => 'webserver-htaccess',
'type' => 'hidden',
'default' => '',
),
),
),
),
);
?>

View File

@@ -14,9 +14,8 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'security' => array(
@@ -28,19 +27,63 @@ return array(
'varname' => 'unix_names',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'save_method' => 'storeSettingField'
),
'system_mailpwcleartext' => array(
'label' => $lng['serversettings']['mailpwcleartext'],
'settinggroup' => 'system',
'varname' => 'mailpwcleartext',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'default' => false,
'save_method' => 'storeSettingField'
),
),
),
);
?>
'system_passwordcryptfunc' => array(
'label' => $lng['serversettings']['passwordcryptfunc'],
'settinggroup' => 'system',
'varname' => 'passwordcryptfunc',
'type' => 'option',
'default' => 0,
'option_mode' => 'one',
'option_options_method' => array(
'\\Froxlor\\System\\Crypt',
'getAvailablePasswordHashes'
),
'save_method' => 'storeSettingField'
),
'system_allow_error_report_admin' => array(
'label' => $lng['serversettings']['allow_error_report_admin'],
'settinggroup' => 'system',
'varname' => 'allow_error_report_admin',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_allow_error_report_customer' => array(
'label' => $lng['serversettings']['allow_error_report_customer'],
'settinggroup' => 'system',
'varname' => 'allow_error_report_customer',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_allow_customer_shell' => array(
'label' => $lng['serversettings']['allow_allow_customer_shell'],
'settinggroup' => 'system',
'varname' => 'allow_customer_shell',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_available_shells' => array(
'label' => $lng['serversettings']['available_shells'],
'settinggroup' => 'system',
'varname' => 'available_shells',
'type' => 'string',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
)
)
)
)
);

View File

@@ -1,106 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id: 215.backup.php 1 2010-09-14 08:09:17Z monotek $
*/
return array(
'groups' => array(
'backup' => array(
'title' => $lng['backup'],
'fields' => array(
'backup_enabled' => array(
'label' => $lng['serversettings']['backup_enabled'],
'settinggroup' => 'system',
'varname' => 'backup_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'backup_dir' => array(
'label' => $lng['serversettings']['backupdir']['description'],
'settinggroup' => 'system',
'varname' => 'backup_dir',
'type' => 'string',
'default' => '#froxlor_backup',
'save_method' => 'storeSettingField',
),
'backup_mysqldump_path' => array(
'label' => $lng['serversettings']['mysqldump_path']['description'],
'settinggroup' => 'system',
'varname' => 'backup_mysqldump_path',
'type' => 'string',
'default' => '/usr/bin/mysqldump',
'save_method' => 'storeSettingField',
),
'backup_count' => array(
'label' => $lng['serversettings']['backup_count'],
'settinggroup' => 'system',
'varname' => 'backup_count',
'type' => 'bool',
'default' => 'true',
'save_method' => 'storeSettingField',
'overview_option' => false
),
'backup_bigfile' => array(
'label' => $lng['serversettings']['backup_bigfile'],
'settinggroup' => 'system',
'varname' => 'backup_bigfile',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => false
),
'backup_ftp_enabled_' => array(
'label' => $lng['serversettings']['backup_ftp_enabled'],
'settinggroup' => 'system',
'varname' => 'backup_ftp_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => false
),
'backup_server' => array(
'label' => $lng['serversettings']['backup_ftp_server'],
'settinggroup' => 'system',
'varname' => 'backup_ftp_server',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'backup_user' => array(
'label' => $lng['serversettings']['backup_ftp_user'],
'settinggroup' => 'system',
'varname' => 'backup_ftp_user',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'backup_pass' => array(
'label' => $lng['serversettings']['backup_ftp_pass'],
'settinggroup' => 'system',
'varname' => 'backup_ftp_pass',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
),
),
),
);
?>

View File

@@ -0,0 +1,59 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2011- 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> (2011-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'diskquota' => array(
'title' => $lng['diskquota'],
'fields' => array(
'diskquota_enabled' => array(
'label' => $lng['serversettings']['diskquota_enabled'],
'settinggroup' => 'system',
'varname' => 'diskquota_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'diskquota_repquota_path' => array(
'label' => $lng['serversettings']['diskquota_repquota_path']['description'],
'settinggroup' => 'system',
'varname' => 'diskquota_repquota_path',
'type' => 'string',
'default' => '/usr/sbin/repquota',
'save_method' => 'storeSettingField'
),
'diskquota_quotatool_path' => array(
'label' => $lng['serversettings']['diskquota_quotatool_path']['description'],
'settinggroup' => 'system',
'varname' => 'diskquota_quotatool_path',
'type' => 'string',
'default' => '/usr/bin/quotatool',
'save_method' => 'storeSettingField'
),
'diskquota_customer_partition' => array(
'label' => $lng['serversettings']['diskquota_customer_partition']['description'],
'settinggroup' => 'system',
'varname' => 'diskquota_customer_partition',
'type' => 'string',
'default' => '/dev/root',
'save_method' => 'storeSettingField'
)
)
)
)
);
?>

File diff suppressed because it is too large Load Diff

440
admin_apcuinfo.php Normal file
View File

@@ -0,0 +1,440 @@
<?php
/*
* +----------------------------------------------------------------------+
* | APC |
* +----------------------------------------------------------------------+
* | Copyright (c) 2006-2011 The PHP Group |
* +----------------------------------------------------------------------+
* | This source file is subject to version 3.01 of the PHP license, |
* | that is bundled with this package in the file LICENSE, and is |
* | available through the world-wide-web at the following url: |
* | http://www.php.net/license/3_01.txt |
* | If you did not receive a copy of the PHP license and are unable to |
* | obtain it through the world-wide-web, please send a note to |
* | license@php.net so we can mail you a copy immediately. |
* +----------------------------------------------------------------------+
* | Authors: Ralf Becker <beckerr@php.net> |
* | Rasmus Lerdorf <rasmus@php.net> |
* | Ilia Alshanetsky <ilia@prohost.org> |
* +----------------------------------------------------------------------+
*
* All other licensing and usage conditions are those of the PHP Group.
*
* Based on https://github.com/krakjoe/apcu/blob/master/apc.php
* Implemented into Froxlor: Janos Muzsi <muzsij@hypernics.hu>
*
*/
define('AREA', 'admin');
require './lib/init.php';
$horizontal_bar_size = 950; // 1280px window width
if ($action == 'delete' && function_exists('apcu_clear_cache') && $userinfo['change_serversettings'] == '1') {
apcu_clear_cache();
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "cleared APCu cache");
header('Location: ' . $linker->getLink(array(
'section' => 'apcuinfo',
'page' => 'showinfo'
)));
exit();
}
if (! function_exists('apcu_cache_info') || ! function_exists('apcu_sma_info')) {
\Froxlor\UI\Response::standard_error($lng['error']['no_apcuinfo']);
}
if ($page == 'showinfo') {
$cache = apcu_cache_info();
$mem = apcu_sma_info();
$time = time();
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_apcuinfo");
$passtime = $time - $cache['start_time'] > 0 ? $time - $cache['start_time'] : 1; // zero division
$mem_size = $mem['num_seg'] * $mem['seg_size'];
$mem_avail = $mem['avail_mem'];
$mem_used = $mem_size - $mem_avail;
$seg_size = bsize($mem['seg_size']);
$sharedmem = sprintf($lng['apcuinfo']['sharedmemval'], $mem['num_seg'], $seg_size, $cache['memory_type']);
$req_rate_user = sprintf("%.2f", $cache['num_hits'] ? (($cache['num_hits'] + $cache['num_misses']) / $passtime) : 0);
$hit_rate_user = sprintf("%.2f", $cache['num_hits'] ? (($cache['num_hits']) / $passtime) : 0);
$miss_rate_user = sprintf("%.2f", $cache['num_misses'] ? (($cache['num_misses']) / $passtime) : 0);
$insert_rate_user = sprintf("%.2f", $cache['num_inserts'] ? (($cache['num_inserts']) / $passtime) : 0);
$apcversion = phpversion('apcu');
$phpversion = phpversion();
$number_vars = $cache['num_entries'];
$starttime = date('Y-m-d H:i:s', $cache['start_time']);
$uptime_duration = duration($cache['start_time']);
$size_vars = bsize($cache['mem_size']);
// check for possible empty values that are used in the templates
if (! isset($cache['file_upload_progress'])) {
$cache['file_upload_progress'] = $lng['logger']['unknown'];
}
if (! isset($cache['num_expunges'])) {
$cache['num_expunges'] = $lng['logger']['unknown'];
}
$runtimelines = '';
foreach (ini_get_all('apcu') as $name => $v) {
$value = $v['local_value'];
eval("\$runtimelines.=\"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/runtime_line") . "\";");
}
$freemem = bsize($mem_avail) . sprintf(" (%.1f%%)", $mem_avail * 100 / $mem_size);
$usedmem = bsize($mem_used) . sprintf(" (%.1f%%)", $mem_used * 100 / $mem_size);
$hits = $cache['num_hits'] . @sprintf(" (%.1f%%)", $cache['num_hits'] * 100 / ($cache['num_hits'] + $cache['num_misses']));
$misses = $cache['num_misses'] . @sprintf(" (%.1f%%)", $cache['num_misses'] * 100 / ($cache['num_hits'] + $cache['num_misses']));
// Fragementation: (freeseg - 1) / total_seg
$nseg = $freeseg = $fragsize = $freetotal = 0;
for ($i = 0; $i < $mem['num_seg']; $i ++) {
$ptr = 0;
foreach ($mem['block_lists'][$i] as $block) {
if ($block['offset'] != $ptr) {
++ $nseg;
}
$ptr = $block['offset'] + $block['size'];
/* Only consider blocks <5M for the fragmentation % */
if ($block['size'] < (5 * 1024 * 1024))
$fragsize += $block['size'];
$freetotal += $block['size'];
}
$freeseg += count($mem['block_lists'][$i]);
}
if ($freeseg > 1) {
$frag = sprintf("%.2f%% (%s out of %s in %d fragments)", ($fragsize / $freetotal) * 100, bsize($fragsize), bsize($freetotal), $freeseg);
} else {
$frag = "0%";
}
foreach (ini_get_all('apcu') as $name => $v) {
$value = $v['local_value'];
}
$img_src1 = '';
$img_src2 = '';
$img_src3 = '';
if (graphics_avail()) {
$img_src = $linker->getLink(array(
'section' => 'apcuinfo',
'page' => 'img1',
'action' => mt_rand(0, 1000000)
));
eval("\$img_src1=\"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/img_line") . "\";");
$img_src = $linker->getLink(array(
'section' => 'apcuinfo',
'page' => 'img2',
'action' => mt_rand(0, 1000000)
));
eval("\$img_src2=\"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/img_line") . "\";");
$img_src = $linker->getLink(array(
'section' => 'apcuinfo',
'page' => 'img3',
'action' => mt_rand(0, 1000000)
));
eval("\$img_src3=\"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/img_line") . "\";");
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/apcuinfo/showinfo") . "\";");
} elseif ($page == 'img1') {
$mem = apcu_sma_info();
$size = 460;
$image = imagecreate($size + 5, $size + 5);
$col_white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
$col_red = imagecolorallocate($image, 0xD0, 0x60, 0x30);
$col_green = imagecolorallocate($image, 0x60, 0xF0, 0x60);
$col_black = imagecolorallocate($image, 0, 0, 0);
imagecolortransparent($image, $col_white);
$s = $mem['num_seg'] * $mem['seg_size'];
$a = $mem['avail_mem'];
$x = $y = $size / 2;
$fuzz = 0.000001;
// This block of code creates the pie chart. It is a lot more complex than you
// would expect because we try to visualize any memory fragmentation as well.
$angle_from = 0;
$string_placement = array();
for ($i = 0; $i < $mem['num_seg']; $i ++) {
$ptr = 0;
$free = $mem['block_lists'][$i];
uasort($free, 'block_sort');
foreach ($free as $block) {
if ($block['offset'] != $ptr) { // Used block
$angle_to = $angle_from + ($block['offset'] - $ptr) / $s;
if (($angle_to + $fuzz) > 1)
$angle_to = 1;
if (($angle_to * 360) - ($angle_from * 360) >= 1) {
fill_arc($image, $x, $y, $size, $angle_from * 360, $angle_to * 360, $col_black, $col_red);
if (($angle_to - $angle_from) > 0.05) {
array_push($string_placement, array(
$angle_from,
$angle_to
));
}
}
$angle_from = $angle_to;
}
$angle_to = $angle_from + ($block['size']) / $s;
if (($angle_to + $fuzz) > 1)
$angle_to = 1;
if (($angle_to * 360) - ($angle_from * 360) >= 1) {
fill_arc($image, $x, $y, $size, $angle_from * 360, $angle_to * 360, $col_black, $col_green);
if (($angle_to - $angle_from) > 0.05) {
array_push($string_placement, array(
$angle_from,
$angle_to
));
}
}
$angle_from = $angle_to;
$ptr = $block['offset'] + $block['size'];
}
if ($ptr < $mem['seg_size']) { // memory at the end
$angle_to = $angle_from + ($mem['seg_size'] - $ptr) / $s;
if (($angle_to + $fuzz) > 1)
$angle_to = 1;
fill_arc($image, $x, $y, $size, $angle_from * 360, $angle_to * 360, $col_black, $col_red);
if (($angle_to - $angle_from) > 0.05) {
array_push($string_placement, array(
$angle_from,
$angle_to
));
}
}
}
foreach ($string_placement as $angle) {
text_arc($image, $x, $y, $size, $angle[0] * 360, $angle[1] * 360, $col_black, bsize($s * ($angle[1] - $angle[0])));
}
header("Content-type: image/png");
imagepng($image);
exit();
} elseif ($page == 'img2') {
$cache = apcu_cache_info();
$size = $horizontal_bar_size;
$image = imagecreate($size + 5, 140);
$col_white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
$col_red = imagecolorallocate($image, 0xD0, 0x60, 0x30);
$col_green = imagecolorallocate($image, 0x60, 0xF0, 0x60);
$col_black = imagecolorallocate($image, 0, 0, 0);
imagecolortransparent($image, $col_white);
$s = $cache['num_hits'] + $cache['num_misses'];
$a = $cache['num_hits'];
fill_box($image, 1, 10, $s ? ($a * ($size - 21) / $s) : $size, 50, $col_black, $col_green /* , sprintf("%.1f%%", $s ? $cache['num_hits'] * 100 / $s : 0) */
);
fill_box($image, 1, 80, $s ? max(4, ($s - $a) * ($size - 21) / $s) : $size, 50, $col_black, $col_red /* , sprintf("%.1f%%", $s ? $cache['num_misses'] * 100 / $s : 0) */
);
header("Content-type: image/png");
imagepng($image);
exit();
} elseif ($page == 'img3') {
$mem = apcu_sma_info();
$size = $horizontal_bar_size;
$image = imagecreate($size, 70);
$col_white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
$col_red = imagecolorallocate($image, 0xD0, 0x60, 0x30);
$col_green = imagecolorallocate($image, 0x60, 0xF0, 0x60);
$col_black = imagecolorallocate($image, 0, 0, 0);
imagecolortransparent($image, $col_white);
$s = $mem['num_seg'] * $mem['seg_size'];
$a = $mem['avail_mem'];
$x = 10;
$y = 0;
// This block of code creates the bar chart. It is a lot more complex than you
// would expect because we try to visualize any memory fragmentation as well.
for ($i = 0; $i < $mem['num_seg']; $i ++) {
$ptr = 0;
$free = $mem['block_lists'][$i];
uasort($free, 'block_sort');
foreach ($free as $block) {
if ($block['offset'] != $ptr) { // Used block
$h = ($size - 5) * ($block['offset'] - $ptr) / $s;
if ($h > 0) {
fill_box($image, $y, $x, $h, 50, $col_black, $col_red);
}
$y += $h;
}
$h = ($size - 5) * ($block['size']) / $s;
if ($h > 0) {
fill_box($image, $y, $x, $h, 50, $col_black, $col_green);
}
$y += $h;
$ptr = $block['offset'] + $block['size'];
}
if ($ptr < $mem['seg_size']) { // memory at the end
$h = ($size - 5) * ($mem['seg_size'] - $ptr) / $s;
if ($h > 0) {
fill_box($image, $y, $x, $h, 50, $col_black, $col_red, bsize($mem['seg_size'] - $ptr), $j ++);
}
}
}
header("Content-type: image/png");
imagepng($image);
exit();
}
function graphics_avail()
{
return extension_loaded('gd');
}
// pretty printer for byte values
//
function bsize($s)
{
foreach (array(
'',
'K',
'M',
'G'
) as $i => $k) {
if ($s < 1024)
break;
$s /= 1024;
}
return sprintf("%5.1f %sBytes", $s, $k);
}
function duration($ts)
{
global $time;
$years = (int) ((($time - $ts) / (7 * 86400)) / 52.177457);
$rem = (int) (($time - $ts) - ($years * 52.177457 * 7 * 86400));
$weeks = (int) (($rem) / (7 * 86400));
$days = (int) (($rem) / 86400) - $weeks * 7;
$hours = (int) (($rem) / 3600) - $days * 24 - $weeks * 7 * 24;
$mins = (int) (($rem) / 60) - $hours * 60 - $days * 24 * 60 - $weeks * 7 * 24 * 60;
$str = '';
if ($years == 1)
$str .= "$years year, ";
if ($years > 1)
$str .= "$years years, ";
if ($weeks == 1)
$str .= "$weeks week, ";
if ($weeks > 1)
$str .= "$weeks weeks, ";
if ($days == 1)
$str .= "$days day,";
if ($days > 1)
$str .= "$days days,";
if ($hours == 1)
$str .= " $hours hour and";
if ($hours > 1)
$str .= " $hours hours and";
if ($mins == 1)
$str .= " 1 minute";
else
$str .= " $mins minutes";
return $str;
}
function block_sort($array1, $array2)
{
if ($array1['offset'] > $array2['offset']) {
return 1;
} else {
return - 1;
}
}
function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1, $color2, $text = '', $placeindex = 0)
{
$r = $diameter / 2;
$w = deg2rad((360 + $start + ($end - $start) / 2) % 360);
if (function_exists("imagefilledarc")) {
// exists only if GD 2.0.1 is available
imagefilledarc($im, $centerX + 1, $centerY + 1, $diameter, $diameter, $start, $end, $color1, IMG_ARC_PIE);
imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2, IMG_ARC_PIE);
imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color1, IMG_ARC_NOFILL | IMG_ARC_EDGED);
} else {
imagearc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2);
imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($start)) * $r, $centerY + sin(deg2rad($start)) * $r, $color2);
imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($start + 1)) * $r, $centerY + sin(deg2rad($start)) * $r, $color2);
imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($end - 1)) * $r, $centerY + sin(deg2rad($end)) * $r, $color2);
imageline($im, $centerX, $centerY, $centerX + cos(deg2rad($end)) * $r, $centerY + sin(deg2rad($end)) * $r, $color2);
imagefill($im, $centerX + $r * cos($w) / 2, $centerY + $r * sin($w) / 2, $color2);
}
if ($text) {
if ($placeindex > 0) {
imageline($im, $centerX + $r * cos($w) / 2, $centerY + $r * sin($w) / 2, $diameter, $placeindex * 12, $color1);
imagestring($im, 4, $diameter, $placeindex * 12, $text, $color1);
} else {
imagestring($im, 4, $centerX + $r * cos($w) / 2, $centerY + $r * sin($w) / 2, $text, $color1);
}
}
}
function text_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1, $text, $placeindex = 0)
{
$r = $diameter / 2;
$w = deg2rad((360 + $start + ($end - $start) / 2) % 360);
if ($placeindex > 0) {
imageline($im, $centerX + $r * cos($w) / 2, $centerY + $r * sin($w) / 2, $diameter, $placeindex * 12, $color1);
imagestring($im, 4, $diameter, $placeindex * 12, $text, $color1);
} else {
imagestring($im, 4, $centerX + $r * cos($w) / 2, $centerY + $r * sin($w) / 2, $text, $color1);
}
}
function fill_box($im, $x, $y, $w, $h, $color1, $color2, $text = '', $placeindex = '')
{
global $col_black;
$x1 = $x + $w - 1;
$y1 = $y + $h - 1;
imagerectangle($im, $x, $y1, $x1 + 1, $y + 1, $col_black);
if ($y1 > $y)
imagefilledrectangle($im, $x, $y, $x1, $y1, $color2);
else
imagefilledrectangle($im, $x, $y1, $x1, $y, $color2);
imagerectangle($im, $x, $y1, $x1, $y, $color1);
if ($text) {
if ($placeindex > 0) {
if ($placeindex < 16) {
$px = 5;
$py = $placeindex * 12 + 6;
imagefilledrectangle($im, $px + 90, $py + 3, $px + 90 - 4, $py - 3, $color2);
imageline($im, $x, $y + $h / 2, $px + 90, $py, $color2);
imagestring($im, 2, $px, $py - 6, $text, $color1);
} else {
if ($placeindex < 31) {
$px = $x + 40 * 2;
$py = ($placeindex - 15) * 12 + 6;
} else {
$px = $x + 40 * 2 + 100 * intval(($placeindex - 15) / 15);
$py = ($placeindex % 15) * 12 + 6;
}
imagefilledrectangle($im, $px, $py + 3, $px - 4, $py - 3, $color2);
imageline($im, $x + $w, $y + $h / 2, $px, $py, $color2);
imagestring($im, 2, $px + 2, $py - 6, $text, $color1);
}
} else {
imagestring($im, 4, $x + 5, $y1 - 16, $text, $color1);
}
}
}

View File

@@ -1,34 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*/
// Required code
define('AREA', 'admin');
require ("./lib/init.php");
$Id = 0;
if(isset($_GET['id']))$Id = (int)$_GET['id'];
if(isset($_POST['id']))$Id = (int)$_POST['id'];
eval("echo \"" . getTemplate("aps/header") . "\";");
$Aps = new ApsParser($userinfo, $settings, $db);
$Aps->MainHandler($action);
eval("echo \"" . getTemplate("aps/footer") . "\";");
?>

235
admin_autoupdate.php Normal file
View File

@@ -0,0 +1,235 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2016 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 Michael Kaufmann <mkaufmann@nutime.de>
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Frontend
*
* @since 0.9.35
*
*/
define('AREA', 'admin');
require './lib/init.php';
use Froxlor\Http\HttpClient;
// define update-uri
define('UPDATE_URI', "https://version.froxlor.org/Froxlor/api/" . $version);
define('RELEASE_URI', "https://autoupdate.froxlor.org/froxlor-{version}.zip");
define('CHECKSUM_URI', "https://autoupdate.froxlor.org/froxlor-{version}.zip.sha256");
// check for archive-stuff
if (! extension_loaded('zip')) {
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s,
'page' => 'error',
'errno' => 2
));
}
// 0.10.x requires 7.0 at least
if (version_compare("7.0.0", PHP_VERSION, ">=")) {
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s,
'page' => 'error',
'errno' => 10
));
}
// display initial version check
if ($page == 'overview') {
// log our actions
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "checking auto-update");
// check for new version
try {
$latestversion = HttpClient::urlGet(UPDATE_URI, true, 3);
} catch (\Exception $e) {
\Froxlor\UI\Response::dynamic_error("Version-check currently unavailable, please try again later");
}
$latestversion = explode('|', $latestversion);
if (is_array($latestversion) && count($latestversion) >= 1) {
$_version = $latestversion[0];
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
// add the branding so debian guys are not gettings confused
// about their version-number
$version_label = $_version . $branding;
$version_link = $_link;
$message_addinfo = $_message;
// not numeric -> error-message
if (! preg_match('/^((\d+\\.)(\d+\\.)(\d+\\.)?(\d+)?(\-(svn|dev|rc)(\d+))?)$/', $_version)) {
// check for customized version to not output
// "There is a newer version of froxlor" besides the error-message
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s,
'page' => 'error',
'errno' => 3
));
} elseif (\Froxlor\Froxlor::versionCompare2($version, $_version) == - 1) {
// there is a newer version - yay
$isnewerversion = 1;
} else {
// nothing new
$isnewerversion = 0;
}
// anzeige über version-status mit ggfls. formular
// zum update schritt #1 -> download
if ($isnewerversion == 1) {
$text = 'There is a newer version available. Update to version <b>' . $_version . '</b> now?<br/>(Your current version is: ' . $version . ')';
$hiddenparams = '<input type="hidden" name="newversion" value="' . $_version . '" />';
$yesfile = $filename . '?s=' . $s . '&amp;page=getdownload';
eval("echo \"" . \Froxlor\UI\Template::getTemplate("misc/question_yesno", true) . "\";");
exit();
} elseif ($isnewerversion == 0) {
// all good
\Froxlor\UI\Response::standard_success('noupdatesavail');
} else {
\Froxlor\UI\Response::standard_error('customized_version');
}
}
} // download the new archive
elseif ($page == 'getdownload') {
// retrieve the new version from the form
$newversion = isset($_POST['newversion']) ? $_POST['newversion'] : null;
// valid?
if ($newversion !== null) {
// define files to get
$toLoad = str_replace('{version}', $newversion, RELEASE_URI);
$toCheck = str_replace('{version}', $newversion, CHECKSUM_URI);
// check for local destination folder
if (! is_dir(\Froxlor\Froxlor::getInstallDir() . '/updates/')) {
mkdir(\Froxlor\Froxlor::getInstallDir() . '/updates/');
}
// name archive
$localArchive = \Froxlor\Froxlor::getInstallDir() . '/updates/' . basename($toLoad);
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "Downloading " . $toLoad . " to " . $localArchive);
// remove old archive
if (file_exists($localArchive)) {
@unlink($localArchive);
}
// get archive data
try {
HttpClient::fileGet($toLoad, $localArchive);
} catch (Exception $e) {
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s,
'page' => 'error',
'errno' => 4
));
}
// validate the integrity of the downloaded file
$_shouldsum = HttpClient::urlGet($toCheck);
if (! empty($_shouldsum)) {
$_t = explode(" ", $_shouldsum);
$shouldsum = $_t[0];
} else {
$shouldsum = null;
}
$filesum = hash_file('sha256', $localArchive);
if ($filesum != $shouldsum) {
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s,
'page' => 'error',
'errno' => 9
));
}
// to the next step
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s,
'page' => 'extract',
'archive' => basename($localArchive)
));
}
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s,
'page' => 'error',
'errno' => 6
));
} // extract and install new version
elseif ($page == 'extract') {
$toExtract = isset($_GET['archive']) ? $_GET['archive'] : null;
$localArchive = \Froxlor\Froxlor::getInstallDir() . '/updates/' . $toExtract;
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// decompress from zip
$zip = new ZipArchive();
$res = $zip->open($localArchive);
if ($res === true) {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "Extracting " . $localArchive . " to " . \Froxlor\Froxlor::getInstallDir());
$zip->extractTo(\Froxlor\Froxlor::getInstallDir());
$zip->close();
// success - remove unused archive
@unlink($localArchive);
// wait a bit before we redirect to be sure
sleep(2);
} else {
// error
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s,
'page' => 'error',
'errno' => 8
));
}
// redirect to update-page?
\Froxlor\UI\Response::redirectTo('admin_updates.php', array(
's' => $s
));
}
if (! file_exists($localArchive)) {
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s,
'page' => 'error',
'errno' => 7
));
}
$text = 'Extract downloaded archive "' . $toExtract . '"?';
$hiddenparams = '';
$yesfile = $filename . '?s=' . $s . '&amp;page=extract&amp;archive=' . $toExtract;
eval("echo \"" . \Froxlor\UI\Template::getTemplate("misc/question_yesno", true) . "\";");
} // display error
elseif ($page == 'error') {
// retrieve error-number via url-parameter
$errno = isset($_GET['errno']) ? (int) $_GET['errno'] : 0;
// 2 = no Zlib
// 3 = custom version detected
// 4 = could not store archive to local hdd
// 5 = some weird value came from version.froxlor.org
// 6 = download without valid version
// 7 = local archive does not exist
// 8 = could not extract archive
// 9 = checksum mismatch
// 10 = <php-7.0
\Froxlor\UI\Response::standard_error('autoupdate_' . $errno);
}

View File

@@ -2,7 +2,6 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
@@ -10,174 +9,258 @@
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
* @since 0.9.34
*/
define('AREA', 'admin');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Settings;
$need_db_sql_data = true;
require ("./lib/init.php");
require ("./lib/configfiles_index.inc.php");
$distribution = '';
$distributions_select = '';
$service = '';
$services_select = '';
$daemon = '';
$daemons_select = '';
if ($userinfo['change_serversettings'] == '1') {
if($userinfo['change_serversettings'] == '1')
{
if(isset($_GET['distribution'])
&& $_GET['distribution'] != ''
&& isset($configfiles[$_GET['distribution']])
&& is_array($configfiles[$_GET['distribution']]))
{
$distribution = $_GET['distribution'];
if ($action == 'setconfigured') {
Settings::Set('panel.is_configured', '1', true);
\Froxlor\UI\Response::redirectTo('admin_configfiles.php', array(
's' => $s
));
}
if(isset($_GET['service'])
&& $_GET['service'] != ''
&& isset($configfiles[$distribution]['services'][$_GET['service']])
&& is_array($configfiles[$distribution]['services'][$_GET['service']]))
{
$service = $_GET['service'];
$customer_tmpdir = '/tmp/';
if (Settings::Get('system.mod_fcgid') == '1' && Settings::Get('system.mod_fcgid_tmpdir') != '') {
$customer_tmpdir = Settings::Get('system.mod_fcgid_tmpdir');
} elseif (Settings::Get('phpfpm.enabled') == '1' && Settings::Get('phpfpm.tmpdir') != '') {
$customer_tmpdir = Settings::Get('phpfpm.tmpdir');
}
if(isset($_GET['daemon'])
&& $_GET['daemon'] != ''
&& isset($configfiles[$distribution]['services'][$service]['daemons'][$_GET['daemon']])
&& is_array($configfiles[$distribution]['services'][$service]['daemons'][$_GET['daemon']]))
{
$daemon = $_GET['daemon'];
// try to convert namserver hosts to ip's
$ns_ips = "";
if (Settings::Get('system.nameservers') != '') {
$nameservers = explode(',', Settings::Get('system.nameservers'));
foreach ($nameservers as $nameserver) {
$nameserver = trim($nameserver);
$nameserver_ips = \Froxlor\PhpHelper::gethostbynamel6($nameserver);
if (is_array($nameserver_ips) && count($nameserver_ips) > 0) {
$ns_ips .= implode(",", $nameserver_ips);
}
else
{
foreach($configfiles[$distribution]['services'][$service]['daemons'] as $daemon_name => $daemon_details)
{
$daemons_select.= makeoption($daemon_details['label'], $daemon_name);
}
}
$replace_arr = Array(
'<SQL_UNPRIVILEGED_USER>' => $sql['user'],
'<SQL_UNPRIVILEGED_PASSWORD>' => 'FROXLOR_MYSQL_PASSWORD',
'<SQL_DB>' => $sql['db'],
'<SQL_HOST>' => $sql['host'],
'<SQL_SOCKET>' => isset($sql['socket']) ? $sql['socket'] : null,
'<SERVERNAME>' => Settings::Get('system.hostname'),
'<SERVERIP>' => Settings::Get('system.ipaddress'),
'<NAMESERVERS>' => Settings::Get('system.nameservers'),
'<NAMESERVERS_IP>' => $ns_ips,
'<AXFRSERVERS>' => Settings::Get('system.axfrservers'),
'<VIRTUAL_MAILBOX_BASE>' => Settings::Get('system.vmail_homedir'),
'<VIRTUAL_UID_MAPS>' => Settings::Get('system.vmail_uid'),
'<VIRTUAL_GID_MAPS>' => Settings::Get('system.vmail_gid'),
'<SSLPROTOCOLS>' => (Settings::Get('system.use_ssl') == '1') ? 'imaps pop3s' : '',
'<CUSTOMER_TMP>' => \Froxlor\FileDir::makeCorrectDir($customer_tmpdir),
'<BASE_PATH>' => \Froxlor\FileDir::makeCorrectDir(\Froxlor\Froxlor::getInstallDir()),
'<BIND_CONFIG_PATH>' => \Froxlor\FileDir::makeCorrectDir(Settings::Get('system.bindconf_directory')),
'<WEBSERVER_RELOAD_CMD>' => Settings::Get('system.apachereload_command'),
'<CUSTOMER_LOGS>' => \Froxlor\FileDir::makeCorrectDir(Settings::Get('system.logfiles_directory')),
'<FPM_IPCDIR>' => \Froxlor\FileDir::makeCorrectDir(Settings::Get('phpfpm.fastcgi_ipcdir')),
'<WEBSERVER_GROUP>' => Settings::Get('system.httpgroup')
);
// get distro from URL param
$distribution = (isset($_GET['distribution']) && $_GET['distribution'] != 'choose') ? $_GET['distribution'] : "";
$service = (isset($_GET['service']) && $_GET['service'] != 'choose') ? $_GET['service'] : "";
$daemon = (isset($_GET['daemon']) && $_GET['daemon'] != 'choose') ? $_GET['daemon'] : "";
$distributions_select = "";
$services_select = "";
$daemons_select = "";
$configfiles = "";
$services = "";
$daemons = "";
$config_dir = \Froxlor\FileDir::makeCorrectDir(\Froxlor\Froxlor::getInstallDir() . '/lib/configfiles/');
if ($distribution != "") {
if (! file_exists($config_dir . '/' . $distribution . ".xml")) {
trigger_error("Unknown distribution, are you playing around with the URL?");
exit();
}
// create configparser object
$configfiles = new \Froxlor\Config\ConfigParser($config_dir . '/' . $distribution . ".xml");
// get distro-info
$dist_display = getCompleteDistroName($configfiles);
// get all the services from the distro
$services = $configfiles->getServices();
if ($service != "") {
if (! isset($services[$service])) {
trigger_error("Unknown service, are you playing around with the URL?");
exit();
}
$daemons = $services[$service]->getDaemons();
if ($daemon == "") {
foreach ($daemons as $di => $dd) {
$title = $dd->title;
if ($dd->default) {
$title = $title . " (" . strtolower($lng['panel']['default']) . ")";
}
$daemons_select .= \Froxlor\UI\HTML::makeoption($title, $di);
}
}
}
else
{
foreach($configfiles[$distribution]['services'] as $service_name => $service_details)
{
$services_select.= makeoption($service_details['label'], $service_name);
} else {
foreach ($services as $si => $sd) {
$services_select .= \Froxlor\UI\HTML::makeoption($sd->title, $si);
}
}
}
else
{
foreach($configfiles as $distribution_name => $distribution_details)
{
$distributions_select.= makeoption($distribution_details['label'], $distribution_name);
} else {
// show list of available distro's
$distros = glob($config_dir . '*.xml');
// tmp array
$distributions_select_data = array();
// read in all the distros
foreach ($distros as $_distribution) {
// get configparser object
$dist = new \Froxlor\Config\ConfigParser($_distribution);
// get distro-info
$dist_display = getCompleteDistroName($dist);
// store in tmp array
$distributions_select_data[$dist_display] = str_replace(".xml", "", strtolower(basename($_distribution)));
}
// sort by distribution name
ksort($distributions_select_data);
foreach ($distributions_select_data as $dist_display => $dist_index) {
// create select-box-option
$distributions_select .= \Froxlor\UI\HTML::makeoption($dist_display, $dist_index);
}
}
if($distribution != ''
&& $service != ''
&& $daemon != '')
{
$replace_arr = Array(
'<SQL_UNPRIVILEGED_USER>' => $sql['user'],
'<SQL_UNPRIVILEGED_PASSWORD>' => 'MYSQL_PASSWORD',
'<SQL_DB>' => $sql['db'],
'<SQL_HOST>' => $sql['host'],
'<SERVERNAME>' => $settings['system']['hostname'],
'<SERVERIP>' => $settings['system']['ipaddress'],
'<NAMESERVERS>' => $settings['system']['nameservers'],
'<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'],
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : '/tmp/',
'<BASE_PATH>' => makeCorrectDir(dirname(__FILE__)),
'<BIND_CONFIG_PATH>' => makeCorrectDir($settings['system']['bindconf_directory'])
);
$files = '';
if ($distribution != "" && $service != "" && $daemon != "") {
if (! isset($daemons[$daemon])) {
trigger_error("Unknown daemon, are you playing around with the URL?");
exit();
}
$confarr = $daemons[$daemon]->getConfig();
$configpage = '';
foreach($configfiles[$distribution]['services'][$service]['daemons'][$daemon] as $action => $value)
{
if(substr($action, 0, 8) == 'commands')
{
$distro_editor = $configfiles->distributionEditor;
$commands_pre = "";
$commands_file = "";
$commands_post = "";
$lasttype = '';
$commands = '';
foreach ($confarr as $_action) {
if ($lasttype != '' && $lasttype != $_action['type']) {
$commands = trim($commands);
$numbrows = count(explode("\n", $commands));
eval("\$configpage.=\"" . \Froxlor\UI\Template::getTemplate("configfiles/configfiles_commands") . "\";");
$lasttype = '';
$commands = '';
if(is_array($value))
{
$commands = implode("\n", $value);
$commands = str_replace("\n\n", "\n", $commands);
if($commands != '')
{
eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_commands") . "\";");
}
switch ($_action['type']) {
case "install":
$commands .= strtr($_action['content'], $replace_arr) . "\n";
$lasttype = "install";
break;
case "command":
$commands .= strtr($_action['content'], $replace_arr) . "\n";
$lasttype = "command";
break;
case "file":
if (array_key_exists('content', $_action)) {
$commands_file = getFileContentContainer($_action['content'], $replace_arr, $_action['name'], $distro_editor);
} elseif (array_key_exists('subcommands', $_action)) {
foreach ($_action['subcommands'] as $fileaction) {
if (array_key_exists('execute', $fileaction) && $fileaction['execute'] == "pre") {
$commands_pre .= $fileaction['content'] . "\n";
} elseif (array_key_exists('execute', $fileaction) && $fileaction['execute'] == "post") {
$commands_post .= $fileaction['content'] . "\n";
} elseif ($fileaction['type'] == 'file') {
$commands_file = getFileContentContainer($fileaction['content'], $replace_arr, $_action['name'], $distro_editor);
}
}
}
}
}
elseif(substr($action, 0, 5) == 'files')
{
$files = '';
if(is_array($value))
{
while(list($filename, $realname) = each($value))
{
$file_content = file_get_contents('./templates/misc/configfiles/' . $distribution . '/' . $daemon . '/' . $filename);
$file_content = strtr($file_content, $replace_arr);
$file_content = htmlspecialchars($file_content);
$numbrows = count(explode("\n", $file_content));
eval("\$files.=\"" . getTemplate("configfiles/configfiles_file") . "\";");
$realname = $_action['name'];
$commands = trim($commands_pre);
if ($commands != "") {
$numbrows = count(explode("\n", $commands));
eval("\$commands_pre=\"" . \Froxlor\UI\Template::getTemplate("configfiles/configfiles_commands") . "\";");
}
eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_files") . "\";");
}
$commands = trim($commands_post);
if ($commands != "") {
$numbrows = count(explode("\n", $commands));
eval("\$commands_post=\"" . \Froxlor\UI\Template::getTemplate("configfiles/configfiles_commands") . "\";");
}
eval("\$configpage.=\"" . \Froxlor\UI\Template::getTemplate("configfiles/configfiles_subfileblock") . "\";");
$commands = '';
$commands_pre = '';
$commands_post = '';
break;
}
}
if(isset($configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart'])
&& is_array($configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart']))
{
$restart = implode("\n", $configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart']);
$commands = trim($commands);
if ($commands != '') {
$numbrows = count(explode("\n", $commands));
eval("\$configpage.=\"" . \Froxlor\UI\Template::getTemplate("configfiles/configfiles_commands") . "\";");
}
else
{
$restart = '';
}
eval("echo \"" . getTemplate("configfiles/configfiles") . "\";");
}
elseif($page == 'overview')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_configfiles");
$distributions = '';
foreach($configfiles as $distribution_name => $distribution_details)
{
$services = '';
foreach($distribution_details['services'] as $service_name => $service_details)
{
$daemons = '';
foreach($service_details['daemons'] as $daemon_name => $daemon_details)
{
eval("\$daemons.=\"" . getTemplate("configfiles/choose_daemon") . "\";");
}
eval("\$services.=\"" . getTemplate("configfiles/choose_service") . "\";");
}
eval("\$distributions.=\"" . getTemplate("configfiles/choose_distribution") . "\";");
}
eval("echo \"" . getTemplate("configfiles/choose") . "\";");
}
else
{
eval("echo \"" . getTemplate("configfiles/wizard") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("configfiles/configfiles") . "\";");
} else {
$basedir = \Froxlor\Froxlor::getInstallDir();
eval("echo \"" . \Froxlor\UI\Template::getTemplate("configfiles/wizard") . "\";");
}
} else {
\Froxlor\UI\Response::redirectTo('admin_index.php', array(
's' => $s
));
}
?>
// helper functions
function getFileContentContainer($file_content, &$replace_arr, $realname, $distro_editor)
{
$files = "";
$file_content = trim($file_content);
if ($file_content != '') {
$file_content = strtr($file_content, $replace_arr);
$file_content = htmlspecialchars($file_content);
$numbrows = count(explode("\n", $file_content));
eval("\$files=\"" . \Froxlor\UI\Template::getTemplate("configfiles/configfiles_file") . "\";");
}
return $files;
}
function getCompleteDistroName($cparser)
{
// get distro-info
$dist_display = $cparser->distributionName;
if ($cparser->distributionCodename != '') {
$dist_display .= " " . $cparser->distributionCodename;
}
if ($cparser->distributionVersion != '') {
$dist_display .= " (" . $cparser->distributionVersion . ")";
}
if ($cparser->deprecated) {
$dist_display .= " [deprecated]";
}
return $dist_display;
}

View File

@@ -12,42 +12,35 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id: admin_cronjobs.php 105 2010-12-09 08:02:33Z d00p $
*
*/
define('AREA', 'admin');
require './lib/init.php';
require_once("./lib/init.php");
use Froxlor\Database\Database;
use Froxlor\Api\Commands\Cronjobs as Cronjobs;
if(isset($_POST['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'cronjobs'
|| $page == 'overview')
{
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_cronjobs");
if ($page == 'cronjobs' || $page == 'overview') {
if ($action == '') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'viewed admin_cronjobs');
$fields = array(
'c.lastrun' => $lng['cron']['lastrun'],
'c.interval' => $lng['cron']['interval'],
'c.isactive' => $lng['cron']['isactive']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_CRONRUNS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_PANEL_CRONRUNS, $fields);
/*
* @TODO Fix sorting
*/
$crons = '';
$result = $db->query("SELECT `c`.* FROM `" . TABLE_PANEL_CRONRUNS . "` `c` ORDER BY `cronfile` ASC");
$paging->setEntries($db->num_rows($result));
$result_stmt = Database::prepare("SELECT `c`.* FROM `" . TABLE_PANEL_CRONRUNS . "` `c` ORDER BY `module` ASC, `cronfile` ASC");
Database::pexecute($result_stmt);
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
@@ -55,109 +48,86 @@ if($page == 'cronjobs'
$i = 0;
$count = 0;
$cmod = '';
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($cmod != $row['module']) {
$_mod = explode("/", $row['module']);
$module = ucfirst($_mod[1]);
eval("\$crons.=\"" . \Froxlor\UI\Template::getTemplate('cronjobs/cronjobs_cronjobmodule') . "\";");
$cmod = $row['module'];
}
if ($paging->checkDisplay($i)) {
$row = \Froxlor\PhpHelper::htmlentitiesArray($row);
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
$row = htmlentities_array($row);
$row['lastrun'] = date('d.m.Y H:i', $row['lastrun']);
if((int)$row['isactive'] == 1)
{
$row['isactive'] = $lng['panel']['yes'];
}
else
{
$row['isactive'] = $lng['panel']['no'];
}
$row['isactive'] = ((int) $row['isactive'] == 1) ? $lng['panel']['yes'] : $lng['panel']['no'];
$description = $lng['crondesc'][$row['desc_lng_key']];
eval("\$crons.=\"" . getTemplate("cronjobs/cronjobs_cronjob") . "\";");
$count++;
eval("\$crons.=\"" . \Froxlor\UI\Template::getTemplate('cronjobs/cronjobs_cronjob') . "\";");
$count ++;
}
$i++;
$i ++;
}
eval("echo \"" . getTemplate("cronjobs/cronjobs") . "\";");
}
elseif($action == 'new')
{
eval("echo \"" . \Froxlor\UI\Template::getTemplate('cronjobs/cronjobs') . "\";");
} elseif ($action == 'new') {
/*
* @TODO later
*/
}
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `id`='" . (int)$id . "'");
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;
} elseif ($action == 'edit' && $id != 0) {
try {
$json_result = Cronjobs::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['cronfile'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
Cronjobs::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$interval = $interval_value.' '.strtoupper($interval_interval);
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "`
SET `isactive` = '".(int)$isactive."',
`interval` = '".$interval."'
WHERE `id` = '" . (int)$id . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
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]);
$interval_interval .= \Froxlor\UI\HTML::makeoption($lng['cronmgmt']['minutes'], 'MINUTE', $interval_nfo[1]);
$interval_interval .= \Froxlor\UI\HTML::makeoption($lng['cronmgmt']['hours'], 'HOUR', $interval_nfo[1]);
$interval_interval .= \Froxlor\UI\HTML::makeoption($lng['cronmgmt']['days'], 'DAY', $interval_nfo[1]);
$interval_interval .= \Froxlor\UI\HTML::makeoption($lng['cronmgmt']['weeks'], 'WEEK', $interval_nfo[1]);
$interval_interval .= \Froxlor\UI\HTML::makeoption($lng['cronmgmt']['months'], 'MONTH', $interval_nfo[1]);
// end of interval
$change_cronfile = false;
if (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor')
{
if (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor') {
$change_cronfile = true;
}
$cronjobs_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php';
$cronjobs_edit_form = htmlform::genHTMLForm($cronjobs_edit_data);
$cronjobs_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php';
$cronjobs_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($cronjobs_edit_data);
$title = $cronjobs_edit_data['cronjobs_edit']['title'];
$image = $cronjobs_edit_data['cronjobs_edit']['image'];
eval("echo \"" . getTemplate("cronjobs/cronjob_edit") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('cronjobs/cronjob_edit') . "\";");
}
}
}
elseif($action == 'delete'
&& $id != 0)
{
} elseif ($action == 'delete' && $id != 0) {
/*
* @TODO later
*/
}
}
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -14,188 +14,149 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
use Froxlor\Settings;
use Froxlor\Api\Commands\Froxlor as Froxlor;
use Froxlor\Api\Commands\Admins as Admins;
require ("./lib/init.php");
if ($action == 'logout') {
if($action == 'logout')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "logged out");
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "logged out");
if($settings['session']['allow_multiple_login'] == '1')
{
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['adminid'] . "' AND `adminsession` = '1' AND `hash` = '" . $s . "'");
}
else
{
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['adminid'] . "' AND `adminsession` = '1'");
$params = array(
'adminid' => (int) $userinfo['adminid']
);
if (Settings::Get('session.allow_multiple_login') == '1') {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :adminid
AND `adminsession` = '1'
AND `hash` = :hash");
$params['hash'] = $s;
} else {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :adminid
AND `adminsession` = '1'");
}
Database::pexecute($stmt, $params);
redirectTo('index.php');
exit;
\Froxlor\UI\Response::redirectTo('index.php');
}
if(isset($_POST['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'overview')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_index");
$overview = $db->query_first("SELECT COUNT(*) AS `number_customers`,
if ($page == 'overview') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_index");
$overview_stmt = Database::prepare("SELECT COUNT(*) AS `number_customers`,
SUM(`diskspace_used`) AS `diskspace_used`,
SUM(`mysqls_used`) AS `mysqls_used`,
SUM(`emails_used`) AS `emails_used`,
SUM(`email_accounts_used`) AS `email_accounts_used`,
SUM(`email_forwarders_used`) AS `email_forwarders_used`,
SUM(`email_quota_used`) AS `email_quota_used`,
SUM(`email_autoresponder_used`) AS `email_autoresponder_used`,
SUM(`ftps_used`) AS `ftps_used`,
SUM(`tickets_used`) AS `tickets_used`,
SUM(`subdomains_used`) AS `subdomains_used`,
SUM(`traffic_used`) AS `traffic_used`,
SUM(`aps_packages_used`) AS `aps_packages_used`
FROM `" . TABLE_PANEL_CUSTOMERS . "`" . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' "));
$overview['traffic_used'] = round($overview['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
$overview['diskspace_used'] = round($overview['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
$number_domains = $db->query_first("SELECT COUNT(*) AS `number_domains` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `parentdomainid`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' "));
SUM(`traffic_used`) AS `traffic_used`
FROM `" . TABLE_PANEL_CUSTOMERS . "`" . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = :adminid "));
$overview = Database::pexecute_first($overview_stmt, array(
'adminid' => $userinfo['adminid']
));
$dec_places = Settings::Get('panel.decimal_places');
$overview['traffic_used'] = round($overview['traffic_used'] / (1024 * 1024), $dec_places);
$overview['diskspace_used'] = round($overview['diskspace_used'] / 1024, $dec_places);
$number_domains_stmt = Database::prepare("
SELECT COUNT(*) AS `number_domains` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `parentdomainid`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = :adminid"));
$number_domains = Database::pexecute_first($number_domains_stmt, array(
'adminid' => $userinfo['adminid']
));
$overview['number_domains'] = $number_domains['number_domains'];
$phpversion = phpversion();
$phpmemorylimit = @ini_get("memory_limit");
if($phpmemorylimit == "")
{
$phpmemorylimit = $lng['admin']['memorylimitdisabled'];
}
$mysqlserverversion = mysql_get_server_info();
$mysqlclientversion = mysql_get_client_info();
$mysqlserverversion = Database::getAttribute(PDO::ATTR_SERVER_VERSION);
$webserverinterface = strtoupper(@php_sapi_name());
if((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes')
|| (isset($lookfornewversion) && $lookfornewversion == 'yes'))
{
$update_check_uri = 'http://version.froxlor.org/Froxlor/legacy/' . $version;
if(ini_get('allow_url_fopen'))
{
$latestversion = @file($update_check_uri);
if (isset($latestversion[0]))
{
$latestversion = explode('|', $latestversion[0]);
if(is_array($latestversion)
&& count($latestversion) >= 1)
{
$_version = $latestversion[0];
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
$lookfornewversion_lable = $_version;
$lookfornewversion_link = $_link;
$lookfornewversion_addinfo = $_message;
if (version_compare($version, $_version) == -1) {
$isnewerversion = 1;
} else {
$isnewerversion = 0;
}
}
else
{
redirectTo($update_check_uri.'/pretty', NULL);
}
}
else
{
redirectTo($update_check_uri.'/pretty', NULL);
}
if ((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes') || (isset($lookfornewversion) && $lookfornewversion == 'yes')) {
try {
$json_result = Froxlor::getLocal($userinfo)->checkUpdate();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
else
{
redirectTo($update_check_uri.'/pretty', NULL);
}
}
else
{
$result = json_decode($json_result, true)['data'];
$lookfornewversion_lable = $result['version'];
$lookfornewversion_link = $result['link'];
$lookfornewversion_message = $result['message'];
$lookfornewversion_addinfo = $result['additional_info'];
$isnewerversion = $result['isnewerversion'];
} else {
$lookfornewversion_lable = $lng['admin']['lookfornewversion']['clickhere'];
$lookfornewversion_link = htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
$lookfornewversion_message = '';
$lookfornewversion_addinfo = '';
$isnewerversion = 0;
}
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $settings['panel']['decimal_places']);
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps tickets subdomains aps_packages');
$dec_places = Settings::Get('panel.decimal_places');
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $dec_places);
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $dec_places);
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $dec_places);
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $dec_places);
$userinfo = \Froxlor\PhpHelper::strReplaceArray('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
$cron_last_runs = getCronjobsLastRun();
$outstanding_tasks = getOutstandingTasks();
$userinfo['custom_notes'] = ($userinfo['custom_notes'] != '') ? nl2br($userinfo['custom_notes']) : '';
$opentickets = 0;
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `answerto` = "0" AND (`status` = "0" OR `status` = "1")
AND `lastreplier`="0" AND `adminid` = "' . $userinfo['adminid'] . '"');
$awaitingtickets = $opentickets['count'];
$awaitingtickets_text = '';
$cron_last_runs = \Froxlor\System\Cronjob::getCronjobsLastRun();
$outstanding_tasks = \Froxlor\System\Cronjob::getOutstandingTasks();
if($opentickets > 0)
{
$awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '<a href="admin_tickets.php?page=tickets&amp;s=' . $s . '">' . $opentickets['count'] . '</a>'));
$system_hostname = gethostname();
$meminfo = explode("\n", @file_get_contents("/proc/meminfo"));
$memory = "";
for ($i = 0; $i < sizeof($meminfo); ++ $i) {
if (substr($meminfo[$i], 0, 3) === "Mem") {
$memory .= $meminfo[$i] . PHP_EOL;
}
}
if(function_exists('sys_getloadavg'))
{
if (function_exists('sys_getloadavg')) {
$loadArray = sys_getloadavg();
$load = number_format($loadArray[0], 2, '.', '') . " / " . number_format($loadArray[1], 2, '.', '') . " / " . number_format($loadArray[2], 2, '.', '');
}
else
{
} else {
$load = @file_get_contents('/proc/loadavg');
if(!$load)
{
if (! $load) {
$load = $lng['admin']['noloadavailable'];
}
}
if(function_exists('posix_uname'))
{
if (function_exists('posix_uname')) {
$showkernel = 1;
$kernel_nfo = posix_uname();
$kernel = $kernel_nfo['release'] . ' (' . $kernel_nfo['machine'] . ')';
}
else
{
} else {
$showkernel = 0;
$kernel = '';
}
// Try to get the uptime
// First: With exec (let's hope it's enabled for the Froxlor - vHost)
$uptime_array = explode(" ", @file_get_contents("/proc/uptime"));
if(is_array($uptime_array)
&& isset($uptime_array[0])
&& is_numeric($uptime_array[0]))
{
if (is_array($uptime_array) && isset($uptime_array[0]) && is_numeric($uptime_array[0])) {
// Some calculatioon to get a nicly formatted display
$seconds = round($uptime_array[0], 0);
$minutes = $seconds / 60;
$hours = $minutes / 60;
@@ -206,123 +167,226 @@ if($page == 'overview')
$uptime = "{$days}d, {$hours}h, {$minutes}m, {$seconds}s";
// Just cleanup
unset($uptime_array, $seconds, $minutes, $hours, $days);
}
else
{
} else {
// Nothing of the above worked, show an error :/
$uptime = '';
}
eval("echo \"" . getTemplate("index/index") . "\";");
}
elseif($page == 'change_password')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$old_password = validate($_POST['old_password'], 'old password');
eval("echo \"" . \Froxlor\UI\Template::getTemplate("index/index") . "\";");
} elseif ($page == 'change_password') {
if(md5($old_password) != $userinfo['password'])
{
standard_error('oldpasswordnotcorrect');
exit;
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$old_password = \Froxlor\Validate\Validate::validate($_POST['old_password'], 'old password');
if (! \Froxlor\System\Crypt::validatePasswordLogin($userinfo, $old_password, TABLE_PANEL_ADMINS, 'adminid')) {
\Froxlor\UI\Response::standard_error('oldpasswordnotcorrect');
}
$new_password = validate($_POST['new_password'], 'new password');
$new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm');
$new_password = \Froxlor\Validate\Validate::validate($_POST['new_password'], 'new password');
$new_password_confirm = \Froxlor\Validate\Validate::validate($_POST['new_password_confirm'], 'new password confirm');
if($old_password == '')
{
standard_error(array('stringisempty', 'oldpassword'));
}
elseif($new_password == '')
{
standard_error(array('stringisempty', 'newpassword'));
}
elseif($new_password_confirm == '')
{
standard_error(array('stringisempty', 'newpasswordconfirm'));
}
elseif($new_password != $new_password_confirm)
{
standard_error('newpasswordconfirmerror');
}
else
{
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `password`='" . md5($new_password) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `password`='" . md5($old_password) . "'");
$log->logAction(ADM_ACTION, LOG_NOTICE, 'changed password');
redirectTo($filename, Array('s' => $s));
if ($old_password == '') {
\Froxlor\UI\Response::standard_error(array(
'stringisempty',
'oldpassword'
));
} elseif ($new_password == '') {
\Froxlor\UI\Response::standard_error(array(
'stringisempty',
'newpassword'
));
} elseif ($new_password_confirm == '') {
\Froxlor\UI\Response::standard_error(array(
'stringisempty',
'newpasswordconfirm'
));
} elseif ($new_password != $new_password_confirm) {
\Froxlor\UI\Response::standard_error('newpasswordconfirmerror');
} else {
try {
Admins::getLocal($userinfo, array(
'id' => $userinfo['adminid'],
'admin_password' => $new_password
))->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'changed password');
\Froxlor\UI\Response::redirectTo($filename, Array(
's' => $s
));
}
} else {
eval("echo \"" . \Froxlor\UI\Template::getTemplate("index/change_password") . "\";");
}
else
{
eval("echo \"" . getTemplate("index/change_password") . "\";");
}
}
elseif($page == 'change_language')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$def_language = validate($_POST['def_language'], 'default language');
} elseif ($page == 'change_language') {
if(isset($languages[$def_language]))
{
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `def_language`='" . $db->escape($def_language) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `language`='" . $db->escape($def_language) . "' WHERE `hash`='" . $db->escape($s) . "'");
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$def_language = \Froxlor\Validate\Validate::validate($_POST['def_language'], 'default language');
if (isset($languages[$def_language])) {
try {
Admins::getLocal($userinfo, array(
'id' => $userinfo['adminid'],
'def_language' => $def_language
))->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
// also update current session
$lng_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_SESSIONS . "`
SET `language`= :lng
WHERE `hash`= :hash");
Database::pexecute($lng_stmt, array(
'lng' => $def_language,
'hash' => $s
));
}
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "changed his/her default language to '" . $def_language . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} else {
$log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her default language to '" . $def_language . "'");
redirectTo($filename, Array('s' => $s));
}
else
{
$language_options = '';
$default_lang = $settings['panel']['standardlanguage'];
if($userinfo['def_language'] != '') {
$default_lang = Settings::Get('panel.standardlanguage');
if ($userinfo['def_language'] != '') {
$default_lang = $userinfo['def_language'];
}
while(list($language_file, $language_name) = each($languages))
{
$language_options.= makeoption($language_name, $language_file, $default_lang, true);
foreach ($languages as $language_file => $language_name) {
$language_options .= \Froxlor\UI\HTML::makeoption($language_name, $language_file, $default_lang, true);
}
eval("echo \"" . getTemplate("index/change_language") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("index/change_language") . "\";");
}
}
elseif($page == 'change_theme')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$theme = validate($_POST['theme'], 'theme');
} elseif ($page == 'change_theme') {
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$theme = \Froxlor\Validate\Validate::validate($_POST['theme'], 'theme');
try {
Admins::getLocal($userinfo, array(
'id' => $userinfo['adminid'],
'theme' => $theme
))->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
// also update current session
$theme_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_SESSIONS . "`
SET `theme`= :theme
WHERE `hash`= :hash");
Database::pexecute($theme_stmt, array(
'theme' => $theme,
'hash' => $s
));
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "changed his/her theme to '" . $theme . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} else {
$log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her theme to '" . $theme . "'");
redirectTo($filename, Array('s' => $s));
}
else
{
$theme_options = '';
$default_theme = $settings['panel']['default_theme'];
if($userinfo['theme'] != '') {
$default_theme = Settings::Get('panel.default_theme');
if ($userinfo['theme'] != '') {
$default_theme = $userinfo['theme'];
}
$themes_avail = getThemes();
foreach($themes_avail as $t)
{
$theme_options.= makeoption($t, $t, $default_theme, true);
$themes_avail = \Froxlor\UI\Template::getThemes();
foreach ($themes_avail as $t => $d) {
$theme_options .= \Froxlor\UI\HTML::makeoption($d, $t, $default_theme, true);
}
eval("echo \"" . getTemplate("index/change_theme") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("index/change_theme") . "\";");
}
} elseif ($page == 'send_error_report' && Settings::Get('system.allow_error_report_admin') == '1') {
// only show this if we really have an exception to report
if (isset($_GET['errorid']) && $_GET['errorid'] != '') {
$errid = $_GET['errorid'];
// read error file
$err_dir = \Froxlor\FileDir::makeCorrectDir(\Froxlor\Froxlor::getInstallDir() . "/logs/");
$err_file = \Froxlor\FileDir::makeCorrectFile($err_dir . "/" . $errid . "_sql-error.log");
if (file_exists($err_file)) {
$error_content = file_get_contents($err_file);
$error = explode("|", $error_content);
$_error = array(
'code' => str_replace("\n", "", substr($error[1], 5)),
'message' => str_replace("\n", "", substr($error[2], 4)),
'file' => str_replace("\n", "", substr($error[3], 5 + strlen(\Froxlor\Froxlor::getInstallDir()))),
'line' => str_replace("\n", "", substr($error[4], 5)),
'trace' => str_replace(\Froxlor\Froxlor::getInstallDir(), "", substr($error[5], 6))
);
// build mail-content
$mail_body = "Dear froxlor-team,\n\n";
$mail_body .= "the following error has been reported by a user:\n\n";
$mail_body .= "-------------------------------------------------------------\n";
$mail_body .= $_error['code'] . ' ' . $_error['message'] . "\n\n";
$mail_body .= "File: " . $_error['file'] . ':' . $_error['line'] . "\n\n";
$mail_body .= "Trace:\n" . trim($_error['trace']) . "\n\n";
$mail_body .= "-------------------------------------------------------------\n\n";
$mail_body .= "Froxlor-version: " . $version . "\n";
$mail_body .= "DB-version: " . $dbversion . "\n\n";
$mail_body .= "End of report";
$mail_html = nl2br($mail_body);
// send actual report to dev-team
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// send mail and say thanks
$_mailerror = false;
try {
$mail->Subject = '[Froxlor] Error report by user';
$mail->AltBody = $mail_body;
$mail->MsgHTML($mail_html);
$mail->AddAddress('error-reports@froxlor.org', 'Froxlor Developer Team');
$mail->Send();
} catch (\PHPMailer\PHPMailer\Exception $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
// error when reporting an error...LOLFUQ
\Froxlor\UI\Response::standard_error('send_report_error', $mailerr_msg);
}
// finally remove error from fs
@unlink($err_file);
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
}
// show a nice summary of the error-report
// before actually sending anything
eval("echo \"" . \Froxlor\UI\Template::getTemplate("index/send_error_report") . "\";");
} else {
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
}
} else {
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
}
} elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
require_once __DIR__ . '/api_keys.php';
} elseif ($page == '2fa' && Settings::Get('2fa.enabled') == 1) {
require_once __DIR__ . '/2fa.php';
}

View File

@@ -14,40 +14,40 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
use Froxlor\Settings;
use Froxlor\Api\Commands\IpsAndPorts as IpsAndPorts;
require ("./lib/init.php");
if(isset($_POST['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'ipsandports'
|| $page == 'overview')
{
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_ipsandports");
if ($page == 'ipsandports' || $page == 'overview') {
// Do not display attributes that are not used by the current webserver
$websrv = Settings::Get('system.webserver');
$is_nginx = ($websrv == 'nginx');
$is_apache = ($websrv == 'apache2');
$is_apache24 = $is_apache && (Settings::Get('system.apache24') === '1');
if ($action == '') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_ipsandports");
$fields = array(
'ip' => $lng['admin']['ipsandports']['ip'],
'port' => $lng['admin']['ipsandports']['port']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_IPSANDPORTS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_PANEL_IPSANDPORTS, $fields);
$ipsandports = '';
$result = $db->query("SELECT `id`, `ip`, `port`, `listen_statement`, `namevirtualhost_statement`, `vhostcontainer`, `vhostcontainer_servername_statement`, `specialsettings`, `ssl` FROM `" . TABLE_PANEL_IPSANDPORTS . "` " . $paging->getSqlWhere(false) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` " . $paging->getSqlWhere(false) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
Database::pexecute($result_stmt);
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
@@ -55,365 +55,107 @@ if($page == 'ipsandports'
$i = 0;
$count = 0;
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
$row = htmlentities_array($row);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
{
if ($paging->checkDisplay($i)) {
$row = \Froxlor\PhpHelper::htmlentitiesArray($row);
if (filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
$row['ip'] = '[' . $row['ip'] . ']';
}
eval("\$ipsandports.=\"" . getTemplate("ipsandports/ipsandports_ipandport") . "\";");
$count++;
eval("\$ipsandports.=\"" . \Froxlor\UI\Template::getTemplate("ipsandports/ipsandports_ipandport") . "\";");
$count ++;
}
$i++;
$i ++;
}
eval("echo \"" . getTemplate("ipsandports/ipsandports") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
{
$result = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$id . "'");
if(isset($result['id'])
&& $result['id'] == $id)
{
$result_checkdomain = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `ipandport`='" . (int)$id . "'");
if($result_checkdomain['id'] == '')
{
if($result['id'] != $settings['system']['defaultip'])
{
$result_sameipotherport = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($result['ip']) . "' AND `id`!='" . (int)$id . "'");
if(($result['ip'] != $settings['system']['ipaddress'])
|| ($result['ip'] == $settings['system']['ipaddress'] && $result_sameipotherport['id'] != ''))
{
$result = $db->query_first("SELECT `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$id . "'");
if($result['ip'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$db->query("DELETE FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$id . "'");
$log->logAction(ADM_ACTION, LOG_WARNING, "deleted IP/port '" . $result['ip'] . ":" . $result['port'] . "'");
inserttask('1');
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
ask_yesno('admin_ip_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['ip'] . ':' . $result['port']);
}
}
}
else
{
standard_error('cantdeletesystemip');
}
}
else
{
standard_error('cantdeletedefaultip');
}
}
else
{
standard_error('ipstillhasdomains');
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("ipsandports/ipsandports") . "\";");
} elseif ($action == 'delete' && $id != 0) {
try {
$json_result = IpsAndPorts::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
}
elseif($action == 'add')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$ip = validate_ip($_POST['ip']);
$port = validate($_POST['port'], 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array('stringisempty', 'myport'));
$listen_statement = intval($_POST['listen_statement']);
$namevirtualhost_statement = intval($_POST['namevirtualhost_statement']);
$vhostcontainer = intval($_POST['vhostcontainer']);
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
$docroot = validate($_POST['docroot'], 'docroot');
if((int)$settings['system']['use_ssl'] == 1)
{
$ssl = intval($_POST['ssl']);
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
$result = json_decode($json_result, true)['data'];
if (isset($result['id']) && $result['id'] == $id) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
IpsAndPorts::getLocal($userinfo, array(
'id' => $id
))->delete();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$ssl = 0;
$ssl_cert_file = '';
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
}
if($listen_statement != '1')
{
$listen_statement = '0';
}
if($namevirtualhost_statement != '1')
{
$namevirtualhost_statement = '0';
}
if($vhostcontainer != '1')
{
$vhostcontainer = '0';
}
if($vhostcontainer_servername_statement != '1')
{
$vhostcontainer_servername_statement = '0';
}
if($ssl != '1')
{
$ssl = '0';
}
if($ssl_cert_file != '')
{
$ssl_cert_file = makeCorrectFile($ssl_cert_file);
}
if($ssl_key_file != '')
{
$ssl_key_file = makeCorrectFile($ssl_key_file);
}
if($ssl_ca_file != '')
{
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
}
if($ssl_cert_chainfile != '')
{
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
}
if(strlen(trim($docroot)) > 0)
{
$docroot = makeCorrectDir($docroot);
}
else
{
$docroot = '';
}
$result_checkfordouble = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($ip) . "' AND `port`='" . (int)$port . "'");
if($result_checkfordouble['id'] != '')
{
standard_error('myipnotdouble');
}
else
{
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "`
SET
`ip` = '" . $db->escape($ip) . "',
`port` = '" . (int)$port . "',
`listen_statement` = '" . (int)$listen_statement . "',
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
`vhostcontainer` = '" . (int)$vhostcontainer . "',
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
`specialsettings` = '" . $db->escape($specialsettings) . "',
`ssl` = '" . (int)$ssl . "',
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
`docroot` = '" . $db->escape($docroot) . "';
");
if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
{
$ip = '[' . $ip . ']';
}
$log->logAction(ADM_ACTION, LOG_WARNING, "added IP/port '" . $ip . ":" . $port . "'");
inserttask('1');
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
\Froxlor\UI\HTML::askYesNo('admin_ip_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $result['ip'] . ':' . $result['port']);
}
}
else
{
#$enable_ssl = makeyesno('ssl', '1', '0', '0');
#$listen_statement = makeyesno('listen_statement', '1', '0', '1');
#$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', '1');
#$vhostcontainer = makeyesno('vhostcontainer', '1', '0', '1');
#$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', '1');
} elseif ($action == 'add') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
IpsAndPorts::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$ipsandports_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
$ipsandports_add_form = htmlform::genHTMLForm($ipsandports_add_data);
$ipsandports_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
$ipsandports_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($ipsandports_add_data);
$title = $ipsandports_add_data['ipsandports_add']['title'];
$image = $ipsandports_add_data['ipsandports_add']['image'];
eval("echo \"" . getTemplate("ipsandports/ipsandports_add") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("ipsandports/ipsandports_add") . "\";");
}
}
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$id . "'");
} elseif ($action == 'edit' && $id != 0) {
try {
$json_result = IpsAndPorts::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if($result['ip'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$ip = validate_ip($_POST['ip']);
$port = validate($_POST['port'], 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array('stringisempty', 'myport'));
$result_checkfordouble = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($ip) . "' AND `port`='" . (int)$port . "'");
$result_sameipotherport = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($result['ip']) . "' AND `id`!='" . (int)$id . "'");
$listen_statement = intval($_POST['listen_statement']);
$namevirtualhost_statement = intval($_POST['namevirtualhost_statement']);
$vhostcontainer = intval($_POST['vhostcontainer']);
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
$docroot = validate($_POST['docroot'], 'docroot');
if((int)$settings['system']['use_ssl'] == 1)
{
$ssl = intval($_POST['ssl']);
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
} else {
$ssl = 0;
$ssl_cert_file = '';
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
}
if($listen_statement != '1')
{
$listen_statement = '0';
}
if ($result['ip'] != '') {
if($namevirtualhost_statement != '1')
{
$namevirtualhost_statement = '0';
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
IpsAndPorts::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
if($vhostcontainer != '1')
{
$vhostcontainer = '0';
}
$result = \Froxlor\PhpHelper::htmlentitiesArray($result);
if($vhostcontainer_servername_statement != '1')
{
$vhostcontainer_servername_statement = '0';
}
$ipsandports_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php';
$ipsandports_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($ipsandports_edit_data);
if($ssl != '1')
{
$ssl = '0';
}
if($ssl_cert_file != '')
{
$ssl_cert_file = makeCorrectFile($ssl_cert_file);
}
if($ssl_key_file != '')
{
$ssl_key_file = makeCorrectFile($ssl_key_file);
}
if($ssl_ca_file != '')
{
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
}
if($ssl_cert_chainfile != '')
{
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
}
if(strlen(trim($docroot)) > 0)
{
$docroot = makeCorrectDir($docroot);
}
else
{
$docroot = '';
}
if($result['ip'] != $ip
&& $result['ip'] == $settings['system']['ipaddress']
&& $result_sameipotherport['id'] == '')
{
standard_error('cantchangesystemip');
}
elseif($result_checkfordouble['id'] != ''
&& $result_checkfordouble['id'] != $id)
{
standard_error('myipnotdouble');
}
else
{
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "`
SET
`ip` = '" . $db->escape($ip) . "',
`port` = '" . (int)$port . "',
`listen_statement` = '" . (int)$listen_statement . "',
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
`vhostcontainer` = '" . (int)$vhostcontainer . "',
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
`specialsettings` = '" . $db->escape($specialsettings) . "',
`ssl` = '" . (int)$ssl . "',
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
`docroot` = '" . $db->escape($docroot) . "'
WHERE `id`='" . (int)$id . "'
");
$log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
inserttask('1');
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
#$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
$result = htmlentities_array($result);
#$listen_statement = makeyesno('listen_statement', '1', '0', $result['listen_statement']);
#$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', $result['namevirtualhost_statement']);
#$vhostcontainer = makeyesno('vhostcontainer', '1', '0', $result['vhostcontainer']);
#$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', $result['vhostcontainer_servername_statement']);
$ipsandports_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php';
$ipsandports_edit_form = htmlform::genHTMLForm($ipsandports_edit_data);
$title = $ipsandports_edit_data['ipsandports_edit']['title'];
$image = $ipsandports_edit_data['ipsandports_edit']['image'];
eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("ipsandports/ipsandports_edit") . "\";");
}
}
}
}
?>

View File

@@ -14,57 +14,44 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
require ("./lib/init.php");
if($page == 'log'
&& $userinfo['change_serversettings'] == '1')
{
if($action == '')
{
if ($page == 'log' && $userinfo['change_serversettings'] == '1') {
if ($action == '') {
$fields = array(
'date' => $lng['logger']['date'],
'type' => $lng['logger']['type'],
'user' => $lng['logger']['user'],
'text' => $lng['logger']['action']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_LOG, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'date';
$paging->sortorder = 'desc';
$result = $db->query('SELECT * FROM `' . TABLE_PANEL_LOG . '` ' . $paging->getSqlWhere(false) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_PANEL_LOG, $fields, null, null, 0, 'desc', 30);
$query = 'SELECT * FROM `' . TABLE_PANEL_LOG . '` ' . $paging->getSqlWhere(false) . ' ' . $paging->getSqlOrderBy();
$result_stmt = Database::query($query . ' ' . $paging->getSqlLimit());
$result_cnt_stmt = Database::query($query);
$logs_count = $result_cnt_stmt->rowCount();
$paging->setEntries($logs_count);
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$clog = array();
while($row = $db->fetch_array($result))
{
if(!isset($clog[$row['action']])
|| !is_array($clog[$row['action']]))
{
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if (! isset($clog[$row['action']]) || ! is_array($clog[$row['action']])) {
$clog[$row['action']] = array();
}
$clog[$row['action']][$row['logid']] = $row;
}
if($paging->sortfield == 'date'
&& $paging->sortorder == 'desc')
{
if ($paging->sortfield == 'date' && $paging->sortorder == 'desc') {
krsort($clog);
}
else
{
} else {
ksort($clog);
}
@@ -72,98 +59,73 @@ if($page == 'log'
$count = 0;
$log_count = 0;
$log = '';
foreach($clog as $action => $logrows)
{
foreach ($clog as $action => $logrows) {
$_action = 0;
foreach($logrows as $row)
{
if($paging->checkDisplay($i))
{
$row = htmlentities_array($row);
$row['date'] = date("d.m.y H:i:s", $row['date']);
foreach ($logrows as $row) {
// if ($paging->checkDisplay($i)) {
$row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$row['date'] = date("d.m.y H:i:s", $row['date']);
if($_action != $action)
{
switch($action)
{
case USR_ACTION:
$_action = $lng['admin']['customer'];
break;
case RES_ACTION:
$_action = 'Reseller';
break;
case ADM_ACTION:
$_action = 'Administrator';
break;
case CRON_ACTION:
$_action = 'Cronjob';
break;
case LOG_ERROR:
$_action = 'Internal';
break;
default:
$_action = 'Unknown';
break;
}
$row['action'] = $_action;
eval("\$log.=\"" . getTemplate("logger/logger_action") . "\";");
}
$log_count++;
$type = $row['type'];
$_type = 'unknown';
switch($type)
{
case LOG_INFO:
$_type = 'Information';
if ($_action != $action) {
switch ($action) {
case \Froxlor\FroxlorLogger::USR_ACTION:
$_action = $lng['admin']['customer'];
break;
case LOG_NOTICE:
$_type = 'Notice';
case \Froxlor\FroxlorLogger::RES_ACTION:
$_action = $lng['logger']['reseller'];
break;
case LOG_WARNING:
$_type = 'Warning';
case \Froxlor\FroxlorLogger::ADM_ACTION:
$_action = $lng['logger']['admin'];
break;
case LOG_ERR:
$_type = 'Error';
case \Froxlor\FroxlorLogger::CRON_ACTION:
$_action = $lng['logger']['cron'];
break;
case LOG_CRIT:
$_type = 'Critical';
case \Froxlor\FroxlorLogger::LOGIN_ACTION:
$_action = $lng['logger']['login'];
break;
case \Froxlor\FroxlorLogger::LOG_ERROR:
$_action = $lng['logger']['intern'];
break;
default:
$_type = 'Unknown';
$_action = $lng['logger']['unknown'];
break;
}
$row['type'] = $_type;
eval("\$log.=\"" . getTemplate("logger/logger_log") . "\";");
$count++;
$_action = $action;
$row['action'] = $_action;
eval("\$log.=\"" . \Froxlor\UI\Template::getTemplate('logger/logger_action') . "\";");
}
$log_count ++;
$row['type'] = \Froxlor\FroxlorLogger::getInstanceOf()->getLogLevelDesc($row['type']);
eval("\$log.=\"" . \Froxlor\UI\Template::getTemplate('logger/logger_log') . "\";");
$count ++;
$_action = $action;
// }
$i ++;
}
$i++;
$i ++;
}
eval("echo \"" . getTemplate("logger/logger") . "\";");
}
elseif($action == 'truncate')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$yesterday = time() - (60 * 10);
eval("echo \"" . \Froxlor\UI\Template::getTemplate('logger/logger') . "\";");
} elseif ($action == 'truncate') {
/* (60*60*24); */
$db->query("DELETE FROM `" . TABLE_PANEL_LOG . "` WHERE `date` < '" . $yesterday . "'");
$log->logAction(ADM_ACTION, LOG_WARNING, "truncated the system-log (mysql)");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
ask_yesno('logger_reallytruncate', $filename, array('page' => $page, 'action' => $action), TABLE_PANEL_LOG);
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$truncatedate = time() - (60 * 10);
$trunc_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_LOG . "` WHERE `date` < :trunc");
Database::pexecute($trunc_stmt, array(
'trunc' => $truncatedate
));
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, 'truncated the system-log (mysql)');
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNo('logger_reallytruncate', $filename, array(
'page' => $page,
'action' => $action
), TABLE_PANEL_LOG);
}
}
}

View File

@@ -14,135 +14,114 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
require ("./lib/init.php");
if(isset($_POST['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'message')
{
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed panel_message");
if ($page == 'message') {
if ($action == '') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'viewed panel_message');
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if($_POST['receipient'] == 0
&& $userinfo['customers_see_all'] == '1')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to admins");
$result = $db->query('SELECT `name`, `email` FROM `' . TABLE_PANEL_ADMINS . "`");
}
elseif($_POST['receipient'] == 1)
{
if($userinfo['customers_see_all'] == "1")
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to ALL customers");
$result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`");
if (isset($_POST['send']) && $_POST['send'] == 'send') {
if ($_POST['receipient'] == 0 && $userinfo['customers_see_all'] == '1') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'sending messages to admins');
$result = Database::query('SELECT `name`, `email` FROM `' . TABLE_PANEL_ADMINS . "`");
} elseif ($_POST['receipient'] == 1) {
if ($userinfo['customers_see_all'] == '1') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'sending messages to ALL customers');
$result = Database::query('SELECT `firstname`, `name`, `company`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`");
} else {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'sending messages to customers');
$result = Database::prepare('
SELECT `firstname`, `name`, `company`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`
WHERE `adminid` = :adminid");
Database::pexecute($result, array(
'adminid' => $userinfo['adminid']
));
}
else
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to customers");
$result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "` WHERE `adminid`='" . $userinfo['adminid'] . "'");
}
}
else
{
standard_error('noreceipientsgiven');
} else {
\Froxlor\UI\Response::standard_error('noreceipientsgiven');
}
$subject = $_POST['subject'];
$message = wordwrap($_POST['message'], 70);
if(!empty($message))
{
if (! empty($message)) {
$mailcounter = 0;
$mail->Body = $message;
$mail->Subject = $subject;
while($row = $db->fetch_array($result))
{
$mail->AddAddress($row['email'], (isset($row['firstname']) ? $row['firstname'] . ' ' : '') . $row['name']);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$row['firstname'] = isset($row['firstname']) ? $row['firstname'] : '';
$row['company'] = isset($row['company']) ? $row['company'] : '';
$mail->AddAddress($row['email'], \Froxlor\User::getCorrectUserSalutation(array(
'firstname' => $row['firstname'],
'name' => $row['name'],
'company' => $row['company']
)));
$mail->From = $userinfo['email'];
$mail->FromName = (isset($userinfo['firstname']) ? $userinfo['firstname'] . ' ' : '') . $userinfo['name'];
if(!$mail->Send())
{
if($mail->ErrorInfo != '')
{
if (! $mail->Send()) {
if ($mail->ErrorInfo != '') {
$mailerr_msg = $mail->ErrorInfo;
}
else
{
$mailerr_msg = $row["email"];
} else {
$mailerr_msg = $row['email'];
}
$log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $row["email"]);
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_ERR, 'Error sending mail: ' . $mailerr_msg);
\Froxlor\UI\Response::standard_error('errorsendingmail', $row['email']);
}
$mailcounter++;
$mailcounter ++;
$mail->ClearAddresses();
}
redirectTo($filename, Array('page' => $page, 's' => $s, 'action' => 'showsuccess', 'sentitems' => $mailcounter));
}
else
{
standard_error('nomessagetosend');
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s,
'action' => 'showsuccess',
'sentitems' => $mailcounter
));
} else {
\Froxlor\UI\Response::standard_error('nomessagetosend');
}
}
}
if($action == 'showsuccess')
{
$success = 1;
$sentitems = isset($_GET['sentitems']) ? (int)$_GET['sentitems'] : 0;
if ($action == 'showsuccess') {
if($sentitems == 0)
{
$success = 1;
$sentitems = isset($_GET['sentitems']) ? (int) $_GET['sentitems'] : 0;
if ($sentitems == 0) {
$successmessage = $lng['message']['noreceipients'];
}
else
{
} else {
$successmessage = str_replace('%s', $sentitems, $lng['message']['success']);
}
$action = '';
}
else
{
} else {
$success = 0;
$sentitems = 0;
$successmessage = '';
$action = '';
}
$action = '';
$receipients = '';
if($userinfo['customers_see_all'] == "1")
{
$receipients.= makeoption($lng['panel']['reseller'], 0);
if ($userinfo['customers_see_all'] == '1') {
$receipients .= \Froxlor\UI\HTML::makeoption($lng['panel']['reseller'], 0);
}
$receipients.= makeoption($lng['panel']['customer'], 1);
eval("echo \"" . getTemplate("message/message") . "\";");
$receipients .= \Froxlor\UI\HTML::makeoption($lng['panel']['customer'], 1);
eval("echo \"" . \Froxlor\UI\Template::getTemplate('message/message') . "\";");
}
?>

156
admin_opcacheinfo.php Normal file
View File

@@ -0,0 +1,156 @@
<?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 Janos Muzsi <muzsij@hypernics.hu> (2016)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
*
* Based on https://github.com/amnuts/opcache-gui
*
*/
define('AREA', 'admin');
require './lib/init.php';
if ($action == 'reset' && function_exists('opcache_reset') && $userinfo['change_serversettings'] == '1') {
opcache_reset();
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "reseted OPcache");
header('Location: ' . $linker->getLink(array(
'section' => 'opcacheinfo',
'page' => 'showinfo'
)));
exit();
}
if (! function_exists('opcache_get_configuration')) {
\Froxlor\UI\Response::standard_error($lng['error']['no_opcacheinfo']);
}
if ($page == 'showinfo') {
$opcache_info = opcache_get_configuration();
$opcache_status = opcache_get_status(false);
$time = time();
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed OPcache info");
$runtimelines = '';
if (isset($opcache_info['directives']) && is_array($opcache_info['directives'])) {
foreach ($opcache_info['directives'] as $name => $value) {
$linkname = str_replace('_', '-', $name);
if ($name == 'opcache.optimization_level' && is_integer($value)) {
$value = '0x' . dechex($value);
}
if ($name == 'opcache.memory_consumption' && is_integer($value) && $value % (1024 * 1024) == 0) {
$value = $value / (1024 * 1024);
}
if ($value === null || $value === '') {
$value = $lng['opcacheinfo']['novalue'];
}
if ($value === true) {
$value = $lng['opcacheinfo']['true'];
}
if ($value === false) {
$value = $lng['opcacheinfo']['false'];
}
if (is_integer($value)) {
$value = number_format($value, 0, '.', ' ');
}
$name = str_replace('_', ' ', $name);
eval("\$runtimelines.=\"" . \Froxlor\UI\Template::getTemplate("settings/opcacheinfo/runtime_line") . "\";");
}
}
$cachehits = @$opcache_status['opcache_statistics']['hits'] ?: 0;
$cachemiss = @$opcache_status['opcache_statistics']['misses'] ?: 0;
$blacklistmiss = @$opcache_status['opcache_statistics']['blacklist_misses'] ?: 0;
$cachetotal = $cachehits + $cachemiss + $blacklistmiss;
$general = array(
'version' => (isset($opcache_info['version']['opcache_product_name']) ? $opcache_info['version']['opcache_product_name'] . ' ' : '') . $opcache_info['version']['version'],
'phpversion' => phpversion(),
'start_time' => @$opcache_status['opcache_statistics']['start_time'] ? date('Y-m-d H:i:s', $opcache_status['opcache_statistics']['start_time']) : '',
'last_restart_time' => @$opcache_status['opcache_statistics']['last_restart_time'] ? date('Y-m-d H:i:s', $opcache_status['opcache_statistics']['last_restart_time']) : $lng['opcacheinfo']['never'],
'oom_restarts' => number_format(@$opcache_status['opcache_statistics']['oom_restarts'] ?: 0, 0, '.', ' '),
'hash_restarts' => number_format(@$opcache_status['opcache_statistics']['hash_restarts'] ?: 0, 0, '.', ' '),
'manual_restarts' => number_format(@$opcache_status['opcache_statistics']['manual_restarts'] ?: 0, 0, '.', ' '),
'status' => (@$opcache_status['restart_in_progress'] ? $lng['opcacheinfo']['restartinprogress'] : (@$opcache_status['restart_pending'] ? $lng['opcacheinfo']['restartpending'] : (@$opcache_status['cache_full'] ? $lng['opcacheinfo']['cachefull'] : (@$opcache_status['opcache_enabled'] ? $lng['opcacheinfo']['enabled'] : $lng['opcacheinfo']['novalue'])))),
'cachedscripts' => number_format(@$opcache_status['opcache_statistics']['num_cached_scripts'] ?: 0, 0, '.', ' '),
'cachehits' => number_format($cachehits, 0, '.', ' ') . ($cachetotal > 0 ? sprintf(" (%.1f %%)", $cachehits / ($cachetotal) * 100) : ''),
'cachemiss' => number_format($cachemiss, 0, '.', ' ') . ($cachetotal > 0 ? sprintf(" (%.1f %%)", $cachemiss / ($cachetotal) * 100) : ''),
'blacklistmiss' => number_format($blacklistmiss, 0, '.', ' ') . ($cachetotal > 0 ? sprintf(" (%.1f %%)", $blacklistmiss / ($cachetotal) * 100) : '')
);
$usedmem = @$opcache_status['memory_usage']['used_memory'] ?: 0;
$usedmemstr = bsize($usedmem);
$freemem = @$opcache_status['memory_usage']['free_memory'] ?: 0;
$freememstr = bsize($freemem);
$totalmem = $usedmem + $freemem;
$wastedmem = @$opcache_status['memory_usage']['wasted_memory'] ?: 0;
$wastedmemstr = bsize($wastedmem);
if ($totalmem) {
$memory = array(
'total' => bsize($totalmem),
'used' => $usedmemstr . ($totalmem > 0 ? sprintf(" (%.1f %%)", $usedmem / ($totalmem) * 100) : ''),
'free' => $freememstr . ($totalmem > 0 ? sprintf(" (%.1f %%)", $freemem / ($totalmem) * 100) : ''),
'wasted' => $wastedmemstr . ($totalmem > 0 ? sprintf(" (%.1f %%)", $wastedmem / ($totalmem) * 100) : '')
);
}
if (isset($opcache_status['interned_strings_usage'])) {
$usedstring = @$opcache_status['interned_strings_usage']['used_memory'] ?: 0;
$usedstringstr = bsize($usedstring);
$freestring = @$opcache_status['interned_strings_usage']['free_memory'] ?: 0;
$freestringstr = bsize($freestring);
$totalstring = $usedstring + $freestring;
$stringbuffer = array(
'total' => bsize($totalstring),
'used' => $usedstringstr . ($totalstring > 0 ? sprintf(" (%.1f %%)", $usedstring / $totalstring * 100) : ''),
'free' => $freestringstr . ($totalstring > 0 ? sprintf(" (%.1f %%)", $freestring / $totalstring * 100) : ''),
'strcount' => number_format(@$opcache_status['interned_strings_usage']['number_of_strings'] ?: 0, 0, '.', ' ')
);
}
$usedkey = @$opcache_status['opcache_statistics']['num_cached_keys'] ?: 0;
$usedkeystr = number_format($usedkey, 0, '.', ' ');
$totalkey = @$opcache_status['opcache_statistics']['max_cached_keys'] ?: 0;
$wastedkey = $usedkey - (@$opcache_status['opcache_statistics']['num_cached_scripts'] ?: 0);
if (isset($opcache_status['opcache_statistics'])) {
$keystat = array(
'total' => number_format($totalkey, 0, '.', ' '),
'used' => $usedkeystr . ($totalkey > 0 ? sprintf(" (%.1f %%)", $usedkey / ($totalkey) * 100) : ''),
'wasted' => number_format($wastedkey, 0, '.', ' ') . ($totalkey > 0 ? sprintf(" (%.1f %%)", $wastedkey / ($totalkey) * 100) : '')
);
}
$blacklistlines = '';
if (isset($opcache_info['blacklist']) && is_array($opcache_info['blacklist'])) {
foreach ($opcache_info['blacklist'] as $value) {
eval("\$blacklistlines.=\"" . \Froxlor\UI\Template::getTemplate("settings/opcacheinfo/blacklist_line") . "\";");
}
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/opcacheinfo/showinfo") . "\";");
}
function bsize($s)
{
foreach (array(
'',
'K',
'M',
'G'
) as $i => $k) {
if ($s < 1024)
break;
$s /= 1024;
}
return sprintf("%5.1f %sBytes", $s, $k);
}

View File

@@ -14,187 +14,321 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
use Froxlor\Api\Commands\PhpSettings as PhpSettings;
use Froxlor\Api\Commands\FpmDaemons as FpmDaemons;
require ("./lib/init.php");
if(isset($_POST['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'overview')
{
if($action == '')
{
if ($page == 'overview') {
if ($action == '') {
try {
$json_result = PhpSettings::getLocal($userinfo, array(
'with_subdomains' => true
))->listing();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
$tablecontent = '';
$count = 0;
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
while($row = $db->fetch_array($result))
{
$domainresult = false;
if((int)$userinfo['domains_see_all'] == 0)
{
$domainresult = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `adminid` = " . (int)$userinfo['userid'] . " AND `phpsettingid` = " . (int)$row['id']);
}
else
{
$domainresult = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `phpsettingid` = " . (int)$row['id']);
}
$domains = '';
if($db->num_rows($domainresult) > 0)
{
while($row2 = $db->fetch_array($domainresult))
{
$domains.= $row2['domain'] . '<br/>';
if (isset($result['count']) && $result['count'] > 0) {
foreach ($result['list'] as $row) {
if (isset($row['is_default']) && $row['is_default'] == true) {
$row['description'] = "<b>" . $row['description'] . "</b>";
}
$domains = "";
$subdomains_count = count($row['subdomains']);
foreach ($row['domains'] as $configdomain) {
$domains .= $configdomain . "<br>";
}
$count ++;
if ($subdomains_count == 0 && empty($domains)) {
$domains = $lng['admin']['phpsettings']['notused'];
}
eval("\$tablecontent.=\"" . \Froxlor\UI\Template::getTemplate("phpconfig/overview_overview") . "\";");
}
else
{
$domains = $lng['admin']['phpsettings']['notused'];
}
$count ++;
eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";");
}
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting overview has been viewed by '" . $userinfo['loginname'] . "'");
eval("echo \"" . getTemplate("phpconfig/overview") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("phpconfig/overview") . "\";");
}
if($action == 'add')
{
if((int)$userinfo['change_serversettings'] == 1)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$description = validate($_POST['description'], 'description');
$binary = makeCorrectFile(validate($_POST['binary'], 'binary'));
$file_extensions = validate($_POST['file_extensions'], 'file_extensions', '/^[a-zA-Z0-9\s]*$/');
$phpsettings = validate(str_replace("\r\n", "\n", $_POST['phpsettings']), 'phpsettings', '/^[^\0]*$/');
$mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', ''));
$mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', ''));
if ($action == 'add') {
if(strlen($description) == 0
|| strlen($description) > 50)
{
standard_error('descriptioninvalid');
if ((int) $userinfo['change_serversettings'] == 1) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
PhpSettings::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$fpmconfigs = '';
$configs = Database::query("SELECT * FROM `" . TABLE_PANEL_FPMDAEMONS . "` ORDER BY `description` ASC");
while ($row = $configs->fetch(PDO::FETCH_ASSOC)) {
$fpmconfigs .= \Froxlor\UI\HTML::makeoption($row['description'], $row['id'], 1, true, true);
}
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "'");
inserttask('1');
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been created by '" . $userinfo['loginname'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
$pm_select = \Froxlor\UI\HTML::makeoption('static', 'static', 'static', true, true);
$pm_select .= \Froxlor\UI\HTML::makeoption('dynamic', 'dynamic', 'static', true, true);
$pm_select .= \Froxlor\UI\HTML::makeoption('ondemand', 'ondemand', 'static', true, true);
$phpconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
$phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data);
$phpconfig_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
$phpconfig_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($phpconfig_add_data);
$title = $phpconfig_add_data['phpconfig_add']['title'];
$image = $phpconfig_add_data['phpconfig_add']['image'];
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("phpconfig/overview_add") . "\";");
}
}
else
{
standard_error('nopermissionsorinvalidid');
} else {
\Froxlor\UI\Response::standard_error('nopermissionsorinvalidid');
}
}
if($action == 'delete')
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$id);
if ($action == 'delete') {
if($result['id'] != 0
&& $result['id'] == $id
&& (int)$userinfo['change_serversettings'] == 1
&& $id != 1)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `phpsettingid` = 1 WHERE `phpsettingid` = " . (int)$id);
$db->query("DELETE FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$id);
inserttask('1');
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with id #" . (int)$id . " has been deleted by '" . $userinfo['loginname'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
ask_yesno('phpsetting_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['description']);
}
try {
$json_result = PhpSettings::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
else
$result = json_decode($json_result, true)['data'];
if ($result['id'] != 0 && $result['id'] == $id && (int) $userinfo['change_serversettings'] == 1 && $id != 1) // cannot delete the default php.config
{
standard_error('nopermissionsorinvalidid');
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
PhpSettings::getLocal($userinfo, array(
'id' => $id
))->delete();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNo('phpsetting_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $result['description']);
}
} else {
\Froxlor\UI\Response::standard_error('nopermissionsorinvalidid');
}
}
if($action == 'edit')
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$id);
if ($action == 'edit') {
if($result['id'] != 0
&& $result['id'] == $id
&& (int)$userinfo['change_serversettings'] == 1)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$description = validate($_POST['description'], 'description');
$binary = makeCorrectFile(validate($_POST['binary'], 'binary'));
$file_extensions = validate($_POST['file_extensions'], 'file_extensions', '/^[a-zA-Z0-9\s]*$/');
$phpsettings = validate(str_replace("\r\n", "\n", $_POST['phpsettings']), 'phpsettings', '/^[^\0]*$/');
$mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', ''));
$mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', ''));
try {
$json_result = PhpSettings::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if(strlen($description) == 0
|| strlen($description) > 50)
{
standard_error('descriptioninvalid');
if ($result['id'] != 0 && $result['id'] == $id && (int) $userinfo['change_serversettings'] == 1) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
PhpSettings::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$fpmconfigs = '';
$configs = Database::query("SELECT * FROM `" . TABLE_PANEL_FPMDAEMONS . "` ORDER BY `description` ASC");
while ($row = $configs->fetch(PDO::FETCH_ASSOC)) {
$fpmconfigs .= \Froxlor\UI\HTML::makeoption($row['description'], $row['id'], $result['fpmsettingid'], true, true);
}
$db->query("UPDATE `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "' WHERE `id` = " . (int)$id);
inserttask('1');
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been changed by '" . $userinfo['loginname'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$phpconfig_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php';
$phpconfig_edit_form = htmlform::genHTMLForm($phpconfig_edit_data);
$pm_select = \Froxlor\UI\HTML::makeoption('static', 'static', $result['pm'], true, true);
$pm_select .= \Froxlor\UI\HTML::makeoption('dynamic', 'dynamic', $result['pm'], true, true);
$pm_select .= \Froxlor\UI\HTML::makeoption('ondemand', 'ondemand', $result['pm'], true, true);
$phpconfig_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php';
$phpconfig_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($phpconfig_edit_data);
$title = $phpconfig_edit_data['phpconfig_edit']['title'];
$image = $phpconfig_edit_data['phpconfig_edit']['image'];
eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("phpconfig/overview_edit") . "\";");
}
} else {
\Froxlor\UI\Response::standard_error('nopermissionsorinvalidid');
}
}
} elseif ($page == 'fpmdaemons') {
if ($action == '') {
try {
$json_result = FpmDaemons::getLocal($userinfo)->listing();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
$tablecontent = '';
$count = 0;
if (isset($result['count']) && $result['count'] > 0) {
foreach ($result['list'] as $row) {
$configs = "";
foreach ($row['configs'] as $configused) {
$configs .= $configused . "<br>";
}
$count ++;
eval("\$tablecontent.=\"" . \Froxlor\UI\Template::getTemplate("phpconfig/fpmdaemons_overview") . "\";");
}
}
else
eval("echo \"" . \Froxlor\UI\Template::getTemplate("phpconfig/fpmdaemons") . "\";");
}
if ($action == 'add') {
if ((int) $userinfo['change_serversettings'] == 1) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
FpmDaemons::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$pm_select = \Froxlor\UI\HTML::makeoption('static', 'static', 'static', true, true);
$pm_select .= \Froxlor\UI\HTML::makeoption('dynamic', 'dynamic', 'static', true, true);
$pm_select .= \Froxlor\UI\HTML::makeoption('ondemand', 'ondemand', 'static', true, true);
$fpmconfig_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.fpmconfig_add.php';
$fpmconfig_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($fpmconfig_add_data);
$title = $fpmconfig_add_data['fpmconfig_add']['title'];
$image = $fpmconfig_add_data['fpmconfig_add']['image'];
eval("echo \"" . \Froxlor\UI\Template::getTemplate("phpconfig/fpmconfig_add") . "\";");
}
} else {
\Froxlor\UI\Response::standard_error('nopermissionsorinvalidid');
}
}
if ($action == 'delete') {
try {
$json_result = FpmDaemons::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($id == 1) {
\Froxlor\UI\Response::standard_error('cannotdeletedefaultphpconfig');
}
if ($result['id'] != 0 && $result['id'] == $id && (int) $userinfo['change_serversettings'] == 1 && $id != 1) // cannot delete the default php.config
{
standard_error('nopermissionsorinvalidid');
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
FpmDaemons::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNo('fpmsetting_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $result['description']);
}
} else {
\Froxlor\UI\Response::standard_error('nopermissionsorinvalidid');
}
}
if ($action == 'edit') {
try {
$json_result = FpmDaemons::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['id'] != 0 && $result['id'] == $id && (int) $userinfo['change_serversettings'] == 1) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
FpmDaemons::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$pm_select = \Froxlor\UI\HTML::makeoption('static', 'static', $result['pm'], true, true);
$pm_select .= \Froxlor\UI\HTML::makeoption('dynamic', 'dynamic', $result['pm'], true, true);
$pm_select .= \Froxlor\UI\HTML::makeoption('ondemand', 'ondemand', $result['pm'], true, true);
$fpmconfig_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.fpmconfig_edit.php';
$fpmconfig_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($fpmconfig_edit_data);
$title = $fpmconfig_edit_data['fpmconfig_edit']['title'];
$image = $fpmconfig_edit_data['fpmconfig_edit']['image'];
eval("echo \"" . \Froxlor\UI\Template::getTemplate("phpconfig/fpmconfig_edit") . "\";");
}
} else {
\Froxlor\UI\Response::standard_error('nopermissionsorinvalidid');
}
}
}
?>

325
admin_plans.php Normal file
View File

@@ -0,0 +1,325 @@
<?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 Panel
*
*/
define('AREA', 'admin');
require './lib/init.php';
use Froxlor\Api\Commands\HostingPlans;
use Froxlor\Database\Database;
use Froxlor\Settings;
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if ($page == '' || $page == 'overview') {
if ($action == '') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_plans");
$fields = array(
'p.name' => $lng['admin']['plans']['name'],
'p.description' => $lng['admin']['plans']['description'],
'adminname' => $lng['admin']['admin'],
'p.ts' => $lng['admin']['plans']['last_update']
);
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_PANEL_PLANS, $fields);
$plans = '';
$result_stmt = Database::prepare("
SELECT p.*, a.loginname as adminname
FROM `" . TABLE_PANEL_PLANS . "` p, `" . TABLE_PANEL_ADMINS . "` a
WHERE " . ($userinfo['customers_see_all'] ? '' : " `p`.`adminid` = :adminid AND ") . "
`p`.`adminid` = `a`.`adminid` " . $paging->getSqlWhere(false) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid']
));
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
$row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$row['ts_format'] = date("d.m.Y H:i", $row['ts']);
eval("\$plans.=\"" . \Froxlor\UI\Template::getTemplate("plans/plans_plan") . "\";");
$count ++;
}
$i ++;
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("plans/plans") . "\";");
} elseif ($action == 'delete' && $id != 0) {
try {
$json_result = HostingPlans::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['id'] != 0 && $result['id'] == $id && (int) $userinfo['adminid'] == $result['adminid']) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
HostingPlans::getLocal($userinfo, array(
'id' => $id
))->delete();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNo('plan_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $result['name']);
}
} else {
\Froxlor\UI\Response::standard_error('nopermissionsorinvalidid');
}
} elseif ($action == 'add') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
HostingPlans::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$diskspace_ul = \Froxlor\UI\HTML::makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$traffic_ul = \Froxlor\UI\HTML::makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$subdomains_ul = \Froxlor\UI\HTML::makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$emails_ul = \Froxlor\UI\HTML::makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_accounts_ul = \Froxlor\UI\HTML::makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_forwarders_ul = \Froxlor\UI\HTML::makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_quota_ul = \Froxlor\UI\HTML::makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$ftps_ul = \Froxlor\UI\HTML::makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$mysqls_ul = \Froxlor\UI\HTML::makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$phpconfigs = array();
$configs = Database::query("
SELECT c.*, fc.description as interpreter
FROM `" . TABLE_PANEL_PHPCONFIGS . "` c
LEFT JOIN `" . TABLE_PANEL_FPMDAEMONS . "` fc ON fc.id = c.fpmsettingid
");
while ($row = $configs->fetch(PDO::FETCH_ASSOC)) {
if ((int) Settings::Get('phpfpm.enabled') == 1) {
$phpconfigs[] = array(
'label' => $row['description'] . " [" . $row['interpreter'] . "]<br />",
'value' => $row['id']
);
} else {
$phpconfigs[] = array(
'label' => $row['description'] . "<br />",
'value' => $row['id']
);
}
}
// dummy to avoid unknown variables
$language_options = null;
$gender_options = null;
$hosting_plans = null;
$plans_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/plans/formfield.plans_add.php';
$cust_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/customer/formfield.customer_add.php';
// unset unneeded stuff
unset($cust_add_data['customer_add']['sections']['section_a']);
unset($cust_add_data['customer_add']['sections']['section_b']);
unset($cust_add_data['customer_add']['sections']['section_cpre']);
// merge
$plans_add_data['plans_add']['sections'] = array_merge($plans_add_data['plans_add']['sections'], $cust_add_data['customer_add']['sections']);
$plans_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($plans_add_data);
$title = $plans_add_data['plans_add']['title'];
$image = $plans_add_data['plans_add']['image'];
eval("echo \"" . \Froxlor\UI\Template::getTemplate("plans/plans_add") . "\";");
}
} elseif ($action == 'edit' && $id != 0) {
try {
$json_result = HostingPlans::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['name'] != '') {
$result['value'] = json_decode($result['value'], true);
$result = \Froxlor\PhpHelper::htmlentitiesArray($result);
foreach ($result['value'] as $index => $value) {
$result[$index] = $value;
}
$result['allowed_phpconfigs'] = json_encode($result['allowed_phpconfigs']);
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
HostingPlans::getLocal($userinfo, array(
'id' => $id
))->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$diskspace_ul = \Froxlor\UI\HTML::makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, $result['diskspace'], true, true);
if ($result['diskspace'] == '-1') {
$result['diskspace'] = '';
}
$traffic_ul = \Froxlor\UI\HTML::makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, $result['traffic'], true, true);
if ($result['traffic'] == '-1') {
$result['traffic'] = '';
}
$subdomains_ul = \Froxlor\UI\HTML::makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, $result['subdomains'], true, true);
if ($result['subdomains'] == '-1') {
$result['subdomains'] = '';
}
$emails_ul = \Froxlor\UI\HTML::makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, $result['emails'], true, true);
if ($result['emails'] == '-1') {
$result['emails'] = '';
}
$email_accounts_ul = \Froxlor\UI\HTML::makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, $result['email_accounts'], true, true);
if ($result['email_accounts'] == '-1') {
$result['email_accounts'] = '';
}
$email_forwarders_ul = \Froxlor\UI\HTML::makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, $result['email_forwarders'], true, true);
if ($result['email_forwarders'] == '-1') {
$result['email_forwarders'] = '';
}
$email_quota_ul = \Froxlor\UI\HTML::makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, $result['email_quota'], true, true);
if ($result['email_quota'] == '-1') {
$result['email_quota'] = '';
}
$ftps_ul = \Froxlor\UI\HTML::makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
if ($result['ftps'] == '-1') {
$result['ftps'] = '';
}
$mysqls_ul = \Froxlor\UI\HTML::makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, $result['mysqls'], true, true);
if ($result['mysqls'] == '-1') {
$result['mysqls'] = '';
}
$phpconfigs = array();
$configs = Database::query("
SELECT c.*, fc.description as interpreter
FROM `" . TABLE_PANEL_PHPCONFIGS . "` c
LEFT JOIN `" . TABLE_PANEL_FPMDAEMONS . "` fc ON fc.id = c.fpmsettingid
");
while ($row = $configs->fetch(PDO::FETCH_ASSOC)) {
if ((int) Settings::Get('phpfpm.enabled') == 1) {
$phpconfigs[] = array(
'label' => $row['description'] . " [" . $row['interpreter'] . "]<br />",
'value' => $row['id']
);
} else {
$phpconfigs[] = array(
'label' => $row['description'] . "<br />",
'value' => $row['id']
);
}
}
$result['imap'] = $result['email_imap'];
$result['pop3'] = $result['email_pop3'];
// dummy to avoid unknown variables
$result['loginname'] = null;
$result['documentroot'] = null;
$result['standardsubdomain'] = null;
$result['deactivated'] = null;
$language_options = null;
$result['firstname'] = null;
$gender_options = null;
$result['company'] = null;
$result['street'] = null;
$result['zipcode'] = null;
$result['city'] = null;
$result['phone'] = null;
$result['fax'] = null;
$result['email'] = null;
$result['customernumber'] = null;
$result['custom_notes'] = null;
$result['custom_notes_show'] = null;
$hosting_plans = null;
$admin_select_cnt = null;
$admin_select = null;
$plans_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/plans/formfield.plans_edit.php';
$cust_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/customer/formfield.customer_edit.php';
// unset unneeded stuff
unset($cust_edit_data['customer_edit']['sections']['section_a']);
unset($cust_edit_data['customer_edit']['sections']['section_b']);
unset($cust_edit_data['customer_edit']['sections']['section_cpre']);
// merge
$plans_edit_data['plans_edit']['sections'] = array_merge($plans_edit_data['plans_edit']['sections'], $cust_edit_data['customer_edit']['sections']);
$plans_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($plans_edit_data);
$title = $plans_edit_data['plans_edit']['title'];
$image = $plans_edit_data['plans_edit']['image'];
eval("echo \"" . \Froxlor\UI\Template::getTemplate("plans/plans_edit") . "\";");
}
}
} elseif ($action == 'jqGetPlanValues') {
$planid = isset($_POST['planid']) ? (int) $_POST['planid'] : 0;
try {
$json_result = HostingPlans::getLocal($userinfo, array(
'id' => $planid
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
echo $result['value'];
exit();
}
}

View File

@@ -14,210 +14,371 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
use Froxlor\Database\Database;
use Froxlor\Settings;
use Froxlor\Api\Commands\Froxlor;
define('AREA', 'admin');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
// get sql-root access data
Database::needRoot(true);
Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
$need_db_sql_data = true;
$need_root_db_sql_data = true;
require ("./lib/init.php");
if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
$settings_data = \Froxlor\PhpHelper::loadConfigArrayDir('./actions/admin/settings/');
Settings::loadSettingsInto($settings_data);
if (isset($_POST['send']) && $_POST['send'] == 'send') {
if(($page == 'settings' || $page == 'overview')
&& $userinfo['change_serversettings'] == '1')
{
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
$settings = loadSettings($settings_data, $db);
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$_part = isset($_GET['part']) ? $_GET['part'] : '';
if($_part == '')
{
if ($_part == '') {
$_part = isset($_POST['part']) ? $_POST['part'] : '';
}
if($_part != '')
{
if($_part == 'all')
{
if ($_part != '') {
if ($_part == 'all') {
$settings_all = true;
$settings_part = false;
}
else
{
} else {
$settings_all = false;
$settings_part = true;
}
$only_enabledisable = false;
}
else
{
} 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
)
) {
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
inserttask('1');
inserttask('4');
inserttask('5');
inserttask('9');
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
// check if the session timeout is too low #815
if (isset($_POST['session_sessiontimeout']) && $_POST['session_sessiontimeout'] < 60) {
\Froxlor\UI\Response::standard_error($lng['error']['session_timeout'], $lng['error']['session_timeout_desc']);
}
}
else
{
if (\Froxlor\UI\Form::processFormEx($settings_data, $_POST, array(
'filename' => $filename,
'action' => $action,
'page' => $page
), $_part, $settings_all, $settings_part, $only_enabledisable)) {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
\Froxlor\System\Cronjob::inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
\Froxlor\System\Cronjob::inserttask('4');
// cron.d file
\Froxlor\System\Cronjob::inserttask('99');
\Froxlor\UI\Response::standard_success('settingssaved', '', array(
'filename' => $filename,
'action' => $action,
'page' => $page
));
}
} else {
$_part = isset($_GET['part']) ? $_GET['part'] : '';
if($_part == '')
{
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") . "\";");
$fields = \Froxlor\UI\Form::buildFormEx($settings_data, $_part);
$settings_page = '';
if ($_part == '') {
eval("\$settings_page .= \"" . \Froxlor\UI\Template::getTemplate("settings/settings_overview") . "\";");
} else {
eval("\$settings_page .= \"" . \Froxlor\UI\Template::getTemplate("settings/settings") . "\";");
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/settings_form_begin") . "\";");
eval("echo \$settings_page;");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/settings_form_end") . "\";");
}
}
elseif($page == 'rebuildconfigs'
&& $userinfo['change_serversettings'] == '1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles");
inserttask('1');
inserttask('4');
inserttask('5');
inserttask('9');
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
} elseif ($page == 'phpinfo' && $userinfo['change_serversettings'] == '1') {
ob_start();
phpinfo();
$phpinfo = array(
'phpinfo' => array()
);
if (preg_match_all('#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s', ob_get_clean(), $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
$end = array_keys($phpinfo);
$end = end($end);
if (strlen($match[1])) {
$phpinfo[$match[1]] = array();
} elseif (isset($match[3])) {
$phpinfo[$end][$match[2]] = isset($match[4]) ? array(
$match[3],
$match[4]
) : $match[3];
} else {
$phpinfo[$end][] = $match[2];
}
}
$phpinfohtml = '';
foreach ($phpinfo as $name => $section) {
$phpinfoentries = "";
foreach ($section as $key => $val) {
if (is_array($val)) {
eval("\$phpinfoentries .= \"" . \Froxlor\UI\Template::getTemplate("settings/phpinfo/phpinfo_3") . "\";");
} elseif (is_string($key)) {
eval("\$phpinfoentries .= \"" . \Froxlor\UI\Template::getTemplate("settings/phpinfo/phpinfo_2") . "\";");
} else {
eval("\$phpinfoentries .= \"" . \Froxlor\UI\Template::getTemplate("settings/phpinfo/phpinfo_1") . "\";");
}
}
// first header -> show actual php version
if (strtolower($name) == "phpinfo") {
$name = "PHP " . PHP_VERSION;
}
eval("\$phpinfohtml .= \"" . \Froxlor\UI\Template::getTemplate("settings/phpinfo/phpinfo_table") . "\";");
}
$phpinfo = $phpinfohtml;
} else {
\Froxlor\UI\Response::standard_error($lng['error']['no_phpinfo']);
}
else
{
ask_yesno('admin_configs_reallyrebuild', $filename, array('page' => $page));
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/phpinfo") . "\";");
} elseif ($page == 'rebuildconfigs' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "rebuild configfiles");
\Froxlor\System\Cronjob::inserttask('1');
\Froxlor\System\Cronjob::inserttask('10');
// Using nameserver, insert a task which rebuilds the server config
\Froxlor\System\Cronjob::inserttask('4');
// cron.d file
\Froxlor\System\Cronjob::inserttask('99');
\Froxlor\UI\Response::standard_success('rebuildingconfigs', '', array(
'filename' => 'admin_index.php'
));
} else {
\Froxlor\UI\HTML::askYesNo('admin_configs_reallyrebuild', $filename, array(
'page' => $page
));
}
}
elseif($page == 'updatecounters'
&& $userinfo['change_serversettings'] == '1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$log->logAction(ADM_ACTION, LOG_INFO, "updated resource-counters");
$updatecounters = updateCounters(true);
} elseif ($page == 'updatecounters' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "updated resource-counters");
$updatecounters = \Froxlor\User::updateCounters(true);
$customers = '';
foreach($updatecounters['customers'] as $customerid => $customer)
{
eval("\$customers.=\"" . getTemplate("settings/updatecounters_row_customer") . "\";");
foreach ($updatecounters['customers'] as $customerid => $customer) {
eval("\$customers.=\"" . \Froxlor\UI\Template::getTemplate("settings/updatecounters_row_customer") . "\";");
}
$admins = '';
foreach($updatecounters['admins'] as $adminid => $admin)
{
eval("\$admins.=\"" . getTemplate("settings/updatecounters_row_admin") . "\";");
foreach ($updatecounters['admins'] as $adminid => $admin) {
eval("\$admins.=\"" . \Froxlor\UI\Template::getTemplate("settings/updatecounters_row_admin") . "\";");
}
eval("echo \"" . getTemplate("settings/updatecounters") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/updatecounters") . "\";");
} else {
\Froxlor\UI\HTML::askYesNo('admin_counters_reallyupdate', $filename, array(
'page' => $page
));
}
else
{
ask_yesno('admin_counters_reallyupdate', $filename, array('page' => $page));
} elseif ($page == 'wipecleartextmailpws' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "wiped all cleartext mail passwords");
Database::query("UPDATE `" . TABLE_MAIL_USERS . "` SET `password` = '';");
Database::query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '0' WHERE `settinggroup` = 'system' AND `varname` = 'mailpwcleartext'");
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNo('admin_cleartextmailpws_reallywipe', $filename, array(
'page' => $page
));
}
}
elseif($page == 'wipecleartextmailpws'
&& $userinfo['change_serversettings'] == '1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$log->logAction(ADM_ACTION, LOG_WARNING, "wiped all cleartext mail passwords");
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `password`='' ");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='0' WHERE `settinggroup`='system' AND `varname`='mailpwcleartext'");
redirectTo('admin_settings.php', array('s' => $s));
}
else
{
ask_yesno('admin_cleartextmailpws_reallywipe', $filename, array('page' => $page));
}
}
elseif($page == 'wipequotas'
&& $userinfo['change_serversettings'] == '1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$log->logAction(ADM_ACTION, LOG_WARNING, "wiped all mailquotas");
} elseif ($page == 'wipequotas' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, "wiped all mailquotas");
// Set the quota to 0 which means unlimited
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `quota`='0' ");
$db->query("UPDATE " . TABLE_PANEL_CUSTOMERS . " SET `email_quota_used` = 0");
redirectTo('admin_settings.php', array('s' => $s));
Database::query("UPDATE `" . TABLE_MAIL_USERS . "` SET `quota` = '0';");
Database::query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_quota_used` = '0'");
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNo('admin_quotas_reallywipe', $filename, array(
'page' => $page
));
}
else
{
ask_yesno('admin_quotas_reallywipe', $filename, array('page' => $page));
}
}
elseif($page == 'enforcequotas'
&& $userinfo['change_serversettings'] == '1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
} elseif ($page == 'enforcequotas' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// Fetch all accounts
$result_stmt = Database::query("SELECT `quota`, `customerid` FROM `" . TABLE_MAIL_USERS . "`");
$result = $db->query("SELECT `quota`, `customerid` FROM " . TABLE_MAIL_USERS);
if (Database::num_rows() > 0) {
while($array = $db->fetch_array($result))
{
$difference = $settings['system']['mail_quota'] - $array['quota'];
$db->query("UPDATE " . TABLE_PANEL_CUSTOMERS . " SET `email_quota_used` = `email_quota_used` + " . (int)$difference . " WHERE `customerid` = '" . $array['customerid'] . "'");
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
`email_quota_used` = `email_quota_used` + :diff
WHERE `customerid` = :customerid
");
while ($array = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$difference = Settings::Get('system.mail_quota') - $array['quota'];
Database::pexecute($upd_stmt, array(
'diff' => $difference,
'customerid' => $customerid
));
}
}
// Set the new quota
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `quota`='" . $settings['system']['mail_quota'] . "'");
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_MAIL_USERS . "` SET `quota` = :quota
");
Database::pexecute($upd_stmt, array(
'quota' => Settings::Get('system.mail_quota')
));
// Update the Customer, if the used quota is bigger than the allowed quota
Database::query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_quota` = `email_quota_used` WHERE `email_quota` < `email_quota_used`");
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_WARNING, 'enforcing mailquota to all customers: ' . Settings::Get('system.mail_quota') . ' MB');
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNo('admin_quotas_reallyenforce', $filename, array(
'page' => $page
));
}
} elseif ($page == 'integritycheck' && $userinfo['change_serversettings'] == '1') {
$integrity = new \Froxlor\Database\IntegrityCheck();
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$integrity->fixAll();
} elseif (isset($_GET['action']) && $_GET['action'] == "fix") {
\Froxlor\UI\HTML::askYesNo('admin_integritycheck_reallyfix', $filename, array(
'page' => $page
));
}
$db->query("UPDATE " . TABLE_PANEL_CUSTOMERS . " SET `email_quota` = `email_quota_used` WHERE `email_quota` < `email_quota_used`");
$log->logAction(ADM_ACTION, LOG_WARNING, 'enforcing mailquota to all customers: ' . $settings['system']['mail_quota'] . ' MB');
redirectTo('admin_settings.php', array('s' => $s));
$integritycheck = '';
foreach ($integrity->available as $id => $check) {
$displayid = $id + 1;
$result = $integrity->$check();
$checkdesc = $lng['integrity_check'][$check];
eval("\$integritycheck.=\"" . \Froxlor\UI\Template::getTemplate("settings/integritycheck_row") . "\";");
}
else
{
ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page));
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/integritycheck") . "\";");
} elseif ($page == 'importexport' && $userinfo['change_serversettings'] == '1') {
// check for json-stuff
if (! extension_loaded('json')) {
\Froxlor\UI\Response::standard_error('jsonextensionnotfound');
}
if (isset($_GET['action']) && $_GET['action'] == "export") {
// export
try {
$json_result = Froxlor::getLocal($userinfo)->exportSettings();
$json_export = json_decode($json_result, true)['data'];
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
header('Content-disposition: attachment; filename=Froxlor_settings-' . $version . '-' . $dbversion . '_' . date('d.m.Y') . '.json');
header('Content-type: application/json');
echo $json_export;
exit();
} elseif (isset($_GET['action']) && $_GET['action'] == "import") {
// import
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// get uploaded file
if (isset($_FILES["import_file"]["tmp_name"])) {
$imp_content = file_get_contents($_FILES["import_file"]["tmp_name"]);
try {
Froxlor::getLocal($userinfo, array(
'json_str' => $imp_content
))->importSettings();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::standard_success('settingsimported', '', array(
'filename' => 'admin_settings.php'
));
}
\Froxlor\UI\Response::dynamic_error("Upload failed");
}
} else {
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/importexport/index") . "\";");
}
} elseif ($page == 'testmail') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$test_addr = isset($_POST['test_addr']) ? $_POST['test_addr'] : null;
/**
* Initialize the mailingsystem
*/
$testmail = new \PHPMailer\PHPMailer\PHPMailer(true);
$testmail->CharSet = "UTF-8";
if (Settings::Get('system.mail_use_smtp')) {
$testmail->isSMTP();
$testmail->Host = Settings::Get('system.mail_smtp_host');
$testmail->SMTPAuth = Settings::Get('system.mail_smtp_auth') == '1' ? true : false;
$testmail->Username = Settings::Get('system.mail_smtp_user');
$testmail->Password = Settings::Get('system.mail_smtp_passwd');
if (Settings::Get('system.mail_smtp_usetls')) {
$testmail->SMTPSecure = 'tls';
} else {
$testmail->SMTPAutoTLS = false;
}
$testmail->Port = Settings::Get('system.mail_smtp_port');
}
$_mailerror = false;
if (\PHPMailer\PHPMailer\PHPMailer::ValidateAddress(Settings::Get('panel.adminmail')) !== false) {
// set return-to address and custom sender-name, see #76
$testmail->SetFrom(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname'));
if (Settings::Get('panel.adminmail_return') != '') {
$testmail->AddReplyTo(Settings::Get('panel.adminmail_return'), Settings::Get('panel.adminmail_defname'));
}
try {
$testmail->Subject = "Froxlor Test-Mail";
$mail_body = "Yay, this worked :)";
$testmail->AltBody = $mail_body;
$testmail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$testmail->AddAddress($test_addr);
$testmail->Send();
} catch (\PHPMailer\PHPMailer\Exception $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if (! $_mailerror) {
// success
$mail->ClearAddresses();
\Froxlor\UI\Response::standard_success('testmailsent', '', array(
'filename' => 'admin_settings.php',
'page' => 'testmail'
));
}
} else {
// invalid sender e-mail
$mailerr_msg = "Invalid sender e-mail address: " . Settings::Get('panel.adminmail');
$_mailerror = true;
}
}
$mail_smtp_user = Settings::Get('system.mail_smtp_user');
$mail_smtp_host = Settings::Get('system.mail_smtp_host');
$mail_smtp_port = Settings::Get('system.mail_smtp_port');
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/testmail") . "\";");
}

View File

@@ -14,396 +14,490 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
use Froxlor\Settings;
require ("./lib/init.php");
if(isset($_POST['subjectid']))
{
if (isset($_POST['subjectid'])) {
$subjectid = intval($_POST['subjectid']);
$mailbodyid = intval($_POST['mailbodyid']);
}
elseif(isset($_GET['subjectid']))
{
} elseif (isset($_GET['subjectid'])) {
$subjectid = intval($_GET['subjectid']);
$mailbodyid = intval($_GET['mailbodyid']);
}
if(isset($_POST['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
$available_templates = array(
'createcustomer',
'pop_success',
'trafficmaxpercent',
'diskmaxpercent',
'new_ticket_by_customer',
'new_ticket_for_customer',
'new_ticket_by_staff',
'new_reply_ticket_by_customer',
'new_reply_ticket_by_staff',
'new_database_by_customer',
'new_ftpaccount_by_customer',
'password_reset'
);
// only show templates of features that are enabled #1191
if ((int) Settings::Get('system.report_enable') == 1) {
array_push($available_templates, 'trafficmaxpercent', 'diskmaxpercent');
}
$file_templates = array(
'index_html'
);
if($action == '')
{
//email templates
if ($action == '') {
// email templates
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_templates");
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_templates");
if($settings['panel']['sendalternativemail'] == 1)
{
if (Settings::Get('panel.sendalternativemail') == 1) {
$available_templates[] = 'pop_success_alternative';
}
$templates_array = array();
$result = $db->query("SELECT `id`, `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `templategroup`='mails' ORDER BY `language`, `varname`");
$result_stmt = Database::prepare("
SELECT `id`, `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `templategroup`='mails'
ORDER BY `language`, `varname`");
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid']
));
while($row = $db->fetch_array($result))
{
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$parts = array();
preg_match('/^([a-z]([a-z_]+[a-z])*)_(mailbody|subject)$/', $row['varname'], $parts);
$templates_array[$row['language']][$parts[1]][$parts[3]] = $row['id'];
}
$templates = '';
foreach($templates_array as $language => $template_defs)
{
foreach($template_defs as $action => $email)
{
foreach ($templates_array as $language => $template_defs) {
foreach ($template_defs as $action => $email) {
$subjectid = $email['subject'];
$mailbodyid = $email['mailbody'];
$template = $lng['admin']['templates'][$action];
eval("\$templates.=\"" . getTemplate("templates/templates_template") . "\";");
eval("\$templates.=\"" . \Froxlor\UI\Template::getTemplate("templates/templates_template") . "\";");
}
}
$add = false;
foreach ($languages as $language_file => $language_name) {
while(list($language_file, $language_name) = each($languages))
{
$templates_done = array();
$result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language_name) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\'');
$result_stmt = Database::prepare("
SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `language`= :lang
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'");
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid'],
'lang' => $language_name
));
while(($row = $db->fetch_array($result)) != false)
{
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templates_done[] = str_replace('_subject', '', $row['varname']);
}
if(count(array_diff($available_templates, $templates_done)) > 0)
{
if (count(array_diff($available_templates, $templates_done)) > 0) {
$add = true;
}
}
//filetemplates
// filetemplates
$filetemplates = '';
$filetemplateadd = false;
$result = $db->query("SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `templategroup`='files'");
$result_stmt = Database::prepare("
SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `templategroup`='files'");
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid']
));
if($db->num_rows($result) != count($file_templates))$filetemplateadd = true;
while($row = $db->fetch_array($result))
{
eval("\$filetemplates.=\"" . getTemplate("templates/templates_filetemplate") . "\";");
if (Database::num_rows() != count($file_templates)) {
$filetemplateadd = true;
}
eval("echo \"" . getTemplate("templates/templates") . "\";");
}
elseif($action == 'delete'
&& $subjectid != 0
&& $mailbodyid != 0)
{
//email templates
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
eval("\$filetemplates.=\"" . \Froxlor\UI\Template::getTemplate("templates/templates_filetemplate") . "\";");
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/templates") . "\";");
} elseif ($action == 'delete' && $subjectid != 0 && $mailbodyid != 0) {
// email templates
$result_stmt = Database::prepare("
SELECT `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id");
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid'],
'id' => $subjectid
));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$result = $db->query_first("SELECT `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$subjectid . "'");
if($result['varname'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$db->query("DELETE FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND (`id`='" . (int)$subjectid . "' OR `id`='" . (int)$mailbodyid . "')");
$log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
ask_yesno('admin_template_reallydelete', $filename, array('subjectid' => $subjectid, 'mailbodyid' => $mailbodyid, 'page' => $page, 'action' => $action), $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])]);
if ($result['varname'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid
AND (`id` = :ida OR `id` = :idb)");
Database::pexecute($del_stmt, array(
'adminid' => $userinfo['adminid'],
'ida' => $subjectid,
'idb' => $mailbodyid
));
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "deleted template '" . $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])] . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNo('admin_template_reallydelete', $filename, array(
'subjectid' => $subjectid,
'mailbodyid' => $mailbodyid,
'page' => $page,
'action' => $action
), $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])]);
}
}
}
elseif($action == 'deletef'
&& $id != 0)
{
//file templates
} elseif ($action == 'deletef' && $id != 0) {
// file templates
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id");
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid'],
'id' => $id
));
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$id . "'");
if (Database::num_rows() > 0) {
if($db->num_rows($result) > 0)
{
$row = $db->fetch_array($result);
$row = $result_stmt->fetch(PDO::FETCH_ASSOC);
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$db->query("DELETE FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`=" . (int)$userinfo['adminid'] . " AND `id`=" . (int)$id . "");
$log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $lng['admin']['templates'][$row['varname']] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
ask_yesno('admin_template_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $lng['admin']['templates'][$row['varname']]);
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id");
Database::pexecute($del_stmt, array(
'adminid' => $userinfo['adminid'],
'id' => $id
));
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "deleted template '" . $lng['admin']['templates'][$row['varname']] . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNo('admin_template_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $lng['admin']['templates'][$row['varname']]);
}
} else {
\Froxlor\UI\Response::standard_error('templatenotfound');
}
else
{
standard_error('templatenotfound');
exit;
}
}
elseif($action == 'add')
{
if($settings['panel']['sendalternativemail'] == 1)
{
} elseif ($action == 'add') {
if (Settings::Get('panel.sendalternativemail') == 1) {
$available_templates[] = 'pop_success_alternative';
}
if(isset($_POST['prepare'])
&& $_POST['prepare'] == 'prepare')
{
//email templates
if (isset($_POST['prepare']) && $_POST['prepare'] == 'prepare') {
// email templates
$language = htmlentities(\Froxlor\Validate\Validate::validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect'));
$template = \Froxlor\Validate\Validate::validate($_POST['template'], 'template');
$language = validate($_POST['language'], 'language');
$templates = array();
$result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\'');
while(($row = $db->fetch_array($result)) != false)
{
$templates[] = str_replace('_subject', '', $row['varname']);
$lng_bak = $lng;
foreach ($langs['English'] as $key => $value) {
include_once \Froxlor\FileDir::makeSecurePath($value['file']);
}
if ($language != 'English') {
foreach ($langs[$language] as $key => $value) {
include \Froxlor\FileDir::makeSecurePath($value['file']);
}
}
$templates = array_diff($available_templates, $templates);
$template_options = '';
foreach($templates as $template)
{
$template_options.= makeoption($lng['admin']['templates'][$template], $template, NULL, true);
}
$subject = $lng['mails'][$template]['subject'];
$body = str_replace('\n', "\n", $lng['mails'][$template]['mailbody']);
$template_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_add.php';
$template_add_form = htmlform::genHTMLForm($template_add_data);
$lng = $lng_bak;
$template_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/templates/formfield.template_add.php';
$template_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($template_add_data);
$title = $template_add_data['template_add']['title'];
$image = $template_add_data['template_add']['image'];
eval("echo \"" . getTemplate("templates/templates_add_2") . "\";");
}
elseif(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
//email templates
$language = validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect');
$template = validate($_POST['template'], 'template');
$subject = validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate');
$mailbody = validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate');
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/templates_add_2") . "\";");
} elseif (isset($_POST['send']) && $_POST['send'] == 'send') {
// email templates
$language = htmlentities(\Froxlor\Validate\Validate::validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect'));
$template = \Froxlor\Validate\Validate::validate($_POST['template'], 'template');
$subject = \Froxlor\Validate\Validate::validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate');
$mailbody = \Froxlor\Validate\Validate::validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate');
$templates = array();
$result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\'');
$result_stmt = Database::prepare("
SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `language` = :lang
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'");
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid'],
'lang' => $language
));
while(($row = $db->fetch_array($result)) != false)
{
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templates[] = str_replace('_subject', '', $row['varname']);
}
$templates = array_diff($available_templates, $templates);
if (array_search($template, $templates) === false) {
\Froxlor\UI\Response::standard_error('templatenotfound');
} else {
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` SET
`adminid` = :adminid,
`language` = :lang,
`templategroup` = 'mails',
`varname` = :var,
`value` = :value");
if(array_search($template, $templates) === false)
{
standard_error('templatenotfound');
// mail-subject
$ins_data = array(
'adminid' => $userinfo['adminid'],
'lang' => $language,
'var' => $template . '_subject',
'value' => $subject
);
Database::pexecute($ins_stmt, $ins_data);
// mail-body
$ins_data = array(
'adminid' => $userinfo['adminid'],
'lang' => $language,
'var' => $template . '_mailbody',
'value' => $mailbody
);
Database::pexecute($ins_stmt, $ins_data);
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "added template '" . $language . ' - ' . $template . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
}
else
{
$result = $db->query("INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` (`adminid`, `language`, `templategroup`, `varname`, `value`)
VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($language) . "', 'mails', '" . $db->escape($template) . "_subject','" . $db->escape($subject) . "')");
$result = $db->query("INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` (`adminid`, `language`, `templategroup`, `varname`, `value`)
VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($language) . "', 'mails', '" . $db->escape($template) . "_mailbody','" . $db->escape($mailbody) . "')");
$log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $language . ' - ' . $template . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
elseif(isset($_POST['filesend'])
&& $_POST['filesend'] == 'filesend')
{
//file templates
} elseif (isset($_POST['filesend']) && $_POST['filesend'] == 'filesend') {
// file templates
$template = \Froxlor\Validate\Validate::validate($_POST['template'], 'template');
$filecontent = \Froxlor\Validate\Validate::validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset');
$template = validate($_POST['template'], 'template');
$filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset');
$db->query("INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` (`adminid`, `language`, `templategroup`, `varname`, `value`)
VALUES ('" . (int)$userinfo['adminid'] . "', '', 'files', '" . $db->escape($template) . "','" . $db->escape($filecontent) . "')");
$log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $template . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
elseif(!isset($_GET['files']))
{
//email templates
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` SET
`adminid` = :adminid,
`language` = '',
`templategroup` = 'files',
`varname` = :var,
`value` = :value");
$ins_data = array(
'adminid' => $userinfo['adminid'],
'var' => $template,
'value' => $filecontent
);
Database::pexecute($ins_stmt, $ins_data);
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "added template '" . $template . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} elseif (! isset($_GET['files'])) {
// email templates
$add = false;
$language_options = '';
$template_options = '';
while(list($language_file, $language_name) = each($languages))
{
foreach ($languages as $language_file => $language_name) {
$templates = array();
$result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language_name) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\'');
$result_stmt = Database::prepare("
SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `language` = :lang
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'");
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid'],
'lang' => $language_name
));
while(($row = $db->fetch_array($result)) != false)
{
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templates[] = str_replace('_subject', '', $row['varname']);
}
if(count(array_diff($available_templates, $templates)) > 0)
{
if (count(array_diff($available_templates, $templates)) > 0) {
$add = true;
$language_options.= makeoption($language_name, $language_file, $userinfo['language'], true);
$language_options .= \Froxlor\UI\HTML::makeoption($language_name, $language_file, $userinfo['language'], true, true);
$templates = array_diff($available_templates, $templates);
foreach ($templates as $template) {
$template_options .= \Froxlor\UI\HTML::makeoption($lng['admin']['templates'][$template], $template, NULL, true, true, $language_file) . "\n";
}
}
}
if($add)
{
eval("echo \"" . getTemplate("templates/templates_add_1") . "\";");
if ($add) {
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/templates_add_1") . "\";");
} else {
\Froxlor\UI\Response::standard_error('alltemplatesdefined');
}
else
{
standard_error('alltemplatesdefined');
exit;
}
}
else
{
//filetemplates
} else {
// filetemplates
$result_stmt = Database::prepare("
SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `templategroup`='files'");
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid']
));
$result = $db->query("SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `templategroup`='files'");
if (Database::num_rows() == count($file_templates)) {
\Froxlor\UI\Response::standard_error('alltemplatesdefined');
} else {
if($db->num_rows($result) == count($file_templates))
{
standard_error('alltemplatesdefined');
exit;
}
else
{
$templatesdefined = array();
$free_templates = '';
while($row = $db->fetch_array($result))$templatesdefined[] = $row['varname'];
foreach(array_diff($file_templates, $templatesdefined) as $template)
{
$free_templates.= makeoption($lng['admin']['templates'][$template], $template, '', true);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templatesdefined[] = $row['varname'];
}
$filetemplate_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_add.php';
$filetemplate_add_form = htmlform::genHTMLForm($filetemplate_add_data);
foreach (array_diff($file_templates, $templatesdefined) as $template) {
$free_templates .= \Froxlor\UI\HTML::makeoption($lng['admin']['templates'][$template], $template, '', true);
}
$filetemplate_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/templates/formfield.filetemplate_add.php';
$filetemplate_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($filetemplate_add_data);
$title = $filetemplate_add_data['filetemplate_add']['title'];
$image = $filetemplate_add_data['filetemplate_add']['image'];
eval("echo \"" . getTemplate("templates/filetemplates_add") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/filetemplates_add") . "\";");
}
}
}
elseif($action == 'edit'
&& $subjectid != 0
&& $mailbodyid != 0)
{
//email templates
} elseif ($action == 'edit' && $subjectid != 0 && $mailbodyid != 0) {
// email templates
$result_stmt = Database::prepare("
SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :subjectid");
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid'],
'subjectid' => $subjectid
));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$subjectid . "'");
if ($result['varname'] != '') {
if($result['varname'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$subject = validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate');
$mailbody = validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate');
$db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `value`='" . $db->escape($subject) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$subjectid . "'");
$db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `value`='" . $db->escape($mailbody) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$mailbodyid . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $result['varname'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$result = htmlentities_array($result);
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$subject = \Froxlor\Validate\Validate::validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate');
$mailbody = \Froxlor\Validate\Validate::validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate');
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET
`value` = :value
WHERE `adminid` = :adminid AND `id` = :id");
// subject
Database::pexecute($upd_stmt, array(
'value' => $subject,
'adminid' => $userinfo['adminid'],
'id' => $subjectid
));
// same query but mailbody
Database::pexecute($upd_stmt, array(
'value' => $mailbody,
'adminid' => $userinfo['adminid'],
'id' => $mailbodyid
));
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "edited template '" . $result['varname'] . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$template = $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])];
$subject = $result['value'];
$result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `id`='$mailbodyid'");
$result = htmlentities_array($result);
$result_stmt = Database::prepare("
SELECT `language`, `varname`, `value`
FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `id` = :id");
Database::pexecute($result_stmt, array(
'id' => $mailbodyid
));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$template_name = str_replace('_mailbody', '', $result['varname']);
// don't escape the already escaped language-string so save up before htmlentities()
$language = $result['language'];
$result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$mailbody = $result['value'];
$template_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_edit.php';
$template_edit_form = htmlform::genHTMLForm($template_edit_data);
$template_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/templates/formfield.template_edit.php';
$template_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($template_edit_data);
$title = $template_edit_data['template_edit']['title'];
$image = $template_edit_data['template_edit']['image'];
eval("echo \"" . getTemplate("templates/templates_edit") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/templates_edit") . "\";");
}
}
}
elseif($action == 'editf'
&& $id != 0)
{
//file templates
} elseif ($action == 'editf' && $id != 0) {
// file templates
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id");
Database::pexecute($result_stmt, array(
'adminid' => $userinfo['adminid'],
'id' => $id
));
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$id . "'");
if (Database::num_rows() > 0) {
if($db->num_rows($result) > 0)
{
$row = $db->fetch_array($result);
$row = $result_stmt->fetch(PDO::FETCH_ASSOC);
//filetemplates
// filetemplates
if (isset($_POST['filesend']) && $_POST['filesend'] == 'filesend') {
$filecontent = \Froxlor\Validate\Validate::validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset');
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET
`value` = :value
WHERE `adminid` = :adminid AND `id` = :id");
Database::pexecute($upd_stmt, array(
'value' => $filecontent,
'adminid' => $userinfo['adminid'],
'id' => $id
));
if(isset($_POST['filesend'])
&& $_POST['filesend'] == 'filesend')
{
$filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset');
$db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `value`='" . $db->escape($filecontent) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$id . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $row['varname'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$row = htmlentities_array($row);
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "edited template '" . $row['varname'] . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$filetemplate_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_edit.php';
$filetemplate_edit_form = htmlform::genHTMLForm($filetemplate_edit_data);
$filetemplate_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/templates/formfield.filetemplate_edit.php';
$filetemplate_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($filetemplate_edit_data);
$title = $filetemplate_edit_data['filetemplate_edit']['title'];
$image = $filetemplate_edit_data['filetemplate_edit']['image'];
eval("echo \"" . getTemplate("templates/filetemplates_edit") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("templates/filetemplates_edit") . "\";");
}
}
else
{
standard_error('templatenotfound');
exit;
} else {
\Froxlor\UI\Response::standard_error('templatenotfound');
}
}

View File

@@ -1,836 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*/
define('AREA', 'admin');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require ("./lib/init.php");
if(isset($_POST['id']))
{
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
$id = intval($_GET['id']);
}
if($page == 'tickets'
&& $userinfo['customers'] != '0')
{
// Let's see how many customers we have
$countcustomers = $db->query_first("SELECT COUNT(`customerid`) as `countcustomers` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . "");
$countcustomers = (int)$countcustomers['countcustomers'];
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets");
$fields = array(
'status' => $lng['ticket']['status'],
'priority' => $lng['ticket']['priority'],
'lastchange' => $lng['ticket']['lastchange'],
'ticket_answers' => $lng['ticket']['ticket_answers'],
'subject' => $lng['ticket']['subject'],
'lastreplier' => $lng['ticket']['lastreplier']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'lastchange';
$paging->sortorder = 'desc';
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" ' . ($userinfo['customers_see_all'] ? '' : ' AND `adminid` = "' . (int)$userinfo['adminid'] . '"') . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$ctickets = array();
while($row = $db->fetch_array($result))
{
if(!isset($ctickets[$row['customerid']])
|| !is_array($ctickets[$row['customerid']]))
{
$ctickets[$row['customerid']] = array();
}
$ctickets[$row['customerid']][$row['id']] = $row;
}
if($paging->sortfield == 'customerid'
&& $paging->sortorder == 'desc')
{
krsort($ctickets);
}
else
{
ksort($ctickets);
}
$i = 0;
$count = 0;
$tickets_count = 0;
$tickets = '';
foreach($ctickets as $cid => $ticketrows)
{
$_cid = 0;
foreach($ticketrows as $row)
{
if($paging->checkDisplay($i))
{
$row = htmlentities_array($row);
$row['lastchange'] = date("d.m.y H:i", $row['lastchange']);
if($_cid != $row['customerid'])
{
$cid = $row['customerid'];
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"');
if(isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
//$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
} else {
$customer = $lng['ticket']['nonexistingcustomer'];
}
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
}
$tickets_count++;
if($row['status'] >= 0
&& $row['status'] <= 2)
{
$reopen = 0;
}
else
{
$reopen = 1;
}
$row['status'] = ticket::getStatusText($lng, $row['status']);
$row['priority'] = ticket::getPriorityText($lng, $row['priority']);
if($row['lastreplier'] == '1')
{
$row['lastreplier'] = $lng['ticket']['staff'];
$cananswer = 0;
}
else
{
$row['lastreplier'] = $lng['ticket']['customer'];
$cananswer = 1;
}
$row['subject'] = html_entity_decode($row['subject']);
if(strlen($row['subject']) > 20)
{
$row['subject'] = substr($row['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";");
$count++;
$_cid = $row['customerid'];
}
}
$i++;
}
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
}
elseif($action == 'new')
{
if($userinfo['tickets_used'] < $userinfo['tickets']
|| $userinfo['tickets'] == '-1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$newticket = ticket::getInstanceOf($userinfo, $db, $settings, -1);
$newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
$newticket->Set('customer', (int)$_POST['customer'], true, false);
$newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
if($newticket->Get('subject') == null)
{
standard_error(array('stringisempty', 'mysubject'));
}
elseif($newticket->Get('message') == null)
{
standard_error(array('stringisempty', 'mymessage'));
}
else
{
$now = time();
$newticket->Set('admin', $userinfo['adminid'], true, true);
$newticket->Set('dt', $now, true, true);
$newticket->Set('lastchange', $now, true, true);
$newticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true);
$newticket->Set('status', '0', true, true);
$newticket->Set('lastreplier', '1', true, true);
$newticket->Set('by', '1', true, true);
$newticket->Insert();
$newticket->sendMail((int)$newticket->Get('customer'), 'new_ticket_by_staff_subject', $lng['mails']['new_ticket_by_staff']['subject'], 'new_ticket_by_staff_mailbody', $lng['mails']['new_ticket_by_staff']['mailbody']);
$log->logAction(ADM_ACTION, LOG_NOTICE, "opened a new ticket for customer #" . $newticket->Get('customer') . " - '" . $newticket->Get('subject') . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
$categories = '';
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
if(isset($result['name'])
&& $result['name'] != '')
{
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
while($row = $db->fetch_array($result2))
{
$categories.= makeoption($row['name'], $row['id']);
}
}
else
{
$categories = makeoption($lng['ticket']['no_cat'], '0');
}
$customers = '';
$result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY `name` ASC");
while($row_customer = $db->fetch_array($result_customers))
{
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
$ticket_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.ticket_new.php';
$ticket_new_form = htmlform::genHTMLForm($ticket_new_data);
$title = $ticket_new_data['ticket_new']['title'];
$image = $ticket_new_data['ticket_new']['image'];
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
}
}
else
{
standard_error('nomoreticketsavailable');
}
}
elseif($action == 'answer'
&& $id != 0)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$replyticket = ticket::getInstanceOf($userinfo, $db, $settings, -1);
$replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$replyticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
if($replyticket->Get('message') == null)
{
standard_error(array('stringisempty', 'mymessage'));
}
else
{
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$replyticket->Set('customerid', $mainticket->Get('customer'), true, true);
$replyticket->Set('lastchange', $now, true, true);
$replyticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true);
$replyticket->Set('status', '1', true, true);
$replyticket->Set('answerto', (int)$id, true, false);
$replyticket->Set('by', '1', true, true);
$replyticket->Insert();
// Update priority if changed
if($replyticket->Get('priority') != $mainticket->Get('priority'))
{
$mainticket->Set('priority', $replyticket->Get('priority'), true);
}
$mainticket->Set('lastchange', $now);
$mainticket->Set('lastreplier', '1');
$mainticket->Set('status', '2');
$mainticket->Update();
$mainticket->sendMail((int)$mainticket->Get('customer'), 'new_reply_ticket_by_staff_subject', $lng['mails']['new_reply_ticket_by_staff']['subject'], 'new_reply_ticket_by_staff_mailbody', $lng['mails']['new_reply_ticket_by_staff']['mailbody']);
$log->logAction(ADM_ACTION, LOG_NOTICE, "answered ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
$ticket_replies = '';
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$dt = date("d.m.Y H:i\h", $mainticket->Get('dt'));
$status = ticket::getStatusText($lng, $mainticket->Get('status'));
if($mainticket->Get('status') >= 0
&& $mainticket->Get('status') <= 2)
{
$isclosed = 0;
}
else
{
$isclosed = 1;
}
if($mainticket->Get('by') == '1')
{
$by = $lng['ticket']['staff'];
}
else
{
$by = $lng['ticket']['customer'];
}
$subject = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
$row = $db->fetch_array($result);
$andere = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto`="' . (int)$id . '" ORDER BY `lastchange` ASC');
while($row2 = $db->fetch_array($andere))
{
$subticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$row2['id']);
$lastchange = date("d.m.Y H:i\h", $subticket->Get('lastchange'));
if($subticket->Get('by') == '1')
{
$by = $lng['ticket']['staff'];
}
else
{
$by = $lng['ticket']['customer'];
}
$subject = $subticket->Get('subject');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true);
$subject = $mainticket->Get('subject');
$ticket_replies_count = $db->num_rows($andere) + 1;
// don't forget the main-ticket!
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.ticket_reply.php';
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
$title = $ticket_reply_data['ticket_reply']['title'];
$image = $ticket_reply_data['ticket_reply']['image'];
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
}
}
elseif($action == 'close'
&& $id != 0)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '1', true, true);
$mainticket->Set('status', '3', true, true);
$mainticket->Update();
$log->logAction(ADM_ACTION, LOG_NOTICE, "closed ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
ask_yesno('ticket_reallyclose', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
}
elseif($action == 'reopen'
&& $id != 0)
{
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '1', true, true);
$mainticket->Set('status', '0', true, true);
$mainticket->Update();
$log->logAction(ADM_ACTION, LOG_NOTICE, "reopened ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
elseif($action == 'archive'
&& $id != 0)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '1', true, true);
$mainticket->Set('status', '3', true, true);
$mainticket->Update();
$mainticket->Archive();
$log->logAction(ADM_ACTION, LOG_NOTICE, "archived ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
ask_yesno('ticket_reallyarchive', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
}
elseif($action == 'delete'
&& $id != 0)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$log->logAction(ADM_ACTION, LOG_INFO, "deleted ticket '" . $mainticket->Get('subject') . "'");
$mainticket->Delete();
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
ask_yesno('ticket_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
}
}
elseif($page == 'categories'
&& $userinfo['customers'] != '0')
{
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::categories");
$fields = array(
'name' => $lng['ticket']['category'],
'logicalorder' => $lng['ticket']['logicalorder']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKET_CATS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `main`.`id`, `main`.`name`, `main`.`logicalorder`, (
SELECT COUNT(`sub`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub`
WHERE `sub`.`category` = `main`.`id`
AND `sub`.`answerto` = '0' AND `sub`.`adminid` = '" . $userinfo['adminid'] . "')
as `ticketcount`, (
SELECT COUNT(`sub2`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub2`
WHERE `sub2`.`category` = `main`.`id`
AND `sub2`.`answerto` = '0'
AND (`sub2`.`status` = '0' OR `sub2`.`status` = '1' OR `sub2`.`status` = '2')
AND `sub2`.`adminid` = '" . $userinfo['adminid'] . "'
) as `ticketcountnotclosed`
FROM `" . TABLE_PANEL_TICKET_CATS . "` `main` WHERE `main`.`adminid` = '" . (int)$userinfo['adminid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
$ticketcategories = '';
$categories_count = $db->num_rows($result);
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
$row = htmlentities_array($row);
$closedtickets_count = ($row['ticketcount'] - $row['ticketcountnotclosed']);
eval("\$ticketcategories.=\"" . getTemplate("ticket/tickets_categories") . "\";");
$count++;
}
$i++;
}
eval("echo \"" . getTemplate("ticket/categories") . "\";");
}
elseif($action == 'addcategory')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$category = validate($_POST['category'], 'category');
$order = validate($_POST['logicalorder'], 'logicalorder');
if($order < 1 || $order >= 1000)
{
// use the latest available
$order = ticket::getHighestOrderNumber($db) + 1;
}
if($category == '')
{
standard_error(array('stringisempty', 'mycategory'));
}
else
{
ticket::addCategory($db, $category, $userinfo['adminid'], $order);
$log->logAction(ADM_ACTION, LOG_INFO, "added ticket-category '" . $category . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
$order = ticket::getHighestOrderNumber($db) + 1;
$category_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.category_new.php';
$category_new_form = htmlform::genHTMLForm($category_new_data);
$title = $category_new_data['category_new']['title'];
$image = $category_new_data['category_new']['image'];
eval("echo \"" . getTemplate("ticket/tickets_newcategory") . "\";");
}
}
elseif($action == 'editcategory'
&& $id != 0)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$category = validate($_POST['category'], 'category');
$order = validate($_POST['logicalorder'], 'logicalorder');
if($order < 1 || $order >= 1000)
{
$order = 1;
}
if($category == '')
{
standard_error(array('stringisempty', 'mycategory'));
}
else
{
ticket::editCategory($db, $category, $id, $order);
$log->logAction(ADM_ACTION, LOG_INFO, "edited ticket-category '" . $category . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
$row = $db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$id . '"');
$category_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.category_edit.php';
$category_edit_form = htmlform::genHTMLForm($category_edit_data);
$title = $category_edit_data['category_edit']['title'];
$image = $category_edit_data['category_edit']['image'];
eval("echo \"" . getTemplate("ticket/tickets_editcategory") . "\";");
}
}
elseif($action == 'deletecategory'
&& $id != 0)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if(ticket::deleteCategory($db, $id) == false)
{
standard_error('categoryhastickets');
}
$log->logAction(ADM_ACTION, LOG_INFO, "deleted ticket-category #" . $id);
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$name = ticket::getCategoryName($db, $id);
ask_yesno('ticket_reallydeletecat', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $name);
}
}
}
elseif($page == 'archive'
&& $userinfo['customers'] != '0')
{
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::archive");
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$priority = array();
$categories = array();
$subject = validate($_POST['subject'], 'subject');
$priority[0] = isset($_POST['priority1']) ? $_POST['priority1'] : '';
$priority[1] = isset($_POST['priority2']) ? $_POST['priority2'] : '';
$priority[2] = isset($_POST['priority3']) ? $_POST['priority3'] : '';
$fromdate = validate($_POST['fromdate'], 'fromdate');
$todate = validate($_POST['todate'], 'todate');
$message = validate($_POST['message'], 'message');
$customer = validate($_POST['customer'], 'customer');
$cat = $db->query_first('SELECT COUNT(`id`) as `ccount` FROM `' . TABLE_PANEL_TICKET_CATS . '`');
for ($x = 0;$x < $cat['ccount'];$x++)
{
$categories[$x] = isset($_POST['category' . $x]) ? $_POST['category' . $x] : '';
}
$query = ticket::getArchiveSearchStatement($db, $subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
$fields = array(
'lastchange' => $lng['ticket']['lastchange'],
'ticket_answers' => $lng['ticket']['ticket_answers'],
'subject' => $lng['ticket']['subject'],
'lastreplier' => $lng['ticket']['lastreplier'],
'priority' => $lng['ticket']['priority']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query($query . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$ctickets = array();
while($row = $db->fetch_array($result))
{
if(!isset($ctickets[$row['customerid']])
|| !is_array($ctickets[$row['customerid']]))
{
$ctickets[$row['customerid']] = array();
}
$ctickets[$row['customerid']][$row['id']] = $row;
}
if($paging->sortfield == 'customerid'
&& $paging->sortorder == 'desc')
{
krsort($ctickets);
}
else
{
ksort($ctickets);
}
$i = 0;
$count = 0;
$tickets_count = 0;
$tickets = '';
foreach($ctickets as $cid => $ticketrows)
{
if($paging->sortfield == 'lastchange'
&& $paging->sortorder == 'desc')
{
krsort($ticketrows);
}
else
{
ksort($ticketrows);
}
$_cid = 0;
foreach($ticketrows as $ticket)
{
if($paging->checkDisplay($i))
{
$ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
if($_cid != $ticket['customerid'])
{
$cid = $ticket['customerid'];
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"');
if(isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
} else {
$customer = $lng['ticket']['nonexistingcustomer'];
}
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
}
$tickets_count++;
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
if($ticket['lastreplier'] == '1')
{
$ticket['lastreplier'] = $lng['ticket']['staff'];
}
else
{
$ticket['lastreplier'] = $lng['ticket']['customer'];
}
if(strlen($ticket['subject']) > 20)
{
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
}
$ticket = htmlentities_array($ticket);
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
$count++;
$_cid = $ticket['customerid'];
}
}
$i++;
}
eval("echo \"" . getTemplate("ticket/archivesearch") . "\";");
}
else
{
$archived = array();
$archived = ticket::getLastArchived($db, 6, $userinfo['adminid']);
$tickets = '';
if($archived !== false)
{
foreach($archived as $id => $ticket)
{
$ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
if($ticket['lastreplier'] == '1')
{
$ticket['lastreplier'] = $lng['ticket']['staff'];
}
else
{
$ticket['lastreplier'] = $lng['ticket']['customer'];
}
if(strlen($ticket['subject']) > 20)
{
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
}
}
$priorities_options = makecheckbox('priority1', $lng['ticket']['unf_high'], '1');
$priorities_options.= makecheckbox('priority2', $lng['ticket']['unf_normal'], '2');
$priorities_options.= makecheckbox('priority3', $lng['ticket']['unf_low'], '3');
$category_options = '';
$ccount = 0;
$result = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
while($row = $db->fetch_array($result))
{
$category_options.= makecheckbox('category' . $ccount, $row['name'], $row['id'], true);
$ccount++;
}
$customers = makeoption($lng['ticket']['nocustomer'], '-1', '-1');
$result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY `name` ASC");
while($row_customer = $db->fetch_array($result_customers))
{
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
eval("echo \"" . getTemplate("ticket/archive") . "\";");
}
}
elseif($action == 'view'
&& $id != 0)
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed archived-ticket #" . $id);
$ticket_replies = '';
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$lastchange = date("d.m.Y H:i\h", $mainticket->Get('lastchange'));
$dt = date("d.m.Y H:i\h", $mainticket->Get('dt'));
$status = ticket::getStatusText($lng, $mainticket->Get('status'));
$isclosed = 1;
if($mainticket->Get('by') == '1')
{
$by = $lng['ticket']['staff'];
}
else
{
$by = $lng['ticket']['customer'];
}
$subject = htmlentities($mainticket->Get('subject'));
$message = htmlentities($mainticket->Get('message'));
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
$row = $db->fetch_array($result);
$andere = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto`="' . (int)$id . '"');
while($row2 = $db->fetch_array($andere))
{
$subticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$row2['id']);
$lastchange = date("d.m.Y H:i\h", $subticket->Get('lastchange'));
if($subticket->Get('by') == '1')
{
$by = $lng['ticket']['staff'];
}
else
{
$by = $lng['ticket']['customer'];
}
$subject = htmlentities($subticket->Get('subject'));
$message = htmlentities($subticket->Get('message'));
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', htmlentities($mainticket->Get('priority')), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', htmlentities($mainticket->Get('priority')), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', htmlentities($mainticket->Get('priority')), true, true);
$subject = htmlentities($mainticket->Get('subject'));
$ticket_replies_count = $db->num_rows($andere) + 1;
// don't forget the main-ticket!
eval("echo \"" . getTemplate("ticket/tickets_view") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$log->logAction(ADM_ACTION, LOG_INFO, "deleted archived ticket '" . $mainticket->Get('subject') . "'");
$mainticket->Delete();
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
ask_yesno('ticket_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
}
}
?>

View File

@@ -13,30 +13,17 @@
* @author Morton Jonuschat <m.jonuschat@chrome-it.de>
* @license GPLv2 http://files.syscp.org/misc/COPYING.txt
* @package Panel
* @version $Id: $
*
*/
define('AREA', 'admin');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
use Froxlor\Settings;
require ("./lib/init.php");
if($action == 'logout')
{
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['adminid'] . "' AND `adminsession` = '1'");
redirectTo('index.php');
exit;
}
if(isset($_POST['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
@@ -53,47 +40,27 @@ $months = array(
'9' => 'sep',
'10' => 'oct',
'11' => 'nov',
'12' => 'dec',
'12' => 'dec'
);
if($page == 'overview' || $page == 'customers')
{
if($action == 'su' && $id != 0)
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$id . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' "));
if ($page == 'overview' || $page == 'customers') {
if($result['loginname'] != '')
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$userinfo['userid'] . "'");
$s = md5(uniqid(microtime(), 1));
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$id . "', '" . $db->escape($result['ipaddress']) . "', '" . $db->escape($result['useragent']) . "', '" . time() . "', '" . $db->escape($result['language']) . "', '0')");
redirectTo('customer_traffic.php', Array(
's' => $s
));
}
else
{
redirectTo('index.php', Array(
'action' => 'login'
));
}
}
$customerview = 1;
$stats_tables = '';
$minyear = $db->query_first("SELECT `year` FROM `". TABLE_PANEL_TRAFFIC . "` ORDER BY `year` ASC LIMIT 1");
if (!isset($minyear['year']) || $minyear['year'] == 0)
{
$minyear_stmt = Database::query("SELECT `year` FROM `" . TABLE_PANEL_TRAFFIC . "` ORDER BY `year` ASC LIMIT 1");
$minyear = $minyear_stmt->fetch(PDO::FETCH_ASSOC);
if (! isset($minyear['year']) || $minyear['year'] == 0) {
$maxyears = 0;
}
else
{
} else {
$maxyears = date("Y") - $minyear['year'];
}
for($years = 0; $years<=$maxyears; $years++) {
$overview['year'] = date("Y")-$years;
for ($years = 0; $years <= $maxyears; $years ++) {
$overview['year'] = date("Y") - $years;
$overview['type'] = $lng['traffic']['customer'];
$domain_list = '';
$customer_name_list = $db->query("SELECT `customerid`,`company`,`name`,`firstname` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `deactivated`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY name");
$totals = array(
'jan' => 0,
'feb' => 0,
@@ -106,9 +73,20 @@ if($page == 'overview' || $page == 'customers')
'sep' => 0,
'oct' => 0,
'nov' => 0,
'dec' => 0,
'dec' => 0
);
while($customer_name = $db->fetch_array($customer_name_list)) {
$customer_name_list_stmt = Database::prepare("
SELECT `customerid`,`company`,`name`,`firstname`
FROM `" . TABLE_PANEL_CUSTOMERS . "`
WHERE `deactivated`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = :id") . "
ORDER BY name");
Database::pexecute($customer_name_list_stmt, array(
'id' => $userinfo['adminid']
));
while ($customer_name = $customer_name_list_stmt->fetch(PDO::FETCH_ASSOC)) {
$virtual_host = array(
'name' => ($customer_name['company'] == '' ? $customer_name['name'] . ", " . $customer_name['firstname'] : $customer_name['company']),
'customerid' => $customer_name['customerid'],
@@ -123,26 +101,35 @@ if($page == 'overview' || $page == 'customers')
'sep' => '-',
'oct' => '-',
'nov' => '-',
'dec' => '-',
'dec' => '-'
);
$traffic_list = $db->query("SELECT month, SUM(http+ftp_up+ftp_down+mail)*1024 AS traffic FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE year = " . (date("Y")-$years) . " AND `customerid` = '" . $customer_name['customerid'] . "' GROUP BY month ORDER BY month");
while($traffic_month = $db->fetch_array($traffic_list)) {
$virtual_host[$months[(int)$traffic_month['month']]] = size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.3f %s');
$totals[$months[(int)$traffic_month['month']]] += $traffic_month['traffic'];
$traffic_list_stmt = Database::prepare("
SELECT month, SUM(http+ftp_up+ftp_down+mail)*1024 AS traffic
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE year = :year AND `customerid` = :id
GROUP BY month ORDER BY month");
Database::pexecute($traffic_list_stmt, array(
'year' => (date("Y") - $years),
'id' => $customer_name['customerid']
));
while ($traffic_month = $traffic_list_stmt->fetch(PDO::FETCH_ASSOC)) {
$virtual_host[$months[(int) $traffic_month['month']]] = \Froxlor\PhpHelper::sizeReadable($traffic_month['traffic'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
$totals[$months[(int) $traffic_month['month']]] += $traffic_month['traffic'];
}
eval("\$domain_list .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
eval("\$domain_list .= sprintf(\"%s\", \"" . \Froxlor\UI\Template::getTemplate("traffic/index_table_row") . "\");");
}
// sum up totals
$virtual_host = array(
'name' => $lng['traffic']['months']['total'],
'name' => $lng['traffic']['months']['total']
);
foreach($totals as $month => $bytes) {
$virtual_host[$month] = ($bytes == 0 ? '-' : size_readable($bytes, 'GiB', 'bi', '%01.3f %s'));
foreach ($totals as $month => $bytes) {
$virtual_host[$month] = ($bytes == 0 ? '-' : \Froxlor\PhpHelper::sizeReadable($bytes, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s'));
}
$customerview = 0;
eval("\$total_list = sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
eval("\$stats_tables .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table") . "\");");
eval("\$total_list = sprintf(\"%s\", \"" . \Froxlor\UI\Template::getTemplate("traffic/index_table_row") . "\");");
eval("\$stats_tables .= sprintf(\"%s\", \"" . \Froxlor\UI\Template::getTemplate("traffic/index_table") . "\");");
}
eval("echo \"" . getTemplate("traffic/index") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("traffic/index") . "\";");
}

View File

@@ -12,113 +12,101 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
require ("./lib/init.php");
require './lib/init.php';
if($page == 'overview')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
use Froxlor\Database\Database;
use Froxlor\Settings;
if ($page == 'overview') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
/**
* this is a dirty hack but syscp 1.4.2.1 does not
* has any version/dbversion in the database (don't know why)
* have any version/dbversion in the database (don't know why)
* so we have to set them both to run a correct upgrade
*/
if (!isFroxlor()) {
if (!isset($settings['panel']['version'])
|| $settings['panel']['version'] == ''
) {
$settings['panel']['version'] = '1.4.2.1';
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel','version','".$settings['panel']['version']."')");
if (! \Froxlor\Froxlor::isFroxlor()) {
if (Settings::Get('panel.version') == null || Settings::Get('panel.version') == '') {
Settings::Set('panel.version', '1.4.2.1');
}
if (!isset($settings['system']['dbversion'])
|| $settings['system']['dbversion'] == ''
) {
if (Settings::Get('system.dbversion') == null || Settings::Get('system.dbversion') == '') {
/**
* 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'];
$result_stmt = Database::query("
SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'");
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
if (isset($result['value'])) {
Settings::Set('system.dbversion', (int) $result['value'], false);
} else {
$settings['system']['dbversion'] = 0;
Settings::Set('system.dbversion', 0, false);
}
}
}
if(hasUpdates($version))
{
if (\Froxlor\Froxlor::hasDbUpdates() || \Froxlor\Froxlor::hasUpdates()) {
$successful_update = false;
$message = '';
if(isset($_POST['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") . "\";");
include_once './install/updatesql.php';
if (isset($_POST['send']) && $_POST['send'] == 'send') {
if ((isset($_POST['update_preconfig']) && isset($_POST['update_changesagreed']) && intval($_POST['update_changesagreed']) != 0) || ! isset($_POST['update_preconfig'])) {
eval("echo \"" . \Froxlor\UI\Template::getTemplate('update/update_start') . "\";");
include_once \Froxlor\Froxlor::getInstallDir() . 'install/updatesql.php';
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate("update/update_end") . "\";");
updateCounters();
inserttask('1');
@chmod('./lib/userdata.inc.php', 0440);
eval("echo \"" . \Froxlor\UI\Template::getTemplate('update/update_end') . "\";");
\Froxlor\User::updateCounters();
\Froxlor\System\Cronjob::inserttask('1');
@chmod(\Froxlor\Froxlor::getInstallDir() . '/lib/userdata.inc.php', 0440);
$successful_update = true;
}
else
{
$message = '<br /><strong style="color:#ff0000;">You have to agree that you have read the update notifications.</strong>';
} else {
$message = '<br /><strong class="red">You have to agree that you have read the update notifications.</strong>';
}
}
if(!$successful_update)
{
$current_version = $settings['panel']['version'];
if (! $successful_update) {
$current_version = Settings::Get('panel.version');
$current_db_version = Settings::Get('panel.db_version');
if (empty($current_db_version)) {
$current_db_version = "0";
}
$new_version = $version;
$new_db_version = $dbversion;
$ui_text = $lng['update']['update_information']['part_a'];
$ui_text = str_replace('%curversion', $current_version, $ui_text);
$ui_text = str_replace('%newversion', $new_version, $ui_text);
$update_information = $ui_text;
include_once './install/updates/preconfig.php';
$preconfig = getPreConfig($current_version);
if($preconfig != '')
{
$update_information .= '<br />'.$preconfig.$message;
if ($version != $current_version) {
$ui_text = str_replace('%curversion', $current_version, $ui_text);
$ui_text = str_replace('%newversion', $new_version, $ui_text);
} else {
// show db version
$ui_text = str_replace('%curversion', $current_db_version, $ui_text);
$ui_text = str_replace('%newversion', $new_db_version, $ui_text);
}
$update_information = $ui_text;
include_once \Froxlor\Froxlor::getInstallDir() . '/install/updates/preconfig.php';
$preconfig = getPreConfig($current_version, $current_db_version);
if ($preconfig != '') {
$update_information .= '<br />' . $preconfig . $message;
}
$update_information .= $lng['update']['update_information']['part_b'];
eval("echo \"" . getTemplate("update/index") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('update/index') . "\";");
}
}
else
{
/*
* @TODO version-webcheck check here
*/
} else {
$success_message = $lng['update']['noupdatesavail'];
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate("update/noupdatesavail") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('update/noupdatesavail') . "\";");
}
}
?>

74
api.php Normal file
View File

@@ -0,0 +1,74 @@
<?php
require __DIR__ . '/vendor/autoload.php';
require \Froxlor\Froxlor::getInstallDir() . '/lib/tables.inc.php';
// check whether API interface is enabled after all
if (\Froxlor\Settings::Get('api.enabled') != 1) {
// not enabled
header("Status: 404 Not found", 404);
header($_SERVER["SERVER_PROTOCOL"] . " 404 Not found", 404);
exit();
}
// we're talking json here
header("Content-Type:application/json");
// get our request
$request = @file_get_contents('php://input');
// check if present
if (empty($request)) {
json_response(400, "Invalid request");
}
// decode json request
$decoded_request = json_decode(stripslashes($request), true);
// is it valid?
if (is_null($decoded_request)) {
json_response(400, "Invalid JSON");
}
// validate content
try {
$request = \Froxlor\Api\FroxlorRPC::validateRequest($decoded_request);
// now actually do it
$cls = "\\Froxlor\\Api\\Commands\\" . $request['command']['class'];
$method = $request['command']['method'];
$apiObj = new $cls($decoded_request['header'], $request['params']);
// call the method with the params if any
echo $apiObj->$method();
} catch (Exception $e) {
json_response($e->getCode(), $e->getMessage());
}
exit();
/**
* output json result
*
* @param int $status
* @param string $status_message
* @param mixed $data
*
* @return void
*/
function json_response($status, $status_message = '', $data = null)
{
if (isset($_SERVER["SERVER_PROTOCOL"]) && ! empty($_SERVER["SERVER_PROTOCOL"])) {
$resheader = $_SERVER["SERVER_PROTOCOL"] . " " . $status;
if (! empty($status_message)) {
$resheader .= ' ' . str_replace("\n", " ", $status_message);
}
header($resheader);
}
$response = array();
$response['status'] = $status;
$response['status_message'] = $status_message;
$response['data'] = $data;
$json_response = json_encode($response, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
echo $json_response;
exit();
}

235
api_keys.php Normal file
View File

@@ -0,0 +1,235 @@
<?php
if (! defined('AREA')) {
header("Location: index.php");
exit();
}
/**
* This file is part of the Froxlor project.
* Copyright (c) 2018 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> (2018-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @since 0.10.0
*
*/
use Froxlor\Database\Database;
// This file is being included in admin_index and customer_index
// and therefore does not need to require lib/init.php
$del_stmt = Database::prepare("DELETE FROM `" . TABLE_API_KEYS . "` WHERE id = :id");
$success_message = "";
$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
$area = AREA;
// do the delete and then just show a success-message and the apikeys list again
if ($action == 'delete') {
if ($id > 0) {
$chk = (AREA == 'admin' && $userinfo['customers_see_all'] == '1') ? true : false;
if (AREA == 'customer') {
$chk_stmt = Database::prepare("
SELECT c.customerid FROM `" . TABLE_PANEL_CUSTOMERS . "` c
LEFT JOIN `" . TABLE_API_KEYS . "` ak ON ak.customerid = c.customerid
WHERE ak.`id` = :id AND c.`customerid` = :cid
");
$chk = Database::pexecute_first($chk_stmt, array(
'id' => $id,
'cid' => $userinfo['customerid']
));
} elseif (AREA == 'admin' && $userinfo['customers_see_all'] == '0') {
$chk_stmt = Database::prepare("
SELECT a.adminid FROM `" . TABLE_PANEL_ADMINS . "` a
LEFT JOIN `" . TABLE_API_KEYS . "` ak ON ak.adminid = a.adminid
WHERE ak.`id` = :id AND a.`adminid` = :aid
");
$chk = Database::pexecute_first($chk_stmt, array(
'id' => $id,
'aid' => $userinfo['adminid']
));
}
if ($chk !== false) {
Database::pexecute($del_stmt, array(
'id' => $id
));
$success_message = sprintf($lng['apikeys']['apikey_removed'], $id);
}
}
} elseif ($action == 'add') {
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_API_KEYS . "` SET
`apikey` = :key, `secret` = :secret, `adminid` = :aid, `customerid` = :cid, `valid_until` = '-1', `allowed_from` = ''
");
// customer generates for himself, admins will see a customer-select-box later
if (AREA == 'admin') {
$cid = 0;
} elseif (AREA == 'customer') {
$cid = $userinfo['customerid'];
}
$key = hash('sha256', openssl_random_pseudo_bytes(64 * 64));
$secret = hash('sha512', openssl_random_pseudo_bytes(64 * 64 * 4));
Database::pexecute($ins_stmt, array(
'key' => $key,
'secret' => $secret,
'aid' => $userinfo['adminid'],
'cid' => $cid
));
$success_message = $lng['apikeys']['apikey_added'];
} elseif ($action == 'jqEditApiKey') {
$keyid = isset($_POST['id']) ? (int) $_POST['id'] : 0;
$allowed_from = isset($_POST['allowed_from']) ? $_POST['allowed_from'] : "";
$valid_until = isset($_POST['valid_until']) ? (int) $_POST['valid_until'] : - 1;
// validate allowed_from
if (! empty($allowed_from)) {
$ip_list = array_map('trim', explode(",", $allowed_from));
$_check_list = $ip_list;
foreach ($_check_list as $idx => $ip) {
if (\Froxlor\Validate\Validate::validate_ip2($ip, true, 'invalidip', true, true) == false) {
unset($ip_list[$idx]);
}
}
$ip_list = array_map('inet_ntop', array_map('inet_pton', $ip_list));
$allowed_from = implode(",", array_unique($ip_list));
}
if ($valid_until <= 0 || ! is_numeric($valid_until)) {
$valid_until = - 1;
}
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_API_KEYS . "` SET
`valid_until` = :vu, `allowed_from` = :af
WHERE `id` = :keyid AND `adminid` = :aid AND `customerid` = :cid
");
if (AREA == 'admin') {
$cid = 0;
} elseif (AREA == 'customer') {
$cid = $userinfo['customerid'];
}
Database::pexecute($upd_stmt, array(
'keyid' => $keyid,
'af' => $allowed_from,
'vu' => $valid_until,
'aid' => $userinfo['adminid'],
'cid' => $cid
));
echo json_encode(true);
exit();
}
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed api::api_keys");
// select all my (accessable) certificates
$keys_stmt_query = "SELECT ak.*, c.loginname, a.loginname as adminname
FROM `" . TABLE_API_KEYS . "` ak
LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` c ON `c`.`customerid` = `ak`.`customerid`
LEFT JOIN `" . TABLE_PANEL_ADMINS . "` a ON `a`.`adminid` = `ak`.`adminid`
WHERE ";
$qry_params = array();
if (AREA == 'admin' && $userinfo['customers_see_all'] == '0') {
// admin with only customer-specific permissions
$keys_stmt_query .= "ak.adminid = :adminid ";
$qry_params['adminid'] = $userinfo['adminid'];
$fields = array(
'a.loginname' => $lng['login']['username']
);
} elseif (AREA == 'customer') {
// customer-area
$keys_stmt_query .= "ak.customerid = :cid ";
$qry_params['cid'] = $userinfo['customerid'];
$fields = array(
'c.loginname' => $lng['login']['username']
);
} else {
// admin who can see all customers / reseller / admins
$keys_stmt_query .= "1 ";
$fields = array(
'a.loginname' => $lng['login']['username']
);
}
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_API_KEYS, $fields);
$keys_stmt_query .= $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit();
$keys_stmt = Database::prepare($keys_stmt_query);
Database::pexecute($keys_stmt, $qry_params);
$all_keys = $keys_stmt->fetchAll(PDO::FETCH_ASSOC);
$apikeys = "";
if (count($all_keys) == 0) {
$count = 0;
$message = $lng['apikeys']['no_api_keys'];
$sortcode = "";
$searchcode = "";
$pagingcode = "";
eval("\$apikeys.=\"" . \Froxlor\UI\Template::getTemplate("api_keys/keys_error", true) . "\";");
} else {
$count = count($all_keys);
$paging->setEntries($count);
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
foreach ($all_keys as $idx => $key) {
if ($paging->checkDisplay($idx)) {
// my own key
$isMyKey = false;
if ($key['adminid'] == $userinfo['adminid'] && ((AREA == 'admin' && $key['customerid'] == 0) || (AREA == 'customer' && $key['customerid'] == $userinfo['customerid']))) {
// this is mine
$isMyKey = true;
}
$adminCustomerLink = "";
if (AREA == 'admin') {
if ($isMyKey) {
$adminCustomerLink = $key['adminname'];
} else {
$adminCustomerLink = '<a href="' . $linker->getLink(array(
'section' => (empty($key['customerid']) ? 'admins' : 'customers'),
'page' => (empty($key['customerid']) ? 'admins' : 'customers'),
'action' => 'su',
'id' => (empty($key['customerid']) ? $key['adminid'] : $key['customerid'])
)) . '" rel="external">' . (empty($key['customerid']) ? $key['adminname'] : $key['loginname']) . '</a>';
}
} else {
// customer do not need links
$adminCustomerLink = $key['loginname'];
}
// escape stuff
$row = \Froxlor\PhpHelper::htmlentitiesArray($key);
// shorten keys
$row['_apikey'] = substr($row['apikey'], 0, 20) . '...';
$row['_secret'] = substr($row['secret'], 0, 20) . '...';
// check whether the api key is not valid anymore
$isValid = true;
if ($row['valid_until'] >= 0) {
if ($row['valid_until'] < time()) {
$isValid = false;
}
// format
$row['valid_until'] = date('Y-m-d', $row['valid_until']);
} else {
// infinity
$row['valid_until'] = "";
}
eval("\$apikeys.=\"" . \Froxlor\UI\Template::getTemplate("api_keys/keys_key", true) . "\";");
} else {
continue;
}
}
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("api_keys/keys_list", true) . "\";");

293
build.xml Normal file
View File

@@ -0,0 +1,293 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="froxlor" default="build">
<!-- Use this when the tools are managed by Composer in ${basedir}/vendor/bin -->
<property name="pdepend" value="${basedir}/vendor/bin/pdepend" />
<property name="phpcpd" value="${basedir}/vendor/bin/phpcpd" />
<property name="phpcs" value="${basedir}/vendor/bin/phpcs" />
<property name="phpdox" value="${basedir}/vendor/bin/phpdox" />
<property name="phploc" value="${basedir}/vendor/bin/phploc" />
<property name="phpmd" value="${basedir}/vendor/bin/phpmd" />
<property name="phpunit" value="${basedir}/vendor/bin/phpunit" />
<target name="full-build"
depends="prepare,composer,static-analysis,phpunit,phpdox,-check-failure"
description="Performs static analysis, runs the tests, and generates project documentation" />
<target name="full-build-parallel"
depends="prepare,composer,static-analysis-parallel,phpunit,phpdox,-check-failure"
description="Performs static analysis (executing the tools in parallel), runs the tests, and generates project documentation" />
<target name="quick-build"
depends="prepare,composer,lint,phpunit-no-coverage"
description="Performs a lint check and runs the tests (without generating code coverage reports)" />
<target name="static-analysis"
depends="composer,lint,phploc-ci,pdepend,phpmd-ci,phpcs-ci,phpcompat-ci,phpcpd-ci"
description="Performs static analysis" />
<!-- Adjust the threadCount attribute's value to the number of CPUs -->
<target name="static-analysis-parallel"
description="Performs static analysis (executing the tools in parallel)">
<parallel threadCount="2">
<sequential>
<antcall target="pdepend" />
<antcall target="phpmd-ci" />
</sequential>
<antcall target="lint" />
<antcall target="phpcpd-ci" />
<antcall target="phpcs-ci" />
<antcall target="phpcompat-ci" />
<antcall target="phploc-ci" />
</parallel>
</target>
<target name="clean" unless="clean.done"
description="Cleanup build artifacts">
<delete dir="${basedir}/build/api" />
<delete dir="${basedir}/build/coverage" />
<delete dir="${basedir}/build/logs" />
<delete dir="${basedir}/build/pdepend" />
<delete dir="${basedir}/build/phpdox" />
<property name="clean.done" value="true" />
</target>
<target name="prepare" unless="prepare.done" depends="clean"
description="Prepare for build">
<mkdir dir="${basedir}/build/api" />
<mkdir dir="${basedir}/build/coverage" />
<mkdir dir="${basedir}/build/logs" />
<mkdir dir="${basedir}/build/pdepend" />
<mkdir dir="${basedir}/build/phpdox" />
<property name="prepare.done" value="true" />
</target>
<target name="composer"
description="Installing composer dependencies" depends="prepare">
<exec executable="composer" failonerror="true">
<arg value="install" />
<arg value="--prefer-dist" />
<arg value="--no-progress" />
</exec>
</target>
<target name="lint" unless="lint.done"
description="Perform syntax check of sourcecode files">
<apply executable="php" taskname="lint">
<arg value="-l" />
<fileset dir="${basedir}/lib/Froxlor">
<include name="**/*.php" />
<modified />
</fileset>
<fileset dir="${basedir}/tests">
<include name="**/*.php" />
<modified />
</fileset>
</apply>
<property name="lint.done" value="true" />
</target>
<target name="phploc" unless="phploc.done"
description="Measure project size using PHPLOC and print human readable output. Intended for usage on the command line.">
<exec executable="${phploc}" taskname="phploc">
<arg value="--count-tests" />
<arg path="${basedir}/lib/Froxlor" />
<arg path="${basedir}/tests" />
</exec>
<property name="phploc.done" value="true" />
</target>
<target name="phploc-ci" unless="phploc.done" depends="prepare"
description="Measure project size using PHPLOC and log result in CSV and XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phploc}" taskname="phploc">
<arg value="--count-tests" />
<arg value="--log-csv" />
<arg path="${basedir}/build/logs/phploc.csv" />
<arg value="--log-xml" />
<arg path="${basedir}/build/logs/phploc.xml" />
<arg path="${basedir}/lib/Froxlor" />
<arg path="${basedir}/tests" />
</exec>
<property name="phploc.done" value="true" />
</target>
<target name="pdepend" unless="pdepend.done" depends="prepare"
description="Calculate software metrics using PHP_Depend and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${pdepend}" taskname="pdepend">
<arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
<arg
value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
<arg
value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
<arg path="${basedir}/lib/Froxlor" />
</exec>
<property name="pdepend.done" value="true" />
</target>
<target name="phpmd" unless="phpmd.done"
description="Perform project mess detection using PHPMD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpmd}" taskname="phpmd">
<arg path="${basedir}/lib/Froxlor" />
<arg value="text" />
<arg path="${basedir}/phpmd.xml" />
</exec>
<property name="phpmd.done" value="true" />
</target>
<target name="phpmd-ci" unless="phpmd.done" depends="prepare"
description="Perform project mess detection using PHPMD and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phpmd}" taskname="phpmd">
<arg path="${basedir}/lib/Froxlor" />
<arg value="xml" />
<arg path="${basedir}/phpmd.xml" />
<arg value="--reportfile" />
<arg path="${basedir}/build/logs/pmd.xml" />
</exec>
<property name="phpmd.done" value="true" />
</target>
<target name="phpcs" unless="phpcs.done"
description="Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpcs}" taskname="phpcs">
<arg value="--standard=${basedir}/phpcs.xml" />
<arg value="--extensions=php" />
<arg path="${basedir}/lib/Froxlor" />
<arg path="${basedir}/tests" />
</exec>
<property name="phpcs.done" value="true" />
</target>
<target name="phpcs-ci" unless="phpcs.done" depends="prepare"
description="Find coding standard violations using PHP_CodeSniffer and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phpcs}" output="/dev/null" taskname="phpcs">
<arg value="--report=checkstyle" />
<arg
value="--report-file=${basedir}/build/logs/checkstyle-standard.xml" />
<arg value="--standard=${basedir}/phpcs.xml" />
<arg value="--extensions=php" />
<arg path="${basedir}/lib/Froxlor" />
<arg path="${basedir}/tests" />
</exec>
<property name="phpcs.done" value="true" />
</target>
<target name="phpcompat" unless="phpcompat.done"
depends="composer"
description="Find php violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpcs}" taskname="phpcompat">
<arg
line="--standard=PHPCompatibility --runtime-set testVersion 5.6 ${basedir}/lib/Froxlor ${basedir}/tests" />
</exec>
<property name="phpcompat.done" value="true" />
</target>
<target name="phpcompat-ci" unless="phpcompat.done"
depends="composer"
description="Find php violations using PHP_CodeSniffer and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phpcs}" output="/dev/null"
taskname="phpcompat">
<arg
line="--standard=PHPCompatibility --runtime-set testVersion 5.6 --report=checkstyle --report-file=${basedir}/build/logs/checkstyle-compat.xml ${basedir}/lib/Froxlor ${basedir}/tests" />
</exec>
<property name="phpcompat.done" value="true" />
</target>
<target name="phpcpd" unless="phpcpd.done"
description="Find duplicate code using PHPCPD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpcpd}" taskname="phpcpd">
<arg path="${basedir}/lib/Froxlor" />
</exec>
<property name="phpcpd.done" value="true" />
</target>
<target name="phpcpd-ci" unless="phpcpd.done" depends="prepare"
description="Find duplicate code using PHPCPD and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phpcpd}" taskname="phpcpd">
<arg value="--log-pmd" />
<arg path="${basedir}/build/logs/pmd-cpd.xml" />
<arg path="${basedir}/lib/Froxlor" />
</exec>
<property name="phpcpd.done" value="true" />
</target>
<target name="phpunit-prepare" unless="phpunit-prepare.done" depends="composer"
description="prepare xdebug unit tests">
<exec executable="${phpunit}" resultproperty="result.phpunit-prepare"
taskname="phpunit">
<arg value="--configuration" />
<arg path="${basedir}/phpunit.xml" />
<arg value="--dump-xdebug-filter" />
<arg path="${basedir}/tests/xdebug-filter.php" />
</exec>
<property name="phpunit-prepare.done" value="true" />
</target>
<target name="phpunit" unless="phpunit.done" depends="phpunit-prepare"
description="Run unit tests with PHPUnit">
<exec executable="${phpunit}" failonerror="true" resultproperty="result.phpunit"
taskname="phpunit">
<arg value="--configuration" />
<arg path="${basedir}/phpunit.xml" />
<arg value="--testsuite" />
<arg value="froxlor" />
<arg value="--prepend" />
<arg path="${basedir}/tests/xdebug-filter.php" />
</exec>
<property name="phpunit.done" value="true" />
</target>
<target name="phpunit-no-coverage" unless="phpunit.done"
depends="composer"
description="Run unit tests with PHPUnit (without generating code coverage reports)">
<exec executable="${phpunit}" failonerror="true"
taskname="phpunit">
<arg value="--configuration" />
<arg path="${basedir}/phpunit.xml" />
<arg value="--testsuite" />
<arg value="froxlor" />
<arg value="--no-coverage" />
</exec>
<property name="phpunit.done" value="true" />
</target>
<target name="phpdox" unless="phpdox.done"
depends="phploc-ci,phpcs-ci,phpcompat-ci,phpmd-ci"
description="Generate project documentation using phpDox">
<exec executable="${phpdox}" dir="${basedir}/build"
taskname="phpdox">
<arg value="--file" />
<arg path="${basedir}/phpdox.xml" />
</exec>
<property name="phpdox.done" value="true" />
</target>
<target name="-check-failure">
<fail message="PHPUnit did not finish successfully">
<condition>
<not>
<equals arg1="${result.phpunit}" arg2="0" />
</not>
</condition>
</fail>
</target>
</project>

80
composer.json Normal file
View File

@@ -0,0 +1,80 @@
{
"name": "froxlor/froxlor",
"description": "The server administration software for your needs. Developed by experienced server administrators, this panel simplifies the effort of managing your hosting platform.",
"keywords": [
"server",
"administration",
"php"
],
"homepage": "https://www.froxlor.org",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Michael Kaufmann",
"email": "team@froxlor.org",
"role": "Lead Developer"
},
{
"name": "Robert Förster",
"email": "team@froxlor.org",
"role": "Package Maintainer"
}
],
"support": {
"email": "team@froxlor.org",
"issues": "https://github.com/Froxlor/Froxlor/issues",
"forum": "https://forum.froxlor.org/",
"wiki": "https://github.com/Froxlor/Froxlor/wiki",
"irc": "irc://chat.freenode.net/froxlor",
"source": "https://github.com/Froxlor/Froxlor",
"docs": "https://github.com/Froxlor/Froxlor/wiki"
},
"require": {
"php": ">=7.0",
"ext-session": "*",
"ext-ctype": "*",
"ext-pdo": "*",
"ext-pdo_mysql": "*",
"ext-simplexml": "*",
"ext-xml": "*",
"ext-filter": "*",
"ext-posix": "*",
"ext-mbstring": "*",
"ext-curl": "*",
"ext-json": "*",
"ext-openssl": "*",
"phpmailer/phpmailer": "~6.0",
"monolog/monolog": "^1.24",
"robthree/twofactorauth": "^1.6",
"algo26-matthias/idna-convert": "^2.1"
},
"require-dev": {
"phpunit/phpunit": "^8",
"php": ">=7.3",
"ext-pcntl": "*",
"phpcompatibility/php-compatibility": "*",
"squizlabs/php_codesniffer": "*",
"pdepend/pdepend": "^2.5",
"sebastian/phpcpd": "^4.1",
"theseer/phpdox": "^0.12.0",
"phploc/phploc": "^5.0",
"phpmd/phpmd": "^2.6"
},
"suggest": {
"ext-bcmath": "*",
"ext-zip": "*",
"ext-apcu": "*",
"ext-readline": "*"
},
"autoload": {
"psr-4": {
"Froxlor\\": [
"lib/Froxlor"
]
}
},
"scripts": {
"post-install-cmd": "if [ -f ./vendor/bin/phpcs ]; then \"vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility ; fi",
"post-update-cmd" : "if [ -f ./vendor/bin/phpcs ]; then \"vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility ; fi"
}
}

2963
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

1893
css/jquery-ui.min.css vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,34 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*/
// Required code
define('AREA', 'customer');
require ("./lib/init.php");
$Id = 0;
if(isset($_GET['id']))$Id = (int)$_GET['id'];
if(isset($_POST['id']))$Id = (int)$_POST['id'];
eval("echo \"" . getTemplate("aps/header") . "\";");
$Aps = new ApsParser($userinfo, $settings, $db);
$Aps->MainHandler($action);
eval("echo \"" . getTemplate("aps/footer") . "\";");
?>

View File

@@ -1,318 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*/
// Required code
define('AREA', 'customer');
require ("./lib/init.php");
// Create new autoresponder
if($action == "add")
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$account = trim($_POST['account']);
$subject = trim($_POST['subject']);
$message = trim($_POST['message']);
$date_from_off = isset($_POST['date_from_off']) ? -1 : 0;
$date_until_off = isset($_POST['date_until_off']) ? -1 : 0;
/*
* @TODO validate date (DD-MM-YYYY)
*/
$ts_from = -1;
$ts_until = -1;
if($date_from_off > -1)
{
$date_from = $_POST['date_from'];
$ts_from = mktime(0, 0, 0, substr($date_from, 3, 2), substr($date_from, 0, 2), substr($date_from, 6, 4));
}
if($date_until_off > -1)
{
$date_until = $_POST['date_until'];
$ts_until = mktime(0, 0, 0, substr($date_until, 3, 2), substr($date_until, 0, 2), substr($date_until, 6, 4));
}
if(empty($account)
|| empty($subject)
|| empty($message))
{
standard_error('missingfields');
}
// Does account exist?
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1");
if($db->num_rows($result) == 0)
{
standard_error('accountnotexisting');
}
// Does autoresponder exist?
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1");
if($db->num_rows($result) == 1)
{
standard_error('autoresponderalreadyexists');
}
$db->query("INSERT INTO `" . TABLE_MAIL_AUTORESPONDER . "`
SET `email` = '" . $db->escape($account) . "',
`message` = '" . $db->escape($message) . "',
`enabled` = '" . (int)$_POST['active'] . "',
`date_from` = '" . (int)$ts_from . "',
`date_until` = '" . (int)$ts_until . "',
`subject` = '" . $db->escape($subject) . "',
`customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_autoresponder_used` = `email_autoresponder_used` + 1 WHERE `customerid` = '" . $db->escape((int)$userinfo['customerid']). "'");
redirectTo($filename, Array('s' => $s));
}
// Get accounts
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` NOT IN (SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "`) ORDER BY email ASC");
if($db->num_rows($result) == 0)
{
standard_error('noemailaccount');
}
$accounts = '';
while($row = $db->fetch_array($result))
{
$accounts.= "<option value=\"" . $row['email'] . "\">" . $row['email'] . "</option>";
}
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
#$isactive = makeyesno('active', '1', '0', '1');
$autoresponder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addautoresponder.php';
$autoresponder_add_form = htmlform::genHTMLForm($autoresponder_add_data);
$title = $autoresponder_add_data['autoresponder_add']['title'];
$image = $autoresponder_add_data['autoresponder_add']['image'];
eval("echo \"" . getTemplate("email/autoresponder_add") . "\";");
}
// Edit autoresponder
else
if($action == "edit")
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$account = trim($_POST['account']);
$subject = trim($_POST['subject']);
$message = trim($_POST['message']);
$date_from_off = isset($_POST['date_from_off']) ? -1 : 0;
$date_until_off = isset($_POST['date_until_off']) ? -1 : 0;
/*
* @TODO validate date (DD-MM-YYYY)
*/
$ts_from = -1;
$ts_until = -1;
if($date_from_off > -1)
{
$date_from = $_POST['date_from'];
$ts_from = mktime(0, 0, 0, substr($date_from, 3, 2), substr($date_from, 0, 2), substr($date_from, 6, 4));
}
if($date_until_off > -1)
{
$date_until = $_POST['date_until'];
$ts_until = mktime(0, 0, 0, substr($date_until, 3, 2), substr($date_until, 0, 2), substr($date_until, 6, 4));
}
if(empty($account)
|| empty($subject)
|| empty($message))
{
standard_error('missingfields');
}
// Does account exist?
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1");
if($db->num_rows($result) == 0)
{
standard_error('accountnotexisting');
}
// Does autoresponder exist?
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1");
if($db->num_rows($result) == 0)
{
standard_error('invalidautoresponder');
}
$ResponderActive = 0;
if(isset($_POST['active'])
&& $_POST['active'] == '1')
{
$ResponderActive = 1;
}
$db->query("UPDATE `" . TABLE_MAIL_AUTORESPONDER . "`
SET `message` = '" . $db->escape($message) . "',
`enabled` = '" . (int)$ResponderActive . "',
`date_from` = '" . (int)$ts_from . "',
`date_until` = '" . (int)$ts_until . "',
`subject` = '" . $db->escape($subject) . "'
WHERE `email` = '" . $db->escape($account) . "'
AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
");
redirectTo($filename, Array('s' => $s));
}
$email = trim(htmlspecialchars($_GET['email']));
// Get account data
$result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($email) . "' LIMIT 0,1");
if($db->num_rows($result) == 0)
{
standard_error('invalidautoresponder');
}
$row = $db->fetch_array($result);
$subject = htmlspecialchars($row['subject']);
$message = htmlspecialchars($row['message']);
$date_from = (int)$row['date_from'];
$date_until = (int)$row['date_until'];
if($date_from == -1)
{
$deactivated = '-1';
$date_from = '';
}
else
{
$deactivated = '0';
$date_from = date('d-m-Y', $date_from);
}
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
if($date_until == -1)
{
$deactivated = '-1';
$date_until = '';
}
else
{
$deactivated = '0';
$date_until = date('d-m-Y', $date_until);
}
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
#$isactive = makeyesno('active', '1', '0', $row['enabled']);
$autoresponder_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_editautoresponder.php';
$autoresponder_edit_form = htmlform::genHTMLForm($autoresponder_edit_data);
$title = $autoresponder_edit_data['autoresponder_edit']['title'];
$image = $autoresponder_edit_data['autoresponder_edit']['image'];
eval("echo \"" . getTemplate("email/autoresponder_edit") . "\";");
}
// Delete autoresponder
else
if($action == "delete")
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$account = trim($_POST['account']);
// Does autoresponder exist?
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1");
if($db->num_rows($result) == 0)
{
standard_error('invalidautoresponder');
}
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "`
WHERE `email` = '" . $db->escape($account) . "'
AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_autoresponder_used` = `email_autoresponder_used` - 1 WHERE `customerid` = '" . $db->escape((int)$userinfo['customerid']). "'");
redirectTo($filename, Array('s' => $s));
}
$email = trim(htmlspecialchars($_GET['email']));
ask_yesno('autoresponderdelete', $filename, array('action' => $action, 'account' => $email));
}
// List existing autoresponders
else
{
$autoresponder = '';
$count = 0;
$result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' ORDER BY email ASC");
while($row = $db->fetch_array($result))
{
if($row['date_from'] == -1 && $row['date_until'] == -1)
{
$activated_date = $lng['panel']['not_activated'];
}
elseif($row['date_from'] == -1 && $row['date_until'] != -1)
{
$activated_date = $lng['autoresponder']['date_until'].': '.date('d-m-Y', $row['date_until']);
}
elseif($row['date_from'] != -1 && $row['date_until'] == -1)
{
$activated_date = $lng['autoresponder']['date_from'].': '.date('d-m-Y', $row['date_from']);
}
else
{
$activated_date = date('d-m-Y', $row['date_from']) . ' - ' . date('d-m-Y', $row['date_until']);
}
eval("\$autoresponder.=\"" . getTemplate("email/autoresponder_autoresponder") . "\";");
$count++;
}
eval("echo \"" . getTemplate("email/autoresponder") . "\";");
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -14,68 +14,51 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
use Froxlor\Settings;
use Froxlor\Api\Commands\DirOptions as DirOptions;
use Froxlor\Api\Commands\DirProtections as DirProtections;
use Froxlor\Api\Commands\CustomerBackups as CustomerBackups;
require ("./lib/init.php");
if(isset($_POST['id']))
{
$id = intval($_POST['id']);
// redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'extras')) {
\Froxlor\UI\Response::redirectTo('customer_index.php');
}
elseif(isset($_GET['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'overview')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras");
eval("echo \"" . getTemplate("extras/extras") . "\";");
}
elseif($page == 'backup')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras_backup");
if ($page == 'overview') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_extras");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("extras/extras") . "\";");
} elseif ($page == 'htpasswds') {
$result = $db->query("SELECT `backup_enabled` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$row = $db->fetch_array($result);
// redirect if this customer sub-page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'extras.directoryprotection')) {
\Froxlor\UI\Response::redirectTo('customer_index.php');
}
$backup_enabled = makeyesno('backup_enabled', '1', '0', $row['backup_enabled']);
if(isset($_POST['send']) && $_POST['send'] == 'send'){
$backup_enabled = ($_POST['backup_enabled'] == '1' ? '1' : '0');
$backup_ftp_enabled = ($_POST['backup_ftp_enabled'] == '1' ? '1' : '0');
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `backup_enabled`='" . $backup_enabled . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
$backup_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.backup.php';
$backup_form = htmlform::genHTMLForm($backup_data);
$title = $backup_data['backup']['title'];
$image = $backup_data['backup']['image'];
eval("echo \"" . getTemplate("extras/backup") . "\";");
}
elseif($page == 'htpasswds')
{
if($action == '')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras::htpasswds");
if ($action == '') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_extras::htpasswds");
$fields = array(
'username' => $lng['login']['username'],
'path' => $lng['panel']['path']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_HTPASSWDS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_PANEL_HTPASSWDS, $fields);
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "`
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
Database::pexecute($result_stmt, array(
"customerid" => $userinfo['customerid']
));
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
@@ -84,191 +67,123 @@ elseif($page == 'htpasswds')
$count = 0;
$htpasswds = '';
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
if(strpos($row['path'], $userinfo['documentroot']) === 0)
{
$row['path'] = substr($row['path'], strlen($userinfo['documentroot']));
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
if (strpos($row['path'], $userinfo['documentroot']) === 0) {
$row['path'] = str_replace($userinfo['documentroot'], "/", $row['path']);
}
$row['path'] = \Froxlor\FileDir::makeCorrectDir($row['path']);
$row = \Froxlor\PhpHelper::htmlentitiesArray($row);
eval("\$htpasswds.=\"" . \Froxlor\UI\Template::getTemplate("extras/htpasswds_htpasswd") . "\";");
$count ++;
}
$i ++;
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("extras/htpasswds") . "\";");
} elseif ($action == 'delete' && $id != 0) {
try {
$json_result = DirProtections::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['username']) && $result['username'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
DirProtections::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
if (strpos($result['path'], $userinfo['documentroot']) === 0) {
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
}
$row = htmlentities_array($row);
eval("\$htpasswds.=\"" . getTemplate("extras/htpasswds_htpasswd") . "\";");
$count++;
}
$i++;
}
eval("echo \"" . getTemplate("extras/htpasswds") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
if(isset($result['username'])
&& $result['username'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$db->query("DELETE FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='$id'");
$log->logAction(USR_ACTION, LOG_INFO, "deleted htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
inserttask('1');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
if(strpos($result['path'], $userinfo['documentroot']) === 0)
{
$result['path'] = substr($result['path'], strlen($userinfo['documentroot']));
}
ask_yesno('extras_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username'] . ' (' . $result['path'] . ')');
\Froxlor\UI\HTML::askYesNo('extras_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $result['username'] . ' (' . $result['path'] . ')');
}
}
}
elseif($action == 'add')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$path = makeCorrectDir(validate($_POST['path'], 'path'));
$userpath = $path;
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
$username = validate($_POST['username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
validate($_POST['directory_password'], 'password');
$username_path_check = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `username`='" . $db->escape($username) . "' AND `path`='" . $db->escape($path) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
} elseif ($action == 'add') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
DirProtections::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$pathSelect = \Froxlor\FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
if(CRYPT_STD_DES == 1)
{
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
$password = crypt($_POST['directory_password'], $saltfordescrypt);
}
else
{
$password = crypt($_POST['directory_password']);
}
if(!$_POST['path'])
{
standard_error('invalidpath');
}
if($username == '')
{
standard_error(array('stringisempty', 'myloginname'));
}
elseif($username_path_check['username'] == $username
&& $username_path_check['path'] == $path)
{
standard_error('userpathcombinationdupe');
}
elseif($_POST['directory_password'] == '')
{
standard_error(array('stringisempty', 'mypassword'));
}
elseif($path == '')
{
standard_error('patherror');
}
else
{
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` (`customerid`, `username`, `password`, `path`, `authname`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($password) . "', '" . $db->escape($path) . "', '" . $db->escape($authname) . "')");
$log->logAction(USR_ACTION, LOG_INFO, "added htpasswd for '" . $username . " (" . $path . ")'");
inserttask('1');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
$htpasswd_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_add.php';
$htpasswd_add_form = htmlform::genHTMLForm($htpasswd_add_data);
$htpasswd_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htpasswd_add.php';
$htpasswd_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($htpasswd_add_data);
$title = $htpasswd_add_data['htpasswd_add']['title'];
$image = $htpasswd_add_data['htpasswd_add']['image'];
eval("echo \"" . getTemplate("extras/htpasswds_add") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("extras/htpasswds_add") . "\";");
}
}
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
} elseif ($action == 'edit' && $id != 0) {
try {
$json_result = DirProtections::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if(isset($result['username'])
&& $result['username'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
validate($_POST['directory_password'], 'password');
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
if(CRYPT_STD_DES == 1)
{
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
$password = crypt($_POST['directory_password'], $saltfordescrypt);
if (isset($result['username']) && $result['username'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
DirProtections::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
else
{
$password = crypt($_POST['directory_password']);
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
if (strpos($result['path'], $userinfo['documentroot']) === 0) {
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
}
$pwd_sql = '';
if($_POST['directory_password'] != '')
{
$pwd_sql = "`password`='" . $db->escape($password) . "' ";
}
$auth_sql = '';
if($authname != $result['authname'])
{
$auth_sql = "`authname`='" . $db->escape($authname) . "' ";
}
$result = \Froxlor\PhpHelper::htmlentitiesArray($result);
if($pwd_sql != '' || $auth_sql != '')
{
if($pwd_sql !='' && $auth_sql != '') {
$pwd_sql.= ', ';
}
$db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET ".$pwd_sql.$auth_sql." WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$log->logAction(USR_ACTION, LOG_INFO, "edited htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
inserttask('1');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
if(strpos($result['path'], $userinfo['documentroot']) === 0)
{
$result['path'] = substr($result['path'], strlen($userinfo['documentroot']));
}
$result = htmlentities_array($result);
$htpasswd_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_edit.php';
$htpasswd_edit_form = htmlform::genHTMLForm($htpasswd_edit_data);
$htpasswd_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htpasswd_edit.php';
$htpasswd_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($htpasswd_edit_data);
$title = $htpasswd_edit_data['htpasswd_edit']['title'];
$image = $htpasswd_edit_data['htpasswd_edit']['image'];
eval("echo \"" . getTemplate("extras/htpasswds_edit") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("extras/htpasswds_edit") . "\";");
}
}
}
}
elseif($page == 'htaccess')
{
if($action == '')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras::htaccess");
} elseif ($page == 'htaccess') {
// redirect if this customer sub-page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'extras.pathoptions')) {
\Froxlor\UI\Response::redirectTo('customer_index.php');
}
if ($action == '') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_extras::htaccess");
$fields = array(
'path' => $lng['panel']['path'],
'options_indexes' => $lng['extras']['view_directory'],
@@ -277,9 +192,13 @@ elseif($page == 'htaccess')
'error500path' => $lng['extras']['error500path'],
'options_cgi' => $lng['extras']['execute_perl']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_HTACCESS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_PANEL_HTACCESS, $fields);
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "`
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
Database::pexecute($result_stmt, array(
"customerid" => $userinfo['customerid']
));
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
@@ -288,193 +207,194 @@ elseif($page == 'htaccess')
$count = 0;
$htaccess = '';
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
$cperlenabled = \Froxlor\Customer\Customer::customerHasPerlEnabled($userinfo['customerid']);
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
if(strpos($row['path'], $userinfo['documentroot']) === 0)
{
$row['path'] = substr($row['path'], strlen($userinfo['documentroot']));
// don't show nothing wehn it's the docroot, show slash
if ($row['path'] == '') { $row['path'] = '/'; }
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
if (strpos($row['path'], $userinfo['documentroot']) === 0) {
$row['path'] = str_replace($userinfo['documentroot'], "/", $row['path']);
}
$row['path'] = \Froxlor\FileDir::makeCorrectDir($row['path']);
$row['options_indexes'] = str_replace('1', $lng['panel']['yes'], $row['options_indexes']);
$row['options_indexes'] = str_replace('0', $lng['panel']['no'], $row['options_indexes']);
$row['options_cgi'] = str_replace('1', $lng['panel']['yes'], $row['options_cgi']);
$row['options_cgi'] = str_replace('0', $lng['panel']['no'], $row['options_cgi']);
$row = htmlentities_array($row);
eval("\$htaccess.=\"" . getTemplate("extras/htaccess_htaccess") . "\";");
$count++;
$row = \Froxlor\PhpHelper::htmlentitiesArray($row);
eval("\$htaccess.=\"" . \Froxlor\UI\Template::getTemplate("extras/htaccess_htaccess") . "\";");
$count ++;
}
$i++;
$i ++;
}
eval("echo \"" . getTemplate("extras/htaccess") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("extras/htaccess") . "\";");
} elseif ($action == 'delete' && $id != 0) {
try {
$json_result = DirOptions::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if(isset($result['customerid'])
&& $result['customerid'] != ''
&& $result['customerid'] == $userinfo['customerid'])
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$db->query("DELETE FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$log->logAction(USR_ACTION, LOG_INFO, "deleted htaccess for '" . str_replace($userinfo['documentroot'], '', $result['path']) . "'");
inserttask('1');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
ask_yesno('extras_reallydelete_pathoptions', $filename, array('id' => $id, 'page' => $page, 'action' => $action), str_replace($userinfo['documentroot'], '', $result['path']));
if (isset($result['customerid']) && $result['customerid'] != '' && $result['customerid'] == $userinfo['customerid']) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
DirOptions::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNo('extras_reallydelete_pathoptions', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), str_replace($userinfo['documentroot'], '/', $result['path']));
}
}
}
elseif($action == 'add')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$path = makeCorrectDir(validate($_POST['path'], 'path'));
$userpath = $path;
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
$path_dupe_check = $db->query_first("SELECT `id`, `path` FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `path`='" . $db->escape($path) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
if(!$_POST['path'])
{
standard_error('invalidpath');
} elseif ($action == 'add') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
DirOptions::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$pathSelect = \Froxlor\FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
$cperlenabled = \Froxlor\Customer\Customer::customerHasPerlEnabled($userinfo['customerid']);
if(isset($_POST['options_cgi']))
{
$options_cgi = intval($_POST['options_cgi']);
}
else
{
$options_cgi = '0';
}
$error404path = correctErrorDocument($_POST['error404path']);
$error403path = correctErrorDocument($_POST['error403path']);
$error500path = correctErrorDocument($_POST['error500path']);
if($path_dupe_check['path'] == $path)
{
standard_error('errordocpathdupe', $userpath);
}
elseif($path == '')
{
standard_error('patherror');
}
else
{
$db->query('INSERT INTO `' . TABLE_PANEL_HTACCESS . '` SET
`customerid` = "'.(int)$userinfo['customerid'].'",
`path` = "'.$db->escape($path).'",
`options_indexes` = "'.$db->escape($_POST['options_indexes'] == '1' ? '1' : '0').'",
`error404path` = "'.$db->escape($error404path).'",
`error403path` = "'.$db->escape($error403path).'",
`error500path` = "'.$db->escape($error500path).'",
`options_cgi` = "'.$db->escape($options_cgi).'"');
$log->logAction(USR_ACTION, LOG_INFO, "added htaccess for '" . $path . "'");
inserttask('1');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
#$options_indexes = makeyesno('options_indexes', '1', '0', '0');
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
#$options_cgi = makeyesno('options_cgi', '1', '0', '0');
$htaccess_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_add.php';
$htaccess_add_form = htmlform::genHTMLForm($htaccess_add_data);
$htaccess_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htaccess_add.php';
$htaccess_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($htaccess_add_data);
$title = $htaccess_add_data['htaccess_add']['title'];
$image = $htaccess_add_data['htaccess_add']['image'];
eval("echo \"" . getTemplate("extras/htaccess_add") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("extras/htaccess_add") . "\";");
}
}
elseif(($action == 'edit')
&& ($id != 0))
{
$result = $db->query_first('SELECT * FROM `' . TABLE_PANEL_HTACCESS . '` WHERE `customerid` = "' . (int)$userinfo['customerid'] . '" AND `id` = "' . (int)$id . '"');
} elseif (($action == 'edit') && ($id != 0)) {
try {
$json_result = DirOptions::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if((isset($result['customerid']))
&& ($result['customerid'] != '')
&& ($result['customerid'] == $userinfo['customerid']))
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$option_indexes = intval($_POST['options_indexes']);
$options_cgi = isset($_POST['options_cgi']) ? intval($_POST['options_cgi']) : 0;
if($option_indexes != '1')
{
$option_indexes = '0';
if ((isset($result['customerid'])) && ($result['customerid'] != '') && ($result['customerid'] == $userinfo['customerid'])) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
DirOptions::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
if($options_cgi != '1')
{
$options_cgi = '0';
}
$error404path = correctErrorDocument($_POST['error404path']);
$error403path = correctErrorDocument($_POST['error403path']);
$error500path = correctErrorDocument($_POST['error500path']);
if(($option_indexes != $result['options_indexes'])
|| ($error404path != $result['error404path'])
|| ($error403path != $result['error403path'])
|| ($error500path != $result['error500path'])
|| ($options_cgi != $result['options_cgi']))
{
inserttask('1');
$db->query('UPDATE `' . TABLE_PANEL_HTACCESS . '` SET `options_indexes` = "' . $db->escape($option_indexes) . '", `error404path` = "' . $db->escape($error404path) . '", `error403path` = "' . $db->escape($error403path) . '", `error500path` = "' . $db->escape($error500path) . '", `options_cgi` = "' . $db->escape($options_cgi) . '" WHERE `customerid` = "' . (int)$userinfo['customerid'] . '" AND `id` = "' . (int)$id . '"');
$log->logAction(USR_ACTION, LOG_INFO, "edited htaccess for '" . str_replace($userinfo['documentroot'], '', $result['path']) . "'");
}
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
if(strpos($result['path'], $userinfo['documentroot']) === 0)
{
$result['path'] = substr($result['path'], strlen($userinfo['documentroot']));
// don't show nothing wehn it's the docroot, show slash
if ($result['path'] == '') { $result['path'] = '/'; }
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
if (strpos($result['path'], $userinfo['documentroot']) === 0) {
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
}
$result['error404path'] = $result['error404path'];
$result['error403path'] = $result['error403path'];
$result['error500path'] = $result['error500path'];
#$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
#$options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
$result = htmlentities_array($result);
$cperlenabled = \Froxlor\Customer\Customer::customerHasPerlEnabled($userinfo['customerid']);
/*
* $options_indexes = \Froxlor\UI\HTML::makeyesno('options_indexes', '1', '0', $result['options_indexes']);
* $options_cgi = \Froxlor\UI\HTML::makeyesno('options_cgi', '1', '0', $result['options_cgi']);
*/
$result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$htaccess_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htaccess_edit.php';
$htaccess_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($htaccess_edit_data);
$htaccess_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_edit.php';
$htaccess_edit_form = htmlform::genHTMLForm($htaccess_edit_data);
$title = $htaccess_edit_data['htaccess_edit']['title'];
$image = $htaccess_edit_data['htaccess_edit']['image'];
eval("echo \"" . getTemplate("extras/htaccess_edit") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate("extras/htaccess_edit") . "\";");
}
}
}
}
} elseif ($page == 'backup') {
?>
// redirect if this customer sub-page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'extras.backup')) {
\Froxlor\UI\Response::redirectTo('customer_index.php');
}
if (Settings::Get('system.backupenabled') == 1) {
if ($action == 'abort' && isset($_POST['send']) && $_POST['send'] == 'send') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "customer_extras::backup - aborted scheduled backupjob");
try {
CustomerBackups::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::standard_success('backupaborted');
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
'action' => '',
's' => $s
));
}
if ($action == '') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_extras::backup");
// check whether there is a backup-job for this customer
try {
$json_result = CustomerBackups::getLocal($userinfo)->listing();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
$existing_backupJob = null;
if ($result['count'] > 0) {
$existing_backupJob = array_shift($result['list']);
}
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
CustomerBackups::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::standard_success('backupscheduled');
} else {
if (! empty($existing_backupJob)) {
$action = "abort";
$row = $existing_backupJob['data'];
$row['path'] = \Froxlor\FileDir::makeCorrectDir(str_replace($userinfo['documentroot'], "/", $row['destdir']));
$row['backup_web'] = ($row['backup_web'] == '1') ? $lng['panel']['yes'] : $lng['panel']['no'];
$row['backup_mail'] = ($row['backup_mail'] == '1') ? $lng['panel']['yes'] : $lng['panel']['no'];
$row['backup_dbs'] = ($row['backup_dbs'] == '1') ? $lng['panel']['yes'] : $lng['panel']['no'];
}
$pathSelect = \Froxlor\FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
$backup_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.backup.php';
$backup_form = \Froxlor\UI\HtmlForm::genHTMLForm($backup_data);
$title = $backup_data['backup']['title'];
$image = $backup_data['backup']['image'];
if (! empty($existing_backupJob)) {
// overwrite backup_form after we took everything from it we needed
eval("\$backup_form = \"" . \Froxlor\UI\Template::getTemplate("extras/backup_listexisting") . "\";");
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("extras/backup") . "\";");
}
}
} else {
\Froxlor\UI\Response::standard_error('backupfunctionnotenabled');
}
}

View File

@@ -14,43 +14,47 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
use Froxlor\Settings;
use Froxlor\Api\Commands\Ftps as Ftps;
require ("./lib/init.php");
if(isset($_POST['id']))
{
$id = intval($_POST['id']);
// redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'ftp')) {
\Froxlor\UI\Response::redirectTo('customer_index.php');
}
elseif(isset($_GET['id']))
{
$id = 0;
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'overview')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_ftp");
eval("echo \"" . getTemplate("ftp/ftp") . "\";");
}
elseif($page == 'accounts')
{
if($action == '')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_ftp::accounts");
if ($page == 'overview') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_ftp");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('ftp/ftp') . "\";");
} elseif ($page == 'accounts') {
if ($action == '') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_ftp::accounts");
$fields = array(
'username' => $lng['login']['username'],
'homedir' => $lng['panel']['path']
'homedir' => $lng['panel']['path'],
'description' => $lng['panel']['ftpdesc']
);
$paging = new paging($userinfo, $db, TABLE_FTP_USERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_FTP_USERS, $fields);
$result_stmt = Database::prepare("SELECT `id`, `username`, `description`, `homedir`, `shell` FROM `" . TABLE_FTP_USERS . "`
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
Database::pexecute($result_stmt, array(
"customerid" => $userinfo['customerid']
));
$ftps_count = Database::num_rows();
$paging->setEntries($ftps_count);
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
@@ -59,317 +63,182 @@ elseif($page == 'accounts')
$count = 0;
$accounts = '';
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
if(strpos($row['homedir'], $userinfo['documentroot']) === 0)
{
$row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']));
}
else
{
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
if (strpos($row['homedir'], $userinfo['documentroot']) === 0) {
$row['documentroot'] = str_replace($userinfo['documentroot'], "/", $row['homedir']);
} else {
$row['documentroot'] = $row['homedir'];
}
$row['documentroot'] = makeCorrectDir($row['documentroot']);
$row = htmlentities_array($row);
eval("\$accounts.=\"" . getTemplate("ftp/accounts_account") . "\";");
$count++;
$row['documentroot'] = \Froxlor\FileDir::makeCorrectDir($row['documentroot']);
$row = \Froxlor\PhpHelper::htmlentitiesArray($row);
eval("\$accounts.=\"" . \Froxlor\UI\Template::getTemplate('ftp/accounts_account') . "\";");
$count ++;
}
$i++;
$i ++;
}
$ftps_count = $db->num_rows($result);
eval("echo \"" . getTemplate("ftp/accounts") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
{
$result = $db->query_first("SELECT `id`, `username`, `homedir`, `up_count`, `up_bytes`, `down_count`, `down_bytes` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
if(isset($result['username'])
&& $result['username'] != $userinfo['loginname'])
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `up_count`=`up_count`+'" . (int)$result['up_count'] . "', `up_bytes`=`up_bytes`+'" . (int)$result['up_bytes'] . "', `down_count`=`down_count`+'" . (int)$result['down_count'] . "', `down_bytes`=`down_bytes`+'" . (int)$result['down_bytes'] . "' WHERE `username`='" . $db->escape($userinfo['loginname']) . "'");
$result = $db->query_first("SELECT `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $db->escape($result['username']) . "'");
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=REPLACE(`members`,'," . $db->escape($result['username']) . "','') WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
if($userinfo['ftps_used'] == '1')
{
$resetaccnumber = " , `ftp_lastaccountnumber`='0'";
}
else
{
$resetaccnumber = '';
}
// refs #293
if(isset($_POST['delete_userfiles'])
&& (int)$_POST['delete_userfiles'] == 1)
{
inserttask('8', $userinfo['loginname'], $result['homedir']);
}
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`-1 $resetaccnumber WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
ask_yesno_withcheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate('ftp/accounts') . "\";");
} elseif ($action == 'delete' && $id != 0) {
try {
$json_result = Ftps::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
else
{
standard_error('ftp_cantdeletemainaccount');
}
}
elseif($action == 'add')
{
if($userinfo['ftps_used'] < $userinfo['ftps']
|| $userinfo['ftps'] == '-1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$path = validate($_POST['path'], 'path');
$password = validate($_POST['ftp_password'], 'password');
$password = validatePassword($password);
$result = json_decode($json_result, true)['data'];
$sendinfomail = intval($_POST['sendinfomail']);
if($sendinfomail != 1)
{
$sendinfomail = 0;
}
if($settings['customer']['ftpatdomain'] == '1')
{
$ftpusername = validate($_POST['ftp_username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
if($ftpusername == '')
{
standard_error(array('stringisempty', 'username'));
}
$ftpdomain = $idna_convert->encode(validate($_POST['ftp_domain'], 'domain'));
$ftpdomain_check = $db->query_first("SELECT `id`, `domain`, `customerid` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($ftpdomain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
if($ftpdomain_check['domain'] != $ftpdomain)
{
standard_error('maindomainnonexist', $domain);
}
$username = $ftpusername . "@" . $ftpdomain;
}
else
{
$username = $userinfo['loginname'] . $settings['customer']['ftpprefix'] . (intval($userinfo['ftp_lastaccountnumber']) + 1);
}
$username_check = $db->query_first('SELECT * FROM `' . TABLE_FTP_USERS .'` WHERE `username` = \'' . $db->escape($username) . '\'');
if(!empty($username_check) && $username_check['username'] = $username)
{
standard_error('usernamealreadyexists', $username);
}
elseif($password == '')
{
standard_error(array('stringisempty', 'mypassword'));
}
elseif($path == '')
{
standard_error('patherror');
}
else
{
$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'] . "')");
$result = $db->query("SELECT `bytes_in_used` FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $userinfo['loginname'] . "'");
while($row = $db->fetch_array($result))
{
$db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($username) . "', 'user', '" . $db->escape($row['bytes_in_used']) . "', '0', '0', '0', '0', '0')");
}
$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_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
inserttask(5);
if($sendinfomail == 1)
{
$replace_arr = array(
'CUST_NAME' => getCorrectUserSalutation($userinfo),
'USR_NAME' => $username,
'USR_PASS' => $password,
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
);
$def_language = $userinfo['def_language'];
$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`=\'new_ftpaccount_by_customer_subject\'');
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_subject']), $replace_arr));
$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`=\'new_ftpaccount_by_customer_mailbody\'');
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_body']['main']), $replace_arr));
$_mailerror = false;
try {
$mail->Subject = $mail_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));
if (isset($result['username']) && $result['username'] != $userinfo['loginname']) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
Ftps::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
\Froxlor\UI\HTML::askYesNoWithCheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $result['username']);
}
else
{
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], '/');
} else {
\Froxlor\UI\Response::standard_error('ftp_cantdeletemainaccount');
}
} elseif ($action == 'add') {
if ($userinfo['ftps_used'] < $userinfo['ftps'] || $userinfo['ftps'] == '-1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
Ftps::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$pathSelect = \Froxlor\FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], '/');
if($settings['customer']['ftpatdomain'] == '1')
{
if (Settings::Get('customer.ftpatdomain') == '1') {
$domainlist = array();
$domains = '';
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$result_domains_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid`= :customerid");
Database::pexecute($result_domains_stmt, array(
"customerid" => $userinfo['customerid']
));
while($row_domain = $db->fetch_array($result_domains))
{
$domainlist[] = $row_domain['domain'];
while ($row_domain = $result_domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$domainlist[] = $row_domain['domain'];
}
sort($domainlist);
if(isset($domainlist[0]) && $domainlist[0] != '')
{
foreach($domainlist as $dom)
{
$domains .= makeoption($idna_convert->decode($dom), $dom);
if (isset($domainlist[0]) && $domainlist[0] != '') {
foreach ($domainlist as $dom) {
$domains .= \Froxlor\UI\HTML::makeoption($idna_convert->decode($dom), $dom);
}
}
}
#$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
if (Settings::Get('system.allow_customer_shell') == '1') {
$shells = \Froxlor\UI\HTML::makeoption("/bin/false", "/bin/false", "/bin/false");
$shells_avail = Settings::Get('system.available_shells');
if (! empty($shells_avail)) {
$shells_avail = explode(",", $shells_avail);
$shells_avail = array_map("trim", $shells_avail);
foreach ($shells_avail as $_shell) {
$shells .= \Froxlor\UI\HTML::makeoption($_shell, $_shell, "/bin/false");
}
}
}
$ftp_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_add.php';
$ftp_add_form = htmlform::genHTMLForm($ftp_add_data);
// $sendinfomail = \Froxlor\UI\HTML::makeyesno('sendinfomail', '1', '0', '0');
$ftp_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/ftp/formfield.ftp_add.php';
$ftp_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($ftp_add_data);
$title = $ftp_add_data['ftp_add']['title'];
$image = $ftp_add_data['ftp_add']['image'];
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('ftp/accounts_add') . "\";");
}
}
}
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT `id`, `username`, `homedir`, `uid`, `gid` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
} elseif ($action == 'edit' && $id != 0) {
try {
$json_result = Ftps::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if(isset($result['username'])
&& $result['username'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$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 (isset($result['username']) && $result['username'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
Ftps::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
if($_setnewpass)
{
if($password == '')
{
standard_error(array('stringisempty', 'mypassword'));
exit;
}
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 . "'");
}
}
if($path != '')
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
if($path != $result['homedir'])
{
if(!file_exists($path))
{
mkDirWithCorrectOwnership($userinfo['documentroot'], $path, $result['uid'], $result['gid']);
inserttask(5); /* Let the cronjob do the rest */
}
$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
{
if(strpos($result['homedir'], $userinfo['documentroot']) === 0)
{
$homedir = substr($result['homedir'], strlen($userinfo['documentroot']));
}
else
{
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
if (strpos($result['homedir'], $userinfo['documentroot']) === 0) {
$homedir = str_replace($userinfo['documentroot'], "/", $result['homedir']);
} else {
$homedir = $result['homedir'];
}
$homedir = makeCorrectDir($homedir);
$homedir = \Froxlor\FileDir::makeCorrectDir($homedir);
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $homedir);
$pathSelect = \Froxlor\FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $homedir);
if($settings['customer']['ftpatdomain'] == '1')
{
if (Settings::Get('customer.ftpatdomain') == '1') {
$domains = '';
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$result_domains_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid` = :customerid");
Database::pexecute($result_domains_stmt, array(
"customerid" => $userinfo['customerid']
));
while($row_domain = $db->fetch_array($result_domains))
{
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
while ($row_domain = $result_domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$domains .= \Froxlor\UI\HTML::makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
}
}
$ftp_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_edit.php';
$ftp_edit_form = htmlform::genHTMLForm($ftp_edit_data);
if (Settings::Get('system.allow_customer_shell') == '1') {
$shells = \Froxlor\UI\HTML::makeoption("/bin/false", "/bin/false", $result['shell']);
$shells_avail = Settings::Get('system.available_shells');
if (! empty($shells_avail)) {
$shells_avail = explode(",", $shells_avail);
$shells_avail = array_map("trim", $shells_avail);
foreach ($shells_avail as $_shell) {
$shells .= \Froxlor\UI\HTML::makeoption($_shell, $_shell, $result['shell']);
}
}
}
$ftp_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/ftp/formfield.ftp_edit.php';
$ftp_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($ftp_edit_data);
$title = $ftp_edit_data['ftp_edit']['title'];
$image = $ftp_edit_data['ftp_edit']['image'];
eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('ftp/accounts_edit') . "\";");
}
}
}
}
?>

View File

@@ -14,204 +14,355 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
use Froxlor\Settings;
use Froxlor\Api\Commands\Customers as Customers;
require ("./lib/init.php");
if ($action == 'logout') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, 'logged out');
if($action == 'logout')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "logged out");
if($settings['session']['allow_multiple_login'] == '1')
{
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0' AND `hash` = '" . $s . "'");
}
else
{
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0'");
$params = array(
"customerid" => $userinfo['customerid']
);
if (Settings::Get('session.allow_multiple_login') == '1') {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :customerid
AND `adminsession` = '0'
AND `hash` = :hash");
$params["hash"] = $s;
} else {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :customerid
AND `adminsession` = '0'");
}
Database::pexecute($stmt, $params);
redirectTo('index.php');
exit;
\Froxlor\UI\Response::redirectTo('index.php');
}
if($page == 'overview')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_index");
if ($page == 'overview') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_index");
$domain_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid` = :customerid
AND `parentdomainid` = '0'
AND `id` <> :standardsubdomain
");
Database::pexecute($domain_stmt, array(
"customerid" => $userinfo['customerid'],
"standardsubdomain" => $userinfo['standardsubdomain']
));
$domains = '';
$result = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `id` <> '" . (int)$userinfo['standardsubdomain'] . "' ");
$domainArray = array();
while($row = $db->fetch_array($result))
{
while ($row = $domain_stmt->fetch(PDO::FETCH_ASSOC)) {
$domainArray[] = $idna_convert->decode($row['domain']);
}
natsort($domainArray);
$domains = implode(', ', $domainArray);
$domains = implode(',<br />', $domainArray);
// standard-subdomain
$stdsubdomain = '';
if ($userinfo['standardsubdomain'] != '0') {
$std_domain_stmt = Database::prepare("
SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid` = :customerid
AND `id` = :standardsubdomain
");
$std_domain = Database::pexecute_first($std_domain_stmt, array(
"customerid" => $userinfo['customerid'],
"standardsubdomain" => $userinfo['standardsubdomain']
));
$stdsubdomain = $std_domain['domain'];
}
$userinfo['email'] = $idna_convert->decode($userinfo['email']);
$yesterday = time() - (60 * 60 * 24);
$month = date('M Y', $yesterday);
/* $traffic=$db->query_first("SELECT SUM(http) AS http_sum, SUM(ftp_up) AS ftp_up_sum, SUM(ftp_down) AS ftp_down_sum, SUM(mail) AS mail_sum FROM ".TABLE_PANEL_TRAFFIC." WHERE year='".date('Y')."' AND month='".date('m')."' AND day<='".date('d')."' AND customerid='".$userinfo['customerid']."'");
$userinfo['traffic_used']=$traffic['http_sum']+$traffic['ftp_up_sum']+$traffic['ftp_down_sum']+$traffic['mail_sum'];*/
// get disk-space usages for web, mysql and mail
$usages_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DISKSPACE . "` WHERE `customerid` = :cid ORDER BY `stamp` DESC LIMIT 1");
$usages = Database::pexecute_first($usages_stmt, array(
'cid' => $userinfo['customerid']
));
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $settings['panel']['decimal_places']);
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps tickets subdomains aps_packages');
$opentickets = 0;
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `customerid` = "' . $userinfo['customerid'] . '"
AND `answerto` = "0"
AND (`status` = "0" OR `status` = "2")
AND `lastreplier`="1"');
$awaitingtickets = $opentickets['count'];
$awaitingtickets_text = '';
if($opentickets > 0)
if ($usages)
{
$awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '<a href="customer_tickets.php?page=tickets&amp;s=' . $s . '">' . $opentickets['count'] . '</a>'));
$userinfo['diskspace_used'] = round($usages['webspace'] / 1024, Settings::Get('panel.decimal_places'));
$userinfo['mailspace_used'] = round($usages['mail'] / 1024, Settings::Get('panel.decimal_places'));
$userinfo['dbspace_used'] = round($usages['mysql'] / 1024, Settings::Get('panel.decimal_places'));
$userinfo['total_used'] = round(($usages['webspace'] + $usages['mail'] + $usages['mysql']) / 1024, Settings::Get('panel.decimal_places'));
} else {
$userinfo['diskspace_used'] = 0;
$userinfo['mailspace_used'] = 0;
$userinfo['dbspace_used'] = 0;
$userinfo['total_used'] = 0;
}
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, Settings::Get('panel.decimal_places'));
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
$userinfo = \Froxlor\PhpHelper::strReplaceArray('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
eval("echo \"" . getTemplate("index/index") . "\";");
}
elseif($page == 'change_password')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$old_password = validate($_POST['old_password'], 'old password');
$userinfo['custom_notes'] = ($userinfo['custom_notes'] != '') ? nl2br($userinfo['custom_notes']) : '';
if(md5($old_password) != $userinfo['password'])
{
standard_error('oldpasswordnotcorrect');
exit;
$services_enabled = "";
$se = array();
if ($userinfo['imap'] == '1')
$se[] = "IMAP";
if ($userinfo['pop3'] == '1')
$se[] = "POP3";
if ($userinfo['phpenabled'] == '1')
$se[] = "PHP";
if ($userinfo['perlenabled'] == '1')
$se[] = "Perl/CGI";
if ($userinfo['api_allowed'] == '1')
$se[] = '<a href="customer_index.php?s='.$s.'&page=apikeys">API</a>';
$services_enabled = implode(", ", $se);
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/index') . "\";");
} elseif ($page == 'change_password') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$old_password = \Froxlor\Validate\Validate::validate($_POST['old_password'], 'old password');
if (! \Froxlor\System\Crypt::validatePasswordLogin($userinfo, $old_password, TABLE_PANEL_CUSTOMERS, 'customerid')) {
\Froxlor\UI\Response::standard_error('oldpasswordnotcorrect');
}
$new_password = validate($_POST['new_password'], 'new password');
$new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm');
$new_password = \Froxlor\System\Crypt::validatePassword($_POST['new_password'], 'new password');
$new_password_confirm = \Froxlor\System\Crypt::validatePassword($_POST['new_password_confirm'], 'new password confirm');
if($old_password == '')
{
standard_error(array('stringisempty', 'oldpassword'));
}
elseif($new_password == '')
{
standard_error(array('stringisempty', 'newpassword'));
}
elseif($new_password_confirm == '')
{
standard_error(array('stringisempty', 'newpasswordconfirm'));
}
elseif($new_password != $new_password_confirm)
{
standard_error('newpasswordconfirmerror');
}
else
{
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `password`='" . md5($new_password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `password`='" . md5($old_password) . "'");
$log->logAction(USR_ACTION, LOG_NOTICE, 'changed password');
if ($old_password == '') {
\Froxlor\UI\Response::standard_error(array(
'stringisempty',
'oldpassword'
));
} elseif ($new_password == '') {
\Froxlor\UI\Response::standard_error(array(
'stringisempty',
'newpassword'
));
} elseif ($new_password_confirm == '') {
\Froxlor\UI\Response::standard_error(array(
'stringisempty',
'newpasswordconfirm'
));
} elseif ($new_password != $new_password_confirm) {
\Froxlor\UI\Response::standard_error('newpasswordconfirmerror');
} else {
// Update user password
try {
Customers::getLocal($userinfo, array(
'id' => $userinfo['customerid'],
'new_customer_password' => $new_password
))->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, 'changed password');
if(isset($_POST['change_main_ftp'])
&& $_POST['change_main_ftp'] == 'true')
{
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($new_password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'");
$log->logAction(USR_ACTION, LOG_NOTICE, 'changed main ftp password');
// Update ftp password
if (isset($_POST['change_main_ftp']) && $_POST['change_main_ftp'] == 'true') {
$cryptPassword = \Froxlor\System\Crypt::makeCryptPassword($new_password);
$stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "`
SET `password` = :password
WHERE `customerid` = :customerid
AND `username` = :username");
$params = array(
"password" => $cryptPassword,
"customerid" => $userinfo['customerid'],
"username" => $userinfo['loginname']
);
Database::pexecute($stmt, $params);
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, 'changed main ftp password');
}
if(isset($_POST['change_webalizer'])
&& $_POST['change_webalizer'] == 'true')
{
if(CRYPT_STD_DES == 1)
{
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
$new_webalizer_password = crypt($new_password, $saltfordescrypt);
}
else
{
$new_webalizer_password = crypt($new_password);
}
// Update statistics password
if (isset($_POST['change_stats']) && $_POST['change_stats'] == 'true') {
$new_stats_password = \Froxlor\System\Crypt::makeCryptPassword($new_password, true);
$db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET `password`='" . $db->escape($new_webalizer_password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'");
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_HTPASSWDS . "`
SET `password` = :password
WHERE `customerid` = :customerid
AND `username` = :username");
$params = array(
"password" => $new_stats_password,
"customerid" => $userinfo['customerid'],
"username" => $userinfo['loginname']
);
Database::pexecute($stmt, $params);
}
redirectTo($filename, Array('s' => $s));
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
}
} else {
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/change_password') . "\";");
}
else
{
eval("echo \"" . getTemplate("index/change_password") . "\";");
}
}
elseif($page == 'change_language')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$def_language = validate($_POST['def_language'], 'default language');
} elseif ($page == 'change_language') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$def_language = \Froxlor\Validate\Validate::validate($_POST['def_language'], 'default language');
if (isset($languages[$def_language])) {
try {
Customers::getLocal($userinfo, array(
'id' => $userinfo['customerid'],
'def_language' => $def_language
))->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
if(isset($languages[$def_language]))
{
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `def_language`='" . $db->escape($def_language) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `language`='" . $db->escape($def_language) . "' WHERE `hash`='" . $db->escape($s) . "'");
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default language to '" . $def_language . "'");
// also update current session
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_SESSIONS . "`
SET `language` = :lang
WHERE `hash` = :hash");
Database::pexecute($stmt, array(
"lang" => $def_language,
"hash" => $s
));
}
redirectTo($filename, Array('s' => $s));
}
else
{
$language_options = '';
$default_lang = $settings['panel']['standardlanguage'];
if($userinfo['def_language'] != '') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "changed default language to '" . $def_language . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} else {
$default_lang = Settings::Get('panel.standardlanguage');
if ($userinfo['def_language'] != '') {
$default_lang = $userinfo['def_language'];
}
while(list($language_file, $language_name) = each($languages))
{
$language_options.= makeoption($language_name, $language_file, $default_lang, true);
$language_options = '';
foreach ($languages as $language_file => $language_name) {
$language_options .= \Froxlor\UI\HTML::makeoption($language_name, $language_file, $default_lang, true);
}
eval("echo \"" . getTemplate("index/change_language") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/change_language') . "\";");
}
}
elseif($page == 'change_theme')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$theme = validate($_POST['theme'], 'theme');
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'");
redirectTo($filename, Array('s' => $s));
}
else
{
$theme_options = '';
} elseif ($page == 'change_theme') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$theme = \Froxlor\Validate\Validate::validate($_POST['theme'], 'theme');
try {
Customers::getLocal($userinfo, array(
'id' => $userinfo['customerid'],
'theme' => $theme
))->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$default_theme = $settings['panel']['default_theme'];
if($userinfo['theme'] != '') {
// also update current session
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_SESSIONS . "`
SET `theme` = :theme
WHERE `hash` = :hash");
Database::pexecute($stmt, array(
"theme" => $theme,
"hash" => $s
));
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'");
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
} else {
$default_theme = Settings::Get('panel.default_theme');
if ($userinfo['theme'] != '') {
$default_theme = $userinfo['theme'];
}
$themes_avail = getThemes();
foreach($themes_avail as $t)
{
$theme_options.= makeoption($t, $t, $default_theme, true);
$theme_options = '';
$themes_avail = \Froxlor\UI\Template::getThemes();
foreach ($themes_avail as $t => $d) {
$theme_options .= \Froxlor\UI\HTML::makeoption($d, $t, $default_theme, true);
}
eval("echo \"" . getTemplate("index/change_theme") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/change_theme') . "\";");
}
} elseif ($page == 'send_error_report' && Settings::Get('system.allow_error_report_customer') == '1') {
// only show this if we really have an exception to report
if (isset($_GET['errorid']) && $_GET['errorid'] != '') {
$errid = $_GET['errorid'];
// read error file
$err_dir = \Froxlor\FileDir::makeCorrectDir(\Froxlor\Froxlor::getInstallDir() . "/logs/");
$err_file = \Froxlor\FileDir::makeCorrectFile($err_dir . "/" . $errid . "_sql-error.log");
if (file_exists($err_file)) {
$error_content = file_get_contents($err_file);
$error = explode("|", $error_content);
$_error = array(
'code' => str_replace("\n", "", substr($error[1], 5)),
'message' => str_replace("\n", "", substr($error[2], 4)),
'file' => str_replace("\n", "", substr($error[3], 5 + strlen(\Froxlor\Froxlor::getInstallDir()))),
'line' => str_replace("\n", "", substr($error[4], 5)),
'trace' => str_replace(\Froxlor\Froxlor::getInstallDir(), "", substr($error[5], 6))
);
// build mail-content
$mail_body = "Dear froxlor-team,\n\n";
$mail_body .= "the following error has been reported by a user:\n\n";
$mail_body .= "-------------------------------------------------------------\n";
$mail_body .= $_error['code'] . ' ' . $_error['message'] . "\n\n";
$mail_body .= "File: " . $_error['file'] . ':' . $_error['line'] . "\n\n";
$mail_body .= "Trace:\n" . trim($_error['trace']) . "\n\n";
$mail_body .= "-------------------------------------------------------------\n\n";
$mail_body .= "Froxlor-version: " . $version . "\n";
$mail_body .= "DB-version: " . $dbversion . "\n\n";
$mail_body .= "End of report";
$mail_html = str_replace("\n", "<br />", $mail_body);
// send actual report to dev-team
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// send mail and say thanks
$_mailerror = false;
try {
$mail->Subject = '[Froxlor] Error report by user';
$mail->AltBody = $mail_body;
$mail->MsgHTML($mail_html);
$mail->AddAddress('error-reports@froxlor.org', 'Froxlor Developer Team');
$mail->Send();
} catch (\PHPMailer\PHPMailer\Exception $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
// error when reporting an error...LOLFUQ
\Froxlor\UI\Response::standard_error('send_report_error', $mailerr_msg);
}
// finally remove error from fs
@unlink($err_file);
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
}
// show a nice summary of the error-report
// before actually sending anything
eval("echo \"" . \Froxlor\UI\Template::getTemplate("index/send_error_report") . "\";");
} else {
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
}
} else {
\Froxlor\UI\Response::redirectTo($filename, array(
's' => $s
));
}
} elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
require_once __DIR__ . '/api_keys.php';
} elseif ($page == '2fa' && Settings::Get('2fa.enabled') == 1) {
require_once __DIR__ . '/2fa.php';
}

124
customer_logger.php Normal file
View File

@@ -0,0 +1,124 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
*
*/
define('AREA', 'customer');
require './lib/init.php';
use Froxlor\Database\Database;
use Froxlor\Settings;
// redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'extras.logger')) {
\Froxlor\UI\Response::redirectTo('customer_index.php');
}
if ($page == 'log') {
if ($action == '') {
$fields = array(
'date' => $lng['logger']['date'],
'type' => $lng['logger']['type'],
'user' => $lng['logger']['user'],
'text' => $lng['logger']['action']
);
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_PANEL_LOG, $fields, null, null, 0, 'desc', 30);
$query = 'SELECT * FROM `' . TABLE_PANEL_LOG . '` WHERE `user` = :loginname ' . $paging->getSqlWhere(true) . ' ' . $paging->getSqlOrderBy();
$result_stmt = Database::prepare($query . ' ' . $paging->getSqlLimit());
Database::pexecute($result_stmt, array(
"loginname" => $userinfo['loginname']
));
$result_cnt_stmt = Database::prepare($query);
Database::pexecute($result_cnt_stmt, array(
"loginname" => $userinfo['loginname']
));
$res_cnt = $result_cnt_stmt->fetch(PDO::FETCH_ASSOC);
$logs_count = $result_cnt_stmt->rowCount();
$paging->setEntries($logs_count);
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$clog = array();
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if (! isset($clog[$row['action']]) || ! is_array($clog[$row['action']])) {
$clog[$row['action']] = array();
}
$clog[$row['action']][$row['logid']] = $row;
}
if ($paging->sortfield == 'date' && $paging->sortorder == 'desc') {
krsort($clog);
} else {
ksort($clog);
}
$i = 0;
$count = 0;
$log_count = 0;
$log = '';
foreach ($clog as $action => $logrows) {
$_action = 0;
foreach ($logrows as $row) {
// if ($paging->checkDisplay($i)) {
$row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$row['date'] = date("d.m.y H:i:s", $row['date']);
if ($_action != $action) {
switch ($action) {
case \Froxlor\FroxlorLogger::USR_ACTION:
$_action = $lng['admin']['customer'];
break;
case \Froxlor\FroxlorLogger::RES_ACTION:
$_action = $lng['logger']['reseller'];
break;
case \Froxlor\FroxlorLogger::ADM_ACTION:
$_action = $lng['logger']['admin'];
break;
case \Froxlor\FroxlorLogger::CRON_ACTION:
$_action = $lng['logger']['cron'];
break;
case \Froxlor\FroxlorLogger::LOGIN_ACTION:
$_action = $lng['logger']['login'];
break;
case \Froxlor\FroxlorLogger::LOG_ERROR:
$_action = $lng['logger']['intern'];
break;
default:
$_action = $lng['logger']['unknown'];
break;
}
$row['action'] = $_action;
eval("\$log.=\"" . \Froxlor\UI\Template::getTemplate('logger/logger_action') . "\";");
}
$log_count ++;
$row['type'] = \Froxlor\FroxlorLogger::getInstanceOf()->getLogLevelDesc($row['type']);
eval("\$log.=\"" . \Froxlor\UI\Template::getTemplate('logger/logger_log') . "\";");
$count ++;
$_action = $action;
// }
$i ++;
}
$i ++;
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate('logger/logger') . "\";");
}
}

View File

@@ -14,46 +14,54 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
use Froxlor\Settings;
use Froxlor\Api\Commands\Mysqls as Mysqls;
$need_db_sql_data = true;
$need_root_db_sql_data = true;
require ("./lib/init.php");
if(isset($_POST['id']))
{
$id = intval($_POST['id']);
// redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'mysql')) {
\Froxlor\UI\Response::redirectTo('customer_index.php');
}
elseif(isset($_GET['id']))
{
// get sql-root access data
Database::needRoot(true);
Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'overview')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql");
if ($page == 'overview') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_mysql");
Database::needSqlData();
$sql = Database::getSqlData();
$lng['mysql']['description'] = str_replace('<SQL_HOST>', $sql['host'], $lng['mysql']['description']);
eval("echo \"" . getTemplate("mysql/mysql") . "\";");
}
elseif($page == 'mysqls')
{
if($action == '')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql::mysqls");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('mysql/mysql') . "\";");
} elseif ($page == 'mysqls') {
if ($action == '') {
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_mysql::mysqls");
$fields = array(
'databasename' => $lng['mysql']['databasename'],
'description' => $lng['mysql']['databasedescription']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_DATABASES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$paging = new \Froxlor\UI\Paging($userinfo, TABLE_PANEL_DATABASES, $fields);
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DATABASES . "`
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
Database::pexecute($result_stmt, array(
"customerid" => $userinfo['customerid']
));
$mysqls_count = Database::num_rows();
$paging->setEntries($mysqls_count);
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
@@ -62,267 +70,151 @@ elseif($page == 'mysqls')
$count = 0;
$mysqls = '';
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
$row = htmlentities_array($row);
eval("\$mysqls.=\"" . getTemplate("mysql/mysqls_database") . "\";");
$count++;
$dbservers_stmt = Database::query("SELECT COUNT(DISTINCT `dbserver`) as numservers FROM `" . TABLE_PANEL_DATABASES . "`");
$dbserver = $dbservers_stmt->fetch(PDO::FETCH_ASSOC);
$count_mysqlservers = $dbserver['numservers'];
// Begin root-session
Database::needRoot(true);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
$row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$mbdata_stmt = Database::prepare("SELECT SUM(data_length + index_length) as MB FROM information_schema.TABLES
WHERE table_schema = :table_schema
GROUP BY table_schema");
Database::pexecute($mbdata_stmt, array(
"table_schema" => $row['databasename']
));
$mbdata = $mbdata_stmt->fetch(PDO::FETCH_ASSOC);
$row['size'] = \Froxlor\PhpHelper::sizeReadable($mbdata['MB'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
eval("\$mysqls.=\"" . \Froxlor\UI\Template::getTemplate('mysql/mysqls_database') . "\";");
$count ++;
}
$i++;
$i ++;
}
Database::needRoot(false);
// End root-session
$mysqls_count = $db->num_rows($result);
eval("echo \"" . getTemplate("mysql/mysqls") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
{
$result = $db->query_first('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
eval("echo \"" . \Froxlor\UI\Template::getTemplate('mysql/mysqls') . "\";");
} elseif ($action == 'delete' && $id != 0) {
if(isset($result['databasename'])
&& $result['databasename'] != '')
{
if(!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']]))
{
try {
$json_result = Mysqls::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['databasename']) && $result['databasename'] != '') {
Database::needRoot(true, $result['dbserver']);
Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
if (! isset($sql_root[$result['dbserver']]) || ! is_array($sql_root[$result['dbserver']])) {
$result['dbserver'] = 0;
}
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
// Begin root-session
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
unset($db_root->password);
foreach(array_map('trim', array_unique(explode(',', $settings['system']['mysql_access_host']))) as $mysql_access_host)
{
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($result['databasename'])) . '` . * FROM `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($result['databasename']) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"');
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
Mysqls::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$db_root->query('DROP DATABASE IF EXISTS `' . $db_root->escape($result['databasename']) . '`');
$db_root->query('FLUSH PRIVILEGES');
$db_root->close();
// End root-session
$db->query('DELETE FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
if($userinfo['mysqls_used'] == '1')
{
$resetaccnumber = " , `mysql_lastaccountnumber`='0' ";
}
else
{
$resetaccnumber = '';
}
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`-1 ' . $resetaccnumber . 'WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
$dbnamedesc = $result['databasename'];
if(isset($result['description']) && $result['description'] != '') {
$dbnamedesc.= ' ('.$result['description'].')';
if (isset($result['description']) && $result['description'] != '') {
$dbnamedesc .= ' (' . $result['description'] . ')';
}
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc);
\Froxlor\UI\HTML::askYesNo('mysql_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
), $dbnamedesc);
}
}
}
elseif($action == 'add')
{
if($userinfo['mysqls_used'] < $userinfo['mysqls']
|| $userinfo['mysqls'] == '-1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$password = validate($_POST['mysql_password'], 'password');
$password = validatePassword($password);
$sendinfomail = intval($_POST['sendinfomail']);
if($sendinfomail != 1)
{
$sendinfomail = 0;
} elseif ($action == 'add') {
if ($userinfo['mysqls_used'] < $userinfo['mysqls'] || $userinfo['mysqls'] == '-1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
Mysqls::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
if($password == '')
{
standard_error(array('stringisempty', 'mypassword'));
}
else
{
$username = $userinfo['loginname'] . $settings['customer']['mysqlprefix'] . (intval($userinfo['mysql_lastaccountnumber']) + 1);
if(count($sql_root) > 1)
{
$dbserver = validate($_POST['mysql_server'], html_entity_decode($lng['mysql']['mysql_server']), '', '', 0);
if(!isset($sql_root[$dbserver]) || !is_array($sql_root[$dbserver]))
{
$dbserver = 0;
}
}
else
{
$dbserver = 0;
}
// Begin root-session
$db_root = new db($sql_root[$dbserver]['host'], $sql_root[$dbserver]['user'], $sql_root[$dbserver]['password'], '');
unset($db_root->password);
$db_root->query('CREATE DATABASE `' . $db_root->escape($username) . '`');
$log->logAction(USR_ACTION, LOG_INFO, "created database '" . $username . "'");
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
{
$db_root->query('GRANT ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($username)) . '`.* TO `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '` IDENTIFIED BY \'password\'');
$db_root->query('SET PASSWORD FOR `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '` = PASSWORD(\'' . $db_root->escape($password) . '\')');
$log->logAction(USR_ACTION, LOG_NOTICE, "grant all privileges for '" . $username . "'@'" . $mysql_access_host . "'");
}
$db_root->query('FLUSH PRIVILEGES');
$db_root->close();
// End root-session
// Statement modifyed for Database description -- PH 2004-11-29
$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('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1, `mysql_lastaccountnumber`=`mysql_lastaccountnumber`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
if($sendinfomail == 1)
{
$pma = $lng['admin']['notgiven'];
if($settings['panel']['phpmyadmin_url'] != '')
{
$pma = $settings['panel']['phpmyadmin_url'];
}
$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
);
$def_language = $userinfo['def_language'];
$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`=\'new_database_by_customer_subject\'');
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_subject']), $replace_arr));
$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`=\'new_database_by_customer_mailbody\'');
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_body']['main']), $replace_arr));
$_mailerror = false;
try {
$mail->Subject = $mail_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));
}
}
else
{
$dbservers_stmt = Database::query("SELECT DISTINCT `dbserver` FROM `" . TABLE_PANEL_DATABASES . "`");
$mysql_servers = '';
foreach($sql_root as $mysql_server => $mysql_server_details)
{
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
$count_mysqlservers = 0;
while ($dbserver = $dbservers_stmt->fetch(PDO::FETCH_ASSOC)) {
Database::needRoot(true, $dbserver['dbserver']);
Database::needSqlData();
$sql_root = Database::getSqlData();
$mysql_servers .= \Froxlor\UI\HTML::makeoption($sql_root['caption'], $dbserver['dbserver']);
$count_mysqlservers ++;
}
Database::needRoot(false);
#$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
$mysql_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_add.php';
$mysql_add_form = htmlform::genHTMLForm($mysql_add_data);
$mysql_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/mysql/formfield.mysql_add.php';
$mysql_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($mysql_add_data);
$title = $mysql_add_data['mysql_add']['title'];
$image = $mysql_add_data['mysql_add']['image'];
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('mysql/mysqls_add') . "\";");
}
}
}
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . $userinfo['customerid'] . '" AND `id`="' . $id . '"');
} elseif ($action == 'edit' && $id != 0) {
try {
$json_result = Mysqls::getLocal($userinfo, array(
'id' => $id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if(isset($result['databasename'])
&& $result['databasename'] != '')
{
if(!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']]))
{
$result['dbserver'] = 0;
}
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
$password = validate($_POST['mysql_password'], 'password');
if($password != '')
{
// validate password
$password = validatePassword($password);
// Begin root-session
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
unset($db_root->password);
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
{
$db_root->query('SET PASSWORD FOR `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '` = PASSWORD(\'' . $db_root->escape($password) . '\')');
}
$db_root->query('FLUSH PRIVILEGES');
$db_root->close();
// End root-session
if (isset($result['databasename']) && $result['databasename'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
$json_result = Mysqls::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
\Froxlor\UI\Response::redirectTo($filename, array(
'page' => $page,
's' => $s
));
} else {
// Update the Database description -- PH 2004-11-29
$dbservers_stmt = Database::query("SELECT COUNT(DISTINCT `dbserver`) as numservers FROM `" . TABLE_PANEL_DATABASES . "`");
$dbserver = $dbservers_stmt->fetch(PDO::FETCH_ASSOC);
$count_mysqlservers = $dbserver['numservers'];
$log->logAction(USR_ACTION, LOG_INFO, "edited database '" . $result['databasename'] . "'");
$databasedescription = validate($_POST['description'], 'description');
$result = $db->query('UPDATE `' . TABLE_PANEL_DATABASES . '` SET `description`="' . $db->escape($databasedescription) . '" WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$mysql_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_edit.php';
$mysql_edit_form = htmlform::genHTMLForm($mysql_edit_data);
Database::needRoot(true, $result['dbserver']);
Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
$mysql_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/mysql/formfield.mysql_edit.php';
$mysql_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($mysql_edit_data);
$title = $mysql_edit_data['mysql_edit']['title'];
$image = $mysql_edit_data['mysql_edit']['image'];
eval("echo \"" . getTemplate("mysql/mysqls_edit") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('mysql/mysqls_edit') . "\";");
}
}
}
}
?>

View File

@@ -1,428 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* 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 Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*/
define('AREA', 'customer');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require ("./lib/init.php");
if(isset($_POST['id']))
{
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
$id = intval($_GET['id']);
}
if($page == 'overview')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets");
eval("echo \"" . getTemplate("ticket/ticket") . "\";");
}
elseif($page == 'tickets')
{
if($action == '')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets::tickets");
$fields = array(
'status' => $lng['ticket']['status'],
'priority' => $lng['ticket']['priority'],
'lastchange' => $lng['ticket']['lastchange'],
'ticket_answers' => $lng['ticket']['ticket_answers'],
'subject' => $lng['ticket']['subject'],
'lastreplier' => $lng['ticket']['lastreplier']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'lastchange';
$paging->sortorder = 'desc';
$result = $db->query('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `customerid`="' . (int)$userinfo['customerid'] . '" AND `adminid`="' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
$tickets = '';
$tickets_count = 0;
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
$tickets_count++;
$row = htmlentities_array($row);
$row['lastchange'] = date("d.m.y H:i", $row['lastchange']);
if($row['status'] >= 0
&& $row['status'] <= 2)
{
$reopen = 0;
}
else
{
$reopen = 1;
}
$row['status'] = ticket::getStatusText($lng, $row['status']);
$row['priority'] = ticket::getPriorityText($lng, $row['priority']);
if($row['lastreplier'] == '1')
{
$row['lastreplier'] = $lng['ticket']['staff'];
$cananswer = 1;
}
else
{
$row['lastreplier'] = $lng['ticket']['customer'];
$cananswer = 0;
}
$row['subject'] = html_entity_decode($row['subject']);
if(strlen($row['subject']) > 20)
{
$row['subject'] = substr($row['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";");
$count++;
}
$i++;
}
$supportavailable = 0;
$time = date("Hi", time());
$day = date("w", time());
$start = substr($settings['ticket']['worktime_begin'], 0, 2) . substr($settings['ticket']['worktime_begin'], 3, 2);
$end = substr($settings['ticket']['worktime_end'], 0, 2) . substr($settings['ticket']['worktime_end'], 3, 2);
if($time >= $start
&& $time <= $end)
{
$supportavailable = 1;
}
if($settings['ticket']['worktime_sat'] == "0"
&& $day == "6")
{
$supportavailable = 0;
}
if($settings['ticket']['worktime_sun'] == "0"
&& $day == "0")
{
$supportavailable = 0;
}
if($settings['ticket']['worktime_all'] == "1")
{
$supportavailable = 1;
}
$ticketsopen = 0;
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `customerid` = "' . $userinfo['customerid'] . '"
AND `answerto` = "0"
AND (`status` = "0" OR `status` = "1" OR `status` = "2")');
if($settings['ticket']['concurrently_open'] != - 1
&& $settings['ticket']['concurrently_open'] != '')
{
$notmorethanxopentickets = strtr($lng['ticket']['notmorethanxopentickets'], array('%s' => $settings['ticket']['concurrently_open']));
}
else
{
$notmorethanxopentickets = '';
}
$ticketsopen = (int)$opentickets['count'];
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
}
elseif($action == 'new')
{
if($userinfo['tickets_used'] < $userinfo['tickets']
|| $userinfo['tickets'] == '-1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$newticket = ticket::getInstanceOf($userinfo, $db, $settings, -1);
$newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
$newticket->Set('customer', (int)$userinfo['customerid'], true, false);
$newticket->Set('admin', (int)$userinfo['adminid'], true, false);
$newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
if($newticket->Get('subject') == null)
{
standard_error(array('stringisempty', 'mysubject'));
}
elseif($newticket->Get('message') == null)
{
standard_error(array('stringisempty', 'mymessage'));
}
else
{
$now = time();
$newticket->Set('dt', $now, true, true);
$newticket->Set('lastchange', $now, true, true);
$newticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true);
$newticket->Set('status', '0', true, true);
$newticket->Set('lastreplier', '0', true, true);
$newticket->Set('by', '0', true, true);
$newticket->Insert();
$log->logAction(USR_ACTION, LOG_NOTICE, "opened support-ticket '" . $newticket->Get('subject') . "'");
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '`
SET `tickets_used`=`tickets_used`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
// Customer mail
$newticket->sendMail((int)$userinfo['customerid'], 'new_ticket_for_customer_subject', $lng['mails']['new_ticket_for_customer']['subject'], 'new_ticket_for_customer_mailbody', $lng['mails']['new_ticket_for_customer']['mailbody']);
// Admin mail
$newticket->sendMail(-1, 'new_ticket_by_customer_subject', $lng['mails']['new_ticket_by_customer']['subject'], 'new_ticket_by_customer_mailbody', $lng['mails']['new_ticket_by_customer']['mailbody']);
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
$categories = '';
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
if(isset($result['name'])
&& $result['name'] != '')
{
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
while($row = $db->fetch_array($result2))
{
$categories.= makeoption($row['name'], $row['id']);
}
}
else
{
$categories = makeoption($lng['ticket']['no_cat'], '0');
}
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
$ticketsopen = 0;
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `customerid` = "' . $userinfo['customerid'] . '"
AND `answerto` = "0"
AND (`status` = "0" OR `status` = "1" OR `status` = "2")');
if($settings['ticket']['concurrently_open'] != - 1
&& $settings['ticket']['concurrently_open'] != '')
{
$notmorethanxopentickets = strtr($lng['ticket']['notmorethanxopentickets'], array('%s' => $settings['ticket']['concurrently_open']));
}
else
{
$notmorethanxopentickets = '';
}
$ticketsopen = (int)$opentickets['count'];
$ticket_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/ticket/formfield.ticket_add.php';
$ticket_add_form = htmlform::genHTMLForm($ticket_add_data);
$title = $ticket_add_data['ticket_add']['title'];
$image = $ticket_add_data['ticket_add']['image'];
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
}
}
else
{
standard_error('nomoreticketsavailable');
}
}
elseif($action == 'answer'
&& $id != 0)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$replyticket = ticket::getInstanceOf($userinfo, $db, $settings, -1);
$replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$replyticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
if($replyticket->Get('message') == null)
{
standard_error(array('stringisempty', 'mymessage'));
}
else
{
$now = time();
$replyticket->Set('customerid', (int)$userinfo['customerid'], true, true);
$replyticket->Set('lastchange', $now, true, true);
$replyticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true);
$replyticket->Set('status', '1', true, true);
$replyticket->Set('answerto', (int)$id, true, false);
$replyticket->Set('by', '0', true, true);
$replyticket->Insert();
// Update priority if changed
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
if($replyticket->Get('priority') != $mainticket->Get('priority'))
{
$mainticket->Set('priority', $replyticket->Get('priority'), true);
}
$mainticket->Set('lastchange', $now);
$mainticket->Set('lastreplier', '0');
$mainticket->Set('status', '1');
$mainticket->Update();
$log->logAction(USR_ACTION, LOG_NOTICE, "answered support-ticket '" . $mainticket->Get('subject') . "'");
$mainticket->sendMail(-1, 'new_reply_ticket_by_customer_subject', $lng['mails']['new_reply_ticket_by_customer']['subject'], 'new_reply_ticket_by_customer_mailbody', $lng['mails']['new_reply_ticket_by_customer']['mailbody']);
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
$ticket_replies = '';
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$dt = date("d.m.Y H:i\h", $mainticket->Get('dt'));
$status = ticket::getStatusText($lng, $mainticket->Get('status'));
if($mainticket->Get('status') >= 0
&& $mainticket->Get('status') <= 2)
{
$isclosed = 0;
}
else
{
$isclosed = 1;
}
if($mainticket->Get('by') == '1')
{
$by = $lng['ticket']['staff'];
}
else
{
$by = $lng['ticket']['customer'];
}
$subject = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
$row = $db->fetch_array($result);
$andere = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto`="' . (int)$id . '" ORDER BY `lastchange` ASC');
while($row2 = $db->fetch_array($andere))
{
$subticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$row2['id']);
$lastchange = date("d.m.Y H:i\h", $subticket->Get('lastchange'));
if($subticket->Get('by') == '1')
{
$by = $lng['ticket']['staff'];
}
else
{
$by = $lng['ticket']['customer'];
}
$subject = $subticket->Get('subject');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true);
$subject = $mainticket->Get('subject');
$ticket_replies_count = $db->num_rows($andere) + 1;
// don't forget the main-ticket!
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/customer/ticket/formfield.ticket_reply.php';
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
$title = $ticket_reply_data['ticket_reply']['title'];
$image = $ticket_reply_data['ticket_reply']['image'];
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
}
}
elseif($action == 'close'
&& $id != 0)
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '0', true, true);
$mainticket->Set('status', '3', true, true);
$mainticket->Update();
$log->logAction(USR_ACTION, LOG_NOTICE, "closed support-ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
ask_yesno('ticket_reallyclose', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
}
elseif($action == 'reopen'
&& $id != 0)
{
$ticketsopen = 0;
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `customerid` = "' . $userinfo['customerid'] . '"
AND `answerto` = "0"
AND (`status` = "0" OR `status` = "1" OR `status` = "2")');
$ticketsopen = (int)$opentickets['count'];
if($ticketsopen > $settings['ticket']['concurrently_open']
&& $settings['ticket']['concurrently_open'] != - 1
&& $settings['ticket']['concurrently_open'] != '')
{
standard_error('notmorethanxopentickets', $settings['ticket']['concurrently_open']);
}
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id);
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '0', true, true);
$mainticket->Set('status', '0', true, true);
$mainticket->Update();
$log->logAction(USR_ACTION, LOG_NOTICE, "reopened support-ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
?>

View File

@@ -14,271 +14,153 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
$intrafficpage = 1;
require './lib/init.php';
/**
* Include our init.php, which manages Sessions, Language etc.
*/
use Froxlor\Database\Database;
use Froxlor\Settings;
// redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'traffic')) {
\Froxlor\UI\Response::redirectTo('customer_index.php');
}
require ("./lib/init.php");
$traffic = '';
$month = null;
$year = null;
if(isset($_POST['month'])
&& isset($_POST['year']))
{
if (isset($_POST['month']) && isset($_POST['year'])) {
$month = intval($_POST['month']);
$year = intval($_POST['year']);
}
elseif(isset($_GET['month'])
&& isset($_GET['year']))
{
} elseif (isset($_GET['month']) && isset($_GET['year'])) {
$month = intval($_GET['month']);
$year = intval($_GET['year']);
}
//BAM! $_GET???
elseif (isset($_GET['page'])
&& $_GET['page'] == "current")
{
if(date('d') != '01')
{
} // BAM! $_GET???
elseif (isset($_GET['page']) && $_GET['page'] == 'current') {
if (date('d') != '01') {
$month = date('m');
$year = date('Y');
}
else
{
if(date('m') == '01')
{
} else {
if (date('m') == '01') {
$month = 12;
$year = date('Y') - 1;
}
else
{
} else {
$month = date('m') - 1;
$year = date('Y');
}
}
}
if(!is_null($month)
&& !is_null($year))
{
if (! is_null($month) && ! is_null($year)) {
$traf['byte'] = 0;
$result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`)
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid`='" . $userinfo['customerid'] . "'
AND `month` = '" . $month . "'
AND `year` = '" . $year . "'");
$row = mysql_fetch_row($result);
rsort($row);
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));;
$result = $db->query("SELECT
SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail',
`day`, `month`, `year`
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid`='" . $userinfo['customerid'] . "'
AND `month` = '" . $month . "' AND `year` = '" . $year . "'
GROUP BY `day` ORDER BY `day` ASC");
$result_stmt = Database::prepare("SELECT SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail', `day`, `month`, `year`
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid`= :customerid
AND `month` = :month
AND `year` = :year
GROUP BY `day`
ORDER BY `day` DESC");
$params = array(
"customerid" => $userinfo['customerid'],
"month" => $month,
"year" => $year
);
Database::pexecute($result_stmt, $params);
$traffic_complete['http'] = 0;
$traffic_complete['ftp'] = 0;
$traffic_complete['mail'] = 0;
$show = '';
while($row = $db->fetch_array($result))
{
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$http = $row['http'];
$ftp = $row['ftp_up'] + $row['ftp_down'];
$mail = $row['mail'];
$traf['byte'] = $http + $ftp + $mail;
$traffic_complete['http']+= $http;
$traffic_complete['ftp']+= $ftp;
$traffic_complete['mail']+= $mail;
$traf['day'] = $row['day'];
$traffic_complete['http'] += $http;
$traffic_complete['ftp'] += $ftp;
$traffic_complete['mail'] += $mail;
$traf['day'] = $row['day'] . '.';
if(extension_loaded('bcmath'))
{
$traf['ftptext'] = bcdiv($row['ftp_up'], 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($row['ftp_down'], 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
}
else
{
$traf['ftptext'] = round($row['ftp_up'] / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($row['ftp_down'] / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
$traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
$traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
if (extension_loaded('bcmath')) {
$traf['ftptext'] = bcdiv($row['ftp_up'], 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . bcdiv($row['ftp_down'], 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
$traf['ftp'] = bcdiv($ftp, 1024, Settings::Get('panel.decimal_places'));
$traf['http'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places'));
$traf['mail'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places'));
$traf['byte'] = bcdiv($traf['byte'], 1024, Settings::Get('panel.decimal_places'));
} else {
$traf['ftptext'] = round($row['ftp_up'] / 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . round($row['ftp_down'] / 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
$traf['httptext'] = round($http / 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
$traf['mailtext'] = round($mail / 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
$traf['http'] = round($http, Settings::Get('panel.decimal_places'));
$traf['ftp'] = round($ftp, Settings::Get('panel.decimal_places'));
$traf['mail'] = round($mail, Settings::Get('panel.decimal_places'));
$traf['byte'] = round($traf['byte'] / 1024, Settings::Get('panel.decimal_places'));
}
if($traf['byte'] != 0
&& $traf['max'] != 0)
{
$proz = $traf['max'] / 100;
$traf['http'] = round($http / $proz, 0);
$traf['ftp'] = round($ftp / $proz, 0);
$traf['mail'] = round($mail / $proz, 0);
if($traf['http'] == 0)
{
$traf['http'] = 1;
}
if($traf['ftp'] == 0)
{
$traf['ftp'] = 1;
}
if($traf['mail'] == 0)
{
$traf['mail'] = 1;
}
}
else
{
$traf['http'] = 0;
$traf['ftp'] = 0;
$traf['mail'] = 0;
}
if(extension_loaded('bcmath'))
{
$traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']);
}
else
{
$traf['byte'] = round($traf['byte'] / 1024, $settings['panel']['decimal_places']);
}
eval("\$traffic.=\"" . getTemplate("traffic/traffic_month") . "\";");
$show = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year'];
eval("\$traffic.=\"" . \Froxlor\UI\Template::getTemplate('traffic/traffic_month') . "\";");
$show = $lng['traffic']['months'][intval($row['month'])] . ' ' . $row['year'];
}
if(extension_loaded('bcmath'))
{
$traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024, $settings['panel']['decimal_places']);
}
else
{
$traffic_complete['http'] = round($traffic_complete['http'] / 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = round($traffic_complete['mail'] / 1024, $settings['panel']['decimal_places']);
}
$traffic_complete['http'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['http'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
$traffic_complete['ftp'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['ftp'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
$traffic_complete['mail'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['mail'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
eval("echo \"" . getTemplate("traffic/traffic_details") . "\";");
}
else
{
$result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`)
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid`='" . $userinfo['customerid'] . "'
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
$nums = mysql_num_rows($result);
if($nums > 0)
{
$row = mysql_fetch_row($result);
rsort($row);
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));
} else {
// no records yet
$traf['max'] = 0;
}
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('traffic/traffic_details') . "\";");
} else {
$result_stmt = Database::prepare("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid` = :customerid
GROUP BY `year` DESC, `month` DESC
LIMIT 12");
Database::pexecute($result_stmt, array(
"customerid" => $userinfo['customerid']
));
$traffic_complete['http'] = 0;
$traffic_complete['ftp'] = 0;
$traffic_complete['mail'] = 0;
while($row = $db->fetch_array($result))
{
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$http = $row['http'];
$ftp_up = $row['ftp_up'];
$ftp_down = $row['ftp_down'];
$mail = $row['mail'];
$traffic_complete['http']+= $http;
$traffic_complete['ftp']+= $ftp_up + $ftp_down;
$traffic_complete['mail']+= $mail;
$traffic_complete['http'] += $http;
$traffic_complete['ftp'] += $ftp_up + $ftp_down;
$traffic_complete['mail'] += $mail;
$traf['month'] = $row['month'];
$traf['year'] = $row['year'];
$traf['monthname'] = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year'];
$traf['byte'] = $http + $ftp_up + $ftp_down + $mail;
if(extension_loaded('bcmath'))
{
$traf['ftptext'] = bcdiv($ftp_up, 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . bcdiv($ftp_down, 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)";
}
else
{
$traf['ftptext'] = round($ftp_up / 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . round($ftp_down / 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)";
$traf['httptext'] = round($http / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)";
$traf['mailtext'] = round($mail / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)";
if (extension_loaded('bcmath')) {
$traf['ftptext'] = bcdiv($ftp_up, 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . bcdiv($ftp_down, 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
$traf['ftp'] = bcdiv(($ftp_up + $ftp_down), 1024, Settings::Get('panel.decimal_places'));
$traf['http'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places'));
$traf['mail'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places'));
$traf['byte'] = bcdiv($traf['byte'], 1024 * 1024, Settings::Get('panel.decimal_places'));
} else {
$traf['ftptext'] = round($ftp_up / 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . round($ftp_down / 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
$traf['httptext'] = round($http / 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
$traf['mailtext'] = round($mail / 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
$traf['ftp'] = round(($ftp_up + $ftp_down) / 1024, Settings::Get('panel.decimal_places'));
$traf['http'] = round($http / 1024, Settings::Get('panel.decimal_places'));
$traf['mail'] = round($mail / 1024, Settings::Get('panel.decimal_places'));
$traf['byte'] = round($traf['byte'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
}
if($traf['max'] != 0)
{
$proz = $traf['max'] / 100;
$traf['ftp'] = round(($ftp_up + $ftp_down) / $proz, 0);
$traf['http'] = round($http / $proz, 0);
$traf['mail'] = round($mail / $proz, 0);
if($traf['http'] == 0)
{
$traf['http'] = 1;
}
if($traf['ftp'] == 0)
{
$traf['ftp'] = 1;
}
if($traf['mail'] == 0)
{
$traf['mail'] = 1;
}
}
else
{
$traf['ftp'] = 0;
$traf['http'] = 0;
$traf['mail'] = 0;
}
if(extension_loaded('bcmath'))
{
$traf['byte'] = bcadd($traf['byte'] / (1024 * 1024), 0.0000, 4);
}
else
{
$traf['byte'] = round($traf['byte'] + (1024 * 1024), 4);
}
eval("\$traffic.=\"" . getTemplate("traffic/traffic_traffic") . "\";");
eval("\$traffic.=\"" . \Froxlor\UI\Template::getTemplate('traffic/traffic_traffic') . "\";");
}
if(extension_loaded('bcmath'))
{
$traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024 * 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024 * 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024 * 1024, $settings['panel']['decimal_places']);
}
else
{
$traffic_complete['http'] = round($traffic_complete['http'] / 1024 * 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024 * 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = round($traffic_complete['mail'] / 1024 * 1024, $settings['panel']['decimal_places']);
}
$traffic_complete['http'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['http'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
$traffic_complete['ftp'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['ftp'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
$traffic_complete['mail'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['mail'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
eval("echo \"" . getTemplate("traffic/traffic") . "\";");
eval("echo \"" . \Froxlor\UI\Template::getTemplate('traffic/traffic') . "\";");
}
?>

139
dns_editor.php Normal file
View File

@@ -0,0 +1,139 @@
<?php
if (! defined('AREA')) {
header("Location: index.php");
exit();
}
/**
* This file is part of the Froxlor project.
* Copyright (c) 2016 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> (2016-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
*
*/
use Froxlor\Database\Database;
use Froxlor\Api\Commands\DomainZones as DomainZones;
// This file is being included in admin_domains and customer_domains
// and therefore does not need to require lib/init.php
$domain_id = isset($_GET['domain_id']) ? (int) $_GET['domain_id'] : null;
$record = isset($_POST['record']['record']) ? trim($_POST['record']['record']) : null;
$type = isset($_POST['record']['type']) ? $_POST['record']['type'] : 'A';
$prio = isset($_POST['record']['prio']) ? (int) $_POST['record']['prio'] : null;
$content = isset($_POST['record']['content']) ? trim($_POST['record']['content']) : null;
$ttl = isset($_POST['record']['ttl']) ? (int) $_POST['record']['ttl'] : 18000;
// get domain-name
$domain = \Froxlor\Dns\Dns::getAllowedDomainEntry($domain_id, AREA, $userinfo);
// select all entries
$sel_stmt = Database::prepare("SELECT * FROM `" . TABLE_DOMAIN_DNS . "` WHERE domain_id = :did");
Database::pexecute($sel_stmt, array(
'did' => $domain_id
));
$dom_entries = $sel_stmt->fetchAll(PDO::FETCH_ASSOC);
$errors = "";
$success_message = "";
// action for adding a new entry
if ($action == 'add_record' && ! empty($_POST)) {
try {
DomainZones::getLocal($userinfo, array(
'id' => $domain_id,
'record' => $record,
'type' => $type,
'prio' => $prio,
'content' => $content,
'ttl' => $ttl
))->add();
$success_message = $lng['success']['dns_record_added'];
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
} elseif ($action == 'delete') {
// remove entry
$entry_id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
if ($entry_id > 0) {
try {
DomainZones::getLocal($userinfo, array(
'entry_id' => $entry_id,
'id' => $domain_id
))->delete();
} catch (Exception $e) {
$errors = str_replace("\n", "<br>", $e->getMessage());
}
if (empty($errors)) {
// remove deleted entry from internal data array (no reread of DB necessary)
$_t = $dom_entries;
foreach ($_t as $idx => $entry) {
if ($entry['id'] == $entry_id) {
unset($dom_entries[$idx]);
break;
}
}
unset($_t);
// success message (inline)
$success_message = $lng['success']['dns_record_deleted'];
}
}
}
// show editor
$record_list = "";
$existing_entries = "";
$type_select = "";
$entriescount = 0;
if (! empty($dom_entries)) {
$entriescount = count($dom_entries);
foreach ($dom_entries as $entry) {
$entry['content'] = wordwrap($entry['content'], 100, '<br>', true);
eval("\$existing_entries.=\"" . \Froxlor\UI\Template::getTemplate("dns_editor/entry_bit", true) . "\";");
}
}
// available types
$type_select_values = array(
'A',
'AAAA',
'CAA',
'CNAME',
'DNAME',
'LOC',
'MX',
'NS',
'RP',
'SRV',
'SSHFP',
'TXT',
);
asort($type_select_values);
foreach ($type_select_values as $_type) {
$type_select .= \Froxlor\UI\HTML::makeoption($_type, $_type, $type);
}
eval("\$record_list=\"" . \Froxlor\UI\Template::getTemplate("dns_editor/list", true) . "\";");
try {
$json_result = DomainZones::getLocal($userinfo, array(
'id' => $domain_id
))->get();
} catch (Exception $e) {
\Froxlor\UI\Response::dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
$zonefile = implode("\n", $result);
eval("echo \"" . \Froxlor\UI\Template::getTemplate("dns_editor/index", true) . "\";");

213
doc/example/FroxlorAPI.php Normal file
View File

@@ -0,0 +1,213 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2018 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> (2018-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package API-example
* @since 0.10.0
*
*/
class FroxlorAPI
{
/**
* URL to api.php of your froxlor installation
*
* @var string
*/
private $host = "";
/**
* your api-key
*
* @var string
*/
private $api_key = "";
/**
* your api-secret
*
* @var string
*/
private $api_secret = "";
/**
* last cURL error message
*
* @var string
*/
private $last_error = "";
/**
* last response header received
*
* @var array
*/
private $last_header = array();
/**
* last response data received
*
* @var array
*/
private $last_body = array();
/**
* create FroxlorAPI object
*
* @param string $host
* URL to api.php of your froxlor installation
* @param string $api_key
* your api-key
* @param string $api_secret
* your api-secret
*
* @return FroxlorAPI
*/
public function __construct(string $host, string $api_key, string $api_secret)
{
$this->host = $host;
$this->api_key = $api_key;
$this->api_secret = $api_secret;
}
/**
* send request to froxlor api
*
* @param string $command
* @param array $params
*
* @return FroxlorAPI
*/
public function request(string $command, array $params = array()): FroxlorAPI
{
// build request array
$request = [
'header' => [
'apikey' => $this->api_key,
'secret' => $this->api_secret
],
'body' => [
'command' => $command
]
];
// add parameter to request-body if any
if (! empty($params)) {
$request['body']['params'] = $params;
}
// reset last data
$this->last_header = array();
$this->last_body = array();
// send actual request
$response = $this->requestCurl(json_encode($request));
// decode response
$resp = json_decode($response[1], true);
// set body to data-part of response
$this->last_body = $resp['data'];
// set header of response
$this->last_header = [
'status' => $resp['status'],
'status_message' => $resp['status_message']
];
// check for error in api response
if (isset($this->last_header['status']) && $this->last_header['status'] >= 400) {
// set last-error message
$this->last_error .= "[" . $this->last_header['status'] . "] " . $this->last_header['status_message'];
}
return $this;
}
/**
* returns last response header
*
* @return array status|status_message
*/
public function getLastHeader(): array
{
return $this->last_header;
}
/**
* returns last response data
*
* @return array
*/
public function getLastResponse(): array
{
if (!empty($this->getLastError())) {
// nothing is returned when the last call
// was not successful
return [];
}
return $this->last_body;
}
/**
* return last known error message
*
* @return string
*/
public function getLastError(): string
{
return $this->last_error;
}
/**
* send cURL request to api
*
* @param string $data
* json array
*
* @return array header|body
*/
private function requestCurl(string $data): array
{
// reset last error message
$this->last_error = "";
$ch = curl_init($this->host);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-type: application/json'
));
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_HEADER, 1);
$verbose = fopen('php://temp', 'w+');
curl_setopt($ch, CURLOPT_STDERR, $verbose);
if (! $data = curl_exec($ch)) {
$this->last_error = 'Curl execution error: ' . curl_error($ch) . "\n";
rewind($verbose);
$verboseLog = stream_get_contents($verbose);
$this->last_error .= "Verbose information: " . htmlspecialchars($verboseLog) . "\n";
}
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$header = substr($data, 0, $header_size);
$body = substr($data, $header_size);
curl_close($ch);
return array(
$header,
$body
);
}
}

View File

@@ -0,0 +1,48 @@
<?php
// include FroxlorAPI helper class
require __DIR__ . '/FroxlorAPI.php';
// create object of FroxlorAPI with URL, apikey and apisecret
$fapi = new FroxlorAPI('https://froxlor.your-host.tld/api.php', 'your-api-key', 'your-api-secret');
// customer data
$data = [
'new_loginname' => 'test',
'email' => 'test@froxlor.org',
'firstname' => 'Test',
'name' => 'Testman',
'customernumber' => 1337,
'new_customer_password' => 's0mEcRypt1cpassword' . uniqid()
];
// send request
$fapi->request('Customers.add', $data);
// check for error
if (! empty($fapi->getLastError())) {
echo "Error: " . $fapi->getLastError();
exit();
}
// get response of request
$request = $fapi->getLastResponse();
// view response data
var_dump($request);
/*
array(60) {
["customerid"]=>
string(1) "1"
["loginname"]=>
string(4) "test"
["password"]=>
string(63) "$5$asdasdasd.asdasd"
["adminid"]=>
string(1) "1"
["name"]=>
string(7) "Testman"
["firstname"]=>
string(4) "Test"
[...]
*/

View File

@@ -0,0 +1,22 @@
<?php
// include FroxlorAPI helper class
require __DIR__ . '/FroxlorAPI.php';
// create object of FroxlorAPI with URL, apikey and apisecret
$fapi = new FroxlorAPI('https://froxlor.your-host.tld/api.php', 'your-api-key', 'your-api-secret');
// send request
$fapi->request('Froxlor.listFunctions');
// check for error
if (! empty($fapi->getLastError())) {
echo "Error: " . $fapi->getLastError();
exit();
}
// get response of request
$request = $fapi->getLastResponse();
// view response data
var_dump($request);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

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