Compare commits

...

189 Commits

Author SHA1 Message Date
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
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
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
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
724 changed files with 10157 additions and 13348 deletions

2
.gitignore vendored
View File

@@ -1,5 +1,7 @@
packages/*
temp/*
templates/*
install/update.log
.buildpath
.project
.settings/

View File

@@ -77,6 +77,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',

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',
@@ -124,7 +133,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,11 +142,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')
),
'nginx_fastcgiparams' => array(
'label' => $lng['serversettings']['nginx_fastcgiparams'],
'settinggroup' => 'nginx',
'varname' => 'fastcgiparams',
'type' => 'string',
'default' => '/etc/nginx/fastcgi_params',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'system_mod_log_sql' => array(
'label' => $lng['serversettings']['mod_log_sql'],
'settinggroup' => 'system',

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')

View File

@@ -56,7 +56,7 @@ return array(
),
/*
* @TODO implement if phpfpm knows custom php.ini files
*
*
'system_phpfpm_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
'settinggroup' => 'phpfpm',
@@ -77,6 +77,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 +119,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(

View File

@@ -51,6 +51,15 @@ 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',
'save_method' => 'storeSettingField',
),
'panel_sendalternativemail' => array(
'label' => $lng['serversettings']['sendalternativemail'],
'settinggroup' => 'panel',
@@ -90,9 +99,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

@@ -28,6 +28,7 @@ return array(
'varname' => 'backup_enabled',
'type' => 'bool',
'default' => false,
'cronmodule' => 'froxlor/backup',
'save_method' => 'storeSettingField',
'overview_option' => true
),

View File

@@ -92,13 +92,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 +291,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 +329,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 +400,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 +429,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 +482,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 +529,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,7 +544,7 @@ if($page == 'admins'
{
$password = validate($_POST['admin_password'], 'new password');
$def_language = validate($_POST['def_language'], 'default language');
$deactivated = intval($_POST['deactivated']);
$deactivated = isset($_POST['deactivated']) ? 1 : 0;
$customers = intval_ressource($_POST['customers']);
if(isset($_POST['customers_ul']))
@@ -628,7 +650,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;
$customers_see_all = 0;
if(isset($_POST['customers_see_all']))
@@ -644,10 +666,14 @@ if($page == 'admins'
$change_serversettings = 0;
if(isset($_POST['change_serversettings']))
$change_serversettings = intval($_POST['change_serversettings']);
$change_serversettings = isset($_POST['change_serversettings']) ? 1 : 0;
$diskspace = intval($_POST['diskspace']);
$tickets_see_all = 0;
if (isset($_POST['tickets_see_all']))
$tickets_see_all = intval($_POST['tickets_see_all']);
if(isset($_POST['diskspace_ul']))
{
$diskspace = - 1;
@@ -714,7 +740,11 @@ 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';
}
$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 +882,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

@@ -101,7 +101,7 @@ if($page == 'cronjobs'
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$isactive = intval($_POST['isactive']);
$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');
@@ -121,7 +121,7 @@ if($page == 'cronjobs'
}
else
{
#$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
//$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
// interval
$interval_nfo = explode(' ', $result['interval']);
$interval_value = $interval_nfo[0];
@@ -159,5 +159,3 @@ if($page == 'cronjobs'
*/
}
}
?>

View File

@@ -48,49 +48,19 @@ 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($settings['panel']['natsorting']) . " " . $paging->getSqlLimit());
@@ -223,12 +193,17 @@ if($page == 'customers'
$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) . '`',false,true);
$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) . '`',false,true);
$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']) . '`');
@@ -820,7 +795,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($db->escape($password),1);
$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 . "'");
@@ -924,13 +900,16 @@ 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');
/*
$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');
*/
// why still makeyesno for this one?
$backup_allowed = makeyesno('backup_allowed', '1', '0', '0');
$gender_options = makeoption($lng['gender']['undef'], 0, true, true, true);
@@ -1235,7 +1214,7 @@ 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 . "'");
@@ -1262,8 +1241,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 */
{
@@ -1588,12 +1567,14 @@ 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']);
/*
$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);

View File

@@ -195,9 +195,8 @@ if($page == 'domains'
updateCounters();
inserttask('1');
# Using nameserver, insert a task which rebuilds the server config
if ($settings['system']['bind_enable'])
{
// Using nameserver, insert a task which rebuilds the server config
if ($settings['system']['bind_enable'] = '1') {
inserttask('4');
}
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -283,9 +282,16 @@ if($page == 'domains'
if($userinfo['change_serversettings'] == '1')
{
$isbinddomain = intval($_POST['isbinddomain']);
$caneditdomain = 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']))
{
@@ -315,7 +321,10 @@ if($page == 'domains'
}
else
{
$isbinddomain = '1';
$isbinddomain = '0';
if ($settings['system']['bind_enable'] == '1') {
$isbinddomain = '1';
}
$caneditdomain = '1';
$zonefile = '';
$dkim = '1';
@@ -325,8 +334,8 @@ if($page == 'domains'
if($userinfo['caneditphpsettings'] == '1'
|| $userinfo['change_serversettings'] == '1')
{
$openbasedir = intval($_POST['openbasedir']);
$safemode = intval($_POST['safemode']);
$openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0;
$safemode = isset($_POST['safemode']) ? intval($_POST['safemode']) : 0;
if((int)$settings['system']['mod_fcgid'] == 1)
{
@@ -385,7 +394,7 @@ if($page == 'domains'
&& isset($_POST['ssl_ipandport'])
&& $_POST['ssl'] != '0')
{
$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'];
@@ -577,8 +586,7 @@ if($page == 'domains'
inserttask('1');
# Using nameserver, insert a task which rebuilds the server config
if ($settings['system']['bind_enable'])
{
if ($settings['system']['bind_enable']) {
inserttask('4');
}
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -683,18 +691,7 @@ if($page == 'domains'
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true);
}
#$isbinddomain = makeyesno('isbinddomain', '1', '0', '1');
#$isemaildomain = makeyesno('isemaildomain', '1', '0', '1');
#$email_only = makeyesno('email_only', '1', '0', '0');
$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';
@@ -793,7 +790,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', ''));
@@ -816,12 +813,18 @@ if($page == 'domains'
if($userinfo['change_serversettings'] == '1')
{
$isbinddomain = intval($_POST['isbinddomain']);
$zonefile = validate($_POST['zonefile'], 'zonefile');
$isbinddomain = $result['isbinddomain'];
$zonefile = $result['zonefile'];
if ($settings['system']['bind_enable'] == '1') {
if (isset($_POST['isbinddomain'])) {
$isbinddomain = '1';
}
$zonefile = validate($_POST['zonefile'], 'zonefile');
}
if($settings['dkim']['use_dkim'] == '1')
{
$dkim = intval($_POST['dkim']);
$dkim = isset($_POST['dkim']) ? 1 : 0;
}
else
{
@@ -854,8 +857,8 @@ 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;
$safemode = isset($_POST['safemode']) ? intval($_POST['safemode']) : 0;
if((int)$settings['system']['mod_fcgid'] == 1)
{
@@ -914,7 +917,7 @@ if($page == 'domains'
&& isset($_POST['ssl_ipandport'])
&& $_POST['ssl'] != '0')
{
$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'];
@@ -1084,7 +1087,9 @@ if($page == 'domains'
|| $dkim != $result['dkim']
|| $ipandport != $result['ipandport'])
{
inserttask('4');
if ($settings['system']['bind_enable'] == '1') {
inserttask('4');
}
}
if($isemaildomain == '0'
@@ -1124,7 +1129,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) . "' ";
@@ -1237,20 +1242,11 @@ if($page == 'domains'
}
$result['specialsettings'] = $result['specialsettings'];
#$isbinddomain = makeyesno('isbinddomain', '1', '0', $result['isbinddomain']);
#$wwwserveralias = makeyesno('wwwserveralias', '1', '0', $result['wwwserveralias']);
#$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
#$email_only = makeyesno('email_only', '1', '0', $result['email_only']);
#$ssl = makeyesno('ssl', '1', '0', $result['ssl']);
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
$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']);
@@ -1262,8 +1258,6 @@ if($page == 'domains'
$phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true);
}
#$specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1');
$result = htmlentities_array($result);
$domain_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_edit.php';

View File

@@ -141,11 +141,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)
@@ -261,11 +261,13 @@ if($page == 'ipsandports'
}
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);
@@ -290,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');
@@ -402,7 +411,7 @@ 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
// Using nameserver, insert a task which rebuilds the server config
if ($settings['system']['bind_enable'])
{
inserttask('4');
@@ -412,12 +421,14 @@ if($page == 'ipsandports'
}
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

@@ -83,7 +83,6 @@ if(($page == 'settings' || $page == 'overview')
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
inserttask('1');
inserttask('5');
inserttask('9');
# Using nameserver, insert a task which rebuilds the server config
if ($settings['system']['bind_enable'])
@@ -129,7 +128,6 @@ elseif($page == 'rebuildconfigs'
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles");
inserttask('1');
inserttask('5');
inserttask('9');
inserttask('10');
# Using nameserver, insert a task which rebuilds the server config

View File

@@ -32,17 +32,20 @@ if(isset($_POST['id']))
elseif(isset($_GET['id']))
{
$id = intval($_GET['id']);
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'));
// 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'));
}
}
}
}
@@ -115,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") . "\";");
@@ -212,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))
{
@@ -450,11 +461,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`
@@ -462,7 +478,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);
@@ -499,7 +515,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 == '')
@@ -515,7 +531,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);
@@ -673,12 +689,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'];
}
@@ -852,6 +873,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

@@ -110,7 +110,7 @@ if($action == "add")
$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);
@@ -241,7 +241,7 @@ if($action == "edit")
}
$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);

View File

@@ -352,7 +352,7 @@ elseif($page == 'domains')
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
inserttask('1');
# Using nameserver, insert a task which rebuilds the server config
// Using nameserver, insert a task which rebuilds the server config
if ($settings['system']['bind_enable'])
{
inserttask('4');
@@ -388,7 +388,7 @@ elseif($page == 'domains')
}
}
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
//$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
$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']);
@@ -532,7 +532,7 @@ elseif($page == 'domains')
$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 . "'");
inserttask('1');
# Using nameserver, insert a task which rebuilds the server config
// Using nameserver, insert a task which rebuilds the server config
if ($settings['system']['bind_enable'])
{
inserttask('4');
@@ -585,9 +585,11 @@ 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']);
/*
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
*/
$openbasedir = makeoption($lng['domain']['docroot'], 0, $result['openbasedir_path'], true) . makeoption($lng['domain']['homedir'], 1, $result['openbasedir_path'], true);
$result_ipandport = $db->query_first("SELECT `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` WHERE `id`='".(int)$result['ipandport']."'");

View File

@@ -237,7 +237,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 +253,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 +281,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 +336,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 +353,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 +458,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($db->escape($password),1);
$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,
@@ -557,7 +607,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($db->escape($password),1);
$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

@@ -144,7 +144,7 @@ elseif($page == 'accounts')
$password = validate($_POST['ftp_password'], 'password');
$password = validatePassword($password);
$sendinfomail = intval($_POST['sendinfomail']);
$sendinfomail = isset($_POST['sendinfomail']) ? 1 : 0;
if($sendinfomail != 1)
{
$sendinfomail = 0;
@@ -187,8 +187,9 @@ elseif($page == 'accounts')
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($db->escape($password),1);
$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))
{
@@ -268,7 +269,7 @@ elseif($page == 'accounts')
}
}
#$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);
@@ -311,11 +312,12 @@ elseif($page == 'accounts')
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 . "'");
$cryptPassword = makeCryptPassword($db->escape($password),1);
$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'");
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`='" . $db->escape($cryptPassword) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $result['username'] . "_backup'");
}
}
}

View File

@@ -55,7 +55,7 @@ if($page == 'overview')
}
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);
@@ -124,7 +124,8 @@ elseif($page == 'change_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']) . "'");
$cryptPassword = makeCryptPassword($db->escape($new_password),1);
$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');
}

View File

@@ -102,11 +102,17 @@ elseif($page == 'mysqls')
// Begin root-session
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
foreach(array_map('trim', array_unique(explode(',', $settings['system']['mysql_access_host']))) as $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))
{
$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) . '"');
// 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']) . '`');
@@ -150,7 +156,7 @@ elseif($page == 'mysqls')
$password = validate($_POST['mysql_password'], 'password');
$password = validatePassword($password);
$sendinfomail = intval($_POST['sendinfomail']);
$sendinfomail = isset($_POST['sendinfomail']) ? 1 : 0;
if($sendinfomail != 1)
{
$sendinfomail = 0;
@@ -177,9 +183,11 @@ elseif($page == 'mysqls')
{
$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'], '');
$db_root->query('CREATE DATABASE `' . $db_root->escape($username) . '`');
$log->logAction(USR_ACTION, LOG_INFO, "created database '" . $username . "'");
@@ -195,8 +203,6 @@ elseif($page == 'mysqls')
// End root-session
// Statement modifyed for Database description -- PH 2004-11-29
$databasedescription = validate($_POST['description'], 'description');
$result = $db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($username) . '", "' . $db->escape($databasedescription) . '", "' . $db->escape($dbserver) . '")');
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1, `mysql_lastaccountnumber`=`mysql_lastaccountnumber`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
@@ -258,7 +264,7 @@ elseif($page == 'mysqls')
$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);
@@ -308,7 +314,6 @@ elseif($page == 'mysqls')
}
// 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 . '"');

View File

@@ -221,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))
{

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

File diff suppressed because it is too large Load Diff

View File

@@ -100,23 +100,27 @@ function page_header() {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="iso-8859-1" />
<meta charset="utf-8" />
<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]-->
<link rel="stylesheet" href="../templates/Froxlor/assets/css/main.css" />
<!--[if IE]><link rel="stylesheet" href="../templates/Froxlor/assets/css/main_ie.css" /><![endif]-->
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../templates/Froxlor/js/froxlor.js"></script>
<script type="text/javascript" src="../templates/Froxlor/assets/js/main.js"></script>
<link href="../templates/Froxlor/assets/img/favicon.ico" rel="icon" type="image/x-icon" />
<title>Froxlor Server Management Panel - Installation</title>
<style>
body {
font-family: Verdana, Geneva, sans-serif;
}
input {
background: #dae7ee url('../images/Froxlor/icons/text_align_left.png') no-repeat 5px 4px;
background: #dae7ee url('../templates/Froxlor/assets/img/icons/text_align_left.png') no-repeat 5px 4px;
}
input[type="password"] {
background: #dae7ee url('../images/Froxlor/icons/password.png') no-repeat 4px 4px;
background: #dae7ee url('../templates/Froxlor/assets/img/icons/password.png') no-repeat 4px 4px;
}
input[type="submit"] {
background: #ccc url('../images/Froxlor/icons/button_ok.png') no-repeat 4px 8px;
background: #ccc url('../templates/Froxlor/assets/img/icons/button_ok.png') no-repeat 4px 8px;
}
</style>
</head>
@@ -154,13 +158,13 @@ function status_message($case, $text)
function requirement_checks() {
global $lng;
global $lng, $theme;
page_header();
?>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
@@ -520,7 +524,7 @@ if(isset($_POST['installstep'])
?>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
@@ -673,8 +677,6 @@ if(isset($_POST['installstep'])
$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'");
@@ -692,23 +694,20 @@ if(isset($_POST['installstep'])
$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")
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';");
@@ -717,7 +716,6 @@ if(isset($_POST['installstep'])
$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',
@@ -728,14 +726,12 @@ if(isset($_POST['installstep'])
$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) . "',
@@ -767,6 +763,7 @@ if(isset($_POST['installstep'])
`ftps_used` = 0,
`tickets` = -1,
`tickets_used` = 0,
`tickets_see_all` = 1,
`subdomains` = -1,
`subdomains_used` = 0,
`traffic` = -1048576,
@@ -779,7 +776,6 @@ if(isset($_POST['installstep'])
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";
@@ -794,7 +790,6 @@ if(isset($_POST['installstep'])
$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));
@@ -841,7 +836,7 @@ else
?>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2><?php echo $lng['install']['language']; ?></h2>

View File

@@ -73,6 +73,12 @@ $lng['install']['bcmathdescription'] = 'Traffic-calculation related functions wi
$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';
/**
* ADDED IN 1.2.19-svn7
*/
$lng['install']['servername_should_be_fqdn'] = 'The servername should be a FQDN and not an IP address';
/**
* Renamed in 1.2.19-svn40
*/

View File

@@ -63,6 +63,12 @@ $lng['install']['click_here_to_login'] = 'Cliquez ici pour vous rendre <20> l\'in
$lng['install']['httpuser'] = 'Nom du utilisateur du HTTP';
$lng['install']['httpgroup'] = 'Nom du la group du HTTP';
/**
* ADDED IN 1.2.19-svn7
*/
$lng['install']['servername_should_be_fqdn'] = 'Le nom du serveur doit être un nom FQDN, pas une adresse IP';
/**
* Renamed in 1.2.19-svn40
*/

View File

@@ -73,6 +73,12 @@ $lng['install']['openbasedirenabled'] = 'aktiviert. Froxlor wird mit aktiviertem
$lng['install']['httpuser'] = 'HTTP Username';
$lng['install']['httpgroup'] = 'HTTP Gruppenname';
/**
* ADDED IN 1.2.19-svn7
*/
$lng['install']['servername_should_be_fqdn'] = 'Der Servername sollte eine FQDN sein und keine IP Adresse sein';
/**
* Renamed in 1.2.19-svn40
*/

View File

@@ -1642,7 +1642,7 @@ if(isFroxlorVersion('0.9.22-svn1'))
/* fix backup_dir for #186 */
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/var/customers/backups/' WHERE `varname` = 'backup_dir';");
updateToVersion('0.9.22-svn2');
}
@@ -1650,7 +1650,7 @@ if(isFroxlorVersion('0.9.22-svn2'))
{
showUpdateStep("Updating from 0.9.22-svn2 to 0.9.22-rc1");
lastStepStatus(0);
updateToVersion('0.9.22-rc1');
}
@@ -1658,7 +1658,7 @@ if(isFroxlorVersion('0.9.22-rc1'))
{
showUpdateStep("Updating from 0.9.22-rc1 to 0.9.22");
lastStepStatus(0);
updateToVersion('0.9.22');
}
@@ -1729,10 +1729,10 @@ if(isFroxlorVersion('0.9.25'))
{
showUpdateStep("Updating from 0.9.25 to 0.9.26-svn1");
lastStepStatus(0);
// enable bind by default
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'bind_enable', '1')");
updateToVersion('0.9.26-svn1');
}
@@ -1756,24 +1756,24 @@ if(isFroxlorVersion('0.9.26'))
{
showUpdateStep("Updating from 0.9.26 to 0.9.27-svn1");
lastStepStatus(0);
// check for multiple backup_ftp_enabled entries
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `varname` = 'backup_ftp_enabled';");
// if there are more than one entry try to fix it
if ($db->num_rows($handle) > 1) {
$rows = $db->fetch_array($handle);
$state = false;
// iterate through all found entries
// and try to guess what value it should be
foreach ($rows as $row) {
$state = $state | $row['value'];
}
// now delete all entries
$db->query("DELETE FROM `panel_settings` WHERE `varname` = 'backup_ftp_enabled';");
// and re-add it
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'backup_ftp_enabled', '". $state ."');");
}
@@ -1785,18 +1785,18 @@ if(isFroxlorVersion('0.9.27-svn1'))
{
showUpdateStep("Updating from 0.9.27-svn1 to 0.9.27-svn2");
lastStepStatus(0);
// Get FastCGI timeout setting if available
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'system' AND `varname` = 'mod_fcgid_idle_timeout';");
// If timeout is set then skip
if ($db->num_rows($handle) < 1) {
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_idle_timeout', '30');");
}
// Get FastCGI timeout setting if available
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'phpfpm' AND `varname` = 'idle_timeout';");
// If timeout is set then skip
if ($db->num_rows($handle) < 1) {
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('phpfpm', 'idle_timeout', '30');");
@@ -1821,3 +1821,206 @@ if(isFroxlorVersion('0.9.27-rc1'))
updateToVersion('0.9.27');
}
if(isFroxlorVersion('0.9.27')) {
showUpdateStep("Updating from 0.9.27 to 0.9.28-svn1");
lastStepStatus(0);
// Get AliasconfigDir setting if available
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'phpfpm' AND `varname` = 'aliasconfigdir';");
// If AliasconfigDir is set then skip
if ($db->num_rows($handle) < 1) {
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('phpfpm', 'aliasconfigdir', '/var/www/php-fpm/');");
}
updateToVersion('0.9.28-svn1');
}
if(isFroxlorVersion('0.9.28-svn1')) {
showUpdateStep("Updating from 0.9.28-svn1 to 0.9.28-svn2");
lastStepStatus(0);
// Insert ISO-Codes into database. Default value is foo, which is not a valid language code.
$db->query("ALTER TABLE `panel_languages` ADD `iso` CHAR( 3 ) NOT NULL DEFAULT 'foo' AFTER `language`");
$handle = $db->query("SELECT `language` FROM `panel_languages` WHERE `iso`='foo'");
$langauges = $db->fetch_array($handle);
foreach($languages as $language){
switch ($language) {
case "Deutsch":
$db->query("UPDATE `panel_languages` SET `iso`='de' WHERE `language` = 'Deutsch'");
break;
case "English":
$db->query("UPDATE `panel_languages` SET `iso`='en' WHERE `language` = 'English'");
break;
case "Fran&ccedil;ais":
$db->query("UPDATE `panel_languages` SET `iso`='fr' WHERE `language` = 'Fran&ccedil;ais'");
break;
case "Chinese":
$db->query("UPDATE `panel_languages` SET `iso`='zh' WHERE `language` = 'Chinese'");
break;
case "Catalan":
$db->query("UPDATE `panel_languages` SET `iso`='ca' WHERE `language` = 'Catalan'");
break;
case "Espa&ntilde;ol":
$db->query("UPDATE `panel_languages` SET `iso`='es' WHERE `language` = 'Espa&ntilde;ol'");
break;
case "Portugu&ecirc;s":
$db->query("UPDATE `panel_languages` SET `iso`='pt' WHERE `language` = 'Portugu&ecirc;s'");
break;
case "Danish":
$db->query("UPDATE `panel_languages` SET `iso`='da' WHERE `language` = 'Danish'");
break;
case "Italian":
$db->query("UPDATE `panel_languages` SET `iso`='it' WHERE `language` = 'Italian'");
break;
case "Bulgarian":
$db->query("UPDATE `panel_languages` SET `iso`='bg' WHERE `language` = 'Bulgarian'");
break;
case "Slovak":
$db->query("UPDATE `panel_languages` SET `iso`='sk' WHERE `language` = 'Slovak'");
break;
case "Dutch":
$db->query("UPDATE `panel_languages` SET `iso`='nl' WHERE `language` = 'Dutch'");
break;
case "Russian":
$db->query("UPDATE `panel_languages` SET `iso`='ru' WHERE `language` = 'Russian'");
break;
case "Hungarian":
$db->query("UPDATE `panel_languages` SET `iso`='hu' WHERE `language` = 'Hungarian'");
break;
case "Swedish":
$db->query("UPDATE `panel_languages` SET `iso`='sv' WHERE `language` = 'Swedish'");
break;
case "Czech":
$db->query("UPDATE `panel_languages` SET `iso`='cz' WHERE `language` = 'Czech'");
break;
case "Polski":
$db->query("UPDATE `panel_languages` SET `iso`='pl' WHERE `language` = 'Polski'");
break;
default:
showUpdateStep("Sorry, but I don't know the ISO-639 language code for ".$language.". Please update the entry in `panel_languages` manually.\n");
}
}
updateToVersion('0.9.28-svn2');
}
if(isFroxlorVersion('0.9.28-svn2')) {
showUpdateStep("Updating from 0.9.28-svn2 to 0.9.28-svn3");
lastStepStatus(0);
// change lenght of passwd column
$db->query("ALTER TABLE `" . TABLE_FTP_USERS . "` MODIFY `password` varchar(128) NOT NULL default ''");
// Add default setting for vmail_maildirname if not already in place
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'system' AND `varname` = 'vmail_maildirname';");
if ($db->num_rows($handle) < 1) {
showUpdateStep("Adding default Maildir value into Mailserver settings.");
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'vmail_maildirname', 'Maildir');");
}
updateToVersion('0.9.28-svn3');
}
if(isFroxlorVersion('0.9.28-svn3'))
{
showUpdateStep("Updating from 0.9.28-svn3 to 0.9.28-svn4", true);
lastStepStatus(0);
if (isset($_POST['classic_theme_replacement']) && $_POST['classic_theme_replacement'] != '')
{
$classic_theme_replacement = $_POST['classic_theme_replacement'];
}
else
{
$classic_theme_replacement = 'Froxlor';
}
showUpdateStep('Setting replacement for the discontinued and removed Classic theme (if active)', true);
// Updating default theme setting
if ($settings['panel']['default_theme'] == 'Classic')
{
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '".$db->escape($classic_theme_replacement)."' WHERE varname = 'default_theme';");
}
// Updating admin's theme setting
$db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `theme` = \'' . $db->escape($classic_theme_replacement) . '\' WHERE `theme` = \'Classic\'');
// Updating customer's theme setting
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `theme` = \'' . $db->escape($classic_theme_replacement) . '\' WHERE `theme` = \'Classic\'');
// Updating theme setting of active sessions
$db->query('UPDATE `' . TABLE_PANEL_SESSIONS . '` SET `theme` = \'' . $db->escape($classic_theme_replacement) . '\' WHERE `theme` = \'Classic\'');
lastStepStatus(0);
showUpdateStep('Altering Froxlor database and tables to use UTF-8. This may take a while..', true);
$db->query('ALTER DATABASE ' . $db->getDbName() . ' CHARACTER SET utf8 COLLATE utf8_general_ci');
$handle = $db->query('SHOW TABLES');
while ($row = $db->fetch_array($handle))
{
foreach ($row as $table)
{
$db->query('ALTER TABLE ' . $table . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;');
}
}
lastStepStatus(0);
updateToVersion('0.9.28-svn4');
}
if(isFroxlorVersion('0.9.28-svn4')) {
showUpdateStep("Updating from 0.9.28-svn4 to 0.9.28-svn5");
// Catchall functionality (enabled by default) see #1114
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('catchall', 'catchall_enabled', '1');");
lastStepStatus(0);
updateToVersion('0.9.28-svn5');
}
if(isFroxlorVersion('0.9.28-svn5')) {
showUpdateStep("Updating from 0.9.28-svn5 to 0.9.28-svn6", true);
lastStepStatus(0);
$update_system_apache24 = isset($_POST['update_system_apache24']) ? (int)$_POST['update_system_apache24'] : '0';
showUpdateStep('Setting value for apache-2.4 modification', true);
// support for Apache-2.4
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'apache24', '".$update_system_apache24."');");
lastStepStatus(0);
showUpdateStep("Inserting new tickets-see-all field to panel_admins", true);
$db->query("ALTER TABLE `panel_admins` ADD `tickets_see_all` tinyint(1) NOT NULL default '0' AFTER `tickets_used`");
lastStepStatus(0);
showUpdateStep("Updating main admin entry", true);
$db->query("UPDATE `panel_admins` SET `tickets_see_all` = '1' WHERE `adminid` = '".$userinfo['adminid']."';");
lastStepStatus(0);
showUpdateStep("Inserting new panel webfont-settings (default: off)", true);
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'use_webfonts', '0');");
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'webfont', 'Numans');");
lastStepStatus(0);
showUpdateStep("Inserting settings for nginx fastcgi-params file", true);
$fastcgiparams = '/etc/nginx/fastcgi_params';
if (isset($_POST['nginx_fastcgi_params']) && $_POST['nginx_fastcgi_params'] != '') {
$fastcgiparams = makeCorrectDir($_POST['nginx_fastcgi_params']);
}
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('nginx', 'fastcgiparams', '".$db->escape($fastcgiparams)."')");
lastStepStatus(0);
updateToVersion('0.9.28-svn6');
}
if (isFroxlorVersion('0.9.28-svn6')) {
showUpdateStep("Updating from 0.9.28-svn6 to 0.9.28 release candidate 1");
lastStepStatus(0);
updateToVersion('0.9.28-rc1');
}

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

@@ -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'))
{
@@ -417,16 +417,58 @@ 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.';
$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") . "\";");
}
}
}

View File

@@ -393,36 +393,28 @@ class ApsInstaller extends ApsParser
//check for special PHP permissions
//must be done with xpath otherwise check not possible (XML parser problem with attributes)
if($ParentMapping && $ParentMapping !== null)
{
if ($ParentMapping && $ParentMapping !== null) {
$ParentMapping->registerXPathNamespace('p', 'http://apstandard.com/ns/1/php');
$Result = $ParentMapping->xpath('p:permissions');
if($Result[0]['writable'] == 'true')
{
//fixing file permissions to writeable
if(is_dir($Path))
{
chmod($Path, 0775);
if (is_array($Result) && isset($Result[0]) && is_array($Result[0])) {
if (isset($Result[0]['writable']) && $Result[0]['writable'] == 'true') {
// fixing file permissions to writeable
if (is_dir($Path)) {
chmod($Path, 0775);
} else {
chmod($Path, 0664);
}
}
else
{
chmod($Path, 0664);
}
}
if($Result[0]['readable'] == 'false')
{
//fixing file permissions to non readable
if(is_dir($Path))
{
chmod($Path, 0333);
}
else
{
chmod($Path, 0222);
if (isset($Result[0]['readable']) && $Result[0]['readable'] == 'false') {
//fixing file permissions to non readable
if (is_dir($Path)) {
chmod($Path, 0333);
} else {
chmod($Path, 0222);
}
}
}
}

View File

@@ -62,7 +62,7 @@ class ApsParser
private function ManageInstances()
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
$Question = false;
//dont do anything if there is no instance
@@ -170,7 +170,7 @@ class ApsParser
//create table with contents based on instance status
if($Question != true)
{
global $settings;
global $settings, $theme;
$Instances = '';
if((int)$this->userinfo['customers_see_all'] == 1)
@@ -317,7 +317,7 @@ class ApsParser
private function ManagePackages()
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
$Question = false;
if(isset($_POST['save']))
@@ -611,7 +611,7 @@ class ApsParser
private function UploadNewPackages()
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
//define how many files can be uploaded at once
@@ -724,7 +724,7 @@ class ApsParser
private function SearchPackages()
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
$Error = 0;
$Ids = array();
$ShowAll = 0;
@@ -852,7 +852,7 @@ class ApsParser
private function CustomerStatus($CustomerId)
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
$Data = '';
$Fieldname = '';
$Fieldvalue = '';
@@ -877,7 +877,7 @@ class ApsParser
//skip if parse of xml has failed
if($Xml == false)continue;
$Icon = './images/Classic/default.png';
$Icon = 'templates/'.$theme.'/assets/img/default.png';
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
@@ -1033,7 +1033,7 @@ class ApsParser
private function CreatePackageInstance($PackageId, $CustomerId)
{
global $lng;
global $lng, $theme;
if(!self::IsValidPackageId($PackageId, true))return false;
@@ -1141,7 +1141,7 @@ class ApsParser
private function CheckException($Category, $Item, $Value)
{
global $settings;
global $settings, $theme;
//search for element within system settings
@@ -1164,7 +1164,7 @@ class ApsParser
private function CheckSubmappings($ParentMapping, $Url)
{
global $lng;
global $lng, $theme;
$Error = array();
//check for special PHP handler extensions
@@ -1243,7 +1243,7 @@ class ApsParser
private function InstallNewPackage($Filename)
{
global $lng, $userinfo;
global $lng, $userinfo, $theme;
if(file_exists($Filename)
&& $Xml = self::GetXmlFromZip($Filename))
@@ -1726,7 +1726,7 @@ class ApsParser
public function MainHandler($Action)
{
global $lng, $filename, $s, $page, $action, $Id, $userinfo;
global $lng, $filename, $s, $page, $action, $Id, $userinfo, $theme;
//check for basic functions, classes and permissions
@@ -2810,7 +2810,7 @@ class ApsParser
private function ShowPackageInstaller($PackageId, $WrongData, $CustomerId)
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
$Data = '';
$Fieldname = '';
$Fieldvalue = '';
@@ -2838,7 +2838,7 @@ class ApsParser
//icon for package
$Icon = './images/Classic/default.png';
$Icon = 'templates/'.$theme.'/img/default.png';
if($this->aps_version != '1.0')
{
@@ -3187,7 +3187,7 @@ class ApsParser
{
$Temp.= '<textarea name="text" rows="10" cols="55">';
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'ISO-8859-1');
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'UTF-8');
$Temp.= '</textarea>';
$Groupname = $lng['aps']['license'];
$Fieldname = $lng['aps']['license'];
@@ -3231,7 +3231,7 @@ class ApsParser
private function ShowPackageInfo($PackageId, $All = false)
{
global $lng, $filename, $s, $page, $action, $userinfo;
global $lng, $filename, $s, $page, $action, $userinfo, $theme;
$Data = '';
$Fieldname = '';
$Fieldvalue = '';
@@ -3245,7 +3245,7 @@ class ApsParser
//return if parse of xml file has failed
if($Xml == false)return false;
$Icon = './images/Classic/default.png';
$Icon = 'templates/'.$theme.'/img/default.png';
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
@@ -3378,7 +3378,7 @@ class ApsParser
if($license->text->name)$Temp = $license->text->name . '<br/>';
$Temp.= '<form name="license" action="#"><textarea name="text" rows="10" cols="70">';
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'ISO-8859-1');
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'UTF-8');
$Temp.= '</textarea></form>';
$Fieldname = $lng['aps']['license'];
$Fieldvalue = $Temp;
@@ -3460,7 +3460,7 @@ class ApsParser
*/
private function InfoBox($Message, $Type = 0)
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
//shows a box with informations
eval("echo \"" . getTemplate("aps/infobox") . "\";");
}

View File

@@ -106,7 +106,7 @@ class db
if(!$this->link_id)
{
//try to connect with no password an change it afterwards. only for root user
//try to connect with no password and change it afterwards. only for root user
if($this->user == 'root')
{
@@ -134,11 +134,8 @@ class db
$this->showerror('Trying to use database ' . $this->database . ' failed, exiting');
}
}
/*
* this is not for 0.9.x
*/
//mysql_query("SET NAMES utf8", $this->link_id);
//mysql_query("SET CHARACTER SET utf8", $this->link_id);
mysql_set_charset('utf8', $this->link_id);
}
/**
@@ -189,7 +186,7 @@ class db
function query($query_str, $unbuffered = false, $suppress_error = false)
{
global $numbqueries;
global $numbqueries, $theme;
if (!mysql_ping($this->link_id))
{
@@ -349,7 +346,7 @@ class db
function showerror($errormsg, $mysqlActive = true)
{
global $filename;
global $filename, $theme;
$text = 'MySQL - Error: ' . str_replace("\n", "\t", $errormsg);
if($mysqlActive)

View File

@@ -124,7 +124,7 @@ class idna_convert_wrapper
if(strlen($domain) !== 0)
{
$domain = utf8_decode($this->idna_converter->$action(utf8_encode($domain . '.none')));
$domain = $this->idna_converter->$action($domain . '.none');
$domain = substr($domain, 0, strlen($domain) - 5);
}

View File

@@ -26,7 +26,7 @@ class htmlform
public static function genHTMLForm($data = array())
{
global $lng;
global $lng, $theme;
$nob = false;
self::$_form = '';

View File

@@ -421,6 +421,8 @@ class paging
function getHtmlArrowCode($baseurl, $field = '')
{
global $theme;
if($field != ''
&& isset($this->fields[$field]))
{

View File

@@ -93,7 +93,14 @@ class phpinterface_fpm
$fpm_config.= 'pm = '.$fpm_pm."\n";
$fpm_config.= 'pm.max_children = '.$fpm_children."\n";
if($fpm_pm == 'dynamic') {
if($fpm_pm == 'dynamic' || $fpm_pm == 'ondemand') {
// failsafe, refs #955
if ($fpm_start_servers < $fpm_min_spare_servers) {
$fpm_start_servers = $fpm_min_spare_servers;
}
if ($fpm_start_servers > $fpm_max_spare_servers) {
$fpm_start_servers = $fpm_start_servers - (($fpm_start_servers - $fpm_max_spare_servers) + 1);
}
$fpm_config.= 'pm.start_servers = '.$fpm_start_servers."\n";
$fpm_config.= 'pm.min_spare_servers = '.$fpm_min_spare_servers."\n";
$fpm_config.= 'pm.max_spare_servers = '.$fpm_max_spare_servers."\n";
@@ -125,13 +132,13 @@ class phpinterface_fpm
{
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
}
$_custom_openbasedir = explode(':', $this->_settings['system']['phpappendopenbasedir']);
foreach($_custom_openbasedir as $cobd)
{
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
}
if($this->_domain['openbasedir_path'] == '0' && strstr($this->_domain['documentroot'], ":") === false)
{
$openbasedir = appendOpenBasedirPath($this->_domain['documentroot'], true);
@@ -140,10 +147,10 @@ class phpinterface_fpm
{
$openbasedir = appendOpenBasedirPath($this->_domain['customerroot'], true);
}
$openbasedir .= appendOpenBasedirPath($this->getTempDir());
$openbasedir .= $_phpappendopenbasedir;
$openbasedir = explode(':', $openbasedir);
$clean_openbasedir = array();
foreach($openbasedir as $number => $path)
@@ -229,7 +236,31 @@ class phpinterface_fpm
safe_exec('chown -R ' . $this->_domain['guid'] . ':' . $this->_domain['guid'] . ' ' . escapeshellarg($tmpdir));
safe_exec('chmod 0750 ' . escapeshellarg($tmpdir));
}
return $tmpdir;
}
/**
* fastcgi-fakedirectory directory
*
* @param boolean $createifnotexists create the directory if it does not exist
*
* @return string the directory
*/
public function getAliasConfigDir($createifnotexists = true)
{
// ensure default...
if (!isset($this->_settings['phpfpm']['aliasconfigdir'])) {
$this->_settings['phpfpm']['aliasconfigdir'] = '/var/www/php-fpm';
}
$configdir = makeCorrectDir($this->_settings['phpfpm']['aliasconfigdir'] . '/' . $this->_domain['loginname'] . '/' . $this->_domain['domain'] . '/');
if(!is_dir($configdir) && $createifnotexists)
{
safe_exec('mkdir -p ' . escapeshellarg($configdir));
safe_exec('chown ' . $this->_domain['guid'] . ':' . $this->_domain['guid'] . ' ' . escapeshellarg($configdir));
}
return $configdir;
}
}

View File

@@ -2317,4 +2317,4 @@ class phpmailerException extends Exception {
return $errorMsg;
}
}
?>
?>

View File

@@ -89,7 +89,7 @@ class ticket
// initialize purifier
require_once dirname(dirname(__FILE__)).'/htmlpurifier/library/HTMLPurifier.auto.php';
$config = HTMLPurifier_Config::createDefault();
$config->set('Core.Encoding', 'ISO-8859-1'); // for now
$config->set('Core.Encoding', 'UTF-8'); //htmlpurifier uses utf-8 anyway as default
$config->set('HTML.Doctype', 'XHTML 1.0 Transitional');
$this->_purifier = new HTMLPurifier($config);
@@ -260,7 +260,7 @@ class ticket
public function sendMail($customerid = - 1, $template_subject = null, $default_subject = null, $template_body = null, $default_body = null)
{
global $mail;
global $mail, $theme;
// Some checks are to be made here in the future
@@ -449,9 +449,13 @@ class ticket
*
* @return int highest order number
*/
static public function getHighestOrderNumber($_db = null)
static public function getHighestOrderNumber($_db = null, $_uid = 0)
{
$sql = "SELECT MAX(`logicalorder`) as `highestorder` FROM `" . TABLE_PANEL_TICKET_CATS . "`;";
$where = '';
if ($_uid > 0) {
$where = ' WHERE `adminid` = "'.(int)$_uid.'"';
}
$sql = "SELECT MAX(`logicalorder`) as `highestorder` FROM `" . TABLE_PANEL_TICKET_CATS . "`".$where.";";
$result = $_db->query_first($sql);
return (isset($result['highestorder']) ? (int)$result['highestorder'] : 0);
}
@@ -680,13 +684,13 @@ class ticket
private function convertLatin1ToHtml($str)
{
$html_entities = array (
"<EFBFBD>" => "&Auml;",
"<EFBFBD>" => "&auml;",
"<EFBFBD>" => "&Ouml;",
"<EFBFBD>" => "&ouml;",
"<EFBFBD>" => "&Uuml;",
"<EFBFBD>" => "&uuml;",
"<EFBFBD>" => "&szlig;"
"Ä" => "&Auml;",
"ä" => "&auml;",
"Ö" => "&Ouml;",
"ö" => "&ouml;",
"Ü" => "&Uuml;",
"ü" => "&uuml;",
"ß" => "&szlig;"
/*
* @TODO continue this table for all the special-characters
*/

View File

@@ -15,6 +15,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'freebsd' => Array(
'label' => 'FreeBSD',
@@ -89,10 +106,10 @@ return Array(
'make install'
),
'commands_2' => Array(
'pw groupadd vmail -g '.$settings['system']['vmail_gid'],
'pw useradd vmail -u '.$settings['system']['vmail_uid'].' -g '.$settings['system']['vmail_gid'].' -s/sbin/nologin -d/dev/null',
($vmail_group === false) ? 'pw groupadd ' . $vmail_groupname . ' -g '.$settings['system']['vmail_gid'] : '',
($vmail_user === false) ? 'pw useradd ' . $vmail_username . ' -u '.$settings['system']['vmail_uid'].' -g '.$settings['system']['vmail_gid'].' -s/sbin/nologin -d/dev/null' : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'chmod 0750 ' . $settings['system']['vmail_homedir']
),
'commands_3' => Array(
@@ -180,7 +197,7 @@ return Array(
),
'commands_2' => Array(
'echo "dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf',
flags=DRhu user='.$vmail_username.':'.$vmail_groupname.' argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf',
'chmod 0640 /usr/local/etc/dovecot-sql.conf'
),
'restart' => Array(
@@ -222,7 +239,7 @@ return Array(
'cron' => Array(
'label' => 'Crond (cronscript)',
'commands' => Array(
'echo "*/5 * * * * root /usr/local/bin/php -q '.makeCorrectDir(dirname(dirname(dirname(__FILE__)))).'scripts/froxlor_master_cronjob.php" >> /etc/crontab'
'echo "*/5 * * * * root nice -n 5 /usr/local/bin/php -q '.makeCorrectDir(dirname(dirname(dirname(__FILE__)))).'scripts/froxlor_master_cronjob.php" >> /etc/crontab'
),
'restart' => Array(
'/etc/rc.d/cron restart'

View File

@@ -17,6 +17,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'gentoo' => Array(
'label' => 'Gentoo',
@@ -123,30 +140,25 @@ return Array(
'postfix_courier' => Array(
'label' => 'Postfix/Courier',
'commands_1' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'echo "mail-mta/postfix -dovecot-sasl sasl" >> /etc/portage/package.use',
'emerge -av postfix',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'chmod 0750 ' . $settings['system']['vmail_homedir'],
'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo',
'touch /etc/postfix/main.cf',
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
'touch /etc/sasl2/smtpd.conf',
'chown root:root /etc/postfix/main.cf',
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
'chown root:root /etc/sasl2/smtpd.conf',
'chmod 0644 /etc/postfix/main.cf',
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
'chmod 0600 /etc/sasl2/smtpd.conf',
'for suffix in {alias,mailbox,uid,gid}_maps mailbox_domains sender_permissions; do',
' touch /etc/postfix/mysql-virtual_${suffix}.cf',
' chown root:postfix /etc/postfix/mysql-virtual_${suffix}.cf',
' chmod 0640 /etc/postfix/mysql-virtual_${suffix}.cf',
'done'
),
'files' => Array(
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
@@ -154,6 +166,8 @@ return Array(
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
'etc_postfix_mysql-virtual_uid_maps.cf' => '/etc/postfix/mysql-virtual_uid_maps.cf',
'etc_postfix_mysql-virtual_gid_maps.cf' => '/etc/postfix/mysql-virtual_gid_maps.cf',
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
),
'commands_2' => Array(
@@ -166,30 +180,22 @@ return Array(
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands_1' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use',
'emerge -av postfix',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_user['name'].':'.$vmail_group['name'].' ' . $settings['system']['vmail_homedir'],
'chmod 0750 ' . $settings['system']['vmail_homedir'],
'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo',
'touch /etc/postfix/main.cf',
'touch /etc/postfix/master.cf',
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
'chown root:root /etc/postfix/main.cf',
'chown root:root /etc/postfix/master.cf',
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
'chmod 0644 /etc/postfix/main.cf',
'chmod 0644 /etc/postfix/master.cf',
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
'touch /etc/postfix/{main,master}.cf',
'chown root:root /etc/postfix/{main,master}.cf',
'chmod 0644 /etc/postfix/{main,master}.cf',
'for suffix in {alias,mailbox,uid,gid}_maps mailbox_domains sender_permissions; do',
' touch /etc/postfix/mysql-virtual_${suffix}.cf',
' chown root:postfix /etc/postfix/mysql-virtual_${suffix}.cf',
' chmod 0640 /etc/postfix/mysql-virtual_${suffix}.cf',
'done'
),
'files' => Array(
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
@@ -197,7 +203,9 @@ return Array(
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
'etc_postfix_mysql-virtual_uid_maps.cf' => '/etc/postfix/mysql-virtual_uid_maps.cf',
'etc_postfix_mysql-virtual_gid_maps.cf' => '/etc/postfix/mysql-virtual_gid_maps.cf'
),
'commands_2' => Array(
'rc-update add postfix default'
@@ -295,11 +303,12 @@ milter_default_action = accept" >> /etc/postfix/main.cf',
'dovecot' => Array(
'label' => 'Dovecot 1',
'commands_1' => Array(
'echo "net-mail/dovecot mysql" >> /etc/portage/package.use',
'emerge -av dovecot',
'mv dovecot.conf dovecot.conf.gentoo',
'mv dovecot-sql.conf dovecot-sql.conf.gentoo',
'touch dovecot.conf',
'touch dovecot-sql.conf',
'mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.gentoo',
'mv /etc/dovecot/dovecot-sql.conf /etc/dovecot/dovecot-sql.conf.gentoo',
'touch /etc/dovecot/dovecot.conf',
'touch /etc/dovecot/dovecot-sql.conf',
),
'files' => Array(
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
@@ -316,11 +325,12 @@ milter_default_action = accept" >> /etc/postfix/main.cf',
'dovecot2' => Array(
'label' => 'Dovecot 2',
'commands_1' => Array(
'echo "net-mail/dovecot mysql" >> /etc/portage/package.use',
'emerge -av dovecot',
'mv dovecot.conf dovecot.conf.gentoo',
'mv dovecot-sql.conf dovecot-sql.conf.gentoo',
'touch dovecot.conf',
'touch dovecot-sql.conf',
'mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.gentoo',
'mv /etc/dovecot/dovecot-sql.conf /etc/dovecot/dovecot-sql.conf.gentoo',
'touch /etc/dovecot/dovecot.conf',
'touch /etc/dovecot/dovecot-sql.conf',
),
'files' => Array(
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',

View File

@@ -17,6 +17,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'ubuntu_hardy' => Array(
'label' => 'Ubuntu 8.04 (Hardy)',
@@ -127,13 +144,13 @@ return Array(
'postfix_courier' => Array(
'label' => 'Postfix/Courier',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -188,13 +205,13 @@ return Array(
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',

View File

@@ -17,6 +17,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'ubuntu_lucid' => Array(
'label' => 'Ubuntu 10.04 (Lucid)',
@@ -128,13 +145,13 @@ return Array(
'postfix_courier' => Array(
'label' => 'Postfix/Courier',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -189,13 +206,13 @@ return Array(
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',

View File

@@ -14,12 +14,29 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Configfiles
*
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'debian_lenny' => Array(
'label' => 'Debian 5.0 (Lenny)',
'ubuntu_precise' => Array(
'label' => 'Ubuntu 12.04 (Precise)',
'services' => Array(
'http' => Array(
'label' => $lng['admin']['configfiles']['http'],
@@ -67,7 +84,7 @@ return Array(
),
'restart' => Array(
'/etc/init.d/lighttpd restart'
)
),
),
'nginx' => Array(
'label' => 'Nginx Webserver',
@@ -82,7 +99,7 @@ return Array(
'rm /etc/nginx/sites-enabled/default',
'mkdir -p ' . $settings['system']['documentroot_prefix'],
'mkdir -p ' . $settings['system']['logfiles_directory'],
//'mkdir -p ' . $settings['system']['deactivateddocroot'],
'mkdir -p ' . $settings['system']['deactivateddocroot'],
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
'chmod u+x /etc/init.d/php-fcgi'
@@ -91,8 +108,8 @@ return Array(
'/etc/init.d/php-fcgi start',
'/etc/init.d/nginx restart'
)
)
)
),
),
),
'dns' => Array(
'label' => $lng['admin']['configfiles']['dns'],
@@ -128,13 +145,13 @@ return Array(
'postfix_courier' => Array(
'label' => 'Postfix/Courier',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -189,13 +206,13 @@ return Array(
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -282,14 +299,17 @@ return Array(
'dovecot' => Array(
'label' => 'Dovecot',
'commands_1' => Array(
'apt-get install dovecot-imapd dovecot-pop3d'
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix dovecot-mysql mail-stack-delivery'
),
'files' => Array(
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
'etc_dovecot_conf.d_01_mail_stack_delivery.conf' => '/etc/dovecot/conf.d/01-mail-stack-delivery.conf',
'etc_dovecot_conf.d_10_auth.conf' => '/etc/dovecot/conf.d/10-auth.conf',
'etc_dovecot_conf.d_auth-sql.conf.ext' => '/etc/dovecot/conf.d/auth-sql.conf.ext',
'etc_dovecot_dovecot-sql.conf.ext' => '/etc/dovecot/dovecot-sql.conf.ext'
),
'commands_2' => Array(
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
'chmod 0640 /etc/dovecot/dovecot-sql.conf.ext'
),
'restart' => Array(
'/etc/init.d/dovecot restart'
@@ -362,14 +382,14 @@ return Array(
),
),
'libnss' => Array(
'label' => 'libnss (system login with mysql)',
'label' => 'libnss-bg (system login with mysql)',
'commands' => Array(
'apt-get install libnss-mysql nscd',
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
'apt-get install libnss-mysql-bg nscd',
'chmod 600 /etc/libnss-mysql.cfg /etc/libnss-mysql-root.cfg'
),
'files' => Array(
'etc_nss-mysql.conf' => '/etc/nss-mysql.conf',
'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf',
'etc_libnss-mysql.cfg' => '/etc/libnss-mysql.cfg',
'etc_libnss-mysql-root.cfg' => '/etc/libnss-mysql-root.cfg',
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
),
'restart' => Array(

View File

@@ -17,6 +17,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'sle_10' => Array(
'label' => 'SUSE Linux Enterprise 10',
@@ -71,11 +88,11 @@ return Array(
'usr_lib_sasl2_smtpd.conf' => '/usr/lib/sasl2/smtpd.conf'
),
'commands' => Array(
'mkdir -p /var/spool/postfix/etc/pam.d',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'mkdir -p /var/spool/postfix/etc/pam.d',
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',

View File

@@ -17,6 +17,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'debian_squeeze' => Array(
'label' => 'Debian 6.0 (Squeeze)',
@@ -128,13 +145,13 @@ return Array(
'postfix_courier' => Array(
'label' => 'Postfix/Courier',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' '.$vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -189,13 +206,13 @@ return Array(
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',

View File

@@ -17,6 +17,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'opensuse_11_x' => Array(
'label' => 'openSUSE 11.x',
@@ -68,11 +85,11 @@ return Array(
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
),
'commands' => Array(
'mkdir -p /var/spool/postfix/etc/pam.d',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . $settings['system']['vmail_homedir'],
'mkdir -p /var/spool/postfix/etc/pam.d',
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -106,13 +123,13 @@ return Array(
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'zypper install postfix postfix-mysql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',

View File

@@ -45,5 +45,5 @@ else
$cfgPath = 'lib/configfiles/';
$configfiles = Array();
$configfiles = array_merge(include $cfgPath . 'squeeze.inc.php', include $cfgPath . 'lenny.inc.php', include $cfgPath . 'lucid.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse11.inc.php', include $cfgPath . 'sle10.inc.php', include $cfgPath . 'freebsd.inc.php');
$configfiles = array_merge(include $cfgPath . 'squeeze.inc.php', include $cfgPath . 'precise.inc.php', include $cfgPath . 'lucid.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse11.inc.php', include $cfgPath . 'sle10.inc.php', include $cfgPath . 'freebsd.inc.php');

View File

@@ -200,6 +200,14 @@ return array(
'visible' => ($settings['ticket']['enabled'] == '1' ? true : false),
'ul_field' => $tickets_ul
),
'tickets_see_all' => array(
'label' => $lng['admin']['tickets_see_all'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array()
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',

View File

@@ -214,6 +214,14 @@ return array(
'visible' => ($settings['ticket']['enabled'] == '1' ? true : false),
'ul_field' => $tickets_ul
),
'tickets_see_all' => array(
'label' => $lng['admin']['tickets_see_all'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['tickets_see_all'])
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',

View File

@@ -190,7 +190,7 @@ return array(
'section_d' => array(
'title' => $lng['admin']['nameserversettings'],
'image' => 'icons/domain_add.png',
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'visible' => ($settings['system']['bind_enable'] == '1' && $userinfo['change_serversettings'] == '1' ? true : false),
'fields' => array(
'isbinddomain' => array(
'label' => 'Nameserver',

View File

@@ -214,7 +214,7 @@ return array(
'section_d' => array(
'title' => $lng['admin']['nameserversettings'],
'image' => 'icons/domain_edit.png',
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'visible' => ($settings['system']['bind_enable'] == '1' && $userinfo['change_serversettings'] == '1' ? true : false),
'fields' => array(
'isbinddomain' => array(
'label' => 'Nameserver',

View File

@@ -44,7 +44,7 @@ function includeFunctions($dirname)
function __autoload($classname)
{
global $libdirname;
global $libdirname, $theme;
findIncludeClass($libdirname . '/classes/', $classname);
}

View File

@@ -28,7 +28,7 @@
*/
function domainHasApsInstances($domainid = 0)
{
global $db, $settings;
global $db, $settings, $theme;
if($settings['aps']['aps_active'] == '1')
{

View File

@@ -19,12 +19,12 @@
function correctMysqlUsers($mysql_access_host_array)
{
global $db, $settings, $sql, $sql_root;
global $db, $settings, $sql, $sql_root, $theme;
foreach($sql_root as $mysql_server => $mysql_server_details)
{
$db_root = new db($mysql_server_details['host'], $mysql_server_details['user'], $mysql_server_details['password'], '');
unset($db_root->password);
unset($mysql_server_details['password']);
$users = array();
$users_result = $db_root->query('SELECT * FROM `mysql`.`user`');

View File

@@ -24,15 +24,24 @@
*/
function maildirExists($result = null)
{
global $settings;
global $settings, $theme;
if(is_array($result))
{
$loginname = getCustomerDetail($result['customerid'], 'loginname');
if($loginname !== false) {
$maildir = makeCorrectDir($settings['system']['vmail_homedir'] .'/'. $loginname .'/'. $result['email_full']);
$email_user=substr($result['email_full'],0,strrpos($result['email_full'],"@"));
$email_domain=substr($result['email_full'],strrpos($result['email_full'],"@")+1);
$maildirname=trim($settings['system']['vmail_maildirname']);
$maildir = makeCorrectDir($settings['system']['vmail_homedir'] .'/'. $loginname .'/'. $email_domain .'/'. $email_user . (!empty($maildirname)?'/'.$maildirname:''));
if(@file_exists($maildir)) {
return true;
} else {
// backward-compatibility for old folder-structure
$maildir_old = makeCorrectDir($settings['system']['vmail_homedir'] .'/'. $loginname .'/'. $email_user);
if (@file_exists($maildir_old)) {
return true;
}
}
}
}

View File

@@ -26,7 +26,7 @@
*/
function makeChownWithNewStats($row)
{
global $settings;
global $settings, $theme;
// get correct user
if($settings['system']['mod_fcgid'] == '1' && isset($row['deactivated']) && $row['deactivated'] == '0')

View File

@@ -34,7 +34,7 @@
function makePathfield($path, $uid, $gid, $fieldType, $value = '', $dom = false)
{
global $lng;
global $lng, $theme;
$value = str_replace($path, '', $value);
$field = array();

View File

@@ -33,7 +33,7 @@
function safe_exec($exec_string, &$return_value = false)
{
global $settings;
global $settings, $theme;
//
// define allowed system commands

View File

@@ -27,7 +27,7 @@
*/
function storeDefaultIndex($loginname = null, $destination = null, $logger = null, $force = false)
{
global $db, $settings, $pathtophpfiles;
global $db, $settings, $pathtophpfiles, $theme;
if ($force
|| (int)$settings['system']['store_index_file_subs'] == 1

View File

@@ -17,7 +17,7 @@
function buildFormEx($form, $part = '')
{
global $settings;
global $settings, $theme;
$fields = '';
if(validateFormDefinition($form))

View File

@@ -19,7 +19,7 @@
function getFormFieldOutput($fieldname, $fielddata)
{
global $settings;
global $settings, $theme;
$returnvalue = '';
if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldOutput' . ucfirst($fielddata['type'])))

View File

@@ -19,14 +19,14 @@
function getFormGroupOutput($groupname, $groupdetails)
{
global $lng;
global $lng, $theme;
eval("\$group = \"" . getTemplate("settings/settings_group") . "\";");
return $group;
}
function getFormOverviewGroupOutput($groupname, $groupdetails)
{
global $lng, $settings, $filename, $s;
global $lng, $settings, $filename, $s, $theme;
$group = '';
$title = $groupdetails['title'];

View File

@@ -37,7 +37,7 @@ function processForm(&$form, &$input, $url_params = array())
}
}
}
foreach($form['groups'] as $groupname => $groupdetails)
{
if(validateFieldDefinition($groupdetails))
@@ -46,7 +46,7 @@ function processForm(&$form, &$input, $url_params = array())
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
{
$newfieldvalue = getFormFieldData($fieldname, $fielddetails, $input);
if($newfieldvalue != $fielddetails['value'])
{
if(($error = validateFormField($fieldname, $fielddetails, $newfieldvalue)) !== true)
@@ -173,13 +173,13 @@ function processFormEx(&$form, &$input, $url_params = array(), $part, $settings_
}
}
}
foreach($form['groups'] as $groupname => $groupdetails)
{
if(($settings_part && $part == $groupname)
|| $settings_all
|| $only_enabledisable
){
){
if(validateFieldDefinition($groupdetails))
{
// Validate fields
@@ -189,7 +189,6 @@ function processFormEx(&$form, &$input, $url_params = array(), $part, $settings_
|| ($only_enabledisable && isset($fielddetails['overview_option']))
) {
$newfieldvalue = getFormFieldData($fieldname, $fielddetails, $input);
if($newfieldvalue != $fielddetails['value'])
{
if(($error = validateFormField($fieldname, $fielddetails, $newfieldvalue)) !== true)
@@ -201,7 +200,7 @@ function processFormEx(&$form, &$input, $url_params = array(), $part, $settings_
$changed_fields[$fieldname] = $newfieldvalue;
}
}
$submitted_fields[$fieldname] = $newfieldvalue;
}
}

View File

@@ -26,7 +26,7 @@
*/
function correctErrorDocument($errdoc = null)
{
global $settings, $idna_convert;
global $settings, $idna_convert, $theme;
if($errdoc !== null && $errdoc != '')
{

View File

@@ -24,7 +24,7 @@
*/
function getNextCronjobs()
{
global $db;
global $db, $theme;
$query = "SELECT `id`, `cronfile` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `interval` <> '0' AND `isactive` = '1' AND (";
@@ -60,7 +60,7 @@ function getNextCronjobs()
function includeCronjobs($debugHandler, $pathtophpfiles)
{
global $settings;
global $settings, $theme;
$cronjobs = getNextCronjobs();
@@ -84,7 +84,7 @@ function includeCronjobs($debugHandler, $pathtophpfiles)
function getIntervalOptions()
{
global $db, $lng, $cronlog;
global $db, $lng, $cronlog, $theme;
$query = "SELECT DISTINCT `interval` FROM `" . TABLE_PANEL_CRONRUNS . "` ORDER BY `interval` ASC;";
$result = $db->query($query);
@@ -110,7 +110,7 @@ function getIntervalOptions()
function getCronjobsLastRun()
{
global $db, $lng;
global $db, $lng, $theme;
$query = "SELECT `lastrun`, `desc_lng_key` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `isactive` = '1' ORDER BY `cronfile` ASC";
$result = $db->query($query);
@@ -135,7 +135,7 @@ function getCronjobsLastRun()
function toggleCronStatus($module = null, $isactive = 0)
{
global $db;
global $db, $theme;
if($isactive != 1) {
$isactive = 0;
@@ -148,7 +148,7 @@ function toggleCronStatus($module = null, $isactive = 0)
function getOutstandingTasks()
{
global $db, $lng;
global $db, $lng, $theme;
$query = "SELECT * FROM `".TABLE_PANEL_TASKS."` ORDER BY `type` ASC";
$result = $db->query($query);
@@ -209,6 +209,10 @@ function getOutstandingTasks()
$task_desc = $lng['tasks']['deleting_customerfiles'];
$task_desc = str_replace('%loginname%', $loginname, $task_desc);
}
elseif($row['type'] == '7')
{
$task_desc = $lng['tasks']['remove_emailacc_files'];
}
/*
* Set FS - quota
*/
@@ -216,6 +220,11 @@ function getOutstandingTasks()
{
$task_desc = $lng['tasks']['diskspace_set_quota'];
}
else
{
$task_desc = "ERROR: Unknown task type '".$row['type'].
"'";
}
if($task_desc != '') {
$tasks .= '<li>'.$task_desc.'</li>';

View File

@@ -29,7 +29,7 @@
function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot, $awstats_params = array())
{
global $pathtophpfiles, $settings;
global $pathtophpfiles, $settings, $theme;
// Generation header

View File

@@ -27,7 +27,7 @@
*/
function customerHasPerlEnabled($cid = 0)
{
global $db;
global $db, $theme;
if($cid > 0)
{

View File

@@ -25,7 +25,7 @@
*/
function domainHasMainSubDomains($id = 0)
{
global $db;
global $db, $theme;
$sql = "SELECT COUNT(`id`) as `mainsubs` FROM `".TABLE_PANEL_DOMAINS."` WHERE `ismainbutsubto` = '".(int)$id."'";
$result = $db->query_first($sql);
@@ -47,7 +47,7 @@ function domainHasMainSubDomains($id = 0)
*/
function domainMainToSubExists($id = 0)
{
global $db;
global $db, $theme;
$sql = "SELECT `id` FROM `".TABLE_PANEL_DOMAINS."` WHERE `id` = '".(int)$id."'";
$result = $db->query_first($sql);

View File

@@ -21,7 +21,7 @@
function generatePassword()
{
global $db, $settings;
global $db, $settings, $theme;
return substr(md5(uniqid(microtime(), 1)), 24, 10);
}

View File

@@ -19,7 +19,7 @@
function getAdmins($limit_resource = '')
{
global $db;
global $db, $theme;
$additional_conditions = '';
$additional_conditions_array = array();

View File

@@ -19,7 +19,7 @@
function getCustomerDetail($customerid, $varname)
{
global $db;
global $db, $theme;
$query = 'SELECT `' . $db->escape($varname) . '` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = \'' . (int)$customerid . '\'';
$customer = $db->query_first($query);

View File

@@ -9,10 +9,10 @@
*/
function getCustomerIdByDomain($domain = null)
{
global $db;
global $db, $theme;
$result = $db->query_first("SELECT `customerid` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '".$domain."'");
if(is_array($result)
if(is_array($result)
&& isset($result['customerid'])
) {
return $result['customerid'];

View File

@@ -19,7 +19,7 @@
function getCustomers($limit_resource = '')
{
global $db;
global $db, $theme;
$additional_conditions = '';
$additional_conditions_array = array();

View File

@@ -17,7 +17,7 @@
function getFilesystemQuota()
{
global $settings;
global $settings, $theme;
if ($settings['system']['diskquota_enabled'])
{
# Fetch all quota in the desired partition

View File

@@ -19,7 +19,7 @@
function getIpAddresses()
{
global $db;
global $db, $theme;
$query = 'SELECT `id`, `ip`, `port` FROM `' . TABLE_PANEL_IPSANDPORTS . '` ORDER BY `ip` ASC, `port` ASC';
$result = $db->query($query);

View File

@@ -19,7 +19,7 @@
function getIpPortCombinations($ssl = null)
{
global $db;
global $db, $theme;
$additional_conditions = '';
$additional_conditions_array = array();

View File

@@ -19,7 +19,7 @@
function getLanguages()
{
global $db;
global $db, $theme;
$query = 'SELECT * FROM `' . TABLE_PANEL_LANGUAGE . '` ';
$result = $db->query($query);

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