Compare commits

...

685 Commits

Author SHA1 Message Date
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
1710 changed files with 61821 additions and 38562 deletions

10
.gitignore vendored
View File

@@ -1,4 +1,10 @@
templates_c/*
cache/*
packages/*
lib/classes/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/*/
temp/*
templates/*
install/update.log
.buildpath
.project
.settings/
*.diff
*~

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

View File

@@ -33,15 +33,31 @@ return array(
'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',
'option_mode' => 'one',
'option_options_method' => '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',
@@ -77,6 +93,23 @@ return array(
'option_options' => array('Manual' => $lng['serversettings']['manual'], 'Dropdown' => $lng['serversettings']['dropdown']),
'save_method' => 'storeSettingField',
),
'use_webfonts' => array(
'label' => $lng['serversettings']['enablewebfonts'],
'settinggroup' => 'panel',
'varname' => 'use_webfonts',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'webfont' => array(
'label' => $lng['serversettings']['definewebfont']['title'],
'settinggroup' => 'panel',
'varname' => 'webfont',
'type' => 'string',
'default' => 'Numans',
'string_emptyallowed' => false,
'save_method' => 'storeSettingField',
),
'panel_adminmail' => array(
'label' => $lng['serversettings']['adminmail'],
'settinggroup' => 'panel',
@@ -177,6 +210,14 @@ return array(
'default' => false,
'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',
),
),
),
),

View File

@@ -32,6 +32,14 @@ return array(
'save_method' => 'storeSettingField',
'plausibility_check_method' => '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',
@@ -59,6 +67,7 @@ return array(
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingHostname',
'plausibility_check_method' => 'checkHostname',
),
'system_froxlordirectlyviahostname' => array(
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
@@ -137,7 +146,7 @@ return array(
'varname' => 'report_webmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 99,
'int_max' => 150,
'default' => 90,
'save_method' => 'storeSettingField',
),
@@ -147,7 +156,7 @@ return array(
'varname' => 'report_trafficmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 99,
'int_max' => 150,
'default' => 90,
'save_method' => 'storeSettingField',
),
@@ -158,10 +167,10 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
),
),
),
),
);
?>
?>

View File

@@ -33,6 +33,15 @@ return array(
'save_method' => 'storeSettingField',
'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_httpuser' => array(
'label' => $lng['admin']['webserver_user'],
'settinggroup' => 'system',
@@ -85,6 +94,15 @@ return array(
'default' => '/var/customers/logs/',
'save_method' => 'storeSettingField',
),
'system_customersslpath' => array(
'label' => $lng['serversettings']['customerssl_directory'],
'settinggroup' => 'system',
'varname' => 'customer_ssl_path',
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/apache2/ssl/',
'save_method' => 'storeSettingField',
),
'system_phpappendopenbasedir' => array(
'label' => $lng['serversettings']['phpappendopenbasedir'],
'settinggroup' => 'system',
@@ -124,7 +142,7 @@ return 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')
@@ -133,19 +151,20 @@ return 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,
'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'],
@@ -209,72 +228,8 @@ return array(
'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',
),
),
),
),
)
)
)
)
);
?>

View File

@@ -0,0 +1,77 @@
<?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
*
*/
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_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',
)
)
)
)
);

View File

@@ -30,7 +30,7 @@ return array(
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkFcgidPhpFpm',
'overview_option' => true
),
),
'system_mod_fcgid_configdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
'settinggroup' => 'system',
@@ -66,7 +66,7 @@ return array(
'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')
@@ -135,6 +135,14 @@ return array(
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_idle_timeout' => array(
'label' => $lng['serversettings']['mod_fcgid']['idle_timeout'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_idle_timeout',
'type' => 'int',
'default' => 30,
'save_method' => 'storeSettingField'
),
)
)
)

View File

@@ -54,9 +54,16 @@ return array(
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField'
),
/*
* @TODO implement if phpfpm knows custom php.ini files
*
'system_phpfpm_defaultini' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
'settinggroup' => 'phpfpm',
'varname' => 'defaultini',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
),
'system_phpfpm_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
'settinggroup' => 'phpfpm',
@@ -67,7 +74,6 @@ return array(
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
),
*/
'system_phpfpm_configdir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
'settinggroup' => 'phpfpm',
@@ -77,6 +83,15 @@ return array(
'default' => '/etc/php-fpm.d/',
'save_method' => 'storeSettingField',
),
'system_phpfpm_aliasconfigdir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['aliasconfigdir'],
'settinggroup' => 'phpfpm',
'varname' => 'aliasconfigdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/www/php-fpm/',
'save_method' => 'storeSettingField',
),
'system_phpfpm_tmpdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
'settinggroup' => 'phpfpm',
@@ -110,7 +125,7 @@ return array(
'type' => 'option',
'default' => 'static',
'option_mode' => 'one',
'option_options' => array('static' => 'static', 'dynamic' => 'dynamic'),
'option_options' => array('static' => 'static', 'dynamic' => 'dynamic', 'ondemand' => 'ondemand'),
'save_method' => 'storeSettingField',
),
'system_phpfpm_max_children' => array(
@@ -153,6 +168,14 @@ return array(
'default' => 0,
'save_method' => 'storeSettingField',
),
'system_phpfpm_idle_timeout' => array(
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout'],
'settinggroup' => 'phpfpm',
'varname' => 'idle_timeout',
'type' => 'int',
'default' => 30,
'save_method' => 'storeSettingField'
),
),
),
),

View File

@@ -51,6 +51,16 @@ return array(
'default' => '/var/customers/mail/',
'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',
@@ -90,9 +100,17 @@ return array(
'type' => 'hidden',
'default' => 0,
),
'system_catchall_enabled' => array(
'label' => $lng['serversettings']['catchall_enabled'],
'settinggroup' => 'catchall',
'varname' => 'catchall_enabled',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingResetCatchall',
),
),
),
),
);
?>
?>

View File

@@ -22,6 +22,15 @@ return 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_bindconf_directory' => array(
'label' => $lng['serversettings']['bindconf_directory'],
'settinggroup' => 'system',
@@ -59,6 +68,16 @@ return array(
'default' => '',
'save_method' => 'storeSettingField',
),
'system_axfrservers' => array(
'label' => $lng['serversettings']['axfrservers'],
'settinggroup' => 'system',
'varname' => 'axfrservers',
'type' => 'string',
'string_type' => 'validate_ip',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_dns_createmailentry' => array(
'label' => $lng['serversettings']['mail_also_with_mxservers'],
'settinggroup' => 'system',

View File

@@ -17,6 +17,8 @@
*
*/
global $settings;
return array(
'groups' => array(
'dkim' => array(
@@ -79,7 +81,10 @@ return array(
'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'],$settings['dkim']['dkim_prefix'])
),
'settinggroup' => 'dkim',
'varname' => 'dkim_keylength',
'type' => 'option',

View File

@@ -133,7 +133,7 @@ return array(
'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']),
'option_options' => array(1 => $lng['ticket']['high'], 2 => $lng['ticket']['normal'], 3 => $lng['ticket']['low']),
'save_method' => 'storeSettingField',
),
),
@@ -141,4 +141,4 @@ return array(
)
);
?>
?>

View File

@@ -59,7 +59,7 @@ return array(
'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'),
'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', 'Zend Optimizer' => 'Zend Guard'),
'save_method' => 'storeSettingApsPhpExtensions',
),
'aps_php-function' => array(

View File

@@ -38,9 +38,17 @@ return array(
'default' => true,
'save_method' => 'storeSettingField',
),
),
),
),
'system_passwordcryptfunc' => array(
'label' => $lng['serversettings']['passwordcryptfunc'],
'settinggroup' => 'system',
'varname' => 'passwordcryptfunc',
'type' => 'option',
'default' => 0,
'option_mode' => 'one',
'option_options' => array(0 => $lng['serversettings']['systemdefault'], 1 => 'MD5', 2 => 'BLOWFISH', 3 => 'SHA-256', 4 => 'SHA-512'),
'save_method' => 'storeSettingField',
)
)
)
)
);
?>

View File

@@ -28,6 +28,7 @@ return array(
'varname' => 'backup_enabled',
'type' => 'bool',
'default' => false,
'cronmodule' => 'froxlor/backup',
'save_method' => 'storeSettingField',
'overview_option' => true
),
@@ -38,7 +39,7 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/backups/',
'string_regexp' => '/^/.*/$/',
'string_regexp' => '#^/.*/$#',
'save_method' => 'storeSettingField',
),
'backup_mysqldump_path' => array(
@@ -96,7 +97,7 @@ return array(
'label' => $lng['serversettings']['backup_ftp_pass'],
'settinggroup' => 'system',
'varname' => 'backup_ftp_pass',
'type' => 'string',
'type' => 'hiddenstring',
'default' => '',
'save_method' => 'storeSettingField',
),

View File

@@ -1,7 +1,7 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2011 the Froxlor Team (see authors).
* 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

View File

@@ -47,26 +47,6 @@ if($page == 'admins'
'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
'traffic' => $lng['customer']['traffic'],
'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
/*
'mysqls' => $lng['customer']['mysqls'],
'mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
'ftps' => $lng['customer']['ftps'],
'ftps_used' => $lng['customer']['ftps'] . ' (' . $lng['panel']['used'] . ')',
'tickets' => $lng['customer']['tickets'],
'tickets_used' => $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')',
'subdomains' => $lng['customer']['subdomains'],
'subdomains_used' => $lng['customer']['subdomains'] . ' (' . $lng['panel']['used'] . ')',
'emails' => $lng['customer']['emails'],
'emails_used' => $lng['customer']['emails'] . ' (' . $lng['panel']['used'] . ')',
'email_accounts' => $lng['customer']['accounts'],
'email_accounts_used' => $lng['customer']['accounts'] . ' (' . $lng['panel']['used'] . ')',
'email_forwarders' => $lng['customer']['forwarders'],
'email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')',
'email_quota' => $lng['customer']['email_quota'],
'email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
'email_autoresponder' => $lng['customer']['autoresponder'],
'email_autoresponder_used' => $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')',
*/
'deactivated' => $lng['admin']['deactivated']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_ADMINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
@@ -92,13 +72,23 @@ if($page == 'admins'
/**
* percent-values for progressbar
*/
if($row['diskspace'] > 0) {
$percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
$doublepercent = round($percent*2, 2);
} else {
$percent = 0;
$doublepercent = 0;
}
//For Disk usage
if ($row['diskspace'] > 0) {
$disk_percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
$disk_doublepercent = round($disk_percent*2, 2);
} else {
$disk_percent = 0;
$disk_doublepercent = 0;
}
//For Traffic usage
if ($row['traffic'] > 0) {
$traffic_percent = round(($row['traffic_used']*100)/$row['traffic'], 2);
$traffic_doublepercent = round($traffic_percent*2, 2);
} else {
$traffic_percent = 0;
$traffic_doublepercent = 0;
}
/* */
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps subdomains tickets');
@@ -281,7 +271,7 @@ if($page == 'admins'
$number_of_aps_packages = - 1;
}
$can_manage_aps_packages = intval($_POST['can_manage_aps_packages']);
$can_manage_aps_packages = isset($_POST['can_manage_aps_packages']) ? 1 : 0;
}
else
{
@@ -319,6 +309,10 @@ if($page == 'admins'
$traffic = - 1;
}
$tickets_see_all = 0;
if(isset($_POST['tickets_see_all']))
$tickets_see_all = intval($_POST['tickets_see_all']);
$diskspace = $diskspace * 1024;
$traffic = $traffic * 1024 * 1024;
$ipaddress = intval_ressource($_POST['ipaddress']);
@@ -386,6 +380,10 @@ if($page == 'admins'
$change_serversettings = '0';
}
if ($tickets_see_all != '1') {
$tickets_see_all = '0';
}
$_theme = $settings['panel']['default_theme'];
$result = $db->query("INSERT INTO
@@ -411,6 +409,7 @@ if($page == 'admins'
`email_quota` = '" . $db->escape($email_quota) . "',
`ftps` = '" . $db->escape($ftps) . "',
`tickets` = '" . $db->escape($tickets) . "',
`tickets_see_all` = '" . $db->escape($tickets_see_all) . "',
`mysqls` = '" . $db->escape($mysqls) . "',
`ip` = '" . (int)$ipaddress . "',
`can_manage_aps_packages` = '" . (int)$can_manage_aps_packages . "',
@@ -463,11 +462,13 @@ if($page == 'admins'
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
#$change_serversettings = makeyesno('change_serversettings', '1', '0', '0');
#$customers_see_all = makeyesno('customers_see_all', '1', '0', '0');
#$domains_see_all = makeyesno('domains_see_all', '1', '0', '0');
#$caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', '0');
#$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', '0');
/*
$change_serversettings = makeyesno('change_serversettings', '1', '0', '0');
$customers_see_all = makeyesno('customers_see_all', '1', '0', '0');
$domains_see_all = makeyesno('domains_see_all', '1', '0', '0');
$caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', '0');
$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', '0');
*/
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$admin_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_add.php';
@@ -508,6 +509,7 @@ if($page == 'admins'
$ftps = $result['ftps'];
$tickets = $result['tickets'];
$mysqls = $result['mysqls'];
$tickets_see_all = $result['tickets_see_all'];
$customers_see_all = $result['customers_see_all'];
$domains_see_all = $result['domains_see_all'];
$caneditphpsettings = $result['caneditphpsettings'];
@@ -522,114 +524,85 @@ if($page == 'admins'
{
$password = validate($_POST['admin_password'], 'new password');
$def_language = validate($_POST['def_language'], 'default language');
$deactivated = intval($_POST['deactivated']);
$customers = intval_ressource($_POST['customers']);
$deactivated = isset($_POST['deactivated']) ? 1 : 0;
if(isset($_POST['customers_ul']))
{
$customers = - 1;
$customers = intval_ressource($_POST['customers']);
if (isset($_POST['customers_ul'])) {
$customers = -1;
}
$domains = intval_ressource($_POST['domains']);
if(isset($_POST['domains_ul']))
{
$domains = - 1;
if (isset($_POST['domains_ul'])) {
$domains = -1;
}
$subdomains = intval_ressource($_POST['subdomains']);
if(isset($_POST['subdomains_ul']))
{
$subdomains = - 1;
if (isset($_POST['subdomains_ul'])) {
$subdomains = -1;
}
$emails = intval_ressource($_POST['emails']);
if(isset($_POST['emails_ul']))
{
$emails = - 1;
if (isset($_POST['emails_ul'])) {
$emails = -1;
}
$email_accounts = intval_ressource($_POST['email_accounts']);
if(isset($_POST['email_accounts_ul']))
{
$email_accounts = - 1;
if (isset($_POST['email_accounts_ul'])) {
$email_accounts = -1;
}
$email_forwarders = intval_ressource($_POST['email_forwarders']);
if(isset($_POST['email_forwarders_ul']))
{
$email_forwarders = - 1;
if (isset($_POST['email_forwarders_ul'])) {
$email_forwarders = -1;
}
if($settings['system']['mail_quota_enabled'] == '1')
{
if ($settings['system']['mail_quota_enabled'] == '1') {
$email_quota = validate($_POST['email_quota'], 'email_quota', '/^\d+$/', 'vmailquotawrong', array('0', ''));
if(isset($_POST['email_quota_ul']))
{
$email_quota = - 1;
if (isset($_POST['email_quota_ul'])) {
$email_quota = -1;
}
}
else
{
$email_quota = - 1;
} else {
$email_quota = -1;
}
if($settings['autoresponder']['autoresponder_active'] == '1')
{
if ($settings['autoresponder']['autoresponder_active'] == '1') {
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
if(isset($_POST['email_autoresponder_ul']))
{
$email_autoresponder = - 1;
if (isset($_POST['email_autoresponder_ul'])) {
$email_autoresponder = -1;
}
}
else
{
} else {
$email_autoresponder = 0;
}
$ftps = intval_ressource($_POST['ftps']);
if(isset($_POST['ftps_ul']))
{
$ftps = - 1;
if (isset($_POST['ftps_ul'])) {
$ftps = -1;
}
if($settings['ticket']['enabled'] == 1)
{
if ($settings['ticket']['enabled'] == 1) {
$tickets = intval_ressource($_POST['tickets']);
if(isset($_POST['tickets_ul']))
{
$tickets = - 1;
if (isset($_POST['tickets_ul'])) {
$tickets = -1;
}
}
else
{
} else {
$tickets = 0;
}
$mysqls = intval_ressource($_POST['mysqls']);
if(isset($_POST['mysqls_ul']))
{
if (isset($_POST['mysqls_ul'])) {
$mysqls = - 1;
}
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
if(isset($_POST['number_of_aps_packages_ul']))
{
$number_of_aps_packages = - 1;
if ($settings['aps']['aps_active'] == '1') {
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
if (isset($_POST['number_of_aps_packages_ul'])) {
$number_of_aps_packages = -1;
}
$can_manage_aps_packages = isset($_POST['can_manage_aps_packages']) ? 1 : 0;
} else {
$number_of_aps_packages = 0;
}
$can_manage_aps_packages = intval($_POST['can_manage_aps_packages']);
$customers_see_all = 0;
if(isset($_POST['customers_see_all']))
$customers_see_all = intval($_POST['customers_see_all']);
@@ -641,23 +614,23 @@ if($page == 'admins'
$caneditphpsettings = 0;
if(isset($_POST['caneditphpsettings']))
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = 0;
if(isset($_POST['change_serversettings']))
$change_serversettings = intval($_POST['change_serversettings']);
$diskspace = intval($_POST['diskspace']);
$change_serversettings = isset($_POST['change_serversettings']) ? 1 : 0;
if(isset($_POST['diskspace_ul']))
{
$diskspace = - 1;
$tickets_see_all = 0;
if (isset($_POST['tickets_see_all']))
$tickets_see_all = intval($_POST['tickets_see_all']);
$diskspace = intval($_POST['diskspace']);
if (isset($_POST['diskspace_ul'])) {
$diskspace = -1;
}
$traffic = doubleval_ressource($_POST['traffic']);
if(isset($_POST['traffic_ul']))
{
$traffic = - 1;
if (isset($_POST['traffic_ul'])) {
$traffic = -1;
}
$diskspace = $diskspace * 1024;
@@ -714,7 +687,88 @@ if($page == 'admins'
$change_serversettings = '0';
}
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `name`='" . $db->escape($name) . "', `email`='" . $db->escape($email) . "', `def_language`='" . $db->escape($def_language) . "', `change_serversettings` = '" . $db->escape($change_serversettings) . "', `customers` = '" . $db->escape($customers) . "', `customers_see_all` = '" . $db->escape($customers_see_all) . "', `domains` = '" . $db->escape($domains) . "', `domains_see_all` = '" . $db->escape($domains_see_all) . "', `caneditphpsettings` = '" . (int)$caneditphpsettings . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `email_quota`='" . $db->escape($email_quota) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `ip`='" . (int)$ipaddress . "', `deactivated`='" . $db->escape($deactivated) . "', `can_manage_aps_packages`=" . (int)$can_manage_aps_packages . ", `aps_packages`=" . (int)$number_of_aps_packages . " WHERE `adminid`='" . $db->escape($id) . "'");
if ($tickets_see_all != '1') {
$tickets_see_all = '0';
}
// check if a resource was set to something lower
// than actually used by the admin/reseller
$res_warning = "";
if ($customers != $result['customers'] && $customers < $result['customers_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'customers');
}
if ($domains != $result['domains'] && $domains < $result['domains_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'domains');
}
if ($diskspace != $result['diskspace'] && ($diskspace / 1024) != -1 && $diskspace < $result['diskspace_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'diskspace');
}
if ($traffic != $result['traffic'] && ($traffic / 1024 / 1024) != -1 && $traffic < $result['traffic_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'traffic');
}
if ($emails != $result['emails'] && $emails < $result['emails_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'emails');
}
if ($email_accounts != $result['email_accounts'] && $email_accounts < $result['email_accounts_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email accounts');
}
if ($email_forwarders != $result['email_forwarders'] && $email_forwarders < $result['email_forwarders_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email forwarders');
}
if ($email_quota != $result['email_quota'] && $email_quota < $result['email_quota_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email quota');
}
if ($email_autoresponder != $result['email_autoresponder'] && $email_autoresponder < $result['email_autoresponder_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email autoresponder');
}
if ($ftps != $result['ftps'] && $ftps < $result['ftps_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'ftps');
}
if ($tickets != $result['tickets'] && $tickets < $result['tickets_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'tickets');
}
if ($mysqls != $result['mysqls'] && $mysqls < $result['mysqls_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'mysqls');
}
if ($number_of_aps_packages != $result['aps_packages'] && $number_of_aps_packages < $result['aps_packages_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'aps packages');
}
if ($res_warning != "") {
$link = '';
$error = $res_warning;
eval("echo \"" . getTemplate('misc/error', '1') . "\";");
exit;
}
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET
`name`='" . $db->escape($name) . "',
`email`='" . $db->escape($email) . "',
`def_language`='" . $db->escape($def_language) . "',
`change_serversettings` = '" . $db->escape($change_serversettings) . "',
`customers` = '" . $db->escape($customers) . "',
`customers_see_all` = '" . $db->escape($customers_see_all) . "',
`domains` = '" . $db->escape($domains) . "',
`domains_see_all` = '" . $db->escape($domains_see_all) . "',
`caneditphpsettings` = '" . (int)$caneditphpsettings . "',
`password` = '" . $password . "',
`diskspace`='" . $db->escape($diskspace) . "',
`traffic`='" . $db->escape($traffic) . "',
`subdomains`='" . $db->escape($subdomains) . "',
`emails`='" . $db->escape($emails) . "',
`email_accounts` = '" . $db->escape($email_accounts) . "',
`email_forwarders`='" . $db->escape($email_forwarders) . "',
`email_quota`='" . $db->escape($email_quota) . "',
`email_autoresponder`='" . $db->escape($email_autoresponder) . "',
`ftps`='" . $db->escape($ftps) . "',
`tickets`='" . $db->escape($tickets) . "',
`tickets_see_all`='".$db->escape($tickets_see_all) . "',
`mysqls`='" . $db->escape($mysqls) . "',
`ip`='" . (int)$ipaddress . "',
`deactivated`='" . $db->escape($deactivated) . "',
`can_manage_aps_packages`=" . (int)$can_manage_aps_packages . ",
`aps_packages`=" . (int)$number_of_aps_packages . "
WHERE `adminid`='" . $db->escape($id) . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "edited admin '#" . $id . "'");
$redirect_props = Array(
'page' => $page,
@@ -852,13 +906,14 @@ if($page == 'admins'
}
}
#$change_serversettings = makeyesno('change_serversettings', '1', '0', $result['change_serversettings']);
#$customers_see_all = makeyesno('customers_see_all', '1', '0', $result['customers_see_all']);
#$domains_see_all = makeyesno('domains_see_all', '1', '0', $result['domains_see_all']);
#$caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', $result['caneditphpsettings']);
#$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
#$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', $result['can_manage_aps_packages']);
/*
$change_serversettings = makeyesno('change_serversettings', '1', '0', $result['change_serversettings']);
$customers_see_all = makeyesno('customers_see_all', '1', '0', $result['customers_see_all']);
$domains_see_all = makeyesno('domains_see_all', '1', '0', $result['domains_see_all']);
$caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', $result['caneditphpsettings']);
$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', $result['can_manage_aps_packages']);
*/
$result = htmlentities_array($result);
$admin_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_edit.php';

View File

@@ -98,7 +98,9 @@ if($userinfo['change_serversettings'] == '1')
'<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'])
'<BIND_CONFIG_PATH>' => makeCorrectDir($settings['system']['bindconf_directory']),
'<WEBSERVER_RELOAD_CMD>' => $settings['system']['apachereload_command'],
'<CUSTOMER_LOGS>' => makeCorrectDir($settings['system']['logfiles_directory'])
);
$files = '';
$configpage = '';

View File

@@ -16,24 +16,17 @@
*/
define('AREA', 'admin');
require_once('./lib/init.php');
require_once("./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 == 'cronjobs'
|| $page == 'overview')
{
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_cronjobs");
if ($page == 'cronjobs' || $page == 'overview') {
if ($action == '') {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'viewed admin_cronjobs');
$fields = array(
'c.lastrun' => $lng['cron']['lastrun'],
@@ -56,88 +49,65 @@ if($page == 'cronjobs'
$i = 0;
$count = 0;
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
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") . "\";");
eval("\$crons.=\"" . getTemplate('cronjobs/cronjobs_cronjob') . "\";");
$count++;
}
$i++;
}
eval("echo \"" . getTemplate("cronjobs/cronjobs") . "\";");
eval("echo \"" . getTemplate('cronjobs/cronjobs') . "\";");
}
elseif($action == 'new')
{
} elseif ($action == 'new') {
/*
* @TODO later
*/
}
elseif($action == 'edit'
&& $id != 0)
{
} 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']);
if ($result['cronfile'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$isactive = isset($_POST['isactive']) ? 1 : 0;
$interval_value = validate($_POST['interval_value'], 'interval_value', '/^([0-9]+)$/Di', 'stringisempty');
$interval_interval = validate($_POST['interval_interval'], 'interval_interval');
if($isactive != 1)
{
if ($isactive != 1) {
$isactive = 0;
}
$interval = $interval_value.' '.strtoupper($interval_interval);
$interval = $interval_value . ' ' . strtoupper($interval_interval);
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "`
SET `isactive` = '".(int)$isactive."',
`interval` = '".$interval."'
WHERE `id` = '" . (int)$id . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
#$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
} 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 .= makeoption($lng['cronmgmt']['seconds'], 'SECOND', $interval_nfo[1]);
$interval_interval .= makeoption($lng['cronmgmt']['minutes'], 'MINUTE', $interval_nfo[1]);
$interval_interval .= makeoption($lng['cronmgmt']['hours'], 'HOUR', $interval_nfo[1]);
$interval_interval .= makeoption($lng['cronmgmt']['days'], 'DAY', $interval_nfo[1]);
$interval_interval .= makeoption($lng['cronmgmt']['weeks'], 'WEEK', $interval_nfo[1]);
$interval_interval .= makeoption($lng['cronmgmt']['months'], 'MONTH', $interval_nfo[1]);
// end of interval
$change_cronfile = false;
if (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor')
{
if (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor') {
$change_cronfile = true;
}
@@ -147,17 +117,13 @@ if($page == 'cronjobs'
$title = $cronjobs_edit_data['cronjobs_edit']['title'];
$image = $cronjobs_edit_data['cronjobs_edit']['image'];
eval("echo \"" . getTemplate("cronjobs/cronjob_edit") . "\";");
eval("echo \"" . getTemplate('cronjobs/cronjob_edit') . "\";");
}
}
}
elseif($action == 'delete'
&& $id != 0)
{
elseif ($action == 'delete' && $id != 0) {
/*
* @TODO later
*/
}
}
?>

View File

@@ -48,52 +48,22 @@ if($page == 'customers'
'c.loginname' => $lng['login']['username'],
'a.loginname' => $lng['admin']['admin'],
'c.name' => $lng['customer']['name'],
'c.email' => $lng['customer']['email'],
'c.firstname' => $lng['customer']['firstname'],
'c.company' => $lng['customer']['company'],
'c.diskspace' => $lng['customer']['diskspace'],
'c.diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
'c.traffic' => $lng['customer']['traffic'],
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
'c.backup_allowed' => $lng['backup_allowed']
/*
'c.mysqls' => $lng['customer']['mysqls'],
'c.mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
'c.ftps' => $lng['customer']['ftps'],
'c.ftps_used' => $lng['customer']['ftps'] . ' (' . $lng['panel']['used'] . ')',
'c.subdomains' => $lng['customer']['subdomains'],
'c.subdomains_used' => $lng['customer']['subdomains'] . ' (' . $lng['panel']['used'] . ')',
'c.emails' => $lng['customer']['emails'],
'c.emails_used' => $lng['customer']['emails'] . ' (' . $lng['panel']['used'] . ')',
'c.email_accounts' => $lng['customer']['accounts'],
'c.email_accounts_used' => $lng['customer']['accounts'] . ' (' . $lng['panel']['used'] . ')',
'c.email_forwarders' => $lng['customer']['forwarders'],
'c.email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')',
'c.email_quota' => $lng['customer']['email_quota'],
'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
'c.deactivated' => $lng['admin']['deactivated'],
'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'],
'c.phpenabled' => $lng['admin']['phpenabled'],
'c.perlenabled' => $lng['admin']['perlenabled']
*/
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')'
);
/*
if($settings['ticket']['enabled'] == 1)
{
$fields['c.tickets'] = $lng['customer']['tickets'];
$fields['c.tickets_used'] = $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')';
if ($settings['system']['backup_enabled'] == '1') {
$field['c.backup_allowed'] = $lng['backup_allowed'];
}
if($settings['autoresponder']['autoresponder_active'] == 1)
{
$fields['c.email_autoresponder'] = $lng['customer']['autoresponder'];
$fields['c.email_autoresponder_used'] = $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')';
}
*/
$paging = new paging($userinfo, $db, TABLE_PANEL_CUSTOMERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$customers = '';
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy(false) . " " . $paging->getSqlLimit());
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy($settings['panel']['natsorting']) . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng, true);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -117,21 +87,28 @@ if($page == 'customers'
/**
* percent-values for progressbar
*/
//For Disk usage
if ($row['diskspace'] > 0) {
$percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
$doublepercent = round($percent*2, 2);
$disk_percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
$disk_doublepercent = round($disk_percent*2, 2);
} else {
$percent = 0;
$doublepercent = 0;
$disk_percent = 0;
$disk_doublepercent = 0;
}
$column_style = '';
$unlock_link = '';
if ($row['traffic'] > 0) {
$traffic_percent = round(($row['traffic_used']*100)/$row['traffic'], 2);
$traffic_doublepercent = round($traffic_percent*2, 2);
} else {
$traffic_percent = 0;
$traffic_doublepercent = 0;
}
$islocked = 0;
if($row['loginfail_count'] >= $settings['login']['maxloginattempts']
&& $row['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
) {
$column_style = ' style="background-color: #f99122;"';
$unlock_link = '<a href="'.$filename.'?s='.$s.'&amp;page='.$page.'&amp;action=unlock&amp;id='.$row['customerid'].'">'.$lng['panel']['unlock'].'</a><br />';
$islocked = 1;
}
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains email_autoresponder');
@@ -154,11 +131,14 @@ if($page == 'customers'
if($destination_user != '')
{
if ($result['deactivated'] == '1') {
standard_error("usercurrentlydeactivated", $destination_user);
}
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$userinfo['userid'] . "' AND `hash`='" . $db->escape($s) . "'");
$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')");
$log->logAction(ADM_ACTION, LOG_INFO, "switched user and is now '" . $destination_user . "'");
redirectTo('customer_index.php', Array('s' => $s));
redirectTo('customer_index.php', Array('s' => $s), true);
}
else
{
@@ -202,7 +182,6 @@ if($page == 'customers'
{
$databases = $db->query("SELECT * FROM " . TABLE_PANEL_DATABASES . " WHERE customerid='" . (int)$id . "' ORDER BY `dbserver`");
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
unset($db_root->password);
$last_dbserver = 0;
while($row_database = $db->fetch_array($databases))
@@ -212,16 +191,20 @@ if($page == 'customers'
$db_root->query('FLUSH PRIVILEGES;');
$db_root->close();
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
unset($db_root->password);
$last_dbserver = $row_database['dbserver'];
}
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
if(mysql_get_server_info() < '5.0.2') {
// failsafe if user has been deleted manually (requires MySQL 4.1.2+)
$db_root->query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM \'' . $db_root->escape($row_database['databasename']) .'\'',false,true);
}
$host_res = $db_root->query("SELECT `Host` FROM `mysql`.`user` WHERE `User`='" . $db_root->escape($row_database['databasename']) . "'");
while($host = $db_root->fetch_array($host_res))
{
$mysql_access_host = trim($mysql_access_host);
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($row_database['databasename']) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"');
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
$db_root->query('DROP USER \'' . $db_root->escape($row_database['databasename']). '\'@\'' . $db_root->escape($host['Host']) . '\'', false, true);
}
$db_root->query('DROP DATABASE IF EXISTS `' . $db_root->escape($row_database['databasename']) . '`');
@@ -297,7 +280,7 @@ if($page == 'customers'
if($result['email_autoresponder'] != '-1')
{
$admin_update_query.= ", `email_autoresponder` = `email_autoresponder` - 0" . (int)$result['email_autoresponder'];
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` - 0" . (int)$result['email_autoresponder'];
}
if($result['subdomains'] != '-1')
@@ -317,7 +300,7 @@ if($page == 'customers'
if($result['aps_packages'] != '-1')
{
$admin_update_query.= ", `aps_packages` = `aps_packages` - 0" . (int)$result['aps_packages'];
$admin_update_query.= ", `aps_packages_used` = `aps_packages_used` - 0" . (int)$result['aps_packages'];
}
if(($result['diskspace'] / 1024) != '-1')
@@ -329,19 +312,18 @@ if($page == 'customers'
$db->query($admin_update_query);
$log->logAction(ADM_ACTION, LOG_INFO, "deleted user '" . $result['loginname'] . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
if(isset($_POST['delete_userfiles'])
&& (int)$_POST['delete_userfiles'] == 1)
{
if (isset($_POST['delete_userfiles'])
&& (int)$_POST['delete_userfiles'] == 1
) {
inserttask('6', $result['loginname']);
}
# Using filesystem - quota, insert a task which cleans the filesystem - quota
if ($settings['system']['diskquota_enabled'])
{
inserttask('10');
}
// Using filesystem - quota, insert a task which cleans the filesystem - quota
inserttask('10');
/*
* move old tickets to archive
@@ -611,6 +593,11 @@ if($page == 'customers'
{
standard_error('loginnameissystemaccount', $settings['customer']['accountprefix']);
}
//Additional filtering for Bug #962
if(function_exists('posix_getpwnam') && !in_array("posix_getpwnam",explode(",",ini_get('disable_functions'))) && posix_getpwnam($loginname)) {
standard_error('loginnameissystemaccount', $settings['customer']['accountprefix']);
}
}
else
{
@@ -774,13 +761,10 @@ if($page == 'customers'
$log->logAction(ADM_ACTION, LOG_INFO, "added user '" . $loginname . "'");
inserttask('2', $loginname, $guid, $guid, $store_defaultindex);
# Using filesystem - quota, insert a task which cleans the filesystem - quota
if ($settings['system']['diskquota_enabled'])
{
inserttask('10');
}
// Add htpasswd for the webalizer stats
// Using filesystem - quota, insert a task which cleans the filesystem - quota
inserttask('10');
// Add htpasswd for the webalizer stats
if(CRYPT_STD_DES == 1)
{
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
@@ -803,7 +787,8 @@ if($page == 'customers'
}
inserttask('1');
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
$cryptPassword = makeCryptPassword($password);
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($cryptPassword) . "', '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
$result = $db->query("INSERT INTO `" . TABLE_FTP_GROUPS . "` " . "(`customerid`, `groupname`, `gid`, `members`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($guid) . "', '" . $db->escape($loginname) . "')");
$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($loginname) . "', 'user', '0', '0', '0', '0', '0', '0')");
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added ftp-account for user '" . $loginname . "'");
@@ -825,17 +810,21 @@ if($page == 'customers'
"`customerid` = '" . (int)$customerid . "', " .
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
"`parentdomainid` = '-1', " .
"`ipandport` = '" . $db->escape($settings['system']['defaultip']) . "', " .
"`documentroot` = '" . $db->escape($documentroot) . "', " .
"`zonefile` = '', " .
"`isemaildomain` = '0', " .
"`caneditdomain` = '0', " .
"`openbasedir` = '1', " .
"`safemode` = '1', " .
"`speciallogfile` = '0', " .
"`specialsettings` = '', " .
"`add_date` = '".date('Y-m-d')."'");
$domainid = $db->insert_id();
// set ip <-> domain connection
$db->query("INSERT INTO `".TABLE_DOMAINTOIP."` SET
`id_domain` = '".$domainid."',
`id_ipandports` = '".(int)$settings['system']['defaultip']."'"
);
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$customerid . '\'');
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $loginname . "'");
inserttask('1');
@@ -907,14 +896,6 @@ if($page == 'customers'
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
#$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', '1');
#$email_imap = makeyesno('email_imap', '1', '0', '1');
#$email_pop3 = makeyesno('email_pop3', '1', '0', '1');
#$sendpassword = makeyesno('sendpassword', '1', '0', '1');
#$phpenabled = makeyesno('phpenabled', '1', '0', '1');
#$perlenabled = makeyesno('perlenabled', '1', '0', '0');
#$store_defaultindex = makeyesno('store_defaultindex', '1', '0', '1');
$backup_allowed = makeyesno('backup_allowed', '1', '0', '0');
$gender_options = makeoption($lng['gender']['undef'], 0, true, true, true);
$gender_options .= makeoption($lng['gender']['male'], 1, null, true, true);
@@ -1179,9 +1160,30 @@ if($page == 'customers'
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
}
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`, `add_date`) " . "VALUES ('" . $db->escape($_stdsubdomain) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '', '".date('Y-m-d')."')");
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET
`domain` = '" . $db->escape($_stdsubdomain) . "',
`customerid` = '" . (int)$result['customerid'] . "',
`adminid` = '" . (int)$userinfo['adminid'] . "',
`parentdomainid` = '-1',
`documentroot` = '" . $db->escape($result['documentroot']) . "',
`zonefile` = '',
`isemaildomain` = '0',
`caneditdomain` = '0',
`openbasedir` = '1',
`speciallogfile` = '0',
`specialsettings` = '',
`add_date` = '".date('Y-m-d')."'"
);
$domainid = $db->insert_id();
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\'');
// set ip <-> domain connection
$db->query("INSERT INTO `".TABLE_DOMAINTOIP."` SET
`id_domain` = '".$domainid."',
`id_ipandports` = '".(int)$settings['system']['defaultip']."'"
);
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
`standardsubdomain`='" . (int)$domainid . "'
WHERE `customerid`='" . (int)$result['customerid'] . "'"
);
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $result['loginname'] . "'");
inserttask('1');
}
@@ -1189,8 +1191,12 @@ if($page == 'customers'
if($createstdsubdomain == '0'
&& $result['standardsubdomain'] != '0')
{
$db->query('DELETE FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `id`=\'' . (int)$result['standardsubdomain'] . '\'');
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'0\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\'');
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `id`='" . (int)$result['standardsubdomain'] . "'");
$db->query("DELETE FROM `" . TABLE_DOMAINTOIP . "`
WHERE `id_domain`='" . (int)$result['standardsubdomain'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
`standardsubdomain`= '0' WHERE `customerid`= '" . (int)$result['customerid'] . "'");
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically deleted standardsubdomain for user '" . $result['loginname'] . "'");
inserttask('1');
}
@@ -1218,14 +1224,13 @@ if($page == 'customers'
if($deactivated != $result['deactivated'])
{
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `postfix`='" . (($deactivated) ? 'N' : 'Y') . "', `pop3`='" . (($deactivated) ? '0' : '1') . "', `imap`='" . (($deactivated) ? '0' : '1') . "' WHERE `customerid`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `postfix`='" . (($deactivated) ? 'N' : 'Y') . "', `pop3`='" . (($deactivated) ? '0' : (int)$result['pop3']) . "', `imap`='" . (($deactivated) ? '0' : (int)$result['imap']) . "' WHERE `customerid`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `login_enabled`='" . (($deactivated) ? 'N' : 'Y') . "' WHERE `customerid`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `deactivated`='" . (int)$deactivated . "' WHERE `customerid`='" . (int)$id . "'");
/* Retrieve customer's databases */
$databases = $db->query("SELECT * FROM " . TABLE_PANEL_DATABASES . " WHERE customerid='" . (int)$id . "' ORDER BY `dbserver`");
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
unset($db_root->password);
$last_dbserver = 0;
/* For each of them */
@@ -1236,7 +1241,6 @@ if($page == 'customers'
$db_root->query('FLUSH PRIVILEGES;');
$db_root->close();
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
unset($db_root->password);
$last_dbserver = $row_database['dbserver'];
}
@@ -1247,8 +1251,8 @@ if($page == 'customers'
/* Prevent access, if deactivated */
if($deactivated)
{
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
// failsafe if user has been deleted manually (requires MySQL 4.1.2+)
$db_root->query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM \'' . $db_root->escape($row_database['databasename']) .'\'',false,true);
}
else /* Otherwise grant access */
{
@@ -1284,11 +1288,8 @@ if($page == 'customers'
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `gender`='" . $db->escape($gender) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "', `backup_allowed`='" . $db->escape($backup_allowed) . "' WHERE `customerid`='" . (int)$id . "'");
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
# Using filesystem - quota, insert a task which cleans the filesystem - quota
if ($settings['system']['diskquota_enabled'])
{
inserttask('10');
}
// Using filesystem - quota, insert a task which cleans the filesystem - quota
inserttask('10');
if($mysqls != '-1'
|| $result['mysqls'] != '-1')
@@ -1573,13 +1574,6 @@ if($page == 'customers'
$result['aps_packages'] = '';
}
#$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', (($result['standardsubdomain'] != '0') ? '1' : '0'));
#$phpenabled = makeyesno('phpenabled', '1', '0', $result['phpenabled']);
#$perlenabled = makeyesno('perlenabled', '1', '0', $result['perlenabled']);
#$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
#$email_imap = makeyesno('email_imap', '1', '0', $result['imap']);
#$email_pop3 = makeyesno('email_pop3', '1', '0', $result['pop3']);
$backup_allowed = makeyesno('backup_allowed', '1', '0', $result['backup_allowed']);
$result = htmlentities_array($result);
$gender_options = makeoption($lng['gender']['undef'], 0, ($result['gender'] == '0' ? true : false), true, true);

View File

@@ -47,8 +47,6 @@ if($page == 'domains'
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_domains");
$fields = array(
'd.domain' => $lng['domains']['domainname'],
'ip.ip' => $lng['admin']['ipsandports']['ip'],
'ip.port' => $lng['admin']['ipsandports']['port'],
'c.name' => $lng['customer']['name'],
'c.firstname' => $lng['customer']['firstname'],
'c.company' => $lng['customer']['company'],
@@ -57,7 +55,7 @@ if($page == 'domains'
);
$paging = new paging($userinfo, $db, TABLE_PANEL_DOMAINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$domains = '';
$result = $db->query("SELECT `d`.*, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `c`.`standardsubdomain`, `ad`.`id` AS `aliasdomainid`, `ad`.`domain` AS `aliasdomain`, `ip`.`id` AS `ipid`, `ip`.`ip`, `ip`.`port` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id` " . "LEFT JOIN `" . TABLE_PANEL_IPSANDPORTS . "` `ip` ON (`d`.`ipandport` = `ip`.`id`) " . "WHERE `d`.`parentdomainid`='0' " . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' ") . " " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query("SELECT `d`.*, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `c`.`standardsubdomain`, `ad`.`id` AS `aliasdomainid`, `ad`.`domain` AS `aliasdomain` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id` WHERE `d`.`parentdomainid`='0' " . ($userinfo['customers_see_all'] ? '' : " AND `d`.`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);
@@ -70,14 +68,21 @@ if($page == 'domains'
$row['domain'] = $idna_convert->decode($row['domain']);
$row['aliasdomain'] = $idna_convert->decode($row['aliasdomain']);
if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
$resultips = $db->query("SELECT `ips`.* FROM `".TABLE_DOMAINTOIP . "` AS `dti`, `".TABLE_PANEL_IPSANDPORTS."` AS `ips` WHERE `dti`.`id_ipandports` = `ips`.`id` AND `dti`.`id_domain` = " . (int)$row['id']);
$row['ipandport'] = '';
while ($rowip = $db->fetch_array($resultips))
{
$row['ipandport'] = '[' . $row['ip'] . ']:' . $row['port'];
}
else
{
$row['ipandport'] = $row['ip'] . ':' . $row['port'];
if(filter_var($rowip['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
{
$row['ipandport'] .= '[' . $rowip['ip'] . ']:' . $rowip['port'] . "\n";
}
else
{
$row['ipandport'] .= $rowip['ip'] . ':' . $rowip['port'] . "\n";
}
}
$row['ipandport'] = substr($row['ipandport'], 0, -1);
if(!isset($domain_array[$row['domain']]))
{
@@ -123,6 +128,8 @@ if($page == 'domains'
{
$row['customername'] = getCorrectFullUserDetails($row);
$row = htmlentities_array($row);
// display a nice list of IP's
$row['ipandport'] = str_replace("\n", "<br />", $row['ipandport']);
eval("\$domains.=\"" . getTemplate("domains/domains_domain") . "\";");
$count++;
}
@@ -190,11 +197,15 @@ if($page == 'domains'
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` - " . (int)($deleted_domains - 1) . " WHERE `customerid` = '" . (int)$result['customerid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$userinfo['adminid'] . "'");
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'0\' WHERE `standardsubdomain`=\'' . (int)$result['id'] . '\' AND `customerid`=\'' . (int)$result['customerid'] . '\'');
$db->query("DELETE FROM `" . TABLE_DOMAINTOIP . "` WHERE `id_domain` = '" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINREDIRECTS . "` WHERE `did` = '".(int)$id."'");
$log->logAction(ADM_ACTION, LOG_INFO, "deleted domain/subdomains (#" . $result['id'] . ")");
updateCounters();
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
elseif ($alias_check['count'] > 0) {
@@ -236,9 +247,9 @@ if($page == 'domains'
if(isset($_POST['email_only']))
$email_only = intval($_POST['email_only']);
$wwwserveralias = 0;
if(isset($_POST['wwwserveralias']))
$wwwserveralias = intval($_POST['wwwserveralias']);
$serveraliasoption = 0;
if(isset($_POST['selectserveralias']))
$serveraliasoption = intval($_POST['selectserveralias']);
$speciallogfile = 0;
if(isset($_POST['speciallogfile']))
@@ -278,9 +289,16 @@ if($page == 'domains'
if($userinfo['change_serversettings'] == '1')
{
$isbinddomain = intval($_POST['isbinddomain']);
$caneditdomain = intval($_POST['caneditdomain']);
$zonefile = validate($_POST['zonefile'], 'zonefile');
$caneditdomain = isset($_POST['caneditdomain']) ? intval($_POST['caneditdomain']) : 0;
$isbinddomain = '0';
$zonefile = '';
if ($settings['system']['bind_enable'] == '1') {
if (isset($_POST['isbinddomain'])) {
$isbinddomain = intval($_POST['isbinddomain']);
}
$zonefile = validate($_POST['zonefile'], 'zonefile');
}
if(isset($_POST['dkim']))
{
@@ -294,11 +312,13 @@ if($page == 'domains'
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
validate($_POST['documentroot'], 'documentroot');
// If path is empty and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
// set default path to subdomain or domain name
if(isset($_POST['documentroot'])
&& $_POST['documentroot'] != '')
&& ($_POST['documentroot'] != ''))
{
if(substr($_POST['documentroot'], 0, 1) != '/'
&& !preg_match('/^https?\:\/\//', $_POST['documentroot']))
&& !preg_match('/^https?\:\/\//', $_POST['documentroot']))
{
$documentroot.= '/' . $_POST['documentroot'];
}
@@ -307,10 +327,19 @@ if($page == 'domains'
$documentroot = $_POST['documentroot'];
}
}
elseif (isset($_POST['documentroot'])
&& ($_POST['documentroot'] == '')
&& ($settings['system']['documentroot_use_default_value'] == 1))
{
$documentroot = makeCorrectDir($customer['documentroot'] . '/' . $domain);
}
}
else
{
$isbinddomain = '1';
$isbinddomain = '0';
if ($settings['system']['bind_enable'] == '1') {
$isbinddomain = '1';
}
$caneditdomain = '1';
$zonefile = '';
$dkim = '1';
@@ -320,10 +349,9 @@ if($page == 'domains'
if($userinfo['caneditphpsettings'] == '1'
|| $userinfo['change_serversettings'] == '1')
{
$openbasedir = intval($_POST['openbasedir']);
$safemode = intval($_POST['safemode']);
$openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0;
if((int)$settings['system']['mod_fcgid'] == 1)
if((int)$settings['system']['mod_fcgid'] == 1 || (int)$settings['phpfpm']['enabled'] == 1)
{
$phpsettingid = (int)$_POST['phpsettingid'];
$phpsettingid_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$phpsettingid);
@@ -335,12 +363,21 @@ if($page == 'domains'
standard_error('phpsettingidwrong');
}
$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( (int)$settings['system']['mod_fcgid'] == 1) {
$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', ''));
} else {
$mod_fcgid_starter = '-1';
$mod_fcgid_maxrequests = '-1';
}
}
else
{
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
if ((int)$settings['phpfpm']['enabled'] == 1) {
$phpsettingid = $settings['phpfpm']['defaultini'];
} else {
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
}
$mod_fcgid_starter = '-1';
$mod_fcgid_maxrequests = '-1';
}
@@ -348,8 +385,11 @@ if($page == 'domains'
else
{
$openbasedir = '1';
$safemode = '1';
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
if ((int)$settings['phpfpm']['enabled'] == 1) {
$phpsettingid = $settings['phpfpm']['defaultini'];
} else {
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
}
$mod_fcgid_starter = '-1';
$mod_fcgid_maxrequests = '-1';
}
@@ -364,42 +404,63 @@ if($page == 'domains'
$additional_ip_condition = '';
}
$ipandport = intval($_POST['ipandport']);
$ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ipandport) . "' AND `ssl` = '0'" . $additional_ip_condition);
if(!isset($ipandport_check['id'])
|| $ipandport_check['id'] == '0'
|| $ipandport_check['id'] != $ipandport)
{
standard_error('ipportdoesntexist');
$ipandports = array();
if (isset($_POST['ipandport']) && !is_array($_POST['ipandport'])) {
$_POST['ipandport'] = unserialize($_POST['ipandport']);
}
if($settings['system']['use_ssl'] == "1"
&& isset($_POST['ssl'])
/*&& isset($_POST['ssl_redirect'])*/
&& isset($_POST['ssl_ipandport'])
&& $_POST['ssl'] != '0')
{
$ssl = (int)$_POST['ssl'];
if (isset($_POST['ipandport']) && is_array($_POST['ipandport'])) {
foreach($_POST['ipandport'] as $ipandport) {
$ipandport = intval($ipandport);
$ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ipandport) . "' " . $additional_ip_condition);
if(!isset($ipandport_check['id'])
|| $ipandport_check['id'] == '0'
|| $ipandport_check['id'] != $ipandport
) {
standard_error('ipportdoesntexist');
} else {
$ipandports[] = $ipandport;
}
}
}
if ($settings['system']['use_ssl'] == "1"
&& isset($_POST['ssl_ipandport'])
) {
$ssl_redirect = 0;
if (isset($_POST['ssl_redirect'])) {
$ssl_redirect = (int)$_POST['ssl_redirect'];
}
$ssl_ipandport = (int)$_POST['ssl_ipandport'];
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition);
if(!isset($ssl_ipandport_check['id'])
|| $ssl_ipandport_check['id'] == '0'
|| $ssl_ipandport_check['id'] != $ssl_ipandport)
{
standard_error('ipportdoesntexist');
$ssl_ipandports = array();
if (isset($_POST['ssl_ipandport']) && !is_array($_POST['ssl_ipandport'])) {
$_POST['ssl_ipandport'] = unserialize($_POST['ssl_ipandport']);
}
}
else
{
$ssl = 0;
// Verify SSL-Ports
if (isset($_POST['ssl_ipandport']) && is_array($_POST['ssl_ipandport'])) {
foreach ($_POST['ssl_ipandport'] as $ssl_ipandport) {
$ssl_ipandport = intval($ssl_ipandport);
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' " . $additional_ip_condition);
if (!isset($ssl_ipandport_check['id'])
|| $ssl_ipandport_check['id'] == '0'
|| $ssl_ipandport_check['id'] != $ssl_ipandport
) {
standard_error('ipportdoesntexist');
} else {
$ssl_ipandports[] = $ssl_ipandport;
}
}
} else {
// we need this for the serialize
// if ssl is disabled or no ssl-ip/port exists
$ssl_ipandports[] = -1;
}
} else {
$ssl_redirect = 0;
$ssl_ipandport = 0;
// we need this for the serialize
// if ssl is disabled or no ssl-ip/port exists
$ssl_ipandports[] = -1;
}
if(!preg_match('/^https?\:\/\//', $documentroot))
@@ -414,15 +475,35 @@ if($page == 'domains'
}
}
$domain_check = $db->query_first("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'");
$domain_check = $db->query_first("SELECT `id`, `domain`
FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'"
);
$aliasdomain_check = array(
'id' => 0
);
if($aliasdomain != 0)
if ($aliasdomain != 0) {
// Overwrite given ipandports with these of the "main" domain
$ipandports = array();
$origipresult = $db->query("SELECT `id_ipandports`
FROM `" . TABLE_DOMAINTOIP ."`
WHERE `id_domain` = '" . (int)$aliasdomain . "'"
);
while ($origip = $db->fetch_array($origipresult)) {
$ipandports[] = $origip['id_ipandports'];
}
$aliasdomain_check = $db->query_first("SELECT `d`.`id` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c`
WHERE `d`.`customerid`='" . (int)$customerid . "'
AND `d`.`aliasdomain` IS NULL AND
`d`.`id` <> `c`.`standardsubdomain`
AND `c`.`customerid`='" . (int)$customerid . "'
AND `d`.`id`='" . (int)$aliasdomain . "'");
}
if(count($ipandports) == 0)
{
// also check ip/port combination to be the same, #176
$aliasdomain_check = $db->query_first('SELECT `d`.`id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
standard_error('noipportgiven');
}
if($openbasedir != '1')
@@ -430,11 +511,6 @@ if($page == 'domains'
$openbasedir = '0';
}
if($safemode != '1')
{
$safemode = '0';
}
if($speciallogfile != '1')
{
$speciallogfile = '0';
@@ -471,9 +547,8 @@ if($page == 'domains'
$dkim = '0';
}
if($wwwserveralias != '1')
{
$wwwserveralias = '0';
if ($serveraliasoption != '1' && $serveraliasoption != '2') {
$serveraliasoption = '0';
}
if($caneditdomain != '1')
@@ -529,13 +604,11 @@ if($page == 'domains'
'zonefile' => $zonefile,
'dkim' => $dkim,
'speciallogfile' => $speciallogfile,
'wwwserveralias' => $wwwserveralias,
'ipandport' => $ipandport,
'ssl' => $ssl,
'selectserveralias' => $serveraliasoption,
'ipandport' => serialize($ipandports),
'ssl_redirect' => $ssl_redirect,
'ssl_ipandport' => $ssl_ipandport,
'ssl_ipandport' => serialize($ssl_ipandports),
'openbasedir' => $openbasedir,
'safemode' => $safemode,
'phpsettingid' => $phpsettingid,
'mod_fcgid_starter' => $mod_fcgid_starter,
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
@@ -565,12 +638,57 @@ if($page == 'domains'
$question_nr++;
}
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `ismainbutsubto`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "', '".(int)$issubof."')");
$wwwserveralias = ($serveraliasoption == '1') ? '1' : '0';
$iswildcarddomain = ($serveraliasoption == '0') ? '1' : '0';
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET
`domain` = '" . $db->escape($domain) . "',
`customerid` = '" . (int)$customerid . "',
`adminid` = '" . (int)$adminid . "',
`documentroot` = '" . $db->escape($documentroot) . "',
`aliasdomain` = " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ",
`zonefile` = '" . $db->escape($zonefile) . "',
`dkim` = '" . $db->escape($dkim) . "',
`wwwserveralias` = '" . $db->escape($wwwserveralias) . "',
`iswildcarddomain` = '" . $db->escape($iswildcarddomain) . "',
`isbinddomain` = '" . $db->escape($isbinddomain) . "',
`isemaildomain` = '" . $db->escape($isemaildomain) . "',
`email_only` = '" . $db->escape($email_only) . "',
`subcanemaildomain` = '" . $db->escape($subcanemaildomain) . "',
`caneditdomain` = '" . $db->escape($caneditdomain) . "',
`openbasedir` = '" . $db->escape($openbasedir) . "',
`speciallogfile` = '" . $db->escape($speciallogfile) . "',
`specialsettings` = '" . $db->escape($specialsettings) . "',
`ssl_redirect` = '" . $ssl_redirect . "',
`add_date` = '" . $db->escape(time()) . "',
`registration_date` = '" . $db->escape($registration_date) . "',
`phpsettingid` = '" . (int)$phpsettingid . "',
`mod_fcgid_starter` = '" . (int)$mod_fcgid_starter . "',
`mod_fcgid_maxrequests` = '" . (int)$mod_fcgid_maxrequests . "',
`ismainbutsubto` = '".(int)$issubof."'
");
$domainid = $db->insert_id();
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` + 1 WHERE `adminid` = '" . (int)$adminid . "'");
foreach ($ipandports as $ipportid) {
$db->query("INSERT INTO `" . TABLE_DOMAINTOIP . "` SET
`id_domain` = '" . $domainid . "',
`id_ipandports` = '" . (int)$ipportid . "';
");
}
foreach ($ssl_ipandports as $ssl_ipportid) {
if ($ssl_ipportid > 0) {
$db->query("INSERT INTO `" . TABLE_DOMAINTOIP . "` SET
`id_domain` = '" . $domainid . "',
`id_ipandports` = '" . (int)$ssl_ipportid . "';
");
}
}
$log->logAction(ADM_ACTION, LOG_INFO, "added domain '" . $domain . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
@@ -608,8 +726,8 @@ if($page == 'domains'
$result_ssl_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1' AND `ip`='" . $admin_ip['ip'] . "' ORDER BY `ip`, `port` ASC");
}
$ipsandports = '';
// Build array holding all IPs and Ports available to this admin
$ipsandports = array();
while($row_ipandport = $db->fetch_array($result_ipsandports))
{
if(filter_var($row_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
@@ -617,11 +735,10 @@ if($page == 'domains'
$row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']';
}
$ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id'], $settings['system']['defaultip']);
$ipsandports[] = array('label' => $row_ipandport['ip'] . ':' . $row_ipandport['port'], 'value' => $row_ipandport['id']);
}
$ssl_ipsandports = '';
$ssl_ipsandports = array();
while($row_ssl_ipandport = $db->fetch_array($result_ssl_ipsandports))
{
if(filter_var($row_ssl_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
@@ -629,7 +746,7 @@ if($page == 'domains'
$row_ssl_ipandport['ip'] = '[' . $row_ssl_ipandport['ip'] . ']';
}
$ssl_ipsandports.= makeoption($row_ssl_ipandport['ip'] . ':' . $row_ssl_ipandport['port'], $row_ssl_ipandport['id'], $settings['system']['defaultip']);
$ssl_ipsandports[] = array('label' => $row_ssl_ipandport['ip'] . ':' . $row_ssl_ipandport['port'], 'value' => $row_ssl_ipandport['id']);
}
$standardsubdomains = array();
@@ -670,21 +787,20 @@ if($page == 'domains'
while($row = $db->fetch_array($configs))
{
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true);
if ((int)$settings['phpfpm']['enabled'] == 1) {
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['phpfpm']['defaultini'], true, true);
} else {
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true);
}
}
#$isbinddomain = makeyesno('isbinddomain', '1', '0', '1');
#$isemaildomain = makeyesno('isemaildomain', '1', '0', '1');
#$email_only = makeyesno('email_only', '1', '0', '0');
// create serveralias options
$serveraliasoptions = "";
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_wildcard'], '0', '0', true, true);
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_www'], '1', '0', true, true);
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_none'], '2', '0', true, true);
$subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['always'], '3', '0', true, true);
#$dkim = makeyesno('dkim', '1', '0', '1');
#$wwwserveralias = makeyesno('wwwserveralias', '1', '0', '1');
#$caneditdomain = makeyesno('caneditdomain', '1', '0', '1');
#$openbasedir = makeyesno('openbasedir', '1', '0', '1');
#$safemode = makeyesno('safemode', '1', '0', '1');
#$speciallogfile = makeyesno('speciallogfile', '1', '0', '0');
#$ssl = makeyesno('ssl', '1', '0', '0');
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', '0');
$add_date = date('Y-m-d');
$domain_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_add.php';
@@ -732,6 +848,13 @@ if($page == 'domains'
}
}
$ipsresult = $db->query("SELECT `id_ipandports` FROM `" . TABLE_DOMAINTOIP . "` WHERE `id_domain` = '" . (int)$result['id'] . "'");
$usedips = array();
while ($ipsresultrow = $db->fetch_array($ipsresult))
{
$usedips[] = $ipsresultrow['id_ipandports'];
}
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
@@ -783,7 +906,7 @@ if($page == 'domains'
$aliasdomain = intval($_POST['alias']);
$issubof = intval($_POST['issubof']);
$subcanemaildomain = intval($_POST['subcanemaildomain']);
$caneditdomain = intval($_POST['caneditdomain']);
$caneditdomain = isset($_POST['caneditdomain']) ? intval($_POST['caneditdomain']) : 0;
$registration_date = trim($_POST['registration_date']);
$registration_date = validate($registration_date, 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));
@@ -795,18 +918,37 @@ if($page == 'domains'
if(isset($_POST['email_only']))
$email_only = intval($_POST['email_only']);
$wwwserveralias = 0;
if(isset($_POST['wwwserveralias']))
$wwwserveralias = intval($_POST['wwwserveralias']);
$serveraliasoption = '2';
if ($result['iswildcarddomain'] == '1') {
$serveraliasoption = '0';
} elseif ($result['wwwserveralias'] == '1') {
$serveraliasoption = '1';
}
if (isset($_POST['selectserveralias'])) {
$serveraliasoption = intval($_POST['selectserveralias']);
}
$speciallogfile = 0;
if(isset($_POST['speciallogfile']))
$speciallogfile = intval($_POST['speciallogfile']);
if($userinfo['change_serversettings'] == '1')
{
$isbinddomain = intval($_POST['isbinddomain']);
$zonefile = validate($_POST['zonefile'], 'zonefile');
$isbinddomain = $result['isbinddomain'];
$zonefile = $result['zonefile'];
if ($settings['system']['bind_enable'] == '1') {
if (isset($_POST['isbinddomain'])) {
$isbinddomain = (int)$_POST['isbinddomain'];
} else {
$isbinddomain = 0;
}
$zonefile = validate($_POST['zonefile'], 'zonefile');
}
if($settings['dkim']['use_dkim'] == '1')
{
$dkim = intval($_POST['dkim']);
$dkim = isset($_POST['dkim']) ? 1 : 0;
}
else
{
@@ -818,7 +960,16 @@ if($page == 'domains'
if($documentroot == '')
{
$documentroot = $customer['documentroot'];
// If path is empty and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
// set default path to subdomain or domain name
if ($settings['system']['documentroot_use_default_value'] == 1)
{
$documentroot = makeCorrectDir($customer['documentroot'] . '/' . $result['domain']);
}
else
{
$documentroot = $customer['documentroot'];
}
}
if(!preg_match('/^https?\:\/\//', $documentroot)
@@ -836,13 +987,14 @@ if($page == 'domains'
$documentroot = $result['documentroot'];
}
$speciallogverified = (isset($_POST['speciallogverified']) ? (int)$_POST['speciallogverified'] : 0);
if($userinfo['caneditphpsettings'] == '1'
|| $userinfo['change_serversettings'] == '1')
{
$openbasedir = intval($_POST['openbasedir']);
$safemode = intval($_POST['safemode']);
$openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0;
if((int)$settings['system']['mod_fcgid'] == 1)
if((int)$settings['system']['mod_fcgid'] == 1 || (int)$settings['phpfpm']['enabled'] == 1)
{
$phpsettingid = (int)$_POST['phpsettingid'];
$phpsettingid_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$phpsettingid);
@@ -854,8 +1006,13 @@ if($page == 'domains'
standard_error('phpsettingidwrong');
}
$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 ((int)$settings['system']['mod_fcgid'] == 1) {
$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', ''));
} else {
$mod_fcgid_starter = $result['mod_fcgid_starter'];
$mod_fcgid_maxrequests = $result['mod_fcgid_maxrequests'];
}
}
else
{
@@ -867,58 +1024,70 @@ if($page == 'domains'
else
{
$openbasedir = $result['openbasedir'];
$safemode = $result['safemode'];
$phpsettingid = $result['phpsettingid'];
$mod_fcgid_starter = $result['mod_fcgid_starter'];
$mod_fcgid_maxrequests = $result['mod_fcgid_maxrequests'];
}
if($userinfo['ip'] != "-1")
{
$admin_ip = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$userinfo['ip'] . "' ORDER BY `ip`, `port` ASC");
$additional_ip_condition = ' AND `ip` = \'' . $admin_ip['ip'] . '\' ';
$ipandports = array();
if (isset($_POST['ipandport']) && !is_array($_POST['ipandport'])) {
$_POST['ipandport'] = unserialize($_POST['ipandport']);
}
else
{
$additional_ip_condition = '';
}
$ipandport = intval($_POST['ipandport']);
$ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ipandport) . "' AND `ssl` = '0'" . $additional_ip_condition);
if(!isset($ipandport_check['id'])
|| $ipandport_check['id'] == '0'
|| $ipandport_check['id'] != $ipandport)
{
standard_error('ipportdoesntexist');
if (isset($_POST['ipandport']) && is_array($_POST['ipandport'])) {
foreach($_POST['ipandport'] as $ipandport) {
if (trim($ipandport) == "") continue;
$ipandport = intval($ipandport);
$ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ipandport) . "' ");
if (!isset($ipandport_check['id'])
|| $ipandport_check['id'] == '0'
|| $ipandport_check['id'] != $ipandport
) {
standard_error('ipportdoesntexist');
} else {
$ipandports[] = $ipandport;
}
}
}
if($settings['system']['use_ssl'] == "1"
&& isset($_POST['ssl'])
/*&& isset($_POST['ssl_redirect'])*/
&& isset($_POST['ssl_ipandport'])
&& $_POST['ssl'] != '0')
&& isset($_POST['ssl_ipandport']))
{
$ssl = (int)$_POST['ssl'];
$ssl = 1; // if ssl is set and != 0, it can only be 1
$ssl_redirect = 0;
if (isset($_POST['ssl_redirect'])) {
$ssl_redirect = (int)$_POST['ssl_redirect'];
}
$ssl_ipandport = (int)$_POST['ssl_ipandport'];
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition);
if(!isset($ssl_ipandport_check['id'])
|| $ssl_ipandport_check['id'] == '0'
|| $ssl_ipandport_check['id'] != $ssl_ipandport)
{
standard_error('ipportdoesntexist');
$ssl_ipandports = array();
if (isset($_POST['ssl_ipandport']) && !is_array($_POST['ssl_ipandport'])) {
$_POST['ssl_ipandport'] = unserialize($_POST['ssl_ipandport']);
}
if (isset($_POST['ssl_ipandport']) && is_array($_POST['ssl_ipandport'])) {
foreach ($_POST['ssl_ipandport'] as $ssl_ipandport) {
if (trim($ssl_ipandport) == "") continue;
$ssl_ipandport = intval($ssl_ipandport);
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' ");
if (!isset($ssl_ipandport_check['id'])
|| $ssl_ipandport_check['id'] == '0'
|| $ssl_ipandport_check['id'] != $ssl_ipandport
) {
standard_error('ipportdoesntexist');
} else {
$ssl_ipandports[] = $ssl_ipandport;
}
}
} else {
// we need this for the serialize
// if ssl is disabled or no ssl-ip/port exists
$ssl_ipandports[] = -1;
}
}
else
{
$ssl = 0;
$ssl_redirect = 0;
$ssl_ipandport = 0;
// we need this for the serialize
// if ssl is disabled or no ssl-ip/port exists
$ssl_ipandports[] = -1;
}
if(!preg_match('/^https?\:\/\//', $documentroot))
@@ -931,11 +1100,6 @@ if($page == 'domains'
$openbasedir = '0';
}
if($safemode != '1')
{
$safemode = '0';
}
if($isbinddomain != '1')
{
$isbinddomain = '0';
@@ -976,10 +1140,23 @@ if($page == 'domains'
'id' => 0
);
if($aliasdomain != 0)
{
// also check ip/port combination to be the same, #176
$aliasdomain_check = $db->query_first('SELECT `d`.`id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
if ($aliasdomain != 0) {
// Overwrite given ipandports with these of the "main" domain
$ipandports = array();
$origipresult = $db->query("SELECT `id_ipandports` FROM `" . TABLE_DOMAINTOIP ."` WHERE `id_domain` = '" . (int)$aliasdomain . "'");
while ($origip = $db->fetch_array($origipresult)) {
$ipandports[] = $origip['id_ipandports'];
}
$aliasdomain_check = $db->query_first("SELECT `d`.`id` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c`
WHERE `d`.`customerid`='" . (int)$customerid . "'
AND `d`.`aliasdomain` IS NULL AND
`d`.`id` <> `c`.`standardsubdomain`
AND `c`.`customerid`='" . (int)$customerid . "'
AND `d`.`id`='" . (int)$aliasdomain . "'");
}
if (count($ipandports) == 0) {
standard_error('noipportgiven');
}
if($aliasdomain_check['id'] != $aliasdomain)
@@ -992,6 +1169,10 @@ if($page == 'domains'
$issubof = '0';
}
if ($serveraliasoption != '1' && $serveraliasoption != '2') {
$serveraliasoption = '0';
}
$params = array(
'id' => $id,
'page' => $page,
@@ -1007,19 +1188,19 @@ if($page == 'domains'
'caneditdomain' => $caneditdomain,
'zonefile' => $zonefile,
'dkim' => $dkim,
'wwwserveralias' => $wwwserveralias,
'ipandport' => $ipandport,
'ssl' => $ssl,
'selectserveralias' => $serveraliasoption,
'ssl_redirect' => $ssl_redirect,
'ssl_ipandport' => $ssl_ipandport,
'openbasedir' => $openbasedir,
'safemode' => $safemode,
'phpsettingid' => $phpsettingid,
'mod_fcgid_starter' => $mod_fcgid_starter,
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
'specialsettings' => $specialsettings,
'registration_date' => $registration_date,
'issubof' => $issubof
'issubof' => $issubof,
'speciallogfile' => $speciallogfile,
'speciallogverified' => $speciallogverified,
'ipandport' => serialize($ipandports),
'ssl_ipandport' => serialize($ssl_ipandports)
);
$security_questions = array(
@@ -1041,28 +1222,33 @@ if($page == 'domains'
}
}
$wwwserveralias = ($serveraliasoption == '1') ? '1' : '0';
$iswildcarddomain = ($serveraliasoption == '0') ? '1' : '0';
if($documentroot != $result['documentroot']
|| $ipandport != $result['ipandport']
|| $ssl != $result['ssl']
|| $ssl_redirect != $result['ssl_redirect']
|| $ssl_ipandport != $result['ssl_ipandport']
|| $wwwserveralias != $result['wwwserveralias']
|| $iswildcarddomain != $result['iswildcarddomain']
|| $openbasedir != $result['openbasedir']
|| $safemode != $result['safemode']
|| $phpsettingid != $result['phpsettingid']
|| $mod_fcgid_starter != $result['mod_fcgid_starter']
|| $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests']
|| $specialsettings != $result['specialsettings']
|| $aliasdomain != $result['aliasdomain']
|| $issubof != $result['ismainbutsubto'])
|| $issubof != $result['ismainbutsubto']
|| $email_only != $result['email_only']
|| ($speciallogfile != $result['speciallogfile'] && $speciallogverified == '1'))
{
inserttask('1');
}
if ($speciallogfile != $result['speciallogfile'] && $speciallogverified != '1') {
$speciallogfile = $result['speciallogfile'];
}
if($isbinddomain != $result['isbinddomain']
|| $zonefile != $result['zonefile']
|| $dkim != $result['dkim']
|| $ipandport != $result['ipandport'])
|| $dkim != $result['dkim'])
{
inserttask('4');
}
@@ -1104,7 +1290,7 @@ if($page == 'domains'
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$result['adminid'] . "' ");
}
$ssfs = isset($_POST['specialsettingsforsubdomains']) ? intval($_POST['specialsettingsforsubdomains']) : 1;
$ssfs = isset($_POST['specialsettingsforsubdomains']) ? 1 : 0;
if($ssfs == 1)
{
$upd_specialsettings = ", `specialsettings`='" . $db->escape($specialsettings) . "' ";
@@ -1116,8 +1302,86 @@ if($page == 'domains'
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
}
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "', `ismainbutsubto`='" . (int)$issubof . "' WHERE `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
$wwwserveralias = ($serveraliasoption == '1') ? '1' : '0';
$iswildcarddomain = ($serveraliasoption == '0') ? '1' : '0';
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
`customerid` = '" . (int)$customerid . "',
`adminid` = '" . (int)$adminid . "',
`documentroot`='" . $db->escape($documentroot) . "',
`ssl_redirect`='" . (int)$ssl_redirect . "',
`aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ",
`isbinddomain`='" . $db->escape($isbinddomain) . "',
`isemaildomain`='" . $db->escape($isemaildomain) . "',
`email_only`='" . $db->escape($email_only) . "',
`subcanemaildomain`='" . $db->escape($subcanemaildomain) . "',
`dkim`='" . $db->escape($dkim) . "',
`caneditdomain`='" . $db->escape($caneditdomain) . "',
`zonefile`='" . $db->escape($zonefile) . "',
`wwwserveralias`='" . $db->escape($wwwserveralias) . "',
`iswildcarddomain`='" . $db->escape($iswildcarddomain) . "',
`openbasedir`='" . $db->escape($openbasedir) . "',
`speciallogfile`='" . $db->escape($speciallogfile) . "',
`phpsettingid`='" . $db->escape($phpsettingid) . "',
`mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "',
`mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "',
`specialsettings`='" . $db->escape($specialsettings) . "',
`registration_date`='" . $db->escape($registration_date) . "',
`ismainbutsubto`='" . (int)$issubof . "' WHERE `id`='" . (int)$id . "'
");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
`customerid` = '" . (int)$customerid . "',
`adminid` = '" . (int)$adminid . "',
`openbasedir`='" . $db->escape($openbasedir) . "',
`phpsettingid`='" . $db->escape($phpsettingid) . "',
`mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "',
`mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "'
" . $upd_specialsettings . $updatechildren . "
WHERE `parentdomainid`='" . (int)$id . "'
");
// FIXME check how many we got and if the amount of assigned IP's
// has changed so we can insert a config-rebuild task if only
// the ip's of this domain were changed
// Cleanup domain <-> ip mapping
$db->query("DELETE FROM `" . TABLE_DOMAINTOIP . "` WHERE `id_domain` = '" . (int)$id . "'");
foreach ($ipandports as $ipportid) {
$db->query("INSERT INTO `" . TABLE_DOMAINTOIP . "` SET
`id_domain` = '" . (int)$id . "',
`id_ipandports` = '" . (int)$ipportid . "';
");
}
foreach ($ssl_ipandports as $ssl_ipportid) {
if ($ssl_ipportid > 0) {
$db->query("INSERT INTO `" . TABLE_DOMAINTOIP . "` SET
`id_domain` = '" . (int)$id . "',
`id_ipandports` = '" . (int)$ssl_ipportid . "';
");
}
}
// Cleanup domain <-> ip mapping for subdomains
$domainidsresult = $db->query("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `parentdomainid`='" . (int)$id . "'");
while ($row = $db->fetch_array($domainidsresult)) {
$db->query("DELETE FROM `" . TABLE_DOMAINTOIP . "` WHERE `id_domain` = '" . (int)$row['id'] . "'");
foreach ($ipandports as $ipportid) {
$db->query("INSERT INTO `" . TABLE_DOMAINTOIP . "` SET
`id_domain` = '" . (int)$row['id'] . "',
`id_ipandports` = '" . (int)$ipportid . "';
");
}
foreach ($ssl_ipandports as $ssl_ipportid) {
if ($ssl_ipportid > 0) {
$db->query("INSERT INTO `" . TABLE_DOMAINTOIP . "` SET
`id_domain` = '" . (int)$row['id'] . "',
`id_ipandports` = '" . (int)$ssl_ipportid . "';
");
}
}
}
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
$redirect_props = Array(
'page' => $page,
@@ -1192,8 +1456,7 @@ if($page == 'domains'
$result_ssl_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1' AND `ip`='" . $admin_ip['ip'] . "' ORDER BY `ip`, `port` ASC");
}
$ipsandports = '';
$ipsandports = array();
while($row_ipandport = $db->fetch_array($result_ipsandports))
{
if(filter_var($row_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
@@ -1201,11 +1464,10 @@ if($page == 'domains'
$row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']';
}
$ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id'], $result['ipandport']);
$ipsandports[] = array('label' => $row_ipandport['ip'] . ':' . $row_ipandport['port'], 'value' => $row_ipandport['id']);
}
$ssl_ipsandports = '';
$ssl_ipsandports = array();
while($row_ssl_ipandport = $db->fetch_array($result_ssl_ipsandports))
{
if(filter_var($row_ssl_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
@@ -1213,37 +1475,37 @@ if($page == 'domains'
$row_ssl_ipandport['ip'] = '[' . $row_ssl_ipandport['ip'] . ']';
}
$ssl_ipsandports.= makeoption($row_ssl_ipandport['ip'] . ':' . $row_ssl_ipandport['port'], $row_ssl_ipandport['id'], $result['ssl_ipandport']);
$ssl_ipsandports[] = array('label' => $row_ssl_ipandport['ip'] . ':' . $row_ssl_ipandport['port'], 'value' => $row_ssl_ipandport['id']);
}
$result['specialsettings'] = $result['specialsettings'];
#$isbinddomain = makeyesno('isbinddomain', '1', '0', $result['isbinddomain']);
#$wwwserveralias = makeyesno('wwwserveralias', '1', '0', $result['wwwserveralias']);
#$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
#$email_only = makeyesno('email_only', '1', '0', $result['email_only']);
#$ssl = makeyesno('ssl', '1', '0', $result['ssl']);
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
// create serveralias options
$serveraliasoptions = "";
$_value = '2';
if ($result['iswildcarddomain'] == '1') {
$_value = '0';
} elseif ($result['wwwserveralias'] == '1') {
$_value = '1';
}
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_wildcard'], '0', $_value, true, true);
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_www'], '1', $_value, true, true);
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_none'], '2', $_value, true, true);
$subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', $result['subcanemaildomain'], true, true);
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', $result['subcanemaildomain'], true, true);
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', $result['subcanemaildomain'], true, true);
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['always'], '3', $result['subcanemaildomain'], true, true);
#$dkim = makeyesno('dkim', '1', '0', $result['dkim']);
#$caneditdomain = makeyesno('caneditdomain', '1', '0', $result['caneditdomain']);
#$openbasedir = makeyesno('openbasedir', '1', '0', $result['openbasedir']);
#$safemode = makeyesno('safemode', '1', '0', $result['safemode']);
$speciallogfile = ($result['speciallogfile'] == 1 ? $lng['panel']['yes'] : $lng['panel']['no']);
$result['add_date'] = date('Y-m-d', $result['add_date']);
$phpconfigs = '';
$phpconfigs_result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
while($phpconfigs_row = $db->fetch_array($phpconfigs_result))
{
while ($phpconfigs_row = $db->fetch_array($phpconfigs_result)) {
$phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true);
}
#$specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1');
$result = htmlentities_array($result);
$domain_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_edit.php';
@@ -1252,10 +1514,10 @@ if($page == 'domains'
$title = $domain_edit_data['domain_edit']['title'];
$image = $domain_edit_data['domain_edit']['image'];
$speciallogwarning = sprintf($lng['admin']['speciallogwarning'], $lng['admin']['delete_statistics']);
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
}
}
}
}
?>

View File

@@ -104,11 +104,13 @@ if($page == 'overview')
$_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;
// add the branding so debian guys are not gettings confused
// about their version-number
$lookfornewversion_lable = $_version.$branding;
$lookfornewversion_link = $_link;
$lookfornewversion_addinfo = $_message;
if (version_compare($version, $_version) == -1) {
if (version_compare2($version, $_version) == -1) {
$isnewerversion = 1;
} else {
$isnewerversion = 0;

View File

@@ -83,7 +83,7 @@ if($page == 'ipsandports'
if(isset($result['id'])
&& $result['id'] == $id)
{
$result_checkdomain = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `ipandport`='" . (int)$id . "'");
$result_checkdomain = $db->query_first("SELECT `id_domain` as `id` FROM `" . TABLE_DOMAINTOIP . "` WHERE `id_ipandports`='" . (int)$id . "'");
if($result_checkdomain['id'] == '')
{
@@ -102,9 +102,16 @@ if($page == 'ipsandports'
&& $_POST['send'] == 'send')
{
$db->query("DELETE FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$id . "'");
// also, remove connections to domains (multi-stack)
$db->query("DELETE FROM `".TABLE_DOMAINTOIP."` WHERE `id_ipandports`='".(int)$id."'");
$log->logAction(ADM_ACTION, LOG_WARNING, "deleted IP/port '" . $result['ip'] . ":" . $result['port'] . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
@@ -136,11 +143,11 @@ if($page == 'ipsandports'
{
$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']);
$listen_statement = isset($_POST['listen_statement']) ? 1 : 0;
$namevirtualhost_statement = isset($_POST['namevirtualhost_statement']) ? 1 : 0;
$vhostcontainer = isset($_POST['vhostcontainer']) ? 1 : 0;
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
$vhostcontainer_servername_statement = isset($_POST['vhostcontainer_servername_statement']) ? 1 : 0;
$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)
@@ -245,17 +252,22 @@ if($page == 'ipsandports'
$log->logAction(ADM_ACTION, LOG_WARNING, "added IP/port '" . $ip . ":" . $port . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
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');
/*
$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');
*/
$ipsandports_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
$ipsandports_add_form = htmlform::genHTMLForm($ipsandports_add_data);
@@ -280,16 +292,23 @@ if($page == 'ipsandports'
$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']);
$listen_statement = isset($_POST['listen_statement']) ? 1 : 0;
$namevirtualhost_statement = isset($_POST['namevirtualhost_statement']) ? 1 : 0;
$vhostcontainer = isset($_POST['vhostcontainer']) ? 1 : 0;
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
$vhostcontainer_servername_statement = isset($_POST['vhostcontainer_servername_statement']) ? 1 : 0;
$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']);
if((int)$settings['system']['use_ssl'] == 1
/*
* check here if ssl is even checked, cause if not, we don't need
* to validate and set all the $ssl_*_file vars
*/
&& isset($_POST['ssl'])
&& $_POST['ssl'] != 0
) {
$ssl = 1;
$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');
@@ -391,18 +410,23 @@ if($page == 'ipsandports'
$log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
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']);
/*
$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
$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);

View File

@@ -22,14 +22,12 @@ define('AREA', 'admin');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require('./lib/init.php');
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'],
@@ -47,24 +45,21 @@ if($page == 'log'
$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 = $db->fetch_array($result)) {
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,20 +67,15 @@ 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))
{
foreach ($logrows as $row) {
if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row);
$row['date'] = date("d.m.y H:i:s", $row['date']);
if($_action != $action)
{
switch($action)
{
if ($_action != $action) {
switch ($action) {
case USR_ACTION:
$_action = $lng['admin']['customer'];
break;
@@ -107,15 +97,14 @@ if($page == 'log'
}
$row['action'] = $_action;
eval("\$log.=\"" . getTemplate("logger/logger_action") . "\";");
eval("\$log.=\"" . getTemplate('logger/logger_action') . "\";");
}
$log_count++;
$type = $row['type'];
$_type = 'unknown';
switch($type)
{
switch ($type) {
case LOG_INFO:
$_type = 'Information';
break;
@@ -137,32 +126,27 @@ if($page == 'log'
}
$row['type'] = $_type;
eval("\$log.=\"" . getTemplate("logger/logger_log") . "\";");
eval("\$log.=\"" . getTemplate('logger/logger_log') . "\";");
$count++;
$_action = $action;
}
}
$i++;
}
eval("echo \"" . getTemplate("logger/logger") . "\";");
}
elseif($action == 'truncate')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
eval("echo \"" . getTemplate('logger/logger') . "\";");
} elseif ($action == 'truncate') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$yesterday = time() - (60 * 10);
/* (60*60*24); */
$db->query("DELETE FROM `" . TABLE_PANEL_LOG . "` WHERE `date` < '" . $yesterday . "'");
$log->logAction(ADM_ACTION, LOG_WARNING, "truncated the system-log (mysql)");
$log->logAction(ADM_ACTION, LOG_WARNING, 'truncated the system-log (mysql)');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
} else {
ask_yesno('logger_reallytruncate', $filename, array('page' => $page, 'action' => $action), TABLE_PANEL_LOG);
}
}

View File

@@ -22,79 +22,60 @@ define('AREA', 'admin');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require('./lib/init.php');
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(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");
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");
} 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 . "`");
}
else
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to customers");
} 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
{
} else {
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))
{
while ($row = $db->fetch_array($result)) {
$mail->AddAddress($row['email'], (isset($row['firstname']) ? $row['firstname'] . ' ' : '') . $row['name']);
$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(ADM_ACTION, LOG_ERR, 'Error sending mail: ' . $mailerr_msg);
standard_error('errorsendingmail', $row['email']);
}
$mailcounter++;
@@ -102,47 +83,34 @@ if($page == 'message')
}
redirectTo($filename, Array('page' => $page, 's' => $s, 'action' => 'showsuccess', 'sentitems' => $mailcounter));
}
else
{
} else {
standard_error('nomessagetosend');
}
}
}
if($action == 'showsuccess')
{
if ($action == 'showsuccess') {
$success = 1;
$sentitems = isset($_GET['sentitems']) ? (int)$_GET['sentitems'] : 0;
if($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")
{
if ($userinfo['customers_see_all'] == '1') {
$receipients.= makeoption($lng['panel']['reseller'], 0);
}
$receipients.= makeoption($lng['panel']['customer'], 1);
eval("echo \"" . getTemplate("message/message") . "\";");
$receipients .= makeoption($lng['panel']['customer'], 1);
eval("echo \"" . getTemplate('message/message') . "\";");
}
?>

View File

@@ -25,47 +25,54 @@ define('AREA', 'admin');
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 == '') {
$tablecontent = '';
$count = 0;
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
while($row = $db->fetch_array($result))
{
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']);
$query = "SELECT * FROM `".TABLE_PANEL_DOMAINS."`
WHERE `phpsettingid` = '".(int)$row['id']."'
AND `parentdomainid` = '0'";
if ((int)$userinfo['domains_see_all'] == 0) {
$query .= " AND `adminid` = '".(int)$userinfo['userid']."'";
}
$domains = '';
if($db->num_rows($domainresult) > 0)
{
while($row2 = $db->fetch_array($domainresult))
{
$domains.= $row2['domain'] . '<br/>';
if ((int)$settings['panel']['phpconfigs_hidestdsubdomain'] == 1) {
$query2 = "SELECT DISTINCT `standardsubdomain`
FROM `".TABLE_PANEL_CUSTOMERS."`
WHERE `standardsubdomain` > 0 ORDER BY `standardsubdomain` ASC;";
$ssdids_res = $db->query($query2);
$ssdids = array();
while ($ssd = $db->fetch_array($ssdids_res)) {
$ssdids[] = $ssd['standardsubdomain'];
}
if (count($ssdids) > 0) {
$query .= " AND `id` NOT IN (".implode(', ', $ssdids).")";
}
}
else
{
$domainresult = $db->query($query);
$domains = '';
if ($db->num_rows($domainresult) > 0) {
while ($row2 = $db->fetch_array($domainresult)) {
$domains.= $row2['domain'] . '<br/>';
}
} else {
$domains = $lng['admin']['phpsettings']['notused'];
}

View File

@@ -82,9 +82,9 @@ if(($page == 'settings' || $page == 'overview')
) {
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
inserttask('5');
inserttask('9');
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
}
}
@@ -115,6 +115,50 @@ if(($page == 'settings' || $page == 'overview')
}
}
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 .= \"" . getTemplate("settings/phpinfo/phpinfo_3") . "\";");
} elseif (is_string($key)) {
eval("\$phpinfoentries .= \"" . getTemplate("settings/phpinfo/phpinfo_2") . "\";");
} else {
eval("\$phpinfoentries .= \"" . getTemplate("settings/phpinfo/phpinfo_1") . "\";");
}
}
// first header -> show actual php version
if (strtolower($name) == "phpinfo") {
$name = "PHP ".PHP_VERSION;
}
eval("\$phpinfohtml .= \"" . getTemplate("settings/phpinfo/phpinfo_table") . "\";");
}
$phpinfo = $phpinfohtml;
}
eval("echo \"" . getTemplate("settings/phpinfo") . "\";");
}
elseif($page == 'rebuildconfigs'
&& $userinfo['change_serversettings'] == '1')
{
@@ -123,10 +167,10 @@ elseif($page == 'rebuildconfigs'
{
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles");
inserttask('1');
inserttask('4');
inserttask('5');
inserttask('9');
inserttask('10');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
}
else

View File

@@ -48,17 +48,28 @@ elseif(isset($_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['system']['report_enable'] == 1) {
array_push($available_templates,
'trafficmaxpercent',
'diskmaxpercent'
);
}
if ((int)$settings['ticket']['enabled'] == 1) {
array_push($available_templates,
'new_ticket_by_customer',
'new_ticket_for_customer',
'new_ticket_by_staff',
'new_reply_ticket_by_customer',
'new_reply_ticket_by_staff'
);
}
$file_templates = array(
'index_html'
);

View File

@@ -32,6 +32,22 @@ if(isset($_POST['id']))
elseif(isset($_GET['id']))
{
$id = intval($_GET['id']);
// only check if this is not a category-id
if (!isset($_GET['page']) || (isset($_GET['page']) && $_GET['page'] != 'categories')) {
if (!$userinfo['customers_see_all']) {
/*
* Check if the current user is allowed to see the current ticket.
*/
$sql = "SELECT `id` FROM `panel_tickets` WHERE `id` = '".$id."' AND `adminid` = '".$userinfo['admindid']."'";
$result = $db->query_first($sql);
if ($result == null) {
// no rights to see the requested ticket
standard_error(array('ticketnotaccessible'));
}
}
}
}
if($page == 'tickets'
@@ -102,13 +118,17 @@ if($page == 'tickets'
if($_cid != $row['customerid'])
{
$cid = $row['customerid'];
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
$usr = $db->query_first('SELECT `customerid`, `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 {
if(isset($usr['loginname']))
{
$customer = getCorrectFullUserDetails($usr);
$customerloginname = $usr['loginname'];
$customerid = $usr['customerid'];
}
else
{
$customer = $lng['ticket']['nonexistingcustomer'];
}
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
@@ -170,7 +190,7 @@ if($page == 'tickets'
$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);
$newticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
if($newticket->Get('subject') == null)
{
@@ -199,12 +219,16 @@ if($page == 'tickets'
else
{
$categories = '';
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
$where = '';
if ($userinfo['tickets_see_all'] != '1') {
$where = 'WHERE `adminid` = "' . $userinfo['adminid'] . '"';
}
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` '.$where.' 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');
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` '.$where.' ORDER BY `logicalorder`, `name` ASC');
while($row = $db->fetch_array($result2))
{
@@ -224,9 +248,9 @@ if($page == 'tickets'
$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']);
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['low'], '3', $settings['ticket']['default_priority']);
$ticket_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_new.php';
$ticket_new_form = htmlform::genHTMLForm($ticket_new_data);
@@ -251,7 +275,7 @@ if($page == 'tickets'
$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);
$replyticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
if($replyticket->Get('message') == null)
{
@@ -302,13 +326,20 @@ if($page == 'tickets'
$isclosed = 1;
}
if($mainticket->Get('by') == '1')
if ($mainticket->Get('by') == '1')
{
$by = $lng['ticket']['staff'];
}
else
{
$by = $lng['ticket']['customer'];
$cid = $mainticket->Get('customer');
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"'
);
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>';
//$by = $lng['ticket']['customer'];
}
$subject = $mainticket->Get('subject');
@@ -330,7 +361,14 @@ if($page == 'tickets'
}
else
{
$by = $lng['ticket']['customer'];
$cid = $subticket->Get('customer');
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"'
);
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>';
//$by = $lng['ticket']['customer'];
}
$subject = $subticket->Get('subject');
@@ -437,11 +475,16 @@ elseif($page == 'categories'
'name' => $lng['ticket']['category'],
'logicalorder' => $lng['ticket']['logicalorder']
);
$where = '1'; // WHERE 1 is like no 'where-clause'
if ($userinfo['tickets_see_all'] != '1') {
$where = " `main`.`adminid` = '" . (int)$userinfo['adminid'] . "'";
}
$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'] . "')
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`
@@ -449,7 +492,7 @@ elseif($page == 'categories'
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());
FROM `" . TABLE_PANEL_TICKET_CATS . "` `main` WHERE " . $where . $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);
@@ -486,7 +529,7 @@ elseif($page == 'categories'
if($order < 1 || $order >= 1000)
{
// use the latest available
$order = ticket::getHighestOrderNumber($db) + 1;
$order = ticket::getHighestOrderNumber($db, $userinfo['adminid']) + 1;
}
if($category == '')
@@ -502,7 +545,7 @@ elseif($page == 'categories'
}
else
{
$order = ticket::getHighestOrderNumber($db) + 1;
$order = ticket::getHighestOrderNumber($db, $userinfo['adminid']) + 1;
$category_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_new.php';
$category_new_form = htmlform::genHTMLForm($category_new_data);
@@ -660,12 +703,17 @@ elseif($page == 'archive'
if($_cid != $ticket['customerid'])
{
$cid = $ticket['customerid'];
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"');
if(isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
} else {
if(isset($usr['loginname']))
{
$customer = getCorrectFullUserDetails($usr);
$customerloginname = $usr['loginname'];
$customerid = $usr['customerid'];
}
else
{
$customer = $lng['ticket']['nonexistingcustomer'];
}
@@ -673,6 +721,16 @@ elseif($page == 'archive'
}
$tickets_count++;
switch ($ticket['priority'])
{
case 1: $ticket['display'] = 'high';
break;
case 2: $ticket['display'] = 'normal';
break;
case 3: $ticket['display'] = 'low';
break;
default: $ticket['display'] = 'unknown';
}
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
if($ticket['lastreplier'] == '1')
@@ -688,9 +746,7 @@ elseif($page == 'archive'
{
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
}
$ticket = htmlentities_array($ticket);
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
$count++;
$_cid = $ticket['customerid'];
@@ -733,9 +789,9 @@ elseif($page == 'archive'
}
}
$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');
$priorities_options = makecheckbox('priority1', $lng['ticket']['high'], '1');
$priorities_options.= makecheckbox('priority2', $lng['ticket']['normal'], '2');
$priorities_options.= makecheckbox('priority3', $lng['ticket']['low'], '3');
$category_options = '';
$ccount = 0;
$result = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
@@ -774,11 +830,18 @@ elseif($page == 'archive'
}
else
{
$by = $lng['ticket']['customer'];
$cid = $mainticket->Get('customer');
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"'
);
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>';
//$by = $lng['ticket']['customer'];
}
$subject = htmlentities($mainticket->Get('subject'));
$message = htmlentities($mainticket->Get('message'));
$subject = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
@@ -796,22 +859,28 @@ elseif($page == 'archive'
}
else
{
$by = $lng['ticket']['customer'];
$cid = $subticket->Get('customer');
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"'
);
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>';
//$by = $lng['ticket']['customer'];
}
$subject = htmlentities($subticket->Get('subject'));
$message = htmlentities($subticket->Get('message'));
$subject = $subticket->Get('subject');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("tickets/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'));
$subject = $mainticket->Get('subject');
$ticket_replies_count = $db->num_rows($andere) + 1;
// don't forget the main-ticket!
eval("echo \"" . getTemplate("tickets/tickets_view") . "\";");
}
elseif($action == 'delete'
@@ -831,6 +900,6 @@ elseif($page == 'archive'
ask_yesno('ticket_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
}
} else {
standard_error('nocustomerforticket');
}
?>

View File

@@ -128,7 +128,7 @@ if($page == 'overview' || $page == 'customers')
$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');
$virtual_host[$months[(int)$traffic_month['month']]] = size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.'.(int)$settings['panel']['decimal_places'].'f %s');
$totals[$months[(int)$traffic_month['month']]] += $traffic_month['traffic'];
}
eval("\$domain_list .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
@@ -138,7 +138,7 @@ if($page == 'overview' || $page == 'customers')
'name' => $lng['traffic']['months']['total'],
);
foreach($totals as $month => $bytes) {
$virtual_host[$month] = ($bytes == 0 ? '-' : size_readable($bytes, 'GiB', 'bi', '%01.3f %s'));
$virtual_host[$month] = ($bytes == 0 ? '-' : size_readable($bytes, 'GiB', 'bi', '%01.'.(int)$settings['panel']['decimal_places'].'f %s'));
}
$customerview = 0;
eval("\$total_list = sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");

View File

@@ -16,10 +16,9 @@
*/
define('AREA', 'admin');
require ("./lib/init.php");
require('./lib/init.php');
if($page == 'overview')
{
if ($page == 'overview') {
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
/**
@@ -29,13 +28,13 @@ if($page == 'overview')
*/
if (!isFroxlor()) {
if (!isset($settings['panel']['version'])
|| $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 (!isset($settings['system']['dbversion'])
|| $settings['system']['dbversion'] == ''
|| $settings['system']['dbversion'] == ''
) {
/**
* for syscp-stable (1.4.2.1) this value has to be 0
@@ -43,11 +42,9 @@ if($page == 'overview')
* 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']))
{
if (isset($result['value'])) {
$settings['system']['dbversion'] = (int)$result['value'];
} else {
$settings['system']['dbversion'] = 0;
@@ -55,40 +52,36 @@ if($page == 'overview')
}
}
if(hasUpdates($version))
{
if (hasUpdates($version)) {
$successful_update = false;
$message = '';
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if((isset($_POST['update_preconfig'])
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") . "\";");
eval("echo \"" . getTemplate('update/update_start') . "\";");
include_once './install/updatesql.php';
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate("update/update_end") . "\";");
eval("echo \"" . getTemplate('update/update_end') . "\";");
updateCounters();
inserttask('1');
@chmod('./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 style="color: red">You have to agree that you have read the update notifications.</strong>';
}
}
if(!$successful_update)
{
if (!$successful_update) {
$current_version = $settings['panel']['version'];
$new_version = $version;
@@ -96,29 +89,23 @@ if($page == 'overview')
$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 ($preconfig != '') {
$update_information .= '<br />' . $preconfig . $message;
}
$update_information .= $lng['update']['update_information']['part_b'];
eval("echo \"" . getTemplate("update/index") . "\";");
eval("echo \"" . getTemplate('update/index') . "\";");
}
}
else
{
} else {
/*
* @TODO version-webcheck check here
*/
$success_message = $lng['update']['noupdatesavail'];
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate("update/noupdatesavail") . "\";");
eval("echo \"" . getTemplate('update/noupdatesavail') . "\";");
}
}
?>

1
cache/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*

0
cache/.keep vendored Normal file
View File

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

File diff suppressed because one or more lines are too long

1
css/jquery.jqplot.min.css vendored Normal file
View File

@@ -0,0 +1 @@
.jqplot-target{position:relative;color:#666;font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;font-size:1em}.jqplot-axis{font-size:.75em}.jqplot-xaxis{margin-top:10px}.jqplot-x2axis{margin-bottom:10px}.jqplot-yaxis{margin-right:10px}.jqplot-y2axis,.jqplot-y3axis,.jqplot-y4axis,.jqplot-y5axis,.jqplot-y6axis,.jqplot-y7axis,.jqplot-y8axis,.jqplot-y9axis,.jqplot-yMidAxis{margin-left:10px;margin-right:10px}.jqplot-axis-tick,.jqplot-xaxis-tick,.jqplot-yaxis-tick,.jqplot-x2axis-tick,.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick,.jqplot-yMidAxis-tick{position:absolute;white-space:pre}.jqplot-xaxis-tick{top:0;left:15px;vertical-align:top}.jqplot-x2axis-tick{bottom:0;left:15px;vertical-align:bottom}.jqplot-yaxis-tick{right:0;top:15px;text-align:right}.jqplot-yaxis-tick.jqplot-breakTick{right:-20px;margin-right:0;padding:1px 5px 1px 5px;z-index:2;font-size:1.5em}.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{left:0;top:15px;text-align:left}.jqplot-yMidAxis-tick{text-align:center;white-space:nowrap}.jqplot-xaxis-label{margin-top:10px;font-size:11pt;position:absolute}.jqplot-x2axis-label{margin-bottom:10px;font-size:11pt;position:absolute}.jqplot-yaxis-label{margin-right:10px;font-size:11pt;position:absolute}.jqplot-yMidAxis-label{font-size:11pt;position:absolute}.jqplot-y2axis-label,.jqplot-y3axis-label,.jqplot-y4axis-label,.jqplot-y5axis-label,.jqplot-y6axis-label,.jqplot-y7axis-label,.jqplot-y8axis-label,.jqplot-y9axis-label{font-size:11pt;margin-left:10px;position:absolute}.jqplot-meterGauge-tick{font-size:.75em;color:#999}.jqplot-meterGauge-label{font-size:1em;color:#999}table.jqplot-table-legend{margin-top:12px;margin-bottom:12px;margin-left:12px;margin-right:12px}table.jqplot-table-legend,table.jqplot-cursor-legend{background-color:rgba(255,255,255,0.6);border:1px solid #ccc;position:absolute;font-size:.75em}td.jqplot-table-legend{vertical-align:middle}td.jqplot-seriesToggle:hover,td.jqplot-seriesToggle:active{cursor:pointer}.jqplot-table-legend .jqplot-series-hidden{text-decoration:line-through}div.jqplot-table-legend-swatch-outline{border:1px solid #ccc;padding:1px}div.jqplot-table-legend-swatch{width:0;height:0;border-top-width:5px;border-bottom-width:5px;border-left-width:6px;border-right-width:6px;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-style:solid}.jqplot-title{top:0;left:0;padding-bottom:.5em;font-size:1.2em}table.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em}.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px}.jqplot-highlighter-tooltip,.jqplot-canvasOverlay-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px}.jqplot-point-label{font-size:.75em;z-index:2}td.jqplot-cursor-legend-swatch{vertical-align:middle;text-align:center}div.jqplot-cursor-legend-swatch{width:1.2em;height:.7em}.jqplot-error{text-align:center}.jqplot-error-message{position:relative;top:46%;display:inline-block}div.jqplot-bubble-label{font-size:.8em;padding-left:2px;padding-right:2px;color:rgb(20%,20%,20%)}div.jqplot-bubble-label.jqplot-bubble-label-highlight{background:rgba(90%,90%,90%,0.7)}div.jqplot-noData-container{text-align:center;background-color:rgba(96%,96%,96%,0.3)}

View File

@@ -17,18 +17,18 @@
*
*/
// Required code
define('AREA', 'customer');
require ("./lib/init.php");
require ('./lib/init.php');
$Id = 0;
if (isset($_GET['id'])) {
$Id = (int)$_GET['id'];
}
if (isset($_POST['id'])) {
$Id = (int)$_POST['id'];
}
if(isset($_GET['id']))$Id = (int)$_GET['id'];
if(isset($_POST['id']))$Id = (int)$_POST['id'];
eval("echo \"" . getTemplate("aps/header") . "\";");
eval("echo \"" . getTemplate('aps/header') . "\";");
$Aps = new ApsParser($userinfo, $settings, $db);
$Aps->MainHandler($action);
eval("echo \"" . getTemplate("aps/footer") . "\";");
?>
eval("echo \"" . getTemplate('aps/footer') . "\";");

View File

@@ -17,18 +17,14 @@
*
*/
// Required code
define('AREA', 'customer');
require ("./lib/init.php");
require('./lib/init.php');
// Create new autoresponder
if($action == "add")
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if ($action == 'add') {
// Create new autoresponder
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$account = trim($_POST['account']);
$subject = trim($_POST['subject']);
$message = trim($_POST['message']);
@@ -42,39 +38,31 @@ if($action == "add")
$ts_from = -1;
$ts_until = -1;
if($date_from_off > -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)
{
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)
if (empty($account)
|| empty($subject)
|| empty($message))
{
|| 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)
{
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)
{
if ($db->num_rows($result) == 1) {
standard_error('autoresponderalreadyexists');
}
@@ -92,25 +80,20 @@ if($action == "add")
}
// 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)
{
if ($db->num_rows($result) == 0) {
standard_error('noemailaccount');
}
$accounts = '';
while($row = $db->fetch_array($result))
{
$accounts.= "<option value=\"" . $row['email'] . "\">" . $row['email'] . "</option>";
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');
//$isactive = makeyesno('active', '1', '0', '1');
$autoresponder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/autoresponder/formfield.autoresponder_add.php';
$autoresponder_add_form = htmlform::genHTMLForm($autoresponder_add_data);
@@ -118,18 +101,12 @@ if($action == "add")
$title = $autoresponder_add_data['autoresponder_add']['title'];
$image = $autoresponder_add_data['autoresponder_add']['image'];
eval("echo \"" . getTemplate("autoresponder/autoresponder_add") . "\";");
}
// Edit autoresponder
else
if($action == "edit")
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
eval("echo \"" . getTemplate('autoresponder/autoresponder_add') . "\";");
} elseif ($action == 'edit') {
// Edit autoresponder
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$account = trim($_POST['account']);
$subject = trim($_POST['subject']);
$message = trim($_POST['message']);
@@ -143,49 +120,36 @@ if($action == "edit")
$ts_from = -1;
$ts_until = -1;
if($date_from_off > -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)
{
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)
if (empty($account)
|| empty($subject)
|| empty($message))
{
|| 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)
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)
{
if ($db->num_rows($result) == 0) {
standard_error('invalidautoresponder');
}
$ResponderActive = 0;
if(isset($_POST['active'])
&& $_POST['active'] == '1')
{
$ResponderActive = 1;
}
$ResponderActive = (isset($_POST['active']) && $_POST['active'] == '1') ? 1 : 0;
$db->query("UPDATE `" . TABLE_MAIL_AUTORESPONDER . "`
SET `message` = '" . $db->escape($message) . "',
@@ -202,11 +166,8 @@ if($action == "edit")
$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)
{
if ($db->num_rows($result) == 0) {
standard_error('invalidautoresponder');
}
@@ -217,31 +178,25 @@ if($action == "edit")
$date_from = (int)$row['date_from'];
$date_until = (int)$row['date_until'];
if($date_from == -1)
{
if ($date_from == -1) {
$deactivated = '-1';
$date_from = '';
}
else
{
} 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)
{
if ($date_until == -1) {
$deactivated = '-1';
$date_until = '';
}
else
{
} 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']);
//$isactive = makeyesno('active', '1', '0', $row['enabled']);
$autoresponder_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/autoresponder/formfield.autoresponder_edit.php';
$autoresponder_edit_form = htmlform::genHTMLForm($autoresponder_edit_data);
@@ -249,26 +204,17 @@ if($action == "edit")
$title = $autoresponder_edit_data['autoresponder_edit']['title'];
$image = $autoresponder_edit_data['autoresponder_edit']['image'];
eval("echo \"" . getTemplate("autoresponder/autoresponder_edit") . "\";");
}
// Delete autoresponder
else
if($action == "delete")
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
eval("echo \"" . getTemplate('autoresponder/autoresponder_edit') . "\";");
} elseif ($action == 'delete') {
// Delete autoresponder
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)
{
if ($db->num_rows($result) == 0) {
standard_error('invalidautoresponder');
}
@@ -282,37 +228,25 @@ if($action == "delete")
$email = trim(htmlspecialchars($_GET['email']));
ask_yesno('autoresponderdelete', $filename, array('action' => $action, 'account' => $email));
}
// List existing autoresponders
else
{
} else {
// List existing autoresponders
$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)
{
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)
{
} 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)
{
} elseif($row['date_from'] != -1 && $row['date_until'] == -1) {
$activated_date = $lng['autoresponder']['date_from'].': '.date('d-m-Y', $row['date_from']);
}
else
{
} else {
$activated_date = date('d-m-Y', $row['date_from']) . ' - ' . date('d-m-Y', $row['date_until']);
}
eval("\$autoresponder.=\"" . getTemplate("autoresponder/autoresponder_autoresponder") . "\";");
eval("\$autoresponder.=\"" . getTemplate('autoresponder/autoresponder_autoresponder') . "\";");
$count++;
}
eval("echo \"" . getTemplate("autoresponder/autoresponder") . "\";");
eval("echo \"" . getTemplate('autoresponder/autoresponder') . "\";");
}

View File

@@ -45,9 +45,7 @@ elseif($page == 'domains')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_domains::domains");
$fields = array(
'd.domain' => $lng['domains']['domainname'],
'd.documentroot' => $lng['panel']['path'],
'd.aliasdomain' => $lng['domains']['aliasdomain']
'd.domain' => $lng['domains']['domainname']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_DOMAINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`caneditdomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `ad`.`id` AS `aliasdomainid`, `ad`.`domain` AS `aliasdomain`, `da`.`id` AS `domainaliasid`, `da`.`domain` AS `domainalias` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id` LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `da` ON `da`.`aliasdomain`=`d`.`id` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`email_only`='0' AND `d`.`id` <> " . (int)$userinfo['standardsubdomain'] . " " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
@@ -73,17 +71,33 @@ elseif($page == 'domains')
$parentdomains_count++;
}
$domains_count++;
/*
$domainparts = explode('.', $row['domain']);
$domainparts = array_reverse($domainparts);
$sortkey = '';
foreach($domainparts as $key => $part)
{
$sortkey.= $part . '.';
/**
* check for set ssl-certs to show different state-icons
*/
// nothing (ssl_global)
$row['domain_hascert'] = 0;
$ssl_result = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` WHERE `domainid`='".(int)$row['id']."';");
if (is_array($ssl_result)
&& isset($ssl_result['ssl_cert_file'])
&& $ssl_result['ssl_cert_file'] != ''
) {
// own certificate (ssl_customer_green)
$row['domain_hascert'] = 1;
} else {
// check if it's parent has one set (shared)
if ($row['parentdomainid'] != 0) {
$ssl_result = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` WHERE `domainid`='".(int)$row['parentdomainid']."';");
if (is_array($ssl_result)
&& isset($ssl_result['ssl_cert_file'])
&& $ssl_result['ssl_cert_file'] != ''
) {
// parent has a certificate (ssl_shared)
$row['domain_hascert'] = 2;
}
}
}
$domain_array[$sortkey] = $row;
*/
$domains_count++;
$domain_array[$row['domain']] = $row;
}
@@ -151,6 +165,14 @@ elseif($page == 'domains')
$row['documentroot'] = makeCorrectDir(substr($row['documentroot'], strlen($userinfo['documentroot'])));
}
// get ssl-ips if activated
$show_ssledit = false;
if ($settings['system']['use_ssl'] == '1'
&& domainHasSslIpPort($row['id'])
&& $row['caneditdomain'] == '1'
) {
$show_ssledit = true;
}
$row = htmlentities_array($row);
eval("\$domains.=\"" . getTemplate("domains/domains_domain") . "\";");
}
@@ -196,7 +218,10 @@ elseif($page == 'domains')
$result = $db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`-1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
@@ -229,9 +254,9 @@ elseif($page == 'domains')
$_doredirect = false;
if($aliasdomain != 0)
{
{
// also check ip/port combination to be the same, #176
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$domain_check['ipandport'].'\'');
$aliasdomain_check = $db->query_first("SELECT `d`.`id` FROM `" . TABLE_PANEL_DOMAINS . "` `d` , `" . TABLE_PANEL_CUSTOMERS . "` `c` , `".TABLE_DOMAINTOIP."` `dip` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id` = '".(int)$aliasdomain."' AND `c`.`standardsubdomain` <> `d`.`id` AND `d`.`customerid` = '" . (int)$userinfo['customerid'] . "' AND `c`.`customerid` = `d`.`customerid` AND `d`.`id` = `dip`.`id_domain` AND `dip`.`id_ipandports` IN (SELECT `id_ipandports` FROM `".TABLE_DOMAINTOIP."` WHERE `id_domain` = '".(int)$aliasdomain."') GROUP BY `d`.`domain` ORDER BY `d`.`domain` ASC;");
}
if(isset($_POST['url'])
@@ -249,8 +274,17 @@ elseif($page == 'domains')
if(!preg_match('/^https?\:\/\//', $path)
|| !validateUrl($idna_convert->encode($path)))
{
$path = $userinfo['documentroot'] . '/' . $path;
$path = makeCorrectDir($path);
// If path is empty or '/' and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
// set default path to subdomain or domain name
if((($path == '') || ($path == '/'))
&& $settings['system']['documentroot_use_default_value'] == 1)
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $completedomain);
}
else
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
}
if (strstr($path, ":") !== FALSE)
{
standard_error('pathmaynotcontaincolon');
@@ -324,18 +358,18 @@ elseif($page == 'domains')
`customerid` = '" . (int)$userinfo['customerid'] . "',
`domain` = '" . $db->escape($completedomain) . "',
`documentroot` = '" . $db->escape($path) . "',
`ipandport` = '" . $db->escape($domain_check['ipandport']) . "',
`aliasdomain` = ".(($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") .",
`parentdomainid` = '" . (int)$domain_check['id'] . "',
`isemaildomain` = '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "',
`openbasedir` = '" . $db->escape($domain_check['openbasedir']) . "',
`openbasedir_path` = '" . $db->escape($openbasedir_path) . "',
`safemode` = '" . $db->escape($domain_check['safemode']) . "',
`openbasedir_path` = '" . $db->escape($openbasedir_path) . "',
`speciallogfile` = '" . $db->escape($domain_check['speciallogfile']) . "',
`specialsettings` = '" . $db->escape($domain_check['specialsettings']) . "',
`ssl_redirect` = '" . $ssl_redirect . "',
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
$result = $db->query("INSERT INTO `".TABLE_DOMAINTOIP."` (`id_domain`, `id_ipandports`) SELECT LAST_INSERT_ID(), `id_ipandports` FROM `".TABLE_DOMAINTOIP."` WHERE `id_domain` = '" . (int)$domain_check['id'] . "';");
if($_doredirect)
{
$did = $db->insert_id();
@@ -346,7 +380,10 @@ elseif($page == 'domains')
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
@@ -378,7 +415,13 @@ elseif($page == 'domains')
}
}
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
// check if we at least have one ssl-ip/port, #1179
$ssl_ipsandports = '';
$resultX = $db->query_first("SELECT COUNT(*) as countSSL FROM `panel_ipsandports` WHERE `ssl`='1'");
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
$ssl_ipsandports = 'notempty';
}
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
@@ -395,7 +438,7 @@ elseif($page == 'domains')
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`wwwserveralias`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir`, `d`.`openbasedir_path`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
$alias_check = $alias_check['count'];
$_doredirect = false;
@@ -421,8 +464,17 @@ elseif($page == 'domains')
if(!preg_match('/^https?\:\/\//', $path)
|| !validateUrl($idna_convert->encode($path)))
{
$path = $userinfo['documentroot'] . '/' . $path;
$path = makeCorrectDir($path);
// If path is empty or '/' and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
// set default path to subdomain or domain name
if((($path == '') || ($path == '/'))
&& $settings['system']['documentroot_use_default_value'] == 1)
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $result['domain']);
}
else
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
}
if (strstr($path, ":") !== FALSE)
{
standard_error('pathmaynotcontaincolon');
@@ -435,15 +487,14 @@ elseif($page == 'domains')
$aliasdomain = intval($_POST['alias']);
if(isset($_POST['iswildcarddomain'])
&& $_POST['iswildcarddomain'] == '1'
if(isset($_POST['selectserveralias'])
&& $result['parentdomainid'] == '0'
){
$iswildcarddomain = '1';
}
else
{
) {
$iswildcarddomain = ($_POST['selectserveralias'] == '0') ? '1' : '0';
$wwwserveralias = ($_POST['selectserveralias'] == '1') ? '1' : '0';
} else {
$iswildcarddomain = '0';
$wwwserveralias = '0';
}
if($result['parentdomainid'] != '0'
@@ -513,15 +564,28 @@ elseif($page == 'domains')
if($path != $result['documentroot']
|| $isemaildomain != $result['isemaildomain']
|| $wwwserveralias != $result['wwwserveralias']
|| $iswildcarddomain != $result['iswildcarddomain']
|| $aliasdomain != $result['aliasdomain']
|| $openbasedir_path != $result['openbasedir_path']
|| $ssl_redirect != $result['ssl_redirect'])
{
$log->logAction(USR_ACTION, LOG_INFO, "edited domain '" . $idna_convert->decode($result['domain']) . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `documentroot`='" . $db->escape($path) . "', `isemaildomain`='" . (int)$isemaildomain . "', `iswildcarddomain`='" . (int)$iswildcarddomain . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ",`openbasedir_path`='" . $db->escape($openbasedir_path) . "', `ssl_redirect`='" . $ssl_redirect . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
`documentroot`='" . $db->escape($path) . "',
`isemaildomain`='" . (int)$isemaildomain . "',
`wwwserveralias`='" . (int)$wwwserveralias . "',
`iswildcarddomain`='" . (int)$iswildcarddomain . "',
`aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ",
`openbasedir_path`='" . $db->escape($openbasedir_path) . "',
`ssl_redirect`='" . $ssl_redirect . "'
WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'"
);
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
}
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -530,9 +594,10 @@ elseif($page == 'domains')
else
{
$result['domain'] = $idna_convert->decode($result['domain']);
$domains = makeoption($lng['domains']['noaliasdomain'], 0, $result['aliasdomain'], true);
// also check ip/port combination to be the same, #176
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` AND `d`.`ipandport` = '".(int)$result['ipandport']."' ORDER BY `d`.`domain` ASC");
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d` , `" . TABLE_PANEL_CUSTOMERS . "` `c` , `".TABLE_DOMAINTOIP."` `dip` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id` <> '".(int)$result['id']."' AND `c`.`standardsubdomain` <> `d`.`id` AND `d`.`customerid` = '" . (int)$userinfo['customerid'] . "' AND `c`.`customerid` = `d`.`customerid` AND `d`.`id` = `dip`.`id_domain` AND `dip`.`id_ipandports` IN (SELECT `id_ipandports` FROM `".TABLE_DOMAINTOIP."` WHERE `id_domain` = '".(int)$result['id']."') GROUP BY `d`.`domain` ORDER BY `d`.`domain` ASC");
while($row_domain = $db->fetch_array($result_domains))
{
@@ -570,16 +635,33 @@ elseif($page == 'domains')
}
}
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
#$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
#$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
// check if we at least have one ssl-ip/port, #1179
$ssl_ipsandports = '';
$resultX = $db->query_first("SELECT COUNT(*) as countSSL FROM `panel_ipsandports` WHERE `ssl`='1'");
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
$ssl_ipsandports = 'notempty';
}
$openbasedir = makeoption($lng['domain']['docroot'], 0, $result['openbasedir_path'], true) . makeoption($lng['domain']['homedir'], 1, $result['openbasedir_path'], true);
$result_ipandport = $db->query_first("SELECT `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` WHERE `id`='".(int)$result['ipandport']."'");
if(filter_var($result_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
{
$result_ipandport['ip'] = '[' . $result_ipandport['ip'] . ']';
// create serveralias options
$serveraliasoptions = "";
$_value = '2';
if ($result['iswildcarddomain'] == '1') {
$_value = '0';
} elseif ($result['wwwserveralias'] == '1') {
$_value = '1';
}
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_wildcard'], '0', $_value, true, true);
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_www'], '1', $_value, true, true);
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_none'], '2', $_value, true, true);
$resultips = $db->query("SELECT `p`.`ip` AS `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` `p` LEFT JOIN `".TABLE_DOMAINTOIP."` `dip` ON ( `dip`.`id_ipandports` = `p`.`id` ) WHERE `dip`.`id_domain` = '".(int)$result['id']."' GROUP BY `p`.`ip`");
$result_ipandport['ip'] = '';
while ($rowip = $db->fetch_array($resultips)) {
$result_ipandport['ip'] .= $rowip['ip'] . "<br />";
}
$domainip = $result_ipandport['ip'];
$result = htmlentities_array($result);
@@ -598,5 +680,126 @@ elseif($page == 'domains')
}
}
}
elseif ($page == 'domainssleditor') {
?>
if ($action == ''
|| $action == 'view'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$ssl_cert_file = isset($_POST['ssl_cert_file']) ? $_POST['ssl_cert_file'] : '';
$ssl_key_file = isset($_POST['ssl_key_file']) ? $_POST['ssl_key_file'] : '';
$ssl_ca_file = isset($_POST['ssl_ca_file']) ? $_POST['ssl_ca_file'] : '';
$ssl_cert_chainfile = isset($_POST['ssl_cert_chainfile']) ? $_POST['ssl_cert_chainfile'] : '';
$do_insert = isset($_POST['do_insert']) ? (($_POST['do_insert'] == 1) ? true : false) : false;
if ($ssl_cert_file != '' && $ssl_key_file == '') {
standard_error('sslcertificateismissingprivatekey');
}
$do_verify = true;
// no cert-file given -> forget everything
if ($ssl_cert_file == '') {
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
$do_verify = false;
}
// verify certificate content
if ($do_verify) {
// array openssl_x509_parse ( mixed $x509cert [, bool $shortnames = true ] )
// openssl_x509_parse() returns information about the supplied x509cert, including fields such as
// subject name, issuer name, purposes, valid from and valid to dates etc.
$cert_content = openssl_x509_parse($ssl_cert_file);
if (is_array($cert_content)
&& isset($cert_content['subject'])
&& isset($cert_content['subject']['CN'])
) {
// TODO self-signed certs might differ and don't need/want this
/*
$domain = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAINS."` WHERE `id`='".(int)$id."'");
if (strtolower($cert_content['subject']['CN']) != strtolower($idna_convert->decode($domain['domain']))) {
standard_error('sslcertificatewrongdomain');
}
*/
// bool openssl_x509_check_private_key ( mixed $cert , mixed $key )
// Checks whether the given key is the private key that corresponds to cert.
if (openssl_x509_check_private_key($ssl_cert_file, $ssl_key_file) === false) {
standard_error('sslcertificateinvalidcertkeypair');
}
// check optional stuff
if ($ssl_ca_file != '') {
$ca_content = openssl_x509_parse($ssl_ca_file);
if (!is_array($ca_content)) {
// invalid
standard_error('sslcertificateinvalidca');
}
}
if ($ssl_cert_chainfile != '') {
$chain_content = openssl_x509_parse($ssl_cert_chainfile);
if (!is_array($chain_content)) {
// invalid
standard_error('sslcertificateinvalidchain');
}
}
} else {
standard_error('sslcertificateinvalidcert');
}
}
// Add/Update database entry
$qrystart = "UPDATE ";
$qrywhere = "WHERE ";
if ($do_insert) {
$qrystart = "INSERT INTO ";
$qrywhere = ", ";
}
$db->query($qrystart." `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` SET
`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)."'
".$qrywhere." `domainid`='".(int)$id."';"
);
// insert task to re-generate webserver-configs (#1260)
inserttask('1');
// back to domain overview
redirectTo($filename, array('page' => 'domains', 's' => $s));
}
$result = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."`
WHERE `domainid`='".(int)$id."';"
);
$do_insert = false;
// if no entry can be found, behave like we have empty values
if (!is_array($result) || !isset($result['ssl_cert_file'])) {
$result = array(
'ssl_cert_file' => '',
'ssl_key_file' => '',
'ssl_ca_file' => '',
'ssl_cert_chainfile' => ''
);
$do_insert = true;
}
$result = htmlentities_array($result);
$ssleditor_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domain_ssleditor.php';
$ssleditor_form = htmlform::genHTMLForm($ssleditor_data);
$title = $ssleditor_data['domain_ssleditor']['title'];
$image = $ssleditor_data['domain_ssleditor']['image'];
eval("echo \"" . getTemplate("domains/domain_ssleditor") . "\";");
}
}

View File

@@ -50,7 +50,7 @@ elseif($page == 'emails')
'm.destination' => $lng['emails']['forwarders']
);
$paging = new paging($userinfo, $db, TABLE_MAIL_VIRTUAL, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query('SELECT `m`.`id`, `m`.`domainid`, `m`.`email`, `m`.`email_full`, `m`.`iscatchall`, `u`.`quota`, `m`.`destination`, `m`.`popaccountid`, `d`.`domain` FROM `' . TABLE_MAIL_VIRTUAL . '` `m` LEFT JOIN `' . TABLE_PANEL_DOMAINS . '` `d` ON (`m`.`domainid` = `d`.`id`) LEFT JOIN `' . TABLE_MAIL_USERS . '` `u` ON (`m`.`popaccountid` = `u`.`id`) WHERE `m`.`customerid`="' . $db->escape($userinfo['customerid']) . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query('SELECT `m`.`id`, `m`.`domainid`, `m`.`email`, `m`.`email_full`, `m`.`iscatchall`, `u`.`quota`, `m`.`destination`, `m`.`popaccountid`, `d`.`domain`, `u`.`mboxsize` FROM `' . TABLE_MAIL_VIRTUAL . '` `m` LEFT JOIN `' . TABLE_PANEL_DOMAINS . '` `d` ON (`m`.`domainid` = `d`.`id`) LEFT JOIN `' . TABLE_MAIL_USERS . '` `u` ON (`m`.`popaccountid` = `u`.`id`) WHERE `m`.`customerid`="' . $db->escape($userinfo['customerid']) . '" ' . $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);
@@ -66,6 +66,7 @@ elseif($page == 'emails')
$emails[$row['domain']] = array();
}
$row['mboxsize'] = size_readable($row['mboxsize']);
$emails[$row['domain']][$row['email_full']] = $row;
}
@@ -237,7 +238,7 @@ elseif($page == 'emails')
standard_error('emailiswrong', $email_full);
}
$email_check = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE ( `email`='" . $db->escape($email) . "' OR `email_full` = '" . $db->escape($email_full) . "' ) AND `customerid`='" . (int)$userinfo['customerid'] . "'");
$email_check = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE (`email` = '" . strtolower($db->escape($email)) . "' OR `email_full` = '" . strtolower($db->escape($email_full)) . "') AND `customerid`='" . (int)$userinfo['customerid'] . "'");
if($email == ''
|| $email_full == ''
@@ -253,7 +254,7 @@ elseif($page == 'emails')
{
standard_error('maindomainnonexist', $domain);
}
elseif($email_check['email_full'] == $email_full)
elseif(strtolower($email_check['email_full']) == strtolower($email_full))
{
standard_error('emailexistalready', $email_full);
}
@@ -281,9 +282,15 @@ elseif($page == 'emails')
$domains.= makeoption($idna_convert->decode($row['domain']), $row['domain']);
}
#$iscatchall = makeyesno('iscatchall', '1', '0', '0');
//$iscatchall = makeyesno('iscatchall', '1', '0', '0');
$email_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_add.php';
if ( $settings['catchall']['catchall_enabled'] != '1' )
{
unset($email_add_data['emails_add']['sections']['section_a']['fields']['iscatchall']);
}
$email_add_form = htmlform::genHTMLForm($email_add_data);
$title = $email_add_data['emails_add']['title'];
@@ -330,6 +337,12 @@ elseif($page == 'emails')
$result = htmlentities_array($result);
$email_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_edit.php';
if ( $settings['catchall']['catchall_enabled'] != '1' )
{
unset($email_edit_data['emails_edit']['sections']['section_a']['fields']['mail_catchall']);
}
$email_edit_form = htmlform::genHTMLForm($email_edit_data);
$title = $email_edit_data['emails_edit']['title'];
@@ -341,34 +354,41 @@ elseif($page == 'emails')
elseif($action == 'togglecatchall'
&& $id != 0)
{
$result = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid`, `popaccountid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
if(isset($result['email'])
&& $result['email'] != '')
if ( $settings['catchall']['catchall_enabled'] == '1' )
{
if($result['iscatchall'] == '1')
{
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `email` = '" . $db->escape($result['email_full']) . "', `iscatchall` = '0' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['id'] . "'");
}
else
{
$email_parts = explode('@', $result['email_full']);
$email = '@' . $email_parts[1];
$email_check = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `email`='" . $db->escape($email) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
$result = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid`, `popaccountid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
if($email_check['email'] == $email)
if(isset($result['email'])
&& $result['email'] != '')
{
if($result['iscatchall'] == '1')
{
standard_error('youhavealreadyacatchallforthisdomain');
exit;
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `email` = '" . $db->escape($result['email_full']) . "', `iscatchall` = '0' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['id'] . "'");
}
else
{
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `email` = '$email' , `iscatchall` = '1' WHERE `customerid`='" . $userinfo['customerid'] . "' AND `id`='" . $result['id'] . "'");
$log->logAction(USR_ACTION, LOG_INFO, "edited email address '" . $email . "'");
}
}
$email_parts = explode('@', $result['email_full']);
$email = '@' . $email_parts[1];
$email_check = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `email`='" . $db->escape($email) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
redirectTo($filename, Array('page' => $page, 'action' => 'edit', 'id' => $id, 's' => $s));
if($email_check['email'] == $email)
{
standard_error('youhavealreadyacatchallforthisdomain');
exit;
}
else
{
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `email` = '$email' , `iscatchall` = '1' WHERE `customerid`='" . $userinfo['customerid'] . "' AND `id`='" . $result['id'] . "'");
$log->logAction(USR_ACTION, LOG_INFO, "edited email address '" . $email . "'");
}
}
redirectTo($filename, Array('page' => $page, 'action' => 'edit', 'id' => $id, 's' => $s));
}
}
else
{
standard_error(array('operationnotpermitted', 'featureisdisabled'), 'Catchall');
}
}
}
@@ -439,11 +459,42 @@ elseif($page == 'accounts')
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
}
$db->query("INSERT INTO `" . TABLE_MAIL_USERS . "` (`customerid`, `email`, `username`, " . ($settings['system']['mailpwcleartext'] == '1' ? '`password`, ' : '') . " `password_enc`, `homedir`, `maildir`, `uid`, `gid`, `domainid`, `postfix`, `quota`, `imap`, `pop3`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($email_full) . "', '" . $db->escape($username) . "', " . ($settings['system']['mailpwcleartext'] == '1' ? "'" . $db->escape($password) . "'," : '') . " ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($settings['system']['vmail_homedir']) . "', '" . $db->escape($userinfo['loginname'] . '/' . $email_full . '/') . "', '" . (int)$settings['system']['vmail_uid'] . "', '" . (int)$settings['system']['vmail_gid'] . "', '" . (int)$result['domainid'] . "', 'y', '" . (int)$quota . "', '" . (int)$userinfo['imap'] . "', '" . (int)$userinfo['pop3'] . "')");
$cryptPassword = makeCryptPassword($password);
$email_user=substr($email_full,0,strrpos($email_full,"@"));
$email_domain=substr($email_full,strrpos($email_full,"@")+1);
$maildirname=trim($settings['system']['vmail_maildirname']);
// Add trailing slash to Maildir if needed
$maildirpath=$maildirname;
if (!empty($maildirname) and substr($maildirname,-1) != "/") $maildirpath.="/";
$db->query("INSERT INTO `" . TABLE_MAIL_USERS .
"` (`customerid`, `email`, `username`, " . ($settings['system']['mailpwcleartext'] == '1' ? '`password`, ' : '') . " `password_enc`, `homedir`, `maildir`, `uid`, `gid`, `domainid`, `postfix`, `quota`, `imap`, `pop3`) ".
"VALUES (".
"'" . (int)$userinfo['customerid'] . "', ".
"'" . $db->escape($email_full) . "', ".
"'" . $db->escape($username) . "', " .
($settings['system']['mailpwcleartext'] == '1' ? "'" . $db->escape($password) . "', " : '') .
"'" . $db->escape($cryptPassword) . "', ".
"'" . $db->escape($settings['system']['vmail_homedir']) . "', '" . $db->escape($userinfo['loginname'] . '/' . $email_domain . "/" . $email_user . "/" . $maildirpath) . "', ".
"'" . (int)$settings['system']['vmail_uid'] . "', ".
"'" . (int)$settings['system']['vmail_gid'] . "', ".
"'" . (int)$result['domainid'] . "', ".
"'y', ".
"'" . (int)$quota . "', ".
"'" . (int)$userinfo['imap'] . "', ".
"'" . (int)$userinfo['pop3'] . "')");
$popaccountid = $db->insert_id();
$result['destination'].= ' ' . $email_full;
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `destination` = '" . $db->escape(makeCorrectDestination($result['destination'])) . "', `popaccountid` = '" . (int)$popaccountid . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_accounts_used`=`email_accounts_used`+1, `email_quota_used`=`email_quota_used`+" . (int)$quota . " WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET ".
"`destination` = '" . $db->escape(makeCorrectDestination($result['destination'])) . "', ".
"`popaccountid` = '" . (int)$popaccountid . "' ".
"WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET ".
"`email_accounts_used`=`email_accounts_used`+1, ".
"`email_quota_used`=`email_quota_used`+" . (int)$quota . " ".
"WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$log->logAction(USR_ACTION, LOG_INFO, "added email account for '" . $email_full . "'");
$replace_arr = array(
'EMAIL' => $email_full,
@@ -462,7 +513,7 @@ elseif($page == 'accounts')
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($email_full, getCorrectUserSalutation($userinfo));
$mail->AddAddress($email_full);
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
@@ -557,7 +608,8 @@ elseif($page == 'accounts')
$password = validatePassword($password);
$log->logAction(USR_ACTION, LOG_NOTICE, "changed email password for '" . $result['email_full'] . "'");
$result = $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET " . ($settings['system']['mailpwcleartext'] == '1' ? "`password` = '" . $db->escape($password) . "', " : '') . " `password_enc`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['popaccountid'] . "'");
$cryptPassword = makeCryptPassword($password);
$result = $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET " . ($settings['system']['mailpwcleartext'] == '1' ? "`password` = '" . $db->escape($password) . "', " : '') . " `password_enc`='" . $db->escape($cryptPassword) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['popaccountid'] . "'");
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
}
else

View File

@@ -50,7 +50,6 @@ elseif($page == 'backup')
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));
@@ -353,18 +352,28 @@ elseif($page == 'htaccess')
standard_error('invalidpath');
}
if(isset($_POST['options_cgi']))
{
$options_cgi = intval($_POST['options_cgi']);
if(isset($_POST['options_cgi'])
&& (int)$_POST['options_cgi'] != 0
) {
$options_cgi = '1';
}
else
{
$options_cgi = '0';
}
$error404path = correctErrorDocument($_POST['error404path']);
$error403path = correctErrorDocument($_POST['error403path']);
$error500path = correctErrorDocument($_POST['error500path']);
$error404path = '';
if (isset($_POST['error404path'])) {
$error404path = correctErrorDocument($_POST['error404path']);
}
$error403path = '';
if (isset($_POST['error403path'])) {
$error403path = correctErrorDocument($_POST['error403path']);
}
$error500path = '';
if (isset($_POST['error500path'])) {
$error500path = correctErrorDocument($_POST['error500path']);
}
if($path_dupe_check['path'] == $path)
{
@@ -393,9 +402,11 @@ elseif($page == 'htaccess')
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');
/*
$options_indexes = makeyesno('options_indexes', '1', '0', '0');
$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);
@@ -460,9 +471,11 @@ elseif($page == 'htaccess')
$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']);
/*
$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
$options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
*/
$result = htmlentities_array($result);
$htaccess_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_edit.php';

View File

@@ -22,27 +22,20 @@ define('AREA', 'customer');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require('./lib/init.php');
require ("./lib/init.php");
if(isset($_POST['id']))
{
$id = 0;
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif(isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'overview')
{
if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_ftp");
eval("echo \"" . getTemplate("ftp/ftp") . "\";");
}
elseif($page == 'accounts')
{
if($action == '')
{
eval("echo \"" . getTemplate('ftp/ftp') . "\";");
} elseif ($page == 'accounts') {
if ($action == '') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_ftp::accounts");
$fields = array(
'username' => $lng['login']['username'],
@@ -59,23 +52,18 @@ elseif($page == 'accounts')
$count = 0;
$accounts = '';
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
if(strpos($row['homedir'], $userinfo['documentroot']) === 0)
{
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
{
} else {
$row['documentroot'] = $row['homedir'];
}
$row['documentroot'] = makeCorrectDir($row['documentroot']);
$row = htmlentities_array($row);
eval("\$accounts.=\"" . getTemplate("ftp/accounts_account") . "\";");
eval("\$accounts.=\"" . getTemplate('ftp/accounts_account') . "\";");
$count++;
}
@@ -83,19 +71,16 @@ elseif($page == 'accounts')
}
$ftps_count = $db->num_rows($result);
eval("echo \"" . getTemplate("ftp/accounts") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
{
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')
{
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']) . "'");
@@ -103,95 +88,70 @@ elseif($page == 'accounts')
$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 = '';
}
$resetaccnumber = ($userinfo['ftps_used'] == '1') ? " , `ftp_lastaccountnumber`='0'" : '';
// refs #293
if(isset($_POST['delete_userfiles'])
&& (int)$_POST['delete_userfiles'] == 1)
{
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
{
} else {
ask_yesno_withcheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
}
}
else
{
} else {
standard_error('ftp_cantdeletemainaccount');
}
}
elseif($action == 'add')
{
if($userinfo['ftps_used'] < $userinfo['ftps']
|| $userinfo['ftps'] == '-1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
} elseif ($action == 'add') {
if ($userinfo['ftps_used'] < $userinfo['ftps']
|| $userinfo['ftps'] == '-1'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
// @FIXME use a good path-validating regex here (refs #1231)
$path = validate($_POST['path'], 'path');
$password = validate($_POST['ftp_password'], 'password');
$password = validatePassword($password);
$sendinfomail = intval($_POST['sendinfomail']);
if($sendinfomail != 1)
{
$sendinfomail = isset($_POST['sendinfomail']) ? 1 : 0;
if ($sendinfomail != 1) {
$sendinfomail = 0;
}
if($settings['customer']['ftpatdomain'] == '1')
{
if ($settings['customer']['ftpatdomain'] == '1') {
$ftpusername = validate($_POST['ftp_username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
if($ftpusername == '')
{
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)
{
if ($ftpdomain_check['domain'] != $ftpdomain) {
standard_error('maindomainnonexist', $domain);
}
$username = $ftpusername . "@" . $ftpdomain;
}
else
{
} 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)
{
if (!empty($username_check) && $username_check['username'] = $username) {
standard_error('usernamealreadyexists', $username);
}
elseif($password == '')
{
} elseif ($password == '') {
standard_error(array('stringisempty', 'mypassword'));
}
elseif($path == '')
{
} elseif ($path == '') {
standard_error('patherror');
}
else
{
} 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'] . "')");
$cryptPassword = makeCryptPassword($password);
$db->query("INSERT INTO `" . TABLE_FTP_USERS . "` (`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($cryptPassword) . "', '" . $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))
{
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'] . "'");
@@ -200,10 +160,10 @@ elseif($page == 'accounts')
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
inserttask(5);
if($sendinfomail == 1)
{
if ($sendinfomail == 1) {
$replace_arr = array(
'CUST_NAME' => getCorrectUserSalutation($userinfo),
'SALUTATION' => getCorrectUserSalutation($userinfo),
'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility
'USR_NAME' => $username,
'USR_PASS' => $password,
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
@@ -240,35 +200,29 @@ elseif($page == 'accounts')
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
} else {
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], '/');
if($settings['customer']['ftpatdomain'] == '1')
{
if ($settings['customer']['ftpatdomain'] == '1') {
$domainlist = array();
$domains = '';
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
while($row_domain = $db->fetch_array($result_domains))
{
while ($row_domain = $db->fetch_array($result_domains)) {
$domainlist[] = $row_domain['domain'];
}
sort($domainlist);
if(isset($domainlist[0]) && $domainlist[0] != '')
{
foreach($domainlist as $dom)
{
if (isset($domainlist[0]) && $domainlist[0] != '') {
foreach ($domainlist as $dom) {
$domains .= makeoption($idna_convert->decode($dom), $dom);
}
}
}
#$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
//$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
$ftp_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_add.php';
$ftp_add_form = htmlform::genHTMLForm($ftp_add_data);
@@ -276,60 +230,51 @@ elseif($page == 'accounts')
$title = $ftp_add_data['ftp_add']['title'];
$image = $ftp_add_data['ftp_add']['image'];
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
eval("echo \"" . getTemplate('ftp/accounts_add') . "\";");
}
}
}
elseif($action == 'edit'
&& $id != 0)
{
} 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 . "'");
if(isset($result['username'])
&& $result['username'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if (isset($result['username'])
&& $result['username'] != ''
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
// @FIXME use a good path-validating regex here (refs #1231)
$path = validate($_POST['path'], 'path');
$_setnewpass = false;
if(isset($_POST['ftp_password']) && $_POST['ftp_password'] != '')
{
if (isset($_POST['ftp_password']) && $_POST['ftp_password'] != '') {
$password = validate($_POST['ftp_password'], 'password');
$password = validatePassword($password);
$_setnewpass = true;
}
if($_setnewpass)
{
if($password == '')
{
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 . "'");
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account password for '" . $result['username'] . "'");
$cryptPassword = makeCryptPassword($password);
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`='" . $db->escape($cryptPassword) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
// also update customers backup user password if password of main ftp user is changed
if(!preg_match('/' . $settings['customer']['ftpprefix'] . '/', $result['username'])){
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $result['username'] . "_backup'");
}
// also update customers backup user password if password of main ftp user is changed
if(!preg_match('/' . $settings['customer']['ftpprefix'] . '/', $result['username'])){
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`='" . $db->escape($cryptPassword) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $result['username'] . "_backup'");
}
}
if($path != '')
{
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 */
if ($path != $result['homedir']) {
if (!file_exists($path)) {
// it's the task for "new ftp" but that will
// create all directories and correct their permissions
inserttask(5);
}
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account homdir for '" . $result['username'] . "'");
@@ -338,30 +283,23 @@ elseif($page == 'accounts')
}
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
if(strpos($result['homedir'], $userinfo['documentroot']) === 0)
{
} else {
if (strpos($result['homedir'], $userinfo['documentroot']) === 0) {
$homedir = substr($result['homedir'], strlen($userinfo['documentroot']));
}
else
{
} else {
$homedir = $result['homedir'];
}
$homedir = makeCorrectDir($homedir);
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $homedir);
if($settings['customer']['ftpatdomain'] == '1')
{
if ($settings['customer']['ftpatdomain'] == '1') {
$domains = '';
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
while($row_domain = $db->fetch_array($result_domains))
{
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
while ($row_domain = $db->fetch_array($result_domains)) {
$domains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
}
}
@@ -371,10 +309,8 @@ elseif($page == 'accounts')
$title = $ftp_edit_data['ftp_edit']['title'];
$image = $ftp_edit_data['ftp_edit']['image'];
eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";");
eval("echo \"" . getTemplate('ftp/accounts_edit') . "\";");
}
}
}
}
?>

View File

@@ -22,40 +22,32 @@ define('AREA', 'customer');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require('./lib/init.php');
require ("./lib/init.php");
if ($action == 'logout') {
$log->logAction(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 . "'");
$query = "DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0'";
if ($settings['session']['allow_multiple_login'] == '1') {
$query .= " AND `hash` = '" . $s . "'";
}
else
{
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0'");
}
$db->query($query);
redirectTo('index.php');
exit;
}
if($page == 'overview')
{
if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_index");
$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 = $db->fetch_array($result)) {
$domainArray[] = $idna_convert->decode($row['domain']);
}
natsort($domainArray);
$domains = implode(', ', $domainArray);
$domains = implode(',<br />', $domainArray);
$userinfo['email'] = $idna_convert->decode($userinfo['email']);
$yesterday = time() - (60 * 60 * 24);
$month = date('M Y', $yesterday);
@@ -77,67 +69,49 @@ if($page == 'overview')
$awaitingtickets = $opentickets['count'];
$awaitingtickets_text = '';
if($opentickets > 0)
{
if ($opentickets > 0) {
$awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '<a href="customer_tickets.php?page=tickets&amp;s=' . $s . '">' . $opentickets['count'] . '</a>'));
}
eval("echo \"" . getTemplate("index/index") . "\";");
}
elseif($page == 'change_password')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
eval("echo \"" . getTemplate('index/index') . "\";");
} elseif ($page == 'change_password') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$old_password = validate($_POST['old_password'], 'old password');
if(md5($old_password) != $userinfo['password'])
{
if (md5($old_password) != $userinfo['password']) {
standard_error('oldpasswordnotcorrect');
exit;
}
$new_password = validate($_POST['new_password'], 'new password');
$new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm');
$new_password = validatePassword($_POST['new_password'], 'new password');
$new_password_confirm = validatePassword($_POST['new_password_confirm'], 'new password confirm');
if($old_password == '')
{
if ($old_password == '') {
standard_error(array('stringisempty', 'oldpassword'));
}
elseif($new_password == '')
{
} elseif($new_password == '') {
standard_error(array('stringisempty', 'newpassword'));
}
elseif($new_password_confirm == '')
{
} elseif($new_password_confirm == '') {
standard_error(array('stringisempty', 'newpasswordconfirm'));
}
elseif($new_password != $new_password_confirm)
{
} elseif($new_password != $new_password_confirm) {
standard_error('newpasswordconfirmerror');
}
else
{
} 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(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']) . "'");
if (isset($_POST['change_main_ftp'])
&& $_POST['change_main_ftp'] == 'true'
) {
$cryptPassword = makeCryptPassword($new_password);
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`='" . $db->escape($cryptPassword) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'");
$log->logAction(USR_ACTION, LOG_NOTICE, 'changed main ftp password');
}
if(isset($_POST['change_webalizer'])
&& $_POST['change_webalizer'] == 'true')
{
if(CRYPT_STD_DES == 1)
{
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
{
} else {
$new_webalizer_password = crypt($new_password);
}
@@ -146,72 +120,52 @@ elseif($page == 'change_password')
redirectTo($filename, Array('s' => $s));
}
} else {
eval("echo \"" . getTemplate('index/change_password') . "\";");
}
else
{
eval("echo \"" . getTemplate("index/change_password") . "\";");
}
}
elseif($page == 'change_language')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
} elseif ($page == 'change_language') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$def_language = validate($_POST['def_language'], 'default language');
if(isset($languages[$def_language]))
{
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 . "'");
}
redirectTo($filename, Array('s' => $s));
}
else
{
$language_options = '';
} else {
$default_lang = $settings['panel']['standardlanguage'];
if($userinfo['def_language'] != '') {
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 = '';
while (list($language_file, $language_name) = each($languages)) {
$language_options .= makeoption($language_name, $language_file, $default_lang, true);
}
eval("echo \"" . getTemplate("index/change_language") . "\";");
eval("echo \"" . getTemplate('index/change_language') . "\";");
}
}
elseif($page == 'change_theme')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
} 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 = '';
} else {
$default_theme = $settings['panel']['default_theme'];
if($userinfo['theme'] != '') {
if ($userinfo['theme'] != '') {
$default_theme = $userinfo['theme'];
}
$theme_options = '';
$themes_avail = getThemes();
foreach($themes_avail as $t)
{
$theme_options.= makeoption($t, $t, $default_theme, true);
foreach ($themes_avail as $t) {
$theme_options .= makeoption($t, $t, $default_theme, true);
}
eval("echo \"" . getTemplate("index/change_theme") . "\";");
eval("echo \"" . getTemplate('index/change_theme') . "\";");
}
}

View File

@@ -22,30 +22,22 @@ define('AREA', 'customer');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
$need_db_sql_data = true;
$need_root_db_sql_data = true;
require ("./lib/init.php");
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 ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql");
$lng['mysql']['description'] = str_replace('<SQL_HOST>', $sql['host'], $lng['mysql']['description']);
eval("echo \"" . getTemplate("mysql/mysql") . "\";");
}
elseif($page == 'mysqls')
{
if($action == '')
{
eval("echo \"" . getTemplate('mysql/mysql') . "\";");
} elseif($page == 'mysqls') {
if ($action == '') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql::mysqls");
$fields = array(
'databasename' => $lng['mysql']['databasename'],
@@ -62,125 +54,117 @@ elseif($page == 'mysqls')
$count = 0;
$mysqls = '';
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
// Begin root-session
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
while ($row = $db->fetch_array($result)) {
if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row);
eval("\$mysqls.=\"" . getTemplate("mysql/mysqls_database") . "\";");
$mbdata = $db_root->query_first("SELECT SUM( data_length + index_length) / 1024 / 1024 'MB' FROM information_schema.TABLES WHERE table_schema = '" . $db_root->escape($row['databasename']) . "' GROUP BY table_schema ;");
$row['size'] = number_format($mbdata['MB'], 3, '.', '');
eval("\$mysqls.=\"" . getTemplate('mysql/mysqls_database') . "\";");
$count++;
}
$i++;
}
$db_root->close();
// End root-session
$mysqls_count = $db->num_rows($result);
eval("echo \"" . getTemplate("mysql/mysqls") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
{
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 . '"');
if(isset($result['databasename'])
&& $result['databasename'] != '')
{
if(!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']]))
{
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')
{
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) . '"');
$log->logAction(USR_ACTION, LOG_INFO, "deleted database '" . $result['databasename'] . "'");
if (mysql_get_server_info() < '5.0.2') {
// Revoke privileges (only required for MySQL 4.1.2 - 5.0.1)
$db_root->query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM \'' . $db_root->escape($result['databasename']) .'\'',false,true);
}
$host_res = $db_root->query("SELECT `Host` FROM `mysql`.`user` WHERE `User`='" . $db_root->escape($result['databasename']) . "'");
while ($host = $db_root->fetch_array($host_res)) {
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
$db_root->query('DROP USER \'' . $db_root->escape($result['databasename']). '\'@\'' . $db_root->escape($host['Host']) . '\'', false, true);
}
$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 = '';
}
$resetaccnumber = ($userinfo['mysqls_used'] == '1') ? " , `mysql_lastaccountnumber`='0' " : '';
$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
{
} 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);
}
}
}
elseif($action == 'add')
{
if($userinfo['mysqls_used'] < $userinfo['mysqls']
|| $userinfo['mysqls'] == '-1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
} 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 = isset($_POST['sendinfomail']) ? 1 : 0;
if ($sendinfomail != 1) {
$sendinfomail = 0;
}
if($password == '')
{
if ($password == '') {
standard_error(array('stringisempty', 'mypassword'));
}
else
{
$username = $userinfo['loginname'] . $settings['customer']['mysqlprefix'] . (intval($userinfo['mysql_lastaccountnumber']) + 1);
if(count($sql_root) > 1)
{
} else {
$dbserver = 0;
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]))
{
if (!isset($sql_root[$dbserver]) || !is_array($sql_root[$dbserver])) {
$dbserver = 0;
}
}
else
{
$dbserver = 0;
}
// validate description before actual adding the database, #1052
$databasedescription = validate(trim($_POST['description']), 'description');
// Begin root-session
$db_root = new db($sql_root[$dbserver]['host'], $sql_root[$dbserver]['user'], $sql_root[$dbserver]['password'], '');
unset($db_root->password);
if (strtoupper($settings['customer']['mysqlprefix']) == 'RANDOM') {
$result = $db_root->query('SELECT `User` FROM mysql.user');
while ($row = $db_root->fetch_array($result)) {
$allsqlusers[] = $row[User];
}
$username = $userinfo['loginname'] . '-' . substr(md5(uniqid(microtime(), 1)), 20, 3);
while (in_array($username , $allsqlusers)) {
$username = $userinfo['loginname'] . '-' . substr(md5(uniqid(microtime(), 1)), 20, 3);
}
} else {
$username = $userinfo['loginname'] . $settings['customer']['mysqlprefix'] . (intval($userinfo['mysql_lastaccountnumber']) + 1);
}
$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)
{
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 . "'");
@@ -188,24 +172,21 @@ elseif($page == 'mysqls')
$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');
// Statement modified for Database description -- PH 2004-11-29
$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)
{
if ($sendinfomail == 1) {
$pma = $lng['admin']['notgiven'];
if($settings['panel']['phpmyadmin_url'] != '')
{
if ($settings['panel']['phpmyadmin_url'] != '') {
$pma = $settings['panel']['phpmyadmin_url'];
}
$replace_arr = array(
'CUST_NAME' => getCorrectUserSalutation($userinfo),
'SALUTATION' => getCorrectUserSalutation($userinfo),
'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility
'DB_NAME' => $username,
'DB_PASS' => $password,
'DB_DESC' => $databasedescription,
@@ -244,17 +225,14 @@ elseif($page == 'mysqls')
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
} else {
$mysql_servers = '';
foreach($sql_root as $mysql_server => $mysql_server_details)
{
foreach ($sql_root as $mysql_server => $mysql_server_details) {
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
}
#$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
//$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);
@@ -262,67 +240,53 @@ elseif($page == 'mysqls')
$title = $mysql_add_data['mysql_add']['title'];
$image = $mysql_add_data['mysql_add']['image'];
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
eval("echo \"" . getTemplate('mysql/mysqls_add') . "\";");
}
}
}
elseif($action == 'edit'
&& $id != 0)
{
} 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 . '"');
if(isset($result['databasename'])
&& $result['databasename'] != '')
{
if(!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']]))
{
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')
{
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 != '')
{
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)
{
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
}
// Update the Database description -- PH 2004-11-29
$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
{
} else {
$mysql_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_edit.php';
$mysql_edit_form = 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 \"" . getTemplate('mysql/mysqls_edit') . "\";");
}
}
}
}
?>

View File

@@ -28,6 +28,17 @@ require ("./lib/init.php");
if(isset($_POST['id']))
{
$id = intval($_POST['id']);
/*
* Check if the current user is allowed to see the current ticket.
*/
$sql = "SELECT `id` FROM `panel_tickets` WHERE `id` = '".$id."' AND `customerid` = '".$userinfo['customerid']."'";
$result = $db->query_first($sql);
if ($result == null) {
// no rights to see the requested ticket
standard_error(array('ticketnotaccessible'));
}
}
elseif(isset($_GET['id']))
{
@@ -55,7 +66,7 @@ elseif($page == 'tickets')
$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());
$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'] . '" ' . $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);
@@ -210,12 +221,12 @@ elseif($page == 'tickets')
else
{
$categories = '';
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
$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 . '` ORDER BY `logicalorder`, `name` ASC');
$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))
{
@@ -227,9 +238,9 @@ elseif($page == 'tickets')
$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']);
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['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'] . '"
@@ -329,7 +340,13 @@ elseif($page == 'tickets')
}
else
{
$by = $lng['ticket']['customer'];
$cid = $mainticket->Get('customer');
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"'
);
$by = getCorrectFullUserDetails($usr);
//$by = $lng['ticket']['customer'];
}
$subject = $mainticket->Get('subject');
@@ -351,7 +368,8 @@ elseif($page == 'tickets')
}
else
{
$by = $lng['ticket']['customer'];
$by = getCorrectFullUserDetails($usr);
//$by = $lng['ticket']['customer'];
}
$subject = $subticket->Get('subject');

View File

@@ -22,21 +22,20 @@ define('AREA', 'customer');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require ("./lib/init.php");
$intrafficpage = 1;
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']);
}
@@ -44,40 +43,25 @@ elseif(isset($_GET['month'])
//BAM! $_GET???
elseif (isset($_GET['page'])
&& $_GET['page'] == "current")
{
if(date('d') != '01')
{
&& $_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`
@@ -90,106 +74,50 @@ if(!is_null($month)
$traffic_complete['mail'] = 0;
$show = '';
while($row = $db->fetch_array($result))
{
while ($row = $db->fetch_array($result)) {
$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'))
{
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['ftp'] = bcdiv($ftp, 1024, $settings['panel']['decimal_places']);
$traf['http'] = bcdiv($http, 1024, $settings['panel']['decimal_places']);
$traf['mail'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']);
$traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']);
} 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($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['http'] = round($http, $settings['panel']['decimal_places']);
$traf['ftp'] = round($ftp, $settings['panel']['decimal_places']);
$traf['mail'] = round($mail, $settings['panel']['decimal_places']);
$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.=\"" . getTemplate('traffic/traffic_month') . "\";");
$show = $lng['traffic']['months'][intval($row['month'])] . ' ' . $row['year'];
}
if(extension_loaded('bcmath'))
{
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
{
} 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']);
}
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;
}
eval("echo \"" . getTemplate('traffic/traffic_details') . "\";");
} else {
$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");
@@ -197,88 +125,49 @@ else
$traffic_complete['ftp'] = 0;
$traffic_complete['mail'] = 0;
while($row = $db->fetch_array($result))
{
while ($row = $db->fetch_array($result)) {
$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['panel']['decimal_places']) . " MB up/ " . bcdiv($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)";
$traf['ftp'] = bcdiv(($ftp_up + $ftp_down), 1024, $settings['panel']['decimal_places']);
$traf['http'] = bcdiv($http, 1024, $settings['panel']['decimal_places']);
$traf['mail'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']);
$traf['byte'] = bcdiv($traf['byte'], 1024 * 1024, $settings['panel']['decimal_places']);
} else {
$traf['ftptext'] = round($ftp_up / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($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)";
$traf['ftp'] = round(($ftp_up + $ftp_down) / 1024, $settings['panel']['decimal_places']);
$traf['http'] = round($http / 1024, $settings['panel']['decimal_places']);
$traf['mail'] = round($mail / 1024, $settings['panel']['decimal_places']);
$traf['byte'] = round($traf['byte'] / (1024 * 1024), $settings['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.=\"" . getTemplate('traffic/traffic_traffic') . "\";");
}
if(extension_loaded('bcmath'))
{
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']);
} 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']);
}
eval("echo \"" . getTemplate("traffic/traffic") . "\";");
eval("echo \"" . getTemplate('traffic/traffic') . "\";");
}
?>

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: 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 827 B

248
index.php
View File

@@ -22,106 +22,74 @@ define('AREA', 'login');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require ('./lib/init.php');
require ("./lib/init.php");
if($action == '')
{
if ($action == '') {
$action = 'login';
}
if($action == 'login')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if ($action == 'login') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$loginname = validate($_POST['loginname'], 'loginname');
$password = validate($_POST['password'], 'password');
$row = $db->query_first("SELECT `loginname` AS `customer` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `loginname`='" . $db->escape($loginname) . "'");
if($row['customer'] == $loginname)
{
if ($row['customer'] == $loginname) {
$table = "`" . TABLE_PANEL_CUSTOMERS . "`";
$uid = 'customerid';
$adminsession = '0';
$is_admin = false;
}
else
{
if((int)$settings['login']['domain_login'] == 1)
{
} else {
$is_admin = true;
if ((int)$settings['login']['domain_login'] == 1) {
/**
* check if the customer tries to login with a domain, #374
*/
$domainname = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', $loginname));
$row2 = $db->query_first("SELECT `customerid` FROM `".TABLE_PANEL_DOMAINS."` WHERE `domain` = '".$db->escape($domainname)."'");
if(isset($row2['customerid']) && $row2['customerid'] > 0)
{
if (isset($row2['customerid']) && $row2['customerid'] > 0) {
$loginname = getCustomerDetail($row2['customerid'], 'loginname');
if($loginname !== false)
{
if ($loginname !== false) {
$row3 = $db->query_first("SELECT `loginname` AS `customer` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `loginname`='" . $db->escape($loginname) . "'");
if($row3['customer'] == $loginname)
{
if ($row3['customer'] == $loginname) {
$table = "`" . TABLE_PANEL_CUSTOMERS . "`";
$uid = 'customerid';
$adminsession = '0';
$is_admin = false;
}
}
else
{
$is_admin = true;
}
}
else
{
$is_admin = true;
}
}
else
{
$is_admin = true;
}
}
if(hasUpdates($version) && $is_admin == false)
{
if (hasUpdates($version) && $is_admin == false) {
redirectTo('index.php');
exit;
}
if($is_admin)
{
if(hasUpdates($version))
{
if ($is_admin) {
if (hasUpdates($version)) {
$row = $db->query_first("SELECT `loginname` AS `admin` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `loginname`='" . $db->escape($loginname) . "' AND `change_serversettings` = '1'");
/*
* not an admin who can see updates
*/
if(!isset($row['admin']))
{
if (!isset($row['admin'])) {
redirectTo('index.php');
exit;
}
}
else
{
} else {
$row = $db->query_first("SELECT `loginname` AS `admin` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `loginname`='" . $db->escape($loginname) . "'");
}
if($row['admin'] == $loginname)
{
if ($row['admin'] == $loginname) {
$table = "`" . TABLE_PANEL_ADMINS . "`";
$uid = 'adminid';
$adminsession = '1';
}
else
{
} else {
redirectTo('index.php', Array('showmessage' => '2'), true);
exit;
}
@@ -129,64 +97,48 @@ if($action == 'login')
$userinfo = $db->query_first("SELECT * FROM $table WHERE `loginname`='" . $db->escape($loginname) . "'");
if($userinfo['loginfail_count'] >= $settings['login']['maxloginattempts']
&& $userinfo['lastlogin_fail'] > (time() - $settings['login']['deactivatetime']))
{
if ($userinfo['loginfail_count'] >= $settings['login']['maxloginattempts']
&& $userinfo['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
) {
redirectTo('index.php', Array('showmessage' => '3'), true);
exit;
}
elseif($userinfo['password'] == md5($password))
{
} elseif($userinfo['password'] == md5($password)) {
// login correct
// reset loginfail_counter, set lastlogin_succ
$db->query("UPDATE $table SET `lastlogin_succ`='" . time() . "', `loginfail_count`='0' WHERE `$uid`='" . (int)$userinfo[$uid] . "'");
$userinfo['userid'] = $userinfo[$uid];
$userinfo['adminsession'] = $adminsession;
}
else
{
} else {
// login incorrect
$db->query("UPDATE $table SET `lastlogin_fail`='" . time() . "', `loginfail_count`=`loginfail_count`+1 WHERE `$uid`='" . (int)$userinfo[$uid] . "'");
unset($userinfo);
redirectTo('index.php', Array('showmessage' => '2'), true);
exit;
}
if(isset($userinfo['userid'])
&& $userinfo['userid'] != '')
{
if (isset($userinfo['userid'])
&& $userinfo['userid'] != ''
) {
$s = md5(uniqid(microtime(), 1));
if(isset($_POST['language']))
{
if (isset($_POST['language'])) {
$language = validate($_POST['language'], 'language');
if($language == 'profile')
{
if ($language == 'profile') {
$language = $userinfo['def_language'];
}
elseif(!isset($languages[$language]))
{
} elseif(!isset($languages[$language])) {
$language = $settings['panel']['standardlanguage'];
}
}
else
{
} else {
$language = $settings['panel']['standardlanguage'];
}
if(isset($userinfo['theme']) && $userinfo['theme'] != '') {
if (isset($userinfo['theme']) && $userinfo['theme'] != '') {
$theme = $userinfo['theme'];
}
else
{
} else {
$theme = $settings['panel']['default_theme'];
}
if($settings['session']['allow_multiple_login'] != '1')
{
if ($settings['session']['allow_multiple_login'] != '1') {
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['userid'] . "' AND `adminsession` = '" . $db->escape($userinfo['adminsession']) . "'");
}
@@ -195,56 +147,41 @@ if($action == 'login')
$columns = mysql_num_fields($fields);
$field_array = array();
for ($i = 0; $i < $columns; $i++) {
$field_array[] = mysql_field_name($fields, $i);
$field_array[] = mysql_field_name($fields, $i);
}
if (!in_array('theme', $field_array)) {
if (!in_array('theme', $field_array)) {
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$userinfo['userid'] . "', '" . $db->escape($remote_addr) . "', '" . $db->escape($http_user_agent) . "', '" . time() . "', '" . $db->escape($language) . "', '" . $db->escape($userinfo['adminsession']) . "')");
} else {
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`, `theme`) VALUES ('" . $db->escape($s) . "', '" . (int)$userinfo['userid'] . "', '" . $db->escape($remote_addr) . "', '" . $db->escape($http_user_agent) . "', '" . time() . "', '" . $db->escape($language) . "', '" . $db->escape($userinfo['adminsession']) . "', '" . $db->escape($theme) . "')");
}
} else {
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`, `theme`) VALUES ('" . $db->escape($s) . "', '" . (int)$userinfo['userid'] . "', '" . $db->escape($remote_addr) . "', '" . $db->escape($http_user_agent) . "', '" . time() . "', '" . $db->escape($language) . "', '" . $db->escape($userinfo['adminsession']) . "', '" . $db->escape($theme) . "')");
}
if($userinfo['adminsession'] == '1')
{
if(hasUpdates($version))
{
if ($userinfo['adminsession'] == '1') {
if (hasUpdates($version)) {
redirectTo('admin_updates.php', Array('s' => $s), true);
exit;
}
else
{
} else {
redirectTo('admin_index.php', Array('s' => $s), true);
exit;
}
}
else
{
} else {
redirectTo('customer_index.php', Array('s' => $s), true);
exit;
}
}
else
{
} else {
redirectTo('index.php', Array('showmessage' => '2'), true);
exit;
}
}
else
{
exit;
} else {
$language_options = '';
$language_options.= makeoption($lng['login']['profile_lng'], 'profile', 'profile', true, true);
$language_options .= makeoption($lng['login']['profile_lng'], 'profile', 'profile', true, true);
while(list($language_file, $language_name) = each($languages))
{
$language_options.= makeoption($language_name, $language_file, 'profile', true);
while (list($language_file, $language_name) = each($languages)) {
$language_options .= makeoption($language_name, $language_file, 'profile', true);
}
$smessage = isset($_GET['showmessage']) ? (int)$_GET['showmessage'] : 0;
$message = '';
$successmessage = '';
switch($smessage)
{
switch ($smessage) {
case 1:
$successmessage = $lng['pwdreminder']['success'];
break;
@@ -252,7 +189,7 @@ if($action == 'login')
$message = $lng['error']['login'];
break;
case 3:
$message = $lng['error']['login_blocked'];
$message = sprintf($lng['error']['login_blocked'],$settings['login']['deactivatetime']);
break;
case 4:
$cmail = isset($_GET['customermail']) ? $_GET['customermail'] : 'unknown';
@@ -264,23 +201,21 @@ if($action == 'login')
}
$update_in_progress = '';
if(hasUpdates($version))
{
if (hasUpdates($version)) {
$update_in_progress = $lng['update']['updateinprogress_onlyadmincanlogin'];
}
eval("echo \"" . getTemplate("login") . "\";");
eval("echo \"" . getTemplate('login') . "\";");
}
}
if($action == 'forgotpwd')
{
if ($action == 'forgotpwd') {
$adminchecked = false;
$message = '';
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$loginname = validate($_POST['loginname'], 'loginname');
$email = validateEmail($_POST['loginemail'], 'email');
$sql = "SELECT `adminid`, `customerid`, `firstname`, `name`, `company`, `email`, `loginname`, `def_language`, `deactivated` FROM `" . TABLE_PANEL_CUSTOMERS . "`
@@ -288,64 +223,48 @@ if($action == 'forgotpwd')
AND `email`='" . $db->escape($email) . "'";
$result = $db->query($sql);
if($db->num_rows() == 0)
{
if ($db->num_rows() == 0) {
$sql = "SELECT `adminid`, `name`, `email`, `loginname`, `def_language` FROM `" . TABLE_PANEL_ADMINS . "`
WHERE `loginname`='" . $db->escape($loginname) . "'
AND `email`='" . $db->escape($email) . "'";
$result = $db->query($sql);
if($db->num_rows() > 0)
{
if ($db->num_rows() > 0) {
$adminchecked = true;
}
else
{
} else {
$result = null;
}
}
if($result !== null)
{
if ($result !== null) {
$user = $db->fetch_array($result);
/* Check whether user is banned */
if($user['deactivated'])
{
if ($user['deactivated']) {
$message = $lng['pwdreminder']['notallowed'];
redirectTo('index.php', Array('showmessage' => '5'), true);
}
if(($adminchecked && $settings['panel']['allow_preset_admin'] == '1')
|| $adminchecked == false)
{
if($user !== false)
{
if (($adminchecked && $settings['panel']['allow_preset_admin'] == '1')
|| $adminchecked == false
) {
if ($user !== false) {
if ($settings['panel']['password_min_length'] <= 6) {
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
} else {
// make it two times larger than password_min_length
$rnd = '';
$minlength = $settings['panel']['password_min_length'];
while (strlen($rnd) < ($minlength * 2))
{
while (strlen($rnd) < ($minlength * 2)) {
$rnd .= md5(uniqid(microtime(), 1));
}
$password = substr($rnd, (int)($minlength / 2), $minlength);
}
if($adminchecked)
{
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `password`='" . md5($password) . "'
WHERE `loginname`='" . $user['loginname'] . "'
AND `email`='" . $user['email'] . "'");
}
else
{
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `password`='" . md5($password) . "'
WHERE `loginname`='" . $user['loginname'] . "'
AND `email`='" . $user['email'] . "'");
}
$passwordTable = $adminchecked ? TABLE_PANEL_ADMINS : TABLE_PANEL_CUSTOMERS;
$db->query("UPDATE `" . $passwordTable . "` SET `password`='" . md5($password) . "'
WHERE `loginname`='" . $user['loginname'] . "'
AND `email`='" . $user['email'] . "'");
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
$rstlog->logAction(USR_ACTION, LOG_WARNING, "Password for user '" . $user['loginname'] . "' has been reset!");
@@ -389,9 +308,7 @@ if($action == 'forgotpwd')
$mail->ClearAddresses();
redirectTo('index.php', Array('showmessage' => '1'), true);
exit;
}
else
{
} else {
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
$rstlog->logAction(USR_ACTION, LOG_WARNING, "User '" . $loginname . "' tried to reset pwd but wasn't found in database!");
$message = $lng['login']['combination_not_found'];
@@ -399,28 +316,21 @@ if($action == 'forgotpwd')
unset($user);
}
}
else
{
} else {
$message = $lng['login']['usernotfound'];
}
}
if($adminchecked)
{
if($settings['panel']['allow_preset_admin'] != '1')
{
if ($adminchecked) {
if ($settings['panel']['allow_preset_admin'] != '1') {
$message = $lng['pwdreminder']['notallowed'];
unset ($adminchecked);
}
}
else
{
if($settings['panel']['allow_preset'] != '1')
{
} else {
if ($settings['panel']['allow_preset'] != '1') {
$message = $lng['pwdreminder']['notallowed'];
}
}
eval("echo \"" . getTemplate("fpwd") . "\";");
eval("echo \"" . getTemplate('fpwd') . "\";");
}

File diff suppressed because it is too large Load Diff

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,962 +9,14 @@
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Michael Kaufmann <mkaufmann@nutime.de>
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install
*
*/
/**
* Most elements are taken from the phpBB (www.phpbb.com)
* installer, (c) 1999 - 2004 phpBB Group.
*/
require 'lib/class.FroxlorInstall.php';
// ensure that default timezone is set
if(function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get"))
{
@date_default_timezone_set(@date_default_timezone_get());
}
if(file_exists('../lib/userdata.inc.php'))
{
/**
* Includes the Usersettings eg. MySQL-Username/Passwort etc. to test if Froxlor is already installed
*/
require ('../lib/userdata.inc.php');
if(isset($sql)
&& is_array($sql)
) {
$installed_hint = file_get_contents('../templates/Froxlor/misc/alreadyinstalledhint.tpl');
die($installed_hint);
}
}
/**
* Include the functions
*/
require ('../lib/functions.php');
/**
* Include the MySQL-Table-Definitions
*/
require ('../lib/tables.inc.php');
/**
* Language Managament
*/
$languages = Array(
'german' => 'Deutsch',
'english' => 'English',
'french' => 'Francais'
);
$standardlanguage = 'english';
if(isset($_GET['language'])
&& isset($languages[$_GET['language']]))
{
$language = $_GET['language'];
}
elseif(isset($_POST['language'])
&& isset($languages[$_POST['language']]))
{
$language = $_POST['language'];
}
else
{
$language = $standardlanguage;
}
if(file_exists('./lng/' . $language . '.lng.php'))
{
/**
* Includes file /lng/$language.lng.php if it exists
*/
require ('./lng/' . $language . '.lng.php');
}
/**
* BEGIN FUNCTIONS -----------------------------------------------
*/
function page_header() {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="iso-8859-1" />
<meta http-equiv="Default-Style" content="text/css" />
<link rel="stylesheet" href="../templates/Froxlor/froxlor.css" />
<!--[if IE]><link rel="stylesheet" href="../templates/Froxlor/froxlor_ie.css" /><![endif]-->
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script type="text/javascript" src="../templates/Froxlor/js/jquery.min.js"></script>
<script type="text/javascript" src="../templates/Froxlor/js/froxlor.js"></script>
<title>Froxlor Server Management Panel - Installation</title>
<style>
input {
background: #dae7ee url('../images/Froxlor/icons/text_align_left.png') no-repeat 5px 4px;
}
input[type="password"] {
background: #dae7ee url('../images/Froxlor/icons/password.png') no-repeat 4px 4px;
}
input[type="submit"] {
background: #ccc url('../images/Froxlor/icons/button_ok.png') no-repeat 4px 8px;
}
</style>
</head>
<body>
<div class="loginpage">
<?php
}
function page_footer() {
?>
</div>
<footer>
<span>
Froxlor &copy; 2009-<?php echo date('Y', time()); ?> by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
</span>
</footer>
</body>
</html>
<?php
}
function status_message($case, $text)
{
if($case == 'begin')
{
echo '<tr><td>'.$text;
}
else
{
echo '</td><td class="installstatus">
<span style="color:'.$case.';">'.$text.'</span>
</td></tr>';
}
}
function requirement_checks() {
global $lng;
page_header();
?>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2>Requirements</h2>
<table class="noborder">
<?php
$_die = false;
// check for correct php version
status_message('begin', $lng['install']['phpversion']);
if(version_compare("5.2.0", PHP_VERSION, ">="))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// Check if magic_quotes_runtime is active
status_message('begin', $lng['install']['phpmagic_quotes_runtime']);
if(get_magic_quotes_runtime())
{
// Deactivate
set_magic_quotes_runtime(false);
status_message('orange', $lng['install']['active'] . '<br />' . $lng['install']['phpmagic_quotes_runtime_description']);
}
else
{
status_message('green', 'OK');
}
// check for mysql-extension
status_message('begin', $lng['install']['phpmysql']);
if(!extension_loaded('mysql'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// check for xml-extension
status_message('begin', $lng['install']['phpxml']);
if(!extension_loaded('xml'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// check for filter-extension
status_message('begin', $lng['install']['phpfilter']);
if(!extension_loaded('filter'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// check for posix-extension
status_message('begin', $lng['install']['phpposix']);
if(!extension_loaded('posix'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// check for bcmath extension
status_message('begin', $lng['install']['phpbcmath']);
if(!extension_loaded('bcmath'))
{
status_message('orange', $lng['install']['notinstalled'] . '<br />' . $lng['install']['bcmathdescription']);
}
else
{
status_message('green', 'OK');
}
// check for open_basedir
status_message('begin', $lng['install']['openbasedir']);
$php_ob = @ini_get("open_basedir");
if(!empty($php_ob)
&& $php_ob != '')
{
status_message('orange', $lng['install']['openbasedirenabled']);
}
else
{
status_message('green', 'OK');
}
?>
</table>
<?php
if($_die)
{
?>
<p style="padding-left:15px;">
<strong><?php echo $lng['install']['diedbecauseofrequirements']; ?></strong>
</p>
<p class="submit">
<a href="install.php"><?php echo $lng['install']['click_here_to_refresh']; ?></a>
</p>
<?php
} else {
?>
<p style="padding-left:15px;">
<strong><?php echo $lng['install']['froxlor_succ_checks']; ?></strong>
</p>
<p class="submit">
<a href="install.php?check=1"><?php echo $lng['install']['click_here_to_continue']; ?></a>
</p>
<?php
}
?>
</section>
</article>
<?php
page_footer();
}
/**
* END FUNCTIONS ---------------------------------------------------
*/
/**
* BEGIN VARIABLES ---------------------------------------------------
*/
//guess Servername
if(!empty($_POST['servername']))
{
$servername = $_POST['servername'];
}
else
{
if(!empty($_SERVER['SERVER_NAME']))
{
if(preg_match('/^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$/', $_SERVER['SERVER_NAME']) == false)
{
$servername = $_SERVER['SERVER_NAME'];
}
else
{
$servername = '';
}
}
else
{
$servername = '';
}
}
//guess serverip
if(!empty($_POST['serverip']))
{
$serverip = $_POST['serverip'];
}
else
{
if(!empty($_SERVER['SERVER_ADDR']))
{
$serverip = $_SERVER['SERVER_ADDR'];
}
else
{
$serverip = '';
}
}
if(!empty($_POST['mysql_host']))
{
$mysql_host = $_POST['mysql_host'];
}
else
{
$mysql_host = '127.0.0.1';
}
if(!empty($_POST['mysql_database']))
{
$mysql_database = $_POST['mysql_database'];
}
else
{
$mysql_database = 'froxlor';
}
if(!empty($_POST['mysql_unpriv_user']))
{
$mysql_unpriv_user = $_POST['mysql_unpriv_user'];
}
else
{
$mysql_unpriv_user = 'froxlor';
}
if(!empty($_POST['mysql_unpriv_pass']))
{
$mysql_unpriv_pass = $_POST['mysql_unpriv_pass'];
}
else
{
$mysql_unpriv_pass = '';
}
if(!empty($_POST['mysql_root_user']))
{
$mysql_root_user = $_POST['mysql_root_user'];
}
else
{
$mysql_root_user = 'root';
}
if(!empty($_POST['mysql_root_pass']))
{
$mysql_root_pass = $_POST['mysql_root_pass'];
}
else
{
$mysql_root_pass = '';
}
if(!empty($_POST['admin_user']))
{
$admin_user = $_POST['admin_user'];
}
else
{
$admin_user = 'admin';
}
if(!empty($_POST['admin_pass1']))
{
$admin_pass1 = $_POST['admin_pass1'];
}
else
{
$admin_pass1 = '';
}
if(!empty($_POST['admin_pass2']))
{
$admin_pass2 = $_POST['admin_pass2'];
}
else
{
$admin_pass2 = '';
}
if($mysql_host == 'localhost'
|| $mysql_host == '127.0.0.1')
{
$mysql_access_host = $mysql_host;
}
else
{
$mysql_access_host = $serverip;
}
// gues http software
if(!empty($_POST['webserver']))
{
$webserver = $_POST['webserver'];
}
else
{
if(strtoupper(@php_sapi_name()) == "APACHE2HANDLER"
|| stristr($_SERVER['SERVER_SOFTWARE'], "apache/2"))
{
$webserver = 'apache2';
}
elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "LIGHTTPD"
|| stristr($_SERVER['SERVER_SOFTWARE'], "lighttpd"))
{
$webserver = 'lighttpd';
}
elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "NGINX"
|| stristr($_SERVER['SERVER_SOFTWARE'], "nginx"))
{
$webserver = 'nginx';
}
else
{
// we don't need to bail out, since unknown does not affect any critical installation routines
$webserver = 'unknown';
}
}
if(!empty($_POST['httpuser']))
{
$httpuser = $_POST['httpuser'];
}
else
{
$httpuser = '';
}
if(!empty($_POST['httpgroup']))
{
$httpgroup = $_POST['httpgroup'];
}
else
{
$httpgroup = '';
}
/**
* END VARIABLES ---------------------------------------------------
*/
/**
* BEGIN INSTALL ---------------------------------------------------
*/
if(isset($_POST['installstep'])
&& $_POST['installstep'] == '1'
&& $admin_pass1 == $admin_pass2
&& $admin_pass1 != ''
&& $admin_pass2 != ''
&& $mysql_unpriv_pass != ''
&& $mysql_root_pass != ''
&& $servername != ''
&& $serverip != ''
&& $httpuser != ''
&& $httpgroup != ''
&& $mysql_unpriv_user != $mysql_root_user)
{
page_header();
?>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2>Installation</h2>
<table class="noborder">
<?php
//first test if we can access the database server with the given root user and password
status_message('begin', $lng['install']['testing_mysql']);
$db_root = new db($mysql_host, $mysql_root_user, $mysql_root_pass, '');
//ok, if we are here, the database class is build up (otherwise it would have already die'd this script)
status_message('green', 'OK');
//first we make a backup of the old DB if it exists
status_message('begin', $lng['install']['backup_old_db']);
$tables_exist = false;
$sql = "SHOW TABLES FROM $mysql_database";
$result = mysql_query($sql);
// check the first row
if($result !== false)
{
$row = mysql_num_rows($result);
if($row > 0)
{
$tables_exist = true;
}
}
if($tables_exist)
{
$filename = "/tmp/froxlor_backup_" . date('YmdHi') . ".sql";
if(is_file("/usr/bin/mysqldump"))
{
$do_backup = true;
$mysql_dump = '/usr/bin/mysqldump';
}
elseif(is_file("/usr/local/bin/mysqldump"))
{
$do_backup = true;
$mysql_dump = '/usr/local/bin/mysqldump';
}
else
{
$do_backup = false;
status_message('red', $lng['install']['backing_up_binary_missing']);
}
if($do_backup) {
$command = $mysql_dump . " " . $mysql_database . " -u " . $mysql_root_user . " --password='" . $mysql_root_pass . "' --result-file=" . $filename;
$output = exec($command);
if(stristr($output, "error"))
{
status_message('red', $lng['install']['backing_up_failed']);
}
else
{
status_message('green', 'OK');
}
}
}
//so first we have to delete the database and the user given for the unpriv-user if they exit
status_message('begin', $lng['install']['erasing_old_db']);
$db_root->query("DELETE FROM `mysql`.`user` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
$db_root->query("DELETE FROM `mysql`.`db` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
$db_root->query("DELETE FROM `mysql`.`tables_priv` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
$db_root->query("DELETE FROM `mysql`.`columns_priv` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
$db_root->query("DROP DATABASE IF EXISTS `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "` ;");
$db_root->query("FLUSH PRIVILEGES;");
status_message('green', 'OK');
//then we have to create a new user and database for the froxlor unprivileged mysql access
status_message('begin', $lng['install']['create_mysqluser_and_db']);
$db_root->query("CREATE DATABASE `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`");
$mysql_access_host_array = array_map('trim', explode(',', $mysql_access_host));
if(in_array('127.0.0.1', $mysql_access_host_array)
&& !in_array('localhost', $mysql_access_host_array))
{
$mysql_access_host_array[] = 'localhost';
}
if(!in_array('127.0.0.1', $mysql_access_host_array)
&& in_array('localhost', $mysql_access_host_array))
{
$mysql_access_host_array[] = '127.0.0.1';
}
$mysql_access_host_array[] = $serverip;
foreach($mysql_access_host_array as $mysql_access_host)
{
$db_root->query("GRANT ALL PRIVILEGES ON `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`.* TO '" . $db_root->escape($mysql_unpriv_user) . "'@'" . $db_root->escape($mysql_access_host) . "' IDENTIFIED BY 'password'");
$db_root->query("SET PASSWORD FOR '" . $db_root->escape($mysql_unpriv_user) . "'@'" . $db_root->escape($mysql_access_host) . "' = PASSWORD('" . $db_root->escape($mysql_unpriv_pass) . "')");
}
$db_root->query("FLUSH PRIVILEGES;");
$mysql_access_host = implode(',', $mysql_access_host_array);
status_message('green', 'OK');
//now a new database and the new froxlor-unprivileged-mysql-account have been created and we can fill it now with the data.
status_message('begin', $lng['install']['testing_new_db']);
$db = new db($mysql_host, $mysql_unpriv_user, $mysql_unpriv_pass, $mysql_database);
status_message('green', 'OK');
status_message('begin', $lng['install']['importing_data']);
$db_schema = './froxlor.sql';
$sql_query = @file_get_contents($db_schema, 'r');
$sql_query = remove_remarks($sql_query);
$sql_query = split_sql_file($sql_query, ';');
for ($i = 0;$i < sizeof($sql_query);$i++)
{
if(trim($sql_query[$i]) != '')
{
$result = $db->query($sql_query[$i]);
}
}
status_message('green', 'OK');
status_message('begin', 'System Servername...');
if(validate_ip($_SERVER['SERVER_NAME'], true) !== false)
{
status_message('red', $lng['install']['servername_should_be_fqdn']);
}
else
{
status_message('green', 'OK');
}
//now let's change the settings in our settings-table
status_message('begin', $lng['install']['changing_data']);
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = 'admin@" . $db->escape($servername) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'adminmail'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($serverip) . "' WHERE `settinggroup` = 'system' AND `varname` = 'ipaddress'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($servername) . "' WHERE `settinggroup` = 'system' AND `varname` = 'hostname'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($version) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'version'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($languages[$language]) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'standardlanguage'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($mysql_access_host) . "' WHERE `settinggroup` = 'system' AND `varname` = 'mysql_access_host'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpuser) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
if($webserver == "apache2")
{
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/apache2 reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
}
elseif($webserver == "lighttpd")
{
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/conf-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-diroptions/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/lighttpd reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/lighttpd.pem' WHERE `settinggroup` = 'system' AND `varname` = 'ssl_cert_file'");
$ssettings = '';
}
elseif($webserver == "nginx")
{
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/nginx/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/nginx/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/nginx/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/nginx reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
$ssettings = '';
}
// insert the lastcronrun to be the installation date
$query = 'UPDATE `%s` SET `value` = UNIX_TIMESTAMP() WHERE `settinggroup` = \'system\' AND `varname` = \'lastcronrun\'';
$query = sprintf($query, TABLE_PANEL_SETTINGS);
$db->query($query);
// set specific times for some crons (traffic only at night, etc.)
$ts = mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_traffic.php';");
$ts = mktime(1, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_used_tickets_reset.php';");
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_ticketarchive.php';");
// and lets insert the default ip and port
$query = "INSERT INTO `".TABLE_PANEL_IPSANDPORTS."`
SET `ip`= '".$db->escape($serverip)."',
`port` = '80',
`namevirtualhost_statement` = '1',
`vhostcontainer` = '1',
`vhostcontainer_servername_statement` = '1'";
$db->query($query);
$defaultip = $db->insert_id();
// insert the defaultip
$query = 'UPDATE `%s` SET `value` = \'%s\' WHERE `settinggroup` = \'system\' AND `varname` = \'defaultip\'';
$query = sprintf($query, TABLE_PANEL_SETTINGS, $db->escape($defaultip));
$db->query($query);
status_message('green', 'OK');
//last but not least create the main admin
status_message('begin', $lng['install']['adding_admin_user']);
$db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET
`loginname` = '" . $db->escape($admin_user) . "',
`password` = '" . md5($admin_pass1) . "',
`name` = 'Siteadmin',
`email` = 'admin@" . $db->escape($servername) . "',
`def_language` = '". $db->escape($languages[$language]) . "',
`customers` = -1,
`customers_used` = 0,
`customers_see_all` = 1,
`caneditphpsettings` = 1,
`domains` = -1,
`domains_used` = 0,
`domains_see_all` = 1,
`change_serversettings` = 1,
`diskspace` = -1024,
`diskspace_used` = 0,
`mysqls` = -1,
`mysqls_used` = 0,
`emails` = -1,
`emails_used` = 0,
`email_accounts` = -1,
`email_accounts_used` = 0,
`email_forwarders` = -1,
`email_forwarders_used` = 0,
`email_quota` = -1,
`email_quota_used` = 0,
`ftps` = -1,
`ftps_used` = 0,
`tickets` = -1,
`tickets_used` = 0,
`subdomains` = -1,
`subdomains_used` = 0,
`traffic` = -1048576,
`traffic_used` = 0,
`deactivated` = 0,
`aps_packages` = -1,
`aps_packages_used` = 0,
`email_autoresponder` = -1,
`email_autoresponder_used` = 0");
status_message('green', 'OK');
//now we create the userdata.inc.php with the mysql-accounts
status_message('begin', $lng['install']['creating_configfile']);
$userdata = "<?php\n";
$userdata.= "//automatically generated userdata.inc.php for Froxlor\n";
$userdata.= "\$sql['host']='" . addcslashes($mysql_host, "'\\") . "';\n";
$userdata.= "\$sql['user']='" . addcslashes($mysql_unpriv_user, "'\\") . "';\n";
$userdata.= "\$sql['password']='" . addcslashes($mysql_unpriv_pass, "'\\") . "';\n";
$userdata.= "\$sql['db']='" . addcslashes($mysql_database, "'\\") . "';\n";
$userdata.= "\$sql_root[0]['caption']='Default';\n";
$userdata.= "\$sql_root[0]['host']='" . addcslashes($mysql_host, "'\\") . "';\n";
$userdata.= "\$sql_root[0]['user']='" . addcslashes($mysql_root_user, "'\\") . "';\n";
$userdata.= "\$sql_root[0]['password']='" . addcslashes($mysql_root_pass, "'\\") . "';\n";
$userdata.= "?>";
//we test now if we can store the userdata.inc.php in ../lib
if($fp = @fopen('../lib/userdata.inc.php', 'w'))
{
$result = @fputs($fp, $userdata, strlen($userdata));
@fclose($fp);
status_message('green', $lng['install']['creating_configfile_succ']);
chmod('../lib/userdata.inc.php', 0440);
}
elseif($fp = @fopen('/tmp/userdata.inc.php', 'w'))
{
$result = @fputs($fp, $userdata, strlen($userdata));
@fclose($fp);
status_message('orange', $lng['install']['creating_configfile_temp']);
chmod('/tmp/userdata.inc.php', 0440);
}
else
{
status_message('red', $lng['install']['creating_configfile_failed']);
echo "\t\t<tr>\n\t\t\t<td class=\"main_field_name\"><p>" . nl2br(htmlspecialchars($userdata)) . "</p></td>\n\t\t</tr>\n";
}
?>
</table>
<p style="padding-left: 15px;">
<strong><?php echo $lng['install']['froxlor_succ_installed']; ?></strong>
</p>
<p class="submit">
<a href="../index.php"><?php echo $lng['install']['click_here_to_login']; ?></a>
</p>
</section>
</article>
<?php
page_footer();
}
else
{
if((isset($_GET['check'])
&& $_GET['check'] == '1')
|| (isset($_POST['installstep'])
&& $_POST['installstep'] == '1')
) {
page_header();
?>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2><?php echo $lng['install']['language']; ?></h2>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;Install</legend>
<p>
<label for="language"><?php echo $lng['install']['language']; ?>:</label>&nbsp;
<select name="language" id="language">
<?php
$language_options = '';
while(list($language_file, $language_name) = each($languages)) {
$language_options.= makeoption($language_name, $language_file, $language, true, true);
}
echo $language_options;
?>
</select>
</p>
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="submit" name="chooselang" value="Go" />
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>
</section>
<section class="installsec">
<h2><?php echo $lng['install']['installdata']; ?></h2>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;Install</legend>
<p>
<strong><?php echo $lng['install']['database']; ?></strong>
</p>
<p>
<label for="mysql_host"><?php echo $lng['install']['mysql_hostname']; ?>:</label>&nbsp;
<input type="text" name="mysql_host" id="mysql_host" value="<?php echo htmlspecialchars($mysql_host); ?>" required/>
</p>
<p>
<label for="mysql_database"><?php echo $lng['install']['mysql_database']; ?>:</label>&nbsp;
<input type="text" name="mysql_database" id="mysql_database" value="<?php echo htmlspecialchars($mysql_database); ?>" required/>
</p>
<p>
<label for="mysql_unpriv_user"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_user']; ?>:</label>&nbsp;
<input type="text" name="mysql_unpriv_user" id="mysql_unpriv_user" value="<?php echo htmlspecialchars($mysql_unpriv_user); ?>" required/>
</p>
<p>
<label for="mysql_unpriv_pass"<?php echo ((!empty($_POST['installstep']) && $mysql_unpriv_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_pass']; ?>:</label>&nbsp;
<input type="password" name="mysql_unpriv_pass" id="mysql_unpriv_pass" value="<?php echo htmlspecialchars($mysql_unpriv_pass); ?>" required/>
</p>
<p>
<label for="mysql_root_user"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_root_user']; ?>:</label>&nbsp;
<input type="text" name="mysql_root_user" id="mysql_root_user" value="<?php echo htmlspecialchars($mysql_root_user); ?>" required/>
</p>
<p>
<label for="mysql_root_pass"<?php echo ((!empty($_POST['installstep']) && $mysql_root_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_root_pass']; ?>:</label>&nbsp;
<input type="password" name="mysql_root_pass" id="mysql_root_pass" value="<?php echo htmlspecialchars($mysql_root_pass); ?>" required/>
</p>
<p>
<strong><?php echo $lng['install']['admin_account']; ?></strong>
</p>
<p>
<label for="admin_user"><?php echo $lng['install']['admin_user']; ?>:</label>&nbsp;
<input type="text" name="admin_user" id="admin_user" value="<?php echo htmlspecialchars($admin_user); ?>" required/>
</p>
<p>
<label for="admin_pass1"<?php echo ((!empty($_POST['installstep']) && ($admin_pass1 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass']; ?>:</label>&nbsp;
<input type="password" name="admin_pass1" id="admin_pass1" value="<?php echo htmlspecialchars($admin_pass1); ?>" required/>
</p>
<p>
<label for="admin_pass2"<?php echo ((!empty($_POST['installstep']) && ($admin_pass2 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass_confirm']; ?>:</label>&nbsp;
<input type="password" name="admin_pass2" id="admin_pass2" value="<?php echo htmlspecialchars($admin_pass2); ?>" required/>
</p>
<p>
<strong><?php echo $lng['install']['serversettings']; ?></strong>
</p>
<p>
<label for="servername"<?php echo ((!empty($_POST['installstep']) && $servername == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['servername']; ?>:</label>&nbsp;
<input type="text" name="servername" id="servername" value="<?php echo htmlspecialchars($servername); ?>" required/>
</p>
<p>
<label for="serverip"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['serverip']; ?>:</label>&nbsp;
<input type="text" name="serverip" id="serverip" value="<?php echo htmlspecialchars($serverip); ?>" required/>
</p>
<p>
<label for="apache"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> Apache:</label>&nbsp;
<input type="radio" name="webserver" id="apache" value="apache2" <?php echo $webserver == "apache2" ? 'checked="checked"' : "" ?>/>Apache2
</p>
<p>
<label for="lighty"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> LigHTTPd:</label>&nbsp;
<input type="radio" name="webserver" id="lighty" value="lighttpd" <?php echo $webserver == "lighttpd" ? 'checked="checked"' : "" ?>/>LigHTTPd
</p>
<p>
<label for="nginx"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> Nginx:</label>&nbsp;
<input type="radio" name="webserver" id="nginx" value="nginx" <?php echo $webserver == "nginx" ? 'checked="checked"' : "" ?>/>Nginx
</p>
<p>
<label for="httpuser"<?php echo ((!empty($_POST['installstep']) && $httpuser == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpuser']; ?>:</label>&nbsp;
<input type="text" name="httpuser" id="httpuser" value="<?php $posixusername = posix_getpwuid(posix_getuid()); echo $posixusername['name']; ?>" required/>
</p>
<p>
<label for="httpgroup"<?php echo ((!empty($_POST['installstep']) && $httpgroup == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpgroup']; ?>:</label>&nbsp;
<input type="text" name="httpgroup" id="httpgroup" value="<?php $posixgroup = posix_getgrgid(posix_getgid()); echo $posixgroup['name']; ?>" required/>
</p>
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="hidden" name="language" value="<?php echo htmlspecialchars($language); ?>"/>
<input type="hidden" name="installstep" value="1"/>
<input class="bottom" type="submit" name="submitbutton" value="<?php echo $lng['install']['next']; ?>"/>
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>
</section>
</article>
<?php
page_footer();
}
else
{
requirement_checks();
}
}
/**
* END INSTALL ---------------------------------------------------
*/
$frxinstall = new FroxlorInstall();
$frxinstall->run();

File diff suppressed because it is too large Load Diff

View File

@@ -17,86 +17,68 @@
*
*/
/**
* Begin
*/
$lng['requirements']['title'] = 'Checking system requirements...';
$lng['requirements']['installed'] = 'installed';
$lng['requirements']['not_true'] = 'no';
$lng['requirements']['notfound'] = 'not found';
$lng['requirements']['notinstalled'] = 'not installed';
$lng['requirements']['activated'] = 'enabled';
$lng['requirements']['phpversion'] = 'PHP version >= 5.2';
$lng['requirements']['phpmagic_quotes_runtime'] = 'magic_quotes_runtime...';
$lng['requirements']['phpmagic_quotes_runtime_description'] = 'PHP setting "magic_quotes_runtime" must be set to "Off". We have disabled it temporary for now please fix the coresponding php.ini.';
$lng['requirements']['phpmysql'] = 'MySQL-extension...';
$lng['requirements']['phpxml'] = 'PHP XML-extension...';
$lng['requirements']['phpfilter'] = 'PHP filter-extension...';
$lng['requirements']['phpposix'] = 'PHP posix-extension...';
$lng['requirements']['phpbcmath'] = 'PHP bcmath-extension...';
$lng['requirements']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
$lng['requirements']['openbasedir'] = 'open_basedir...';
$lng['requirements']['openbasedirenabled'] = 'Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor in the coresponding php.ini';
$lng['requirements']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Try to fix them and retry.';
$lng['requirements']['froxlor_succ_checks'] = 'All requirements are satisfied';
$lng['install']['language'] = 'Installation - Language';
$lng['install']['welcome'] = 'Welcome to Froxlor Installation';
$lng['install']['title'] = 'Froxlor install - chose language';
$lng['install']['language'] = 'Installation language';
$lng['install']['lngbtn_go'] = 'Change language';
$lng['install']['title'] = 'Froxlor install - setup';
$lng['install']['welcometext'] = 'Thank you for choosing Froxlor. Please fill out the following fields with the required information to start the installation.<br /><b>Attention:</b> If the database you chose for Froxlor already exists on your System, it will be erased with all containing data!';
$lng['install']['database'] = 'Database';
$lng['install']['mysql_hostname'] = 'MySQL-Hostname';
$lng['install']['mysql_database'] = 'MySQL-Database';
$lng['install']['database'] = 'Database connection';
$lng['install']['mysql_host'] = 'MySQL-Hostname';
$lng['install']['mysql_database'] = 'Database name';
$lng['install']['mysql_unpriv_user'] = 'Username for the unprivileged MySQL-account';
$lng['install']['mysql_unpriv_pass'] = 'Password for the unprivileged MySQL-account';
$lng['install']['mysql_root_user'] = 'Username for the MySQL-root-account';
$lng['install']['mysql_root_pass'] = 'Password for the MySQL-root-account';
$lng['install']['admin_account'] = 'Administrator Account';
$lng['install']['admin_user'] = 'Administrator Username';
$lng['install']['admin_pass'] = 'Administrator Password';
$lng['install']['admin_pass_confirm'] = 'Administrator-Password (confirm)';
$lng['install']['admin_pass1'] = 'Administrator Password';
$lng['install']['admin_pass2'] = 'Administrator-Password (confirm)';
$lng['install']['serversettings'] = 'Server settings';
$lng['install']['servername'] = 'Server name (FQDN)';
$lng['install']['servername'] = 'Server name (FQDN, no ip-address)';
$lng['install']['serverip'] = 'Server IP';
$lng['install']['webserver'] = 'Webserver';
$lng['install']['apache2'] = 'Apache 2';
$lng['install']['lighttpd'] = 'LigHTTPd';
$lng['install']['nginx'] = 'NGINX';
$lng['install']['httpuser'] = 'HTTP username';
$lng['install']['httpgroup'] = 'HTTP groupname';
$lng['install']['apacheversion'] = 'Apacheversion';
$lng['install']['next'] = 'Next';
$lng['install']['installdata'] = 'Installation - Data';
/**
* Progress
*/
$lng['install']['testing_mysql'] = 'Testing if MySQL-root-username and password are correct...';
$lng['install']['erasing_old_db'] = 'Erasing old Database...';
$lng['install']['backup_old_db'] = 'Create backup of the old Database...';
$lng['install']['backing_up'] = 'Backing up';
$lng['install']['backing_up_binary_missing'] = '/usr/bin/mysqldump is missing';
$lng['install']['create_mysqluser_and_db'] = 'Creating MySQL-database and username...';
$lng['install']['testing_new_db'] = 'Testing if MySQL-database and username have been created correctly...';
$lng['install']['importing_data'] = 'Importing data into MySQL-database...';
$lng['install']['changing_data'] = 'Changing imported data...';
$lng['install']['adding_admin_user'] = 'Adding Administrator Account...';
$lng['install']['testing_mysql'] = 'Checking MySQL-root access...';
$lng['install']['backup_old_db'] = 'Creating backup of old database...';
$lng['install']['backup_binary_missing'] = 'Could not find mysqldump';
$lng['install']['backup_failed'] = 'Could not backup database';
$lng['install']['prepare_db'] = 'Preparing database...';
$lng['install']['create_mysqluser_and_db'] = 'Creating database and username...';
$lng['install']['testing_new_db'] = 'Testing if database and user have been created correctly...';
$lng['install']['importing_data'] = 'Importing data...';
$lng['install']['changing_data'] = 'Adjusting settings...';
$lng['install']['creating_entries'] = 'Inserting new values...';
$lng['install']['adding_admin_user'] = 'Creating admin-account...';
$lng['install']['creating_configfile'] = 'Creating configfile...';
$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php was saved in lib/.';
$lng['install']['creating_configfile_temp'] = 'File was saved in /tmp/userdata.inc.php, please move to lib/.';
$lng['install']['creating_configfile_failed'] = 'Cannot create lib/userdata.inc.php, please create it manually with the following data:';
$lng['install']['creating_configfile_failed'] = 'Could not create lib/userdata.inc.php, please create it manually with the following content:';
$lng['install']['froxlor_succ_installed'] = 'Froxlor was installed successfully.';
$lng['install']['click_here_to_login'] = 'Click here to login.';
$lng['install']['phpmysql'] = 'Testing if PHP MySQL-extension is installed...';
$lng['install']['phpfilter'] = 'Testing if PHP filter-extension is installed...';
$lng['install']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Aborting...';
$lng['install']['notinstalled'] = 'not installed!';
$lng['install']['phpbcmath'] = 'Testing if PHP bcmath-extension is installed...';
$lng['install']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
$lng['install']['openbasedir'] = 'Testing if open_basedir is enabled...';
$lng['install']['openbasedirenabled'] = 'enabled. Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor';
/**
* Renamed in 1.2.19-svn40
*/
$lng['install']['webserver'] = 'Webserver';
/*
* Added in Froxlor 0.9
*/
$lng['install']['phpversion'] = 'Checking for PHP version >= 5.2';
$lng['install']['phpposix'] = 'Testing if PHP posix-extension is installed...';
/*
* Added in Froxlor 0.9.4
*/
$lng['install']['click_here_to_refresh'] = 'Re-check';
$lng['install']['click_here_to_continue'] = 'Continue installation';
$lng['install']['froxlor_succ_checks'] = 'All requirements are satisfied';
/*
* Added in Froxlor 0.9.13
*/
$lng['install']['phpmagic_quotes_runtime'] = 'Checking whether magic_quotes_runtime is off';
$lng['install']['active'] = 'no';
$lng['install']['phpmagic_quotes_runtime_description'] = 'PHP setting "magic_quotes_runtime" must be set to "Off" in order to avoid strange behavior of Froxlor. Disabling it for now (this is only temporary, please fix our php.ini).';
$lng['install']['phpxml'] = 'Testing if PHP XML-extension is installed...';
?>
$lng['click_here_to_refresh'] = 'Click here to check again';
$lng['click_here_to_continue'] = 'Click here to continue';
$lng['click_here_to_login'] = 'Click here to login.';

View File

@@ -1,73 +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 Tim Zielosko <mail@zielosko.net>
* @author Romain MARIADASSOU <roms2000@free.fr>
* @author Froxlor Team <team@froxlor.org>
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
*
*/
/**
* Begin
*/
$lng['install']['language'] = 'Langue d\'installation';
$lng['install']['welcome'] = 'Bienvenue <20> l\'installation de Froxlor';
$lng['install']['welcometext'] = 'Merci beaucoup d\'avoir choisi Froxlor. Pour installer Froxlor remplissez les cases ci-dessous avec les informations demand<6E>es.<br /><b>Attention :</b> Si vous entrez le nom d\'une base de donn<6E>es existante, celle-ci sera effac<61>e !';
$lng['install']['database'] = 'Base de donn<6E>es';
$lng['install']['mysql_hostname'] = 'Nom d\'h<>te du serveur MySQL';
$lng['install']['mysql_database'] = 'Base de donn<6E>es MySQL';
$lng['install']['mysql_unpriv_user'] = 'Utilisateur pour l\'acc<63>s non privil<69>gi<67> <20> MySQL';
$lng['install']['mysql_unpriv_pass'] = 'Mot de passe pour l\'acc<63>s non privil<69>gi<67> <20> MySQL';
$lng['install']['mysql_root_user'] = 'Utilisateur pour l\'acc<63>s root <20> MySQL';
$lng['install']['mysql_root_pass'] = 'Mot de passe pour l\'acc<63>s root <20> MySQL';
$lng['install']['admin_account'] = 'Acc<63>s administratif';
$lng['install']['admin_user'] = 'Login de l\'administrateur';
$lng['install']['admin_pass'] = 'Mot de passe de l\'administrateur';
$lng['install']['admin_pass_confirm'] = 'Mot de passe de l\'administrateur (confirmation)';
$lng['install']['serversettings'] = 'Configuration du serveur';
$lng['install']['servername'] = 'Nom du serveur (FQDN)';
$lng['install']['serverip'] = 'Adresse IP du serveur';
$lng['install']['apacheversion'] = 'Version du serveur Apache';
$lng['install']['next'] = 'Continuer';
$lng['install']['installdata'] = 'Installation - Data';
/**
* Progress
*/
$lng['install']['testing_mysql'] = 'V<>rification du login root de MySQL ...';
$lng['install']['erasing_old_db'] = 'Effacement de l\'ancienne base de donn<6E>es ...';
$lng['install']['create_mysqluser_and_db'] = 'Cr<43>ation de la base de donn<6E>es puis des utilisateurs ...';
$lng['install']['testing_new_db'] = 'V<>rification de la base de donn<6E>es et des utilisateurs ...';
$lng['install']['importing_data'] = 'Importation des informations dans la base de donn<6E>es ...';
$lng['install']['changing_data'] = 'Modification des donn<6E>es import<72>s ...';
$lng['install']['adding_admin_user'] = 'Ajout de l\'utilisateur administrateur ...';
$lng['install']['creating_configfile'] = 'Cr<43>ation du fichier de configuration ...';
$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php a <20>t<EFBFBD> sauvegard<72> dans le dossier lib/ de Froxlor.';
$lng['install']['creating_configfile_temp'] = 'Le fichier a <20>t<EFBFBD> sauvegard<72> dans /tmp/userdata.inc.php, veuillez le d<>placer / copier dans le dossier lib/ de Froxlor.';
$lng['install']['creating_configfile_failed'] = 'Erreur en cr<63>ant le fichier lib/userdata.inc.php, veuillez le cr<63>er avec le contenu ci-dessous :';
$lng['install']['froxlor_succ_installed'] = 'Froxlor a <20>t<EFBFBD> install<6C> correctement.';
$lng['install']['click_here_to_login'] = 'Cliquez ici pour vous rendre <20> l\'invite de connexion.';
$lng['install']['httpuser'] = 'Nom du utilisateur du HTTP';
$lng['install']['httpgroup'] = 'Nom du la group du HTTP';
/**
* Renamed in 1.2.19-svn40
*/
$lng['install']['webserver'] = 'Version du serveur';
$lng['install']['phpxml'] = 'Tester si PHP XML-extension est install<6C>e...';
?>

View File

@@ -2,101 +2,83 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2007 the SysCP Team (see authors).
* 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.syscp.org/misc/COPYING.txt
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2007)
* @author Froxlor Team <team@froxlor.org> (2010-)
* @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 Language
*
*/
/**
* Begin
*/
$lng['requirements']['title'] = 'Prüfe Systemvoraussetzungen...';
$lng['requirements']['installed'] = 'installiert';
$lng['requirements']['not_true'] = 'nein';
$lng['requirements']['notfound'] = 'nicht gefunden';
$lng['requirements']['notinstalled'] = 'nicht installiert';
$lng['requirements']['activated'] = 'ist aktiviert.';
$lng['requirements']['phpversion'] = 'PHP Version >= 5.2';
$lng['requirements']['phpmagic_quotes_runtime'] = 'magic_quotes_runtime';
$lng['requirements']['phpmagic_quotes_runtime_description'] = 'Die PHP Einstellung "magic_quotes_runtime" muss deaktiviert sein ("Off"). Die Einstellung wurde temporär deaktiviert, bitte ändern Sie diese in der entsprechenden php.ini.';
$lng['requirements']['phpmysql'] = 'PHP MySQL-Erweiterung...';
$lng['requirements']['phpxml'] = 'PHP XML-Erweiterung...';
$lng['requirements']['phpfilter'] = 'PHP filter-Erweiterung...';
$lng['requirements']['phpposix'] = 'PHP posix-Erweiterung...';
$lng['requirements']['phpbcmath'] = 'PHP bcmath-Erweiterung...';
$lng['requirements']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollständig zur Verfügung!';
$lng['requirements']['openbasedir'] = 'open_basedir genutzt wird...';
$lng['requirements']['openbasedirenabled'] = 'Froxlor wird mit aktiviertem open_basedir nicht vollständig funktionieren. Bitte deaktivieren Sie open_basedir für Froxlor in der entsprechenden php.ini';
$lng['requirements']['diedbecauseofrequirements'] = 'Kann Froxlor ohne diese Voraussetzungen nicht installieren! Versuchen Sie die angezeigten Problem zu beheben und versuchen Sie es erneut.';
$lng['requirements']['froxlor_succ_checks'] = 'Alle Vorraussetzungen sind erfüllt';
$lng['install']['language'] = 'Installations - Sprache';
$lng['install']['welcome'] = 'Willkommen zur Froxlor Installation';
$lng['install']['welcometext'] = 'Vielen Dank dass Sie sich f&uuml;r Froxlor entschieden haben. Um Ihre Installation von Froxlor zu starten, f&uuml;llen Sie bitte alle Felder unten mit den geforderten Angaben.<br /><b>Achtung:</b> Eine eventuell bereits existierende Datenbank, die den selben Namen hat wie den, den Sie unten eingeben werden, wird mit allen enthaltenen Daten gel&ouml;scht!';
$lng['install']['database'] = 'Datenbank';
$lng['install']['mysql_hostname'] = 'MySQL-Hostname';
$lng['install']['mysql_database'] = 'MySQL-Datenbank';
$lng['install']['mysql_unpriv_user'] = 'Benutzername f&uuml;r den unprivilegierten MySQL-Account';
$lng['install']['mysql_unpriv_pass'] = 'Passwort f&uuml;r den unprivilegierten MySQL-Account';
$lng['install']['mysql_root_user'] = 'Benutzername f&uuml;r den MySQL-Root-Account';
$lng['install']['mysql_root_pass'] = 'Passwort f&uuml;r den MySQL-Root-Account';
$lng['install']['lngtitle'] = 'Froxlor Installation - Sprache auswählen';
$lng['install']['language'] = 'Sprache für die Installation';
$lng['install']['lngbtn_go'] = 'Sprache ändern';
$lng['install']['title'] = 'Froxlor Installation - Einrichtung';
$lng['install']['welcometext'] = 'Vielen Dank dass Sie sich für Froxlor entschieden haben. Um die Installation von Froxlor zu starten, füllen Sie bitte alle Felder mit den geforderten Angaben aus.<br /><b>Achtung:</b> Eine eventuell existierende Datenbank, die den selben Namen hat wie den Gewählten, wird mit allen enthaltenen Daten gelöscht!';
$lng['install']['database'] = 'Datenbankverbindung';
$lng['install']['mysql_host'] = 'MySQL-Hostname';
$lng['install']['mysql_database'] = 'Datenbank Name';
$lng['install']['mysql_unpriv_user'] = 'Benutzername für den unprivilegierten MySQL-Account';
$lng['install']['mysql_unpriv_pass'] = 'Passwort für den unprivilegierten MySQL-Account';
$lng['install']['mysql_root_user'] = 'Benutzername für den MySQL-Root-Account';
$lng['install']['mysql_root_pass'] = 'Passwort für den MySQL-Root-Account';
$lng['install']['admin_account'] = 'Admin-Zugang';
$lng['install']['admin_user'] = 'Administrator-Benutzername';
$lng['install']['admin_pass'] = 'Administrator-Passwort';
$lng['install']['admin_pass_confirm'] = 'Administrator-Passwort (Best&auml;tigung)';
$lng['install']['admin_pass1'] = 'Administrator-Passwort';
$lng['install']['admin_pass2'] = 'Administrator-Passwort (Bestätigung)';
$lng['install']['serversettings'] = 'Servereinstellungen';
$lng['install']['servername'] = 'Servername (FQDN)';
$lng['install']['servername'] = 'Servername (FQDN, keine IP-Adresse)';
$lng['install']['serverip'] = 'Server-IP';
$lng['install']['apacheversion'] = 'Apacheversion';
$lng['install']['next'] = 'Fortfahren';
$lng['install']['installdata'] = 'Installation - Daten';
/**
* Progress
*/
$lng['install']['testing_mysql'] = 'Teste, ob die MySQL-Root-Benutzerdaten richtig sind...';
$lng['install']['erasing_old_db'] = 'Entferne alte Datenbank...';
$lng['install']['backup_old_db'] = 'Sichere bisherige Datenbank...';
$lng['install']['backing_up'] = 'Sicherung l&auml;ft';
$lng['install']['backing_up_binary_missing'] = '/usr/bin/mysqldump nicht vorhanden';
$lng['install']['create_mysqluser_and_db'] = 'Erstelle Datenbank und Benutzer...';
$lng['install']['testing_new_db'] = 'Teste, ob die Datenbank und Passwort korrekt angelegt wurden...';
$lng['install']['importing_data'] = 'Importiere Daten in die MySQL-Datenbank...';
$lng['install']['changing_data'] = 'Passe die importierten Daten an...';
$lng['install']['adding_admin_user'] = 'F&uuml;ge den Admin-Benutzer hinzu...';
$lng['install']['creating_configfile'] = 'Erstelle Konfigurationsdatei...';
$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php wurde in lib/ gespeichert.';
$lng['install']['creating_configfile_temp'] = 'Datei wurde in /tmp/userdata.inc.php gespeichert, bitte nach lib/ verschieben.';
$lng['install']['creating_configfile_failed'] = 'Konnte lib/userdata.inc.php nicht erstellen, bitte manuell mit folgendem Inhalt anlegen:';
$lng['install']['froxlor_succ_installed'] = 'Froxlor wurde erfolgreich installiert.';
$lng['install']['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.';
$lng['install']['phpmysql'] = 'Teste, ob die PHP MySQL-Erweiterung installiert ist...';
$lng['install']['phpfilter'] = 'Teste, ob die PHP Filter-Erweiterung installiert ist...';
$lng['install']['diedbecauseofrequirements'] = 'Kann Froxlor ohne diese Voraussetzungen nicht installieren! Breche ab...';
$lng['install']['notinstalled'] = 'nicht installiert!';
$lng['install']['phpbcmath'] = 'Teste, ob die PHP bcmath-Erweiterung installiert ist...';
$lng['install']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollst&auml;ndig zur Verf&uuml;gung!';
$lng['install']['openbasedir'] = 'Teste, ob open_basedir genutzt wird...';
$lng['install']['openbasedirenabled'] = 'aktiviert. Froxlor wird mit aktiviertem open_basedir nicht vollst&auml;ndig funktionieren. Bitte deaktivieren Sie open_basedir f&uuml;r Froxlor';
$lng['install']['webserver'] = 'Webserver';
$lng['install']['apache2'] = 'Apache 2';
$lng['install']['lighttpd'] = 'LigHTTPd';
$lng['install']['nginx'] = 'NGINX';
$lng['install']['httpuser'] = 'HTTP Username';
$lng['install']['httpgroup'] = 'HTTP Gruppenname';
/**
* Renamed in 1.2.19-svn40
*/
$lng['install']['testing_mysql'] = 'Teste MySQL-Root Zugang...';
$lng['install']['backup_old_db'] = 'Sicherung vorheriger Datenbank...';
$lng['install']['backup_binary_missing'] = 'Konnte mysqldump nicht finden';
$lng['install']['backup_failed'] = 'Sicherung fehlgeschlagen';
$lng['install']['prepare_db'] = 'Datenbank wird vorbereitet...';
$lng['install']['create_mysqluser_and_db'] = 'Erstelle Datenbank und Benutzer...';
$lng['install']['testing_new_db'] = 'Teste, ob Datenbank und Benutzer korrekt angelegt wurden...';
$lng['install']['importing_data'] = 'Importiere Daten...';
$lng['install']['changing_data'] = 'Einstellungen anpassen...';
$lng['install']['creating_entries'] = 'Trage neue Werte ein...';
$lng['install']['adding_admin_user'] = 'Erstelle Admin-Benutzer...';
$lng['install']['creating_configfile'] = 'Erstelle Konfigurationsdatei...';
$lng['install']['creating_configfile_temp'] = 'Datei wurde in /tmp/userdata.inc.php gespeichert, bitte nach lib/ verschieben.';
$lng['install']['creating_configfile_failed'] = 'Konnte lib/userdata.inc.php nicht erstellen, bitte manuell mit folgendem Inhalt anlegen:';
$lng['install']['froxlor_succ_installed'] = 'Froxlor wurde erfolgreich installiert.';
$lng['install']['webserver'] = 'Webserver';
/*
* Added in Froxlor 0.9
*/
$lng['install']['phpversion'] = 'Pr&uuml;fe PHP Version >= 5.2';
$lng['install']['phpposix'] = 'Teste, ob die PHP Posix-Erweiterung installiert ist...';
/*
* Added in Froxlor 0.9.4
*/
$lng['install']['click_here_to_refresh'] = 'Erneut pr&uuml;fen';
$lng['install']['click_here_to_continue'] = 'Installation fortf&uuml;hren';
$lng['install']['froxlor_succ_checks'] = 'Alle Vorraussetzungen sind erf&uuml;llt';
/*
* Added in Froxlor 0.9.13
*/
$lng['install']['phpmagic_quotes_runtime'] = 'Pr&uuml;fe ob magic_quotes_runtime ausgeschalten ist';
$lng['install']['active'] = 'nein';
$lng['install']['phpmagic_quotes_runtime_description'] = 'Die PHP Einstellung "magic_quotes_runtime" muss deaktiviert sein ("Off"), um merkw&uuml;rdige Verhalten von Froxlor zu umgehen. Sie wurde deaktiviert (nur tempor&auml;r, bitte php.ini anpassen).';
$lng['install']['phpxml'] = 'Teste, ob die PHP XML-Erweiterung installiert ist...';
?>
$lng['click_here_to_refresh'] = 'Hier klicken, um erneut zu prüfen';
$lng['click_here_to_continue'] = 'Installation fortführen';
$lng['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.';

View File

@@ -0,0 +1,531 @@
@charset "UTF-8";
/* RESET */
html,body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input { margin:0; padding:0; }
h1,h2,h3,h4,h5,h6,pre,code,address,caption,cite,code,em,strong,th { font-size:1em; font-weight:400; font-style:normal; }
ul,ol { list-style:none; }
fieldset,img { border:none; }
caption,th { text-align:left; }
table { border-collapse:collapse; border-spacing:0; }
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section { display:block; }
/* TYPE */
html,body {
font:12px/18px Helvetica,Arial,Verdana,sans-serif;
background-color:#f2f2f2;
color:#333;
-webkit-font-smoothing: antialiased;
}
body {
margin:0;
padding:0;
}
.dark {
background-color: #e9edf0;
border-bottom:1px solid #d1d5d8;
}
header img {
padding:10px 0 10px 10px;
}
h1 {
display:none;
}
h2, h3 {
margin: 0 0 1em 0;
padding: 0;
font-weight: bold;
}
h2 {
font-size:17px;
}
h3 {
font-size: 15px;
}
img {
border:0;
vertical-align:middle;
}
td a {
text-decoration:none;
}
.bradius {
border-radius: 5px 5px 5px 5px;
box-shadow: rgba(0, 0, 0, 0.34902) 0px 1px 3px 0px;
}
/* FOOTER */
footer {
clear:both;
text-align:center;
color: #888;
font-size:10px !important;
margin: 10px 0;
}
footer a,footer a:active,footer a:visited {
color: #888;
}
.install {
background-color:#fff;
margin: 20px;
margin-left: auto;
margin-right: auto;
margin-bottom: 12px;
width: 800px;
}
p {
margin: 0 10px !important;
}
.installsec {
margin-top:10px;
padding:0;
text-align:left;
}
.installsec table {
width:100%;
padding:0 10px;
margin: 15px 0 15px 0;
}
.installsec h2 {
display: block;
border-bottom: 1px solid #d1d5d8;
margin: 0;
padding: 5px 15px 15px 15px;
}
.installsec form {
width:800px;
margin:0 auto;
padding:10px 0 0;
text-align:left;
}
.installsec fieldset {
border:0;
float:left;
clear:left;
width:600px;
margin:0 100px 10px;
padding:0;
}
.installsec legend {
display:none;
}
.installsec label {
float:left;
width:26em;
margin-right:1em;
margin-top:6px;
text-align:left;
}
p.submit {
text-align:right;
padding-right:46px;
}
.installsec aside {
border-top:1px solid #d1d5d8;
clear:both;
float:none;
width:auto;
text-align: right;
padding: 10px;
}
.line {
border: 0;
width: 800px;
border-bottom:1px solid #d1d5d8;
}
.messagewrapper {
width:650px;
margin:0 auto;
padding:120px 0 0;
overflow:hidden;
}
.messagewrapperfull {
width:100%;
margin:0 auto;
padding:0;
overflow:hidden;
}
.overviewsearch {
position:absolute;
top:155px;
right:36px;
font-size:80%;
}
.overviewadd {
padding:10px;
font-weight:700;
}
/*
* error message display
*/
.errorcontainer {
background:url(../img/icons/error_big.png) 10px center no-repeat #ffedef;
border:1px solid #ffc2ca;
padding:10px 10px 10px 68px!important;
margin: 10px 0 10px 0 !important;
text-align:left!important;
overflow:hidden;
box-shadow: 0px 0px 0px black;
}
.errortitle {
font-weight:700;
color:#c00!important;
}
.error {
font-weight:400!important;
color:#c00!important;
}
/*
* warning message display
*/
.warningcontainer,.ui-dialog {
background:url(../img/icons/warning_big.png) 10px center no-repeat #fffecc;
border:1px solid #f3c37e;
padding:10px 10px 10px 68px !important;
margin: 10px 0 10px 0 !important;
text-align:left!important;
overflow:hidden;
box-shadow: 0px 0px 0px black;
}
.ui-dialog {
padding: 10px !important;
}
.warningtitle,.ui-dialog-titlebar {
font-weight:700;
color:#D57D00;
}
.warning,.ui-dialog-content {
color:#D57D00!important;
}
/*
* success message display
*/
.successcontainer {
background:url(../img/icons/ok_big.png) 10px center no-repeat #E2F9E3;
border:1px solid #9C9;
padding:10px 10px 10px 68px!important;
margin: 10px 0 10px 0 !important;
text-align:left!important;
overflow:hidden;
box-shadow: 0px 0px 0px black;
}
.successtitle {
font-weight:700;
color:#060!important;
}
.success {
font-weight:400!important;
}
/*
* neutral/info message display
*/
.neutralcontainer {
background:url(../img/icons/info_big.png) 10px center no-repeat #d2eaf6;
border:1px solid #b7d8ed;
padding:10px 10px 10px 68px!important;
margin: 10px 0 10px 0 !important;
text-align:left!important;
overflow:hidden;
box-shadow: 0px 0px 0px black;
}
.neutraltitle {
font-weight:700;
color:#3188c1!important;
}
.neutral {
font-weight:400!important;
color:#3188c1!important;
}
/* std hyperlink */
a,a:active,a:visited {
color:#176fa1;
text-decoration:none;
}
a:hover {
text-decoration:underline;
}
.infotext {
font-size:11px;
}
/*
* main container
*/
.main {
margin-left:240px;
margin-right:10px;
margin-top:105px;
margin-bottom:0;
background-color:#fff;
padding: 30px 30px 30px 30px;
min-height:400px;
}
.noborder {
width:100%;
border-spacing:0;
border-collapse:separate;
border: 0;
}
.noborder td {
border:0;
}
table {
width:100%;
border-spacing:0;
border:1px solid #d1d5d8;
border-collapse:separate;
box-shadow:0px 0px 0px black !important;
}
table thead th, table th {
border-top: 1px solid #d1d5d8;
border-bottom: 1px solid #d1d5d8;
height: 25px !important;
padding: 5px 0px 5px 8px;
background-color: #e9edf0;
font-weight: bold;
}
table thead:first-child th, table:first-child th {
border-top: none !important;
}
table th {
border-top: 0;
}
th a:hover {
text-decoration: none;
}
th a img {
}
th a:nth-child(odd) img {
position: relative;
top: -5px;
left: 4px;
}
th a:nth-child(even) img {
position: relative;
top: 3px;
left: -7px;
}
table thead:first-child th {
border-top: 0;
}
.disabled td, .disabled td a {
color: #cfcfcf;
}
table tbody td {
border-bottom:1px dotted #ccc;
}
table tbody tr:last-child td {
border-bottom: 0;
}
.formtable {
width: 100%;
border-spacing:0;
border:0;
border-collapse:separate;
margin:0 0 0;
}
.formtable tbody td {
border:0;
border-bottom:1px dotted #ccc;
min-height: 20px;
}
.formtable label {
float:none;
display:block;
padding:0;
margin:0;
width:100%;
text-align:left;
}
td {
padding-top:5px;
padding-left:10px;
padding-right: 10px;
padding-bottom:5px;
min-height: 20px;
}
table tfoot td {
height:25px;
border-top: 1px solid #d1d5d8;
background-color: #f2f8fa;
}
.tfootleft {
text-align:left;
}
.maintitle {
padding-top:20px;
}
/* input elements */
input {
background: #fff url(../img/text_align_left.png) no-repeat 5px 4px;
padding:2px 4px 2px 24px;
height:22px;
border: 1px solid #d9d9d9;
margin-bottom: 5px;
}
textarea {
background:#fff url(../img/text_align_left.png) no-repeat 5px 4px;
padding:4px 4px 2px 24px;
border:1px solid #d9d9d9;
margin-bottom: 5px;
}
input[type="password"] {
background:#fff url(../img/password.png) no-repeat 5px 4px;
}
input[type="button"],input[type="submit"],input[type="reset"] {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #79bbff), color-stop(1, #378de5) );
background:-moz-linear-gradient( center top, #79bbff 5%, #378de5 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#79bbff', endColorstr='#378de5');
background-color:#79bbff;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
display:inline-block;
color:#ffffff;
padding:2px 24px 2px 24px;
text-decoration:none;
text-shadow:1px 1px 0px #528ecc;
height: 26px;
margin: 0 3px 0 3px;
}
input[type="button"]:hover,input[type="submit"]:hover,input[type="reset"]:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #378de5), color-stop(1, #79bbff) );
background:-moz-linear-gradient( center top, #378de5 5%, #79bbff 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#378de5', endColorstr='#79bbff');
background-color:#378de5;
}
input[type="submit"],input[class="yesbutton"] {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #9dce2c), color-stop(1, #8cb82b) );
background:-moz-linear-gradient( center top, #9dce2c 5%, #8cb82b 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9dce2c', endColorstr='#8cb82b');
background-color:#9dce2c;
text-shadow:1px 1px 0px #aade7c;
}
input[type="submit"]:hover,input[class="yesbutton"]:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c) );
background:-moz-linear-gradient( center top, #8cb82b 5%, #9dce2c 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8cb82b', endColorstr='#9dce2c');
background-color:#8cb82b;
}
input[class="nobutton"],input[type="reset"] {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #fe1a00), color-stop(1, #ce0100) );
background:-moz-linear-gradient( center top, #fe1a00 5%, #ce0100 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fe1a00', endColorstr='#ce0100');
background-color:#fe1a00;
text-shadow:1px 1px 0px #b23e35;
}
input[class="nobutton"]:hover,input[type="reset"]:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ce0100), color-stop(1, #fe1a00) );
background:-moz-linear-gradient( center top, #ce0100 5%, #fe1a00 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ce0100', endColorstr='#fe1a00');
background-color:#ce0100;
}
input[type="checkbox"] {
background:#dae7ee;
padding: 0;
margin: 0 20px 0 0;
}
input[type="radio"] { /*the span element that immediately follow the radio button */
margin: 0 10px 0 10px;
height:22px;
}
select {
background:#fff;
padding:4px;
border:1px solid #d9d9d9;
margin-bottom: 5px;
}
.maintable {
width:90%;
}
.update_progess {
padding:2em;
text-align:left;
}
.preconfig {
text-align:left;
margin-top:20px;
margin-bottom:5px;
margin-right:15px;
margin-left:15px;
}
.preconfigitem {
padding:.15em;
border-bottom:1px solid #ccc;
}
.preconfdesc {
display:block;
margin-bottom:.5em;
font-size:120%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

10
install/templates/dataform.tpl Executable file
View File

@@ -0,0 +1,10 @@
<p style="margin: 20px 20px 0 !important">{$this->_lng['install']['title']}</p>
<form action="{$formaction}" method="get">
<fieldset>
{$formdata}
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="submit" name="chooselang" value="{$this->_lng['install']['btn_go']}" />
</p>
</fieldset>
</form>

13
install/templates/dataform2.tpl Executable file
View File

@@ -0,0 +1,13 @@
<p style="margin: 20px 20px 0 !important">{$this->_lng['install']['welcometext']}</p>
<form action="{$formaction}" method="post">
<hr class="line">
<fieldset>
{$formdata}
</fieldset>
<aside>
<input type="hidden" name="check" value="1" />
<input type="hidden" name="language" value="{$language}" />
<input type="hidden" name="installstep" value="1" />
<input class="bottom" type="submit" name="submitbutton" value="{$this->_lng['click_here_to_continue']}" />
</aside>
</form>

4
install/templates/dataitem.tpl Executable file
View File

@@ -0,0 +1,4 @@
<p>
<label for="{$fieldname}" style="width:65%;{$style}">{$fieldlabel}:</label>&nbsp;
<input type="{$type}" name="{$fieldname}" id="{$fieldname}" value="{$fieldvalue}" {$required} />
</p>

View File

@@ -0,0 +1,4 @@
<p>
<label for="{$fieldname}" style="width:65%;{$style}">{$this->_lng['install']['webserver']} {$fieldlabel}:</label>
<input type="radio" name="webserver" id="{$fieldname}" value="{$fieldname}" {$checked} /><span>{$fieldlabel}<span>
</p>

View File

@@ -0,0 +1,2 @@
<br />
<h3>{$section}</h3>

7
install/templates/footer.tpl Executable file
View File

@@ -0,0 +1,7 @@
</div>
<footer>
<span> Froxlor &copy; 2009-{$current_year} by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
</span>
</footer>
</body>
</html>

18
install/templates/header.tpl Executable file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Default-Style" content="text/css" />
<!--[if lt IE 9]><script src="../js/html5shiv.js"></script><![endif]-->
<link href="templates/assets/css/install.css" rel="stylesheet" type="text/css" />
<!--[if IE]><link rel="stylesheet" href="../templates/{$theme}/css/main_ie.css" type="text/css" /><![endif]-->
<link href="templates/assets/img/favicon.ico" rel="icon" type="image/x-icon" />
<title>Froxlor Server Management Panel - Installation</title>
<style type="text/css">
body {
font-family: Verdana, Geneva, sans-serif;
}
</style>
</head>
<body>
<div class="installsec">

14
install/templates/lngform.tpl Executable file
View File

@@ -0,0 +1,14 @@
<form action="{$formaction}" method="get">
<fieldset>
<legend>{$this->_lng['install']['lngtitle']}</legend>
<p>
<label for="language">{$this->_lng['install']['language']}:</label>&nbsp;
<select name="language" id="language">
{$language_options}
</select>
<input type="hidden" name="check" value="1" />
<input type="submit" name="chooselang" value="{$this->_lng['install']['lngbtn_go']}" />
</p>
</fieldset>
</form>
<hr class="line">

11
install/templates/page.tpl Executable file
View File

@@ -0,0 +1,11 @@
<article class="install bradius">
<header class="dark">
<img src="../templates/{$theme}/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2>{$pagetitle}</h2>
{$pagecontent}
{$pagenavigation}
</section>
</article>

View File

@@ -0,0 +1,4 @@
<h3 style="color:{$msgcolor};text-align: center">{$message}</h3>
<aside>
<a href="{$link}">{$linktext}</a>
</aside>

5
install/templates/textarea.tpl Executable file
View File

@@ -0,0 +1,5 @@
<tr>
<td class="main_field_name">
<p>{$escpduserdata}</p>
</td>
</tr>

File diff suppressed because it is too large Load Diff

View File

@@ -1,60 +0,0 @@
<?php
/*
if(isFroxlorVersion('0.9'))
{
showUpdateStep("Updating from 0.9 to 1.0", false);
showUpdateStep("Converting database tables to UTF-8");
// Convert all data to UTF-8 to have a sane standard across all data
$result = $db->query("SHOW TABLES");
while($table = $db->fetch_array($result, 'num'))
{
$db->query("ALTER TABLE " . $table[0] . " CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;");
$db->query("ALTER TABLE " . $table[0] . " DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci");
$affected_columns = array();
$primarykey = "";
$columns = $db->query("SHOW COLUMNS FROM ".$table[0]);
while ($column = $db->fetch_array($columns))
{
if (!(strpos($column['Type'], "char") === false) || !(strpos($column['Type'], "text") === false))
{
$affected_columns[] = $column['Field'];
}
if ($column['Key'] == 'PRI') {
$primarykey = $column['Field'];
}
}
$count_cols = count($affected_columns);
if ($count_cols > 0)
{
$load = "";
foreach($affected_columns as $col)
{
$load .= ", `" . $col . "`";
}
$rows = $db->query("SELECT $primarykey" . $load . " FROM `" . $table[0] . "`");
while ($row = $db->fetch_array($rows))
{
$changes = "";
for ($i = 0; $i < $count_cols; $i++)
{
$base = "`" . $affected_columns[$i] . "` = '" . convertUtf8($row[$affected_columns[$i]]) . "'";
$changes .= ($i == ($count_cols-1)) ? $base : $base . ", ";
}
$db->query("UPDATE `" . $table[0] . "` SET " . $changes . " WHERE `$primarykey` = '" . $db->escape($row[$primarykey]) . "';");
}
}
}
lastStepStatus(0);
}
*/
?>

View File

@@ -49,14 +49,6 @@ function versionInUpdate($current_version, $version_to_check)
if (!isFroxlor()) {
return true;
}
$pos_a = strpos($current_version, '-svn');
$pos_b = strpos($version_to_check, '-svn');
// if we compare svn-versions, we have to add -svn0 to the version
// to compare it correctly
if($pos_a === false && $pos_b !== false)
{
$current_version.= '-svn9999';
}
return version_compare($current_version, $version_to_check, '<');
return (version_compare2($current_version, $version_to_check) == -1 ? true : false);
}

View File

@@ -26,7 +26,7 @@
*/
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
{
global $settings, $lng, $db;
global $settings, $lng, $db, $theme;
if(versionInUpdate($current_version, '0.9.4-svn2'))
{
@@ -73,9 +73,9 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$description = 'You can define a default support-ticket priority level which is pre-selected for new support-tickets.';
$question = '<strong>Which should be the default ticket-priority?:</strong>&nbsp;';
$question .= '<select name="update_deftic_priority">';
$priorities = makeoption($lng['ticket']['unf_high'], '1', '2');
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', '2');
$priorities.= makeoption($lng['ticket']['unf_low'], '3', '2');
$priorities = makeoption($lng['ticket']['high'], '1', '2');
$priorities.= makeoption($lng['ticket']['normal'], '2', '2');
$priorities.= makeoption($lng['ticket']['low'], '3', '2');
$question .= $priorities.'</select>';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
@@ -158,7 +158,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$question.= makeyesno('update_defdns_mailentry', '1', '0', '0');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.10-svn1'))
{
$has_nouser = false;
@@ -171,13 +171,13 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$has_nouser = true;
$guessed_user = 'www-data';
if(function_exists('posix_getuid')
&& function_exists('posix_getpwuid')
&& function_exists('posix_getpwuid')
) {
$_httpuser = posix_getpwuid(posix_getuid());
$guessed_user = $_httpuser['name'];
}
}
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
if(!isset($result) || !isset($result['value']))
{
@@ -185,7 +185,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$has_nogroup = true;
$guessed_group = 'www-data';
if(function_exists('posix_getgid')
&& function_exists('posix_getgrgid')
&& function_exists('posix_getgrgid')
) {
$_httpgroup = posix_getgrgid(posix_getgid());
$guessed_group = $_httpgroup['name'];
@@ -198,8 +198,8 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
if($has_nouser)
{
$question = '<strong>Please enter the webservers username:</strong>&nbsp;<input type="text" class="text" name="update_httpuser" value="'.$guessed_user.'" />';
}
elseif($has_nogroup)
}
elseif($has_nogroup)
{
$question2 = '<strong>Please enter the webservers groupname:</strong>&nbsp;<input type="text" class="text" name="update_httpgroup" value="'.$guessed_group.'" />';
if($has_nouser) {
@@ -238,7 +238,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$question.= '<input type="text" class="text" name="update_perlpath" value="/usr/bin/perl" />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.12-svn1'))
{
if($settings['system']['mod_fcgid'] == 1)
@@ -345,13 +345,13 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
}
if(versionInUpdate($current_version, '0.9.14-svn10'))
{
{
$has_preconfig = true;
$description = '<strong>This update removes the unsupported real-time option. Additionally the deprecated tables for navigation and cronscripts are removed, any modules using these tables need to be updated to the new structure!</strong>';
$description = '<strong>This update removes the unsupported real-time option. Additionally the deprecated tables for navigation and cronscripts are removed, any modules using these tables need to be updated to the new structure!</strong>';
$question = '';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.16-svn1'))
{
$has_preconfig = true;
@@ -417,16 +417,157 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
}
if(versionInUpdate($current_version, '0.9.18-svn2'))
{
{
$has_preconfig = true;
$description = 'As you can (obviously) see, Froxlor now comes with a new theme. You also have the possibility to switch back to "Classic" if you want to.';
$description = 'As you can (obviously) see, Froxlor now comes with a new theme. You also have the possibility to switch back to "Classic" if you want to.';
$question = '<strong>Select default panel theme:</strong>&nbsp;';
$question.= '<select name="update_default_theme">';
$themes = getThemes();
foreach($themes as $theme) {
$question.= makeoption($theme, $theme, 'Froxlor');
foreach($themes as $cur_theme) // $theme is already in use
{
$question.= makeoption($cur_theme, $cur_theme, 'Froxlor');
}
$question.= '</select>';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.28-svn4'))
{
$has_preconfig = true;
$description = 'This version introduces a lot of profound changes:';
$description .= '<br /><ul><li>Improving the whole template system</li><li>Full UTF-8 support</li><li><strong>Removing support for the former default theme \'Classic\'</strong></li></ul>';
$description .= '<br /><br />Notice: This update will <strong>alter your Froxlor database to use UTF-8</strong> as default charset. ';
$description .= 'Even though this is already tested, we <span style="color:#ff0000;font-weight:bold;">strongly recommend</span> to ';
$description .= 'test this update in a testing environment using your existing data.<br /><br />';
$question = '<strong>Select your preferred Classic Theme replacement:</strong>&nbsp;';
$question.= '<select name="classic_theme_replacement">';
$themes = getThemes();
foreach($themes as $cur_theme)
{
$question.= makeoption($cur_theme, $cur_theme, 'Froxlor');
}
$question.= '</select>';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.28-svn6')) {
if ($settings['system']['webserver'] == 'apache2') {
$has_preconfig = true;
$description = 'Froxlor now supports the new Apache 2.4. Please be aware that you need to load additional apache-modules in ordner to use it.<br />';
$description.= '<pre>LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so</pre><br />';
$question = '<strong>Do you want to enable the Apache-2.4 modification?:</strong>&nbsp;';
$question.= makeyesno('update_system_apache24', '1', '0', '0');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
} elseif ($settings['system']['webserver'] == 'nginx') {
$has_preconfig = true;
$description = 'The path to nginx\'s fastcgi_params file is now customizable.<br /><br />';
$question = '<strong>Please enter full path to you nginx/fastcgi_params file (including filename):</strong>&nbsp;';
$question.= '<input type="text" class="text" name="nginx_fastcgi_params" value="/etc/nginx/fastcgi_params" />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
if (versionInUpdate($current_version, '0.9.28-rc2')) {
$has_preconfig = true;
$description = 'This version adds an option to append the domain-name to the document-root for domains and subdomains.<br />';
$description .= 'You can enable or disable this feature anytime from settings -> system settings.<br />';
$question = '<strong>Do you want to automatically append the domain-name to the documentroot of newly created domains?:</strong>&nbsp;';
$question.= makeyesno('update_system_documentroot_use_default_value', '1', '0', '0');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.28')) {
$has_preconfig = true;
// just an information about the new sendmail parameter (#1134)
$description = 'Froxlor changed the default parameter-set of sendmail (php.ini)<br />';
$description .= 'sendmail_path = "/usr/sbin/sendmail -t <strong>-i</strong> -f {CUSTOMER_EMAIL}"<br /><br />';
$description .= 'If you don\'t have any problems with sending mails, you don\'t need to change this';
if ($settings['system']['mod_fcgid'] == '1'
|| $settings['phpfpm']['enabled'] == '1'
) {
// information about removal of php's safe_mode
$description .= '<br /><br />The php safe_mode flag has been removed as current versions of PHP<br />';
$description .= 'do not support it anymore.<br /><br />';
$description .= 'Please check your php-configurations and remove safe_mode-directives to avoid php notices/warnings.';
}
$question = '';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.29-dev1')) {
// we only need to ask if fcgid|php-fpm is enabled
if ($settings['system']['mod_fcgid'] == '1'
|| $settings['phpfpm']['enabled'] == '1'
) {
$has_preconfig = true;
$description = 'Standard-subdomains can now be hidden from the php-configuration overview.<br />';
$question = '<strong>Do you want to hide the standard-subdomains (this can be changed in the settings any time)?:</strong>&nbsp;';
$question.= makeyesno('hide_stdsubdomains', '1', '0', '0');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
if (versionInUpdate($current_version, '0.9.29-dev2')) {
$has_preconfig = true;
$description = 'You can now decide whether admins/customers are able to change the theme<br />';
$question = '<strong>If you want to disallow theme-changing, select "no" from the dropdowns:</strong>&nbsp;';
$question.= "Admins: ". makeyesno('allow_themechange_a', '1', '0', '1').'&nbsp;&nbsp;';
$question.= "Customers: ".makeyesno('allow_themechange_c', '1', '0', '1');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.29-dev3')) {
$has_preconfig = true;
$description = 'There is now a possibility to specify AXFR servers for your bind zone-configuration<br />';
$question = '<strong>Enter a comma-separated list of AXFR servers or leave empty (default):</strong>&nbsp;';
$question.= '<input type="text" class="text" name="system_afxrservers" value="" />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.29-dev4')) {
$has_preconfig = true;
$description = 'As customers can now specify ssl-certificate data for their domains, you need to specify where the generated files are stored<br />';
$question = '<strong>Specify the directory for customer ssl-certificates:</strong>&nbsp;';
$question.= '<input type="text" class="text" name="system_customersslpath" value="/etc/apache2/ssl/" />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.29.1-dev3')) {
$has_preconfig = true;
$description = 'The build in logrotation-feature has been removed. Please follow the configuration-instructions for your system to enable logrotating again.';
$question = '';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
// let the apache+fpm users know that they MUST change their config
// for the domains / webserver to work after the update
if (versionInUpdate($current_version, '0.9.30-dev1')) {
if ($settings['system']['webserver'] == 'apache2'
&& $settings['phpfpm']['enabled'] == '1'
) {
$has_preconfig = true;
$description = 'The PHP-FPM implementation for apache2 has changed. Please look for the "<b>fastcgi.conf</b>" (Debian/Ubuntu) or "<b>70_fastcgi.conf</b>" (Gentoo) within /etc/apache2/ and change it as shown below:<br /><br />';
$description .= '<pre style="width:500px;border:1px solid #ccc;padding:4px;">&lt;IfModule mod_fastcgi.c&gt;
FastCgiIpcDir /var/run/apache2/
&lt;Location "/fastcgiphp"&gt;
Order Deny,Allow
Deny from All
# Prevent accessing this path directly
Allow from env=REDIRECT_STATUS
&lt;/Location&gt;
&lt;/IfModule&gt;</pre>';
$question = '';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
}

View File

@@ -31,7 +31,7 @@ if($settings['panel']['version'] == '1.0.10')
{
// Drop/Rename postfix_ tables
$db->query("DROP TABLE `" . TABLE_POSTFIX_TRANSPORT . "`");
$db->query("DROP TABLE IF EXISTS `" . TABLE_POSTFIX_TRANSPORT . "`");
$db->query("ALTER TABLE `" . TABLE_POSTFIX_USERS . "` RENAME `" . TABLE_MAIL_USERS . "` ");
$db->query("ALTER TABLE `" . TABLE_POSTFIX_VIRTUAL . "` RENAME `" . TABLE_MAIL_VIRTUAL . "` ");
@@ -79,4 +79,4 @@ if($settings['panel']['version'] == '1.0.10')
$settings['panel']['version'] = '1.2.0';
}
?>
?>

3
js/excanvas.min.js vendored Normal file

File diff suppressed because one or more lines are too long

8
js/html5shiv.js vendored Normal file
View File

@@ -0,0 +1,8 @@
/*
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);

5
js/jquery-ui-1.9.2.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
js/jquery-ui.min.js vendored Symbolic link
View File

@@ -0,0 +1 @@
jquery-ui-1.9.2.min.js

3
js/jquery.jqplot.min.js vendored Normal file

File diff suppressed because one or more lines are too long

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