Compare commits

..

901 Commits

Author SHA1 Message Date
Florian Aders (EleRas)
c1e083c8b2 Tagging 0.9.24
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-04 19:03:45 +02:00
Florian Aders (EleRas)
70a077da48 fixed resourcebars, thx philnate, fixes #787
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-04 11:21:38 +02:00
Christoph Burchert (Chb)
c5fb8bee6b Enables to delete customers with already deleted databases (thanks to crazy4chrissi), fixes #872
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-26 04:12:01 +02:00
Christoph Burchert (Chb)
418990e271 Fixes fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-26 03:47:12 +02:00
Christoph Burchert (Chb)
93ab8964f1 Hide backup FTP password (thanks to monotek), fixes #762
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-26 03:43:37 +02:00
Florian Aders (EleRas)
fd599da07e Tagging 0.9.24-rc1
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-19 18:32:55 +02:00
Andreas Burchert (scarya)
369df7af62 Fixes wrong location declaration for nginx, fixes #749
Thanks to altmir
2011-09-19 11:21:11 +02:00
Andreas Burchert (scarya)
bb01dd0d93 Fixes a small syntax error. 2011-09-19 11:17:15 +02:00
Andreas Burchert (scarya)
84f00a2519 Fixes malformed priority in ticket archive search, fixes #714
Note: swedish could not be fixed and my swedish is way to bad to do it on my own
Thanks to philnate
2011-09-19 11:11:26 +02:00
Andreas Burchert (scarya)
8e07768996 Fixes 'unknown user' for disabled accounts (traffic overview), fixes #791
Thanks to monotek
2011-09-19 11:07:09 +02:00
Andreas Burchert (scarya)
9b12025c9f Prevents froxlor from creating a vhost (apache only) for relay mail domains, fixes #848
Thanks to sinuxwave
2011-09-19 11:00:50 +02:00
Andreas Burchert (scarya)
14f9344c50 Prevent empty 'ServerName', fixes #870
Thanks to h4cc
2011-09-19 10:56:27 +02:00
Andreas Burchert (scarya)
af430f9946 modernized bash init-scripts, fixes #889
Thanks to arnoldB.
2011-09-19 10:50:23 +02:00
Christoph Burchert (Chb)
992702870c Fixed customer's backup directory (thanks to monotek and arnoldB), fixes #859
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-15 15:03:55 +02:00
Florian Aders (EleRas)
642cd3da9d Applied patch to fix IPv6 in bind, fixes #799, thx frennkie
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-09 13:57:59 +02:00
Florian Aders (EleRas)
5d2d1ffa1a Improve showing of MySQL - databasesize, refs #834, thx arnoldB
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-09 10:33:33 +02:00
Florian Aders (EleRas)
19bbecb535 Shorten the megabytes, refs #834
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 15:05:18 +02:00
Florian Aders (EleRas)
e636e6eb39 Show database-size in database-overview, fixes #834
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 14:46:01 +02:00
Florian Aders (EleRas)
86ac4708f0 Adding a favicon, fixes #875
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 12:49:17 +02:00
Florian Aders (EleRas)
f49ac9e193 fixing mysql-virtual_sender_permissions.cf regarding postfix-policy in Froxlor, fixes #879
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 08:44:08 +02:00
Florian Aders (EleRas)
f0d9db420a fixing mysql-virtual_mailbox_maps.cf regarding postfix-policy in Froxlor, refs #879
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 08:40:21 +02:00
Florian Aders (EleRas)
526dbbd68e fixing mysql-virtual_alias_maps.cf and mysql-virtual_mailbox_domains.cf regarding postfix-policy in Froxlor, refs #879
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-08 08:37:07 +02:00
Christoph Burchert (Chb)
9a05a71f6b Fixed typo (thanks to frontline), fixes #880
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-07 19:29:58 +02:00
Florian Aders (EleRas)
e4f3af5d4b fixed htmleating in ticketsystem, thx philnate, fixes #727
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-06 11:02:47 +02:00
Florian Aders (EleRas)
3a7b7c1300 Improved description of values in admin panel, thx philnate, fixes #743
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-06 08:15:44 +02:00
Florian Aders (EleRas)
cdea6cecfb Fixed version in updater for logrotate, refs #16
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-09-05 19:38:39 +02:00
Christoph Burchert (Chb)
c36a7bf22b Add logrotate support, fixes #16 (thanks to monotek!)
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-05 14:56:50 +02:00
Christoph Burchert (Chb)
ca2a8c9907 Security fix: unescaped commandline argument (thanks to Bernhard Czech (sinuswave))
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-09-05 14:31:03 +02:00
Florian Aders (EleRas)
4914fc640a Tagging 0.9.23
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-22 17:26:11 +02:00
Florian Aders (EleRas)
f0b073a6f1 Tagging 0.9.23-rc1
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-09 18:11:09 +02:00
Andreas Burchert (scarya)
79f5ff4d35 Used correct function to create tmpdir, fixes #846 @0h5m
Thanks to sreimers.
2011-08-07 15:49:40 +02:00
Florian Aders (EleRas)
8609b2394b Removing PHP - tmpdir on customerdelete if files need to be deleted, fixes #728
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-07 14:46:05 +02:00
Florian Aders (EleRas)
5bb3c16312 Fixed a few bugs in the WebFTP and allowing optional SSL - connection to the server
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-07 14:35:57 +02:00
Florian Aders (EleRas)
df5d3ef66f Added autocomplete="off" to formfields (yeah, it is valid in HTML5), thx sinuswave, fixes #469
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-04 08:29:09 +02:00
Florian Aders (EleRas)
a207f2f936 Fixing catchall - checkbox on email-add, thx sinuswave, fixes #793 @0h1m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-08-04 07:23:08 +02:00
Andreas Burchert (scarya)
b0bd0836cd Added --froce to mysqldump, fixes #581 @0h5m
Thanks to monotek.
2011-08-02 14:41:24 +02:00
Andreas Burchert (scarya)
475377dd85 Added missing var to formfield, fixes #780 @0h5m
Thanks to sinuswave
2011-08-02 14:32:45 +02:00
Florian Aders (EleRas)
16776ce750 Updated translation of WebFTP
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-16 10:13:13 +02:00
Florian Aders (EleRas)
3861917dbc Fixed an XSS in WebFTP (positive sideeffect: less HTML in the PHP - code ;)), the tomreyn
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-16 09:52:55 +02:00
Andreas Burchert (scarya)
65891eff1c Autoloader now supports interfaces. 2011-07-14 13:07:04 +02:00
Florian Aders (EleRas)
bf9306c641 Fixed typo which prevented to upload files in webftp, fixes #842 @0h1m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-13 12:16:05 +02:00
Florian Aders (EleRas)
666d0db550 Tagging 0.9.22
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 19:31:22 +02:00
Florian Aders (EleRas)
6a41b30e70 Add the correct cache-directories and add .keep, so git will add them
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 17:32:09 +02:00
Florian Aders (EleRas)
0808bacb39 Use exec and silently fail in languagedetection, fixes #831, fixes #830
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 17:28:10 +02:00
Florian Aders (EleRas)
026f8503ab Fixed languageerror, fixes #828
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 17:12:19 +02:00
Florian Aders (EleRas)
19a7e78ebe Force Froxlor - theme for WebFTP until opther themes are available, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 17:10:35 +02:00
Florian Aders (EleRas)
76fb0d2a20 Always use GUID for chown, fixes #838
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-07-11 17:07:48 +02:00
Florian Aders (EleRas)
a418e60556 Fixed bug in webftp
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-27 18:45:47 +02:00
Florian Aders (EleRas)
8f760e87bc Tagging 0.9.22-rc1
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-27 18:13:47 +02:00
Florian Aders (EleRas)
0aff176cdc Fixed broken updater
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-27 18:12:14 +02:00
Florian Aders (EleRas)
cdcab6e1f8 Converted french special chars into htmlentities, thx arnoldB, fixes #817 @1m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-25 21:45:27 +02:00
Florian Aders (EleRas)
37d03bdf6a Fixed undefined index on loginpage, refs #794 @0h5m
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-25 21:36:59 +02:00
Andreas Burchert (scarya)
4a40870576 Improved backup functionality. Thanks monotek, refs #186 2011-06-24 01:24:13 +02:00
Andreas Burchert (scarya)
35958168a2 You can't set session timeout to 0, fixes #815 2011-06-24 00:39:53 +02:00
Andreas Burchert (scarya)
6badc2ad77 Increased the sorting to 5 chars. Should be enough, fixes #756 2011-06-23 23:44:11 +02:00
Andreas Burchert (scarya)
5184dc9ce7 Language fixes, fixes #813
Thanks to arnoldB!
2011-06-23 23:40:04 +02:00
Andreas Burchert (scarya)
b446575bf0 Removed mod_radius from proftpd conf, fixes #768 2011-06-23 23:29:40 +02:00
Florian Aders (EleRas)
b7114c670a Allow .php5 - files to be edited as well, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 16:32:20 +02:00
Florian Aders (EleRas)
536e66da7c A nicer way to search the errormessage, this may (or may not) be helpful, refs #214
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 16:27:28 +02:00
Florian Aders (EleRas)
9114a98e4c Fixed typos, refs #214
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 16:21:38 +02:00
Florian Aders (EleRas)
9955bed2c1 Log MySQL - errors to syslog and do not print them in public, fixes #214
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 16:18:48 +02:00
Florian Aders (EleRas)
f6af38a2c3 Fixed german translation, thx arnoldB, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 13:30:49 +02:00
Florian Aders (EleRas)
76e886e610 Moved language - selection based on gettext into an own class for easier management
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 13:20:42 +02:00
Florian Aders (EleRas)
6daec3c975 Fixed gettext - support for smarty, now you are able to change the language for real and the translated string is no longer saved in the cached template, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 12:56:18 +02:00
Florian Aders (EleRas)
e9000a7e99 Merge branch 'quota' 2011-06-23 11:18:18 +02:00
Florian Aders (EleRas)
44a53492e6 Moving to smarty - escaping in webftp, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 11:09:44 +02:00
Florian Aders (EleRas)
7cf0fa7284 Destroy session if password was entered wrong in webftp, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 11:02:16 +02:00
Florian Aders (EleRas)
9aa86e1dee Show warnings if login failed, optimized handling of data in session, refs #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 10:47:29 +02:00
Florian Aders (EleRas)
961aad43d1 Added first rework of webftp - module, please not, this still needs a hell lot of work, but anyway: fixes #819
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 10:30:59 +02:00
Florian Aders (EleRas)
6e84ca4ae4 Added helperscript for smarty - gettext
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 10:29:34 +02:00
Florian Aders (EleRas)
f79e351b72 Added gettext - filter for smarty
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 10:28:52 +02:00
Florian Aders (EleRas)
a24d809428 Added Smarty 3.0.8
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 10:28:00 +02:00
Florian Aders (EleRas)
0fa64ea943 Fixed small bug in JS and navigation - element - template
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-23 01:04:59 +02:00
Florian Aders (EleRas)
fe0b71b628 Added updated french languagefile, fixes #817
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-21 21:30:38 +02:00
Florian Aders (EleRas)
a23260fb7f Added task 10 to description of outstanding tasks, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-19 13:43:56 +02:00
Florian Aders (EleRas)
eb984c2f4c Moved redundant code into single function, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-19 11:31:00 +02:00
Florian Aders (EleRas)
1836132c28 Use setting instead of hardcoded name, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 23:06:39 +02:00
Florian Aders (EleRas)
aae635bf5d More secure way to get the used quota, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 22:53:27 +02:00
Florian Aders (EleRas)
8599ff775b Tell Froxlor there exists a task-type 10, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 22:53:15 +02:00
Florian Aders (EleRas)
8bfdd0bc14 Update filesystem - quota when config-updates shall be written as well, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 19:54:43 +02:00
Florian Aders (EleRas)
30344b0dce Forgot to add settings, fixes #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 19:52:47 +02:00
Florian Aders (EleRas)
8019629a28 Added task 10 (setting filesystem - quota) where necessary, fixes #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 19:48:16 +02:00
Florian Aders (EleRas)
7a28108475 Added usage of filesystem - quota to diskusage - calculation and added a new task to cron_tasks.php for setting the quota, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 19:42:01 +02:00
Florian Aders (EleRas)
cfa94c5837 Added new settings for disk quota, refs #814
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-18 19:03:20 +02:00
Florian Aders (EleRas)
c9c0530461 Removed warning on deactivation of safemode since it is deprecated and will be removed, fixes #812, fixes #556
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 20:54:54 +02:00
Florian Aders (EleRas)
093ebfa457 Fixed a bug for PHP < 5.3.0 (used func_get_arg as argument, which does not work on older PHP versions)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 20:23:59 +02:00
Florian Aders (EleRas)
3800f31823 Added security related HTTP - header for browser which support this (non supporting browsers will just ignore it and everything is fine)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 20:17:44 +02:00
Florian Aders (EleRas)
cc26584f01 Updated jquery to jquery-1.6.1.min.js
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 20:05:14 +02:00
Florian Aders (EleRas)
8131e9e92c Just beautification
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 19:06:49 +02:00
Florian Aders (EleRas)
38e472a623 Use correct JS - file
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 19:05:25 +02:00
Florian Aders (EleRas)
3e21cb0298 Moved inline - javascript to external file in preparation of X-Content-Security-Policy (also, the code looks cleaner, yay)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-16 18:59:16 +02:00
Florian Aders (EleRas)
b9bb1a1286 A bit better ticket-delete - view (not 100% sufficient, but better than nothing)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 19:10:38 +02:00
Florian Aders (EleRas)
25609a7068 Moved ticket - formfields to correct directory
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 18:47:09 +02:00
Florian Aders (EleRas)
35d8b3f8a1 Moved autoresponder - formfields to own directory
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 18:45:11 +02:00
Florian Aders (EleRas)
d593a217a4 Moved autoresponder - templates to own directory (now following correct schema)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 18:41:18 +02:00
Florian Aders (EleRas)
960fa58799 Renamed ticket - templates to follow the rest of the Froxlor scheme: templatedir = <section> = [admin|customer]_<section>.php
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 18:34:43 +02:00
Florian Aders (EleRas)
76b716d41d redirectTo now uses the new linker class
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-14 18:22:29 +02:00
Florian Aders (EleRas)
0b3e788b86 Revert "Changed redirectTo to use new link-class"
This reverts commit b88246b112.
2011-06-13 22:08:38 +02:00
Florian Aders (EleRas)
b88246b112 Changed redirectTo to use new link-class
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 21:55:46 +02:00
Florian Aders (EleRas)
4d10c72ae9 Fixed bug in link-class where protocol was added to URL withour hostname
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 21:55:27 +02:00
Florian Aders (EleRas)
0a21ede3d2 Missing linker-link in classic - admin-customers-overview fixed
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 21:15:16 +02:00
Florian Aders (EleRas)
3669822064 Missing linker-links in traffic - files fixed
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 21:12:31 +02:00
Florian Aders (EleRas)
b68f9fe395 Implemented linker - class for admin_setting.php (resource-recalculation) (templates only) 2011-06-13 21:05:52 +02:00
Florian Aders (EleRas)
e101d01e11 Implemented linker - class for customer_tickets.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:56:08 +02:00
Florian Aders (EleRas)
bdce761af0 Implemented linker - class for customer_traffic.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:54:02 +02:00
Florian Aders (EleRas)
784d1a62f7 Implemented linker - class for customer_mysql.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:53:29 +02:00
Florian Aders (EleRas)
c84602d560 Implemented linker - class for customer_ftp.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:51:28 +02:00
Florian Aders (EleRas)
3bcba9fa40 Implemented linker - class for customer_extras.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:50:41 +02:00
Florian Aders (EleRas)
7246dc124e Implemented linker - class for customer_[autoresponder|emails].php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:48:37 +02:00
Florian Aders (EleRas)
fcdcd4d6cb Implemented linker - class for customer_domains.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:40:19 +02:00
Florian Aders (EleRas)
07d981ac25 Implemented linker - class for customer_index.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:38:46 +02:00
Florian Aders (EleRas)
1bf764c5c3 Implemented linker - class for admin_updates.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:36:20 +02:00
Florian Aders (EleRas)
79b886994c Implemented linker - class for admin_traffic.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:35:07 +02:00
Florian Aders (EleRas)
62f8c7d1b6 Implemented linker - class for admin_tickets.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:34:15 +02:00
Florian Aders (EleRas)
6fe0b7f6a4 Implemented linker - class for admin_templates.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:27:08 +02:00
Florian Aders (EleRas)
a55df73281 Implemented linker - class for admin_settings.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:25:36 +02:00
Florian Aders (EleRas)
ce6176ffe4 Implemented linker - class for admin_logger.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:20:05 +02:00
Florian Aders (EleRas)
570ceb8160 Implemented linker - class for admin_ipsandports.php (templates automatic replace only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 20:18:59 +02:00
Florian Aders (EleRas)
163228ff75 Implemented linker - class for admin_domains.php (templates only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 19:35:50 +02:00
Florian Aders (EleRas)
68b9c22938 Implemented linker - class for admin_customers.php (templates only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 18:57:18 +02:00
Florian Aders (EleRas)
7936f72bc1 Implemented linker - class for admin_cronjobs.php (templates only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 18:49:31 +02:00
Florian Aders (EleRas)
81df4f5444 Tiny change in admin_configfiles - template
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 18:36:46 +02:00
Florian Aders (EleRas)
54093a0a9a Implemented linker - class for admin_configfiles.php (templates only)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 18:32:31 +02:00
Florian Aders (EleRas)
c5e8786670 Implemented linker - class for admin_admins.php
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 17:57:17 +02:00
Florian Aders (EleRas)
6ebd6db87f Implemented linker - class for admin_index.php -> change_[theme|language|password], more to come
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 17:21:02 +02:00
Florian Aders (EleRas)
68e31962bc Fixed a bug in linker
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 17:05:08 +02:00
Florian Aders (EleRas)
9d24648607 Added more flexibility and temporary fallback for the sessionid
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 16:49:02 +02:00
Florian Aders (EleRas)
c26223a887 Fixed nasty typo
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 16:28:52 +02:00
Florian Aders (EleRas)
444f4b5d1e Added a class where all links will be generated in the future for easy management (First draft)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-13 16:27:50 +02:00
Andreas Burchert (scarya)
c72b07f690 Changed 'gender' to 'title' 2011-06-10 17:44:49 +02:00
Florian Aders (EleRas)
c318d9e9df We really, really have 2011, thx SZoellner _& arnoldB, fixes #802
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-10 07:22:28 +02:00
Florian Aders (EleRas)
5b6acce822 Fixed permission problem in apache, fixes #800
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-06-07 09:39:13 +02:00
Florian Aders (EleRas)
9a4b45838a Tagging 0.9.21
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-05-30 18:57:48 +02:00
Andreas Burchert (scarya)
48df1bac4b Moved apache reload to the end of cronjob, fixes #775 2011-05-27 21:56:11 +02:00
Andreas Burchert (scarya)
63aed1e8f4 Fix char-errors in Italian language file, fixes #790
Thanks to arnoldB
2011-05-21 17:23:49 +02:00
Andreas Burchert (scarya)
426e87a337 Forgot curly brackets. 2011-05-18 22:17:58 +02:00
Andreas Burchert (scarya)
cd141ce381 Externalized string. 2011-05-18 22:07:04 +02:00
Andreas Burchert (scarya)
ece63b8a36 Fix some language related strings, fixes #760
Thanks to arnoldB!
2011-05-18 20:55:01 +02:00
Andreas Burchert (scarya)
af423248da Small fix in Classic theme. 2011-05-18 16:49:41 +02:00
Christoph Burchert (Chb)
5ca7e173b0 consequently use Denglish, fixes gonna fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-05-18 14:10:44 +02:00
Christoph Burchert (Chb)
f845f7771a consequently use wrong English, fixes gonna fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-05-18 13:56:18 +02:00
Andreas Burchert (scarya)
500a829161 Update version to -svn2. 2011-05-18 13:30:13 +02:00
Andreas Burchert (scarya)
96c34b9b29 Fix issue with SSL and SSL redirect, fixes #778
Thanks to mnaumann.
2011-05-18 13:19:43 +02:00
Christoph Burchert (Chb)
ec7c19cceb fix the fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-05-18 10:04:23 +02:00
Christoph Burchert (Chb)
7a4501e581 added new setting: backup ftp passive mode, fixes #785
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-05-18 02:08:45 +02:00
Christoph Burchert (Chb)
75c5fae6b2 added options for continuous up- and downloads to proftpd config, fixes #784
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-05-18 01:35:54 +02:00
Andreas Burchert (scarya)
7a5bf65184 Added ISO-3166-2 country codes, refs #471 2011-05-15 21:25:00 +02:00
Andreas Burchert (scarya)
103626e82a Small fix in english language file. 2011-05-13 18:22:09 +02:00
Andreas Burchert (scarya)
ca1a77d883 Set version in froxlor.sql 2011-05-13 18:13:05 +02:00
Andreas Burchert (scarya)
ac68a5d35f Updated froxlor.sql and tables.inc 2011-05-13 17:39:16 +02:00
Andreas Burchert (scarya)
f63f1d947b You should think frist before commiting... 2011-05-13 17:33:39 +02:00
Andreas Burchert (scarya)
5b6aa1aa8d More fixing... 2011-05-13 17:31:01 +02:00
Andreas Burchert (scarya)
12177fd21d Patch the updater. 2011-05-13 17:28:11 +02:00
Andreas Burchert (scarya)
aa4254ad47 Added gender selection to add/edit customer, fixes #280 2011-05-12 18:58:01 +02:00
Andreas Burchert (scarya)
e2076603dd Added language stuff for customer gender, refs #280 2011-05-12 15:34:19 +02:00
Florian Aders (EleRas)
2ea90c1b45 Update italian languagefile, thx to Emilien
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-05-05 17:45:21 +02:00
Florian Aders (EleRas)
cf66dcf38d fixed updater, I now really hate that bitch
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-05-04 14:34:36 +02:00
Andreas Burchert (scarya)
51a83d8b09 Removed @version in file header. This isn't used by git. 2011-05-04 11:59:20 +02:00
Andreas Burchert (scarya)
e467409cbb Added <label> tag to license agreement in aps. 2011-05-01 15:32:59 +02:00
Andreas Burchert (scarya)
05b59621a6 Added trim() to registration date check, fixes #741 2011-05-01 13:27:24 +02:00
Florian Aders (EleRas)
e148e7d584 Update version, try fixing all possible broken states, refs #742
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-28 09:47:22 +02:00
Florian Aders (EleRas)
3fb6d4eac9 Fixed SQL, now the real one, fu, fixes #742
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-28 08:27:35 +02:00
Florian Aders (EleRas)
4aa78b07be Tagging 0.9.20.1
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-27 19:41:41 +02:00
Florian Aders (EleRas)
88048bf4c8 renamed lenny -> queeze, fixes #740
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-27 14:19:21 +02:00
Florian Aders (EleRas)
0bfc3393a0 added missing comma, fixes #739
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-27 13:34:21 +02:00
Florian Aders (EleRas)
018bc0b329 added missing columns, refs #186
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-27 11:58:45 +02:00
Florian Aders (EleRas)
f9543806a1 fixed type in backupsystem, refs #186
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-27 11:56:08 +02:00
Florian Aders (EleRas)
b9d65390c5 Added configfiles for squeeze, fixes #730
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-26 12:43:07 +02:00
Florian Aders (EleRas)
8740393b8c Tagging 0.9.20
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-26 11:14:00 +02:00
Florian Aders (EleRas)
1ddad9295f Tagging 0.9.20
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-26 10:28:50 +02:00
Florian Aders (EleRas)
d14493c9be Fixed typo in backup-settings, refs #186
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-26 10:14:09 +02:00
Andreas Burchert (scarya)
329c3f03c7 Added icons for backup function, refs #186 2011-04-26 10:08:23 +02:00
Florian Aders (EleRas)
16144944ca Fixed another bug in admin traffic summary, refs #492
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 18:03:31 +02:00
Florian Aders (EleRas)
6d0e44e103 Fix small bug in admin traffic summary, refs #492
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 17:45:47 +02:00
Andreas Burchert (scarya)
7db2fc6aeb ... fixed, the unfixed fix... hopefuly the last time -.-, refs #186 2011-04-24 10:49:14 +02:00
Andreas Burchert (scarya)
9aecf4ca8a Fix the unfixed fix. 2011-04-24 10:40:51 +02:00
Florian Aders (EleRas)
1b05b64fea Now use the correct js-source in header, fuuuuuuuuuuuu, refs #492
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 10:39:04 +02:00
Florian Aders (EleRas)
ed52821a11 Now use the correct jquery in tablesorting, refs #492
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 10:36:53 +02:00
Andreas Burchert (scarya)
20141ec173 Unfixed classic template, refs #186 2011-04-24 10:33:51 +02:00
Andreas Burchert (scarya)
194e4cfd20 Fixed templates, refs #186 2011-04-24 10:30:58 +02:00
Florian Aders (EleRas)
5a5653d594 Fixed linebreak in updater
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 10:27:46 +02:00
Florian Aders (EleRas)
a810a49a74 Fixed sorting, now use correct binary prefixes, refs #492
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 10:24:56 +02:00
Florian Aders (EleRas)
654af4fbc6 Fixed updater, refs #186
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 09:18:20 +02:00
Andreas Burchert (scarya)
35ffb12950 Fix for versioning.
Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-04-24 02:55:44 +02:00
Andreas Burchert (scarya)
7890730afa Added backup function to froxlor, fixes #186
Thanks to monotek.
2011-04-24 02:18:58 +02:00
Andreas Burchert (scarya)
a97e7d3697 Fixed htpasswd creation for nginx, fixes #722
Thanks to altmir.
2011-04-24 01:26:17 +02:00
Andreas Burchert (scarya)
b34c0e268e Added check for deactivated fcgid settings, fixes #725
Thanks to crazy4chrissi.
2011-04-24 01:04:21 +02:00
Florian Aders (EleRas)
63fe3e7019 Added german translation for traffic summary, refs #492
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 01:03:09 +02:00
Florian Aders (EleRas)
886e8632a7 Improved error message for system-hostname as customerdomain, fixes #690
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 01:02:10 +02:00
Florian Aders (EleRas)
b18a3cabc2 Fixed error if no traffic - entry exists yet, refs #492
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 00:57:08 +02:00
Florian Aders (EleRas)
f3f7127f82 Fix style of table-captions, fixes #492
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 00:25:01 +02:00
Florian Aders (EleRas)
8a8082b579 Use included jquery, refs #492
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 00:23:01 +02:00
Florian Aders (EleRas)
7a27095e7b Traffic - summary, new templates, refs #492
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 00:18:12 +02:00
Florian Aders (EleRas)
a08a34283d Added traffic overview for admins over all customers, refs #492, thx yabawock
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-24 00:01:37 +02:00
Florian Aders (EleRas)
76db59a1b1 Show description of fields in dashboard, fixes #600
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-23 21:45:54 +02:00
Florian Aders (EleRas)
a86fb44e61 Fixed date in configure - hint
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-23 21:36:29 +02:00
Christoph Burchert (Chb)
b6b294b682 added no_more option to exim4 configuration to prevent further routing, fixes #655
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-04-23 11:38:29 +02:00
Florian Aders (EleRas)
96e7ede031 Fixed updater - version introduced in commit 7491442a25
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-18 14:01:43 +02:00
Christoph Burchert (Chb)
e87c16b598 added password generator, fixes #346
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-04-16 16:46:38 +02:00
Andreas Burchert (scarya)
d02daee582 Changed '>=' to '>', fixes #711 2011-04-16 15:38:25 +02:00
Andreas Burchert (scarya)
77b515751e Forgot to add the new translated string. 2011-04-16 15:28:19 +02:00
Christoph Burchert (Chb)
0ade48117c added new setting for domain validation, fixes #718
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-04-16 15:17:21 +02:00
Christoph Burchert (Chb)
7491442a25 added new setting for domain validation, fixes #718
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-04-16 15:13:43 +02:00
Andreas Burchert (scarya)
6ba2d99b67 Added proper strings for resend password failed, fixes #704 2011-04-16 15:11:57 +02:00
Christoph Burchert (Chb)
5c980946a9 insert cronjob task after changig ftp home directory, fixes #698
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-04-16 14:26:52 +02:00
Christoph Burchert (Chb)
213e959568 disabled password reset for banned users, fixes #677
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-04-16 13:32:11 +02:00
Florian Aders (EleRas)
f36643851f Redesign of resource-recalculation, fixes #699
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-10 10:50:10 +02:00
Andreas Burchert (scarya)
dea3601549 Added icons for recalculate resource page, refs #699 2011-04-10 10:39:55 +02:00
Florian Aders (EleRas)
29665ff3c8 Fixing execution of all files containing ".php", fixes #687
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-04-10 10:08:03 +02:00
Robert Förster (Dessa)
fc72d7ec32 fix the fix 2011-04-01 11:27:28 +02:00
Robert Förster (Dessa)
b0f3d09cb9 fix typo, refs #660 2011-04-01 07:44:32 +02:00
Andreas Burchert (scarya)
a9ab3825f5 Fixed undefined indices on admin pages, refs #645 1h0m 2011-03-30 14:52:59 +02:00
Andreas Burchert (scarya)
630e2966e2 Removed unused makeyesno functions, refs #645 @1h0m 2011-03-30 14:52:59 +02:00
Andreas Burchert (scarya)
df6441ef80 Replaced yes/no with checkboxes, refs #645 @1h0m 2011-03-30 14:52:59 +02:00
Andreas Burchert (scarya)
1730088ab1 Replaced yes/no selection with checkboxes, refs #645 @2h0m
Finished all for admin pages. admin_<section>.php files need to be cleaned.
2011-03-30 14:52:58 +02:00
Andreas Burchert (scarya)
7d97544f05 Fix in _checkbox(). 2011-03-30 13:30:28 +02:00
Florian Aders (EleRas)
c4195909e1 Tagging 0.9.19
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-28 18:06:29 +02:00
Andreas Burchert (scarya)
8b3841e2d5 Small fix in german language file, thanks to arnoldB. 2011-03-26 23:26:54 +01:00
Andreas Burchert (scarya)
9ff1d1cce5 Small fix in _checkbox() function to use sent data if available. refs #676 2011-03-26 22:34:06 +01:00
Andreas Burchert (scarya)
6b99f650ca Added label to unlimited checkboxes. 2011-03-26 21:50:57 +01:00
Florian Aders (EleRas)
3282736600 Optimizing image directory (removing unneeded files, running pngcrush over pngs)
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-26 21:49:15 +01:00
Florian Aders (EleRas)
f25d1cbb9e Marked a few fields in admin->domain as mandatory, refs #645
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-26 21:24:12 +01:00
Andreas Burchert (scarya)
3775892bc2 Added _checkbox() to htmlform class so we can generate checkboxes. 2011-03-20 17:41:08 +01:00
Andreas Burchert (scarya)
6b27a00007 Fixed undefined variable in lib/init.php 2011-03-20 10:25:39 +01:00
Andreas Burchert (scarya)
3fc3174788 Finished work for reuseable form data, fixes #672 @4h 2011-03-19 14:34:10 +01:00
Andreas Burchert (scarya)
38999a4f5e Added back button to standard_error page, refs #672 2011-03-19 14:34:10 +01:00
Andreas Burchert (scarya)
ef8c3d3cf7 Added support to reuse form data if validation fails, refs #672 2011-03-19 14:34:10 +01:00
Andreas Burchert (scarya)
3a6779570f Added php internal session handler. 2011-03-19 14:34:09 +01:00
Christoph Burchert (Chb)
e3ff9d8f5d added smtpd_tls_key_file directive to postfix configuration files, fixes #627
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-03-19 13:58:14 +01:00
Florian Aders (EleRas)
5fc5bdfaeb Ups, removed double-encoding
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-19 13:24:38 +01:00
Florian Aders (EleRas)
adcffe3912 Adding ignores for temporary files
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-19 13:19:34 +01:00
Florian Aders (EleRas)
5e0c641a02 Fixing a XSS - vulnerability discovered by tomreyn
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-19 13:14:28 +01:00
Florian Aders (EleRas)
0f4695a43f Fixing SQL-incjection found by tomreyn and general ticket-search, fixes #674
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-19 12:22:34 +01:00
Andreas Burchert (scarya)
6258b53a04 Small fix in language file, fixes #675 2011-03-19 11:51:32 +01:00
Christoph Burchert (Chb)
0776afc09e added appropiate comments to fix of #670
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-03-18 23:41:57 +01:00
Andreas Burchert (scarya)
0ab8d177b2 fixed sorting for admin_customer over view, fixes #618 2011-03-18 16:29:13 +01:00
Christoph Burchert (Chb)
9e6c405bcd fixed return status of executed programs, fixes #670
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-03-18 16:24:25 +01:00
Christoph Burchert (Chb)
94cd1a2f01 lock databases when blocking users, fixes #666
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-03-18 16:14:12 +01:00
Christoph Burchert (Chb)
954e507160 Pass redirect code to mod_rewrite directives, fixes #669
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-03-18 12:48:19 +01:00
Michael Kaufmann (d00p)
d195a9622d use correct order of parameter for chown to work properly when using FreeBSD, fixes #663
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-16 15:40:19 +01:00
Michael Kaufmann (d00p)
0883580199 fix hidden form values for aps-installer (customer panel), fixes #662
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-16 08:34:06 +01:00
Michael Kaufmann (d00p)
8c2e94b2cd show link 'add customer' if more than 15 customers on 'customers-overview', fixes #661
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-14 20:53:41 +01:00
Michael Kaufmann (d00p)
d9dbd1917f add +FollowSysLinks options for perl-workaround, fixes #660
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-14 12:40:38 +01:00
Michael Kaufmann (d00p)
240025a183 - fix usage of template 'diskspace usage', fixes #656
- added missing template-variables to view, fixes #651
2011-03-14 08:40:00 +01:00
Michael Kaufmann (d00p)
24838ec2cf remove deprecated sql-statement 'TYPE' and replaced it with 'ENGINE' for panel_sessions, fixes #654
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-14 08:19:39 +01:00
Michael Kaufmann (d00p)
eaee62db4d remove trailing slash on hostnames for redirect as apache's mod_rewrite appends a second, fixes #658
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-14 08:02:58 +01:00
Michael Kaufmann (d00p)
2f0a717241 don't prepend a slash to the domains 'path' value if it's a hostname, fixes #657 2011-03-14 07:58:32 +01:00
Michael Kaufmann (d00p)
07d82fb063 change message-variable for success-message when resetting password, fixes #653
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-13 08:57:34 +01:00
Michael Kaufmann (d00p)
fae7fd0ccc sanitize paths when creating new user-home
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-11 14:21:05 +01:00
Michael Kaufmann (d00p)
20b2b1c399 add missing validator-parameters for setting-formfields
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-11 12:56:41 +01:00
Michael Kaufmann (d00p)
ee8115cbe9 - correct size unit in traffic-defailts overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-10 13:34:00 +01:00
Michael Kaufmann (d00p)
465f5b406e - fix checkbox-styling when using opera
- fix style-issue with table-hover

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-10 12:53:08 +01:00
Michael Kaufmann (d00p)
9428c794c0 use correct internationalization in email-edit template, thx to arnoldB
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-10 11:14:04 +01:00
Michael Kaufmann (d00p)
2754e0ae5a fix undefined variable in cron_autoresponder, fixes #649
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-10 07:15:38 +01:00
Michael Kaufmann (d00p)
b6be7f6975 Merge branch 'master' of git.froxlor.org:froxlor 2011-03-10 07:12:09 +01:00
Michael Kaufmann (d00p)
f02a8d73c7 fix check for path-value to avoid double-slash output, fixes #648
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-09 16:36:29 +01:00
Andreas Burchert (scarya)
f30d7aecc8 Update for the italian language file.
Thanks to Emilien.
2011-03-09 14:12:42 +01:00
Michael Kaufmann (d00p)
4b1eee49a8 fix ugly spacing in configuration-file-textareas
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-09 07:29:28 +01:00
Michael Kaufmann (d00p)
b5124b8274 fix output of default path-value if path-select-mode is 'Manual', fixes #642
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-08 11:48:05 +01:00
Michael Kaufmann (d00p)
00f8707703 fix variable-mixup in formfield so ips-and-ports specialsettings are not shown on the panel (but actually saved to database and used!)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-07 14:44:48 +01:00
Michael Kaufmann (d00p)
10996c5bed set version to 0.9.18.1
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-07 09:55:23 +01:00
Michael Kaufmann (d00p)
fc712bde90 remove nested table in admin:admin-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-07 09:40:32 +01:00
Michael Kaufmann (d00p)
4e1433d861 fix linebreaks in php-configurations and other textareas, fixes #632
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-06 17:32:51 +01:00
Michael Kaufmann (d00p)
4fc02e6c93 fix inline-if-statements to show specific fields only if necessary, refs #633
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-06 16:49:22 +01:00
Michael Kaufmann (d00p)
57c72d68a4 fix html-layout if resetting password is disabled
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-06 14:12:51 +01:00
Andreas Burchert (scarya)
0230c6ac2b Replaced all picture to have a consistent look.
Added <image>_big.png to have bigger icons for page titles.
2011-03-05 17:16:48 +01:00
Florian Aders (EleRas)
865f7036fd Adding formfields for autoresponder (part 2, forgot some files), fixes #629
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-04 21:45:17 +01:00
Florian Aders (EleRas)
6825c5e0dc Adding formfields for autoresponder, fixes #629
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-04 21:44:05 +01:00
Michael Kaufmann (d00p)
3e63b1aabb - fix possible error in usage-report if customer has no traffic (traffic = 0)
- fix another missing hidden-field in classic-theme template

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-04 13:35:54 +01:00
Michael Kaufmann (d00p)
d6d19e7cb2 - fix undefined index in customer_domains.php
- add possibility to disable form-buttons if not needed
- corrected ticket-categories order-counter begin-value
- beautify domains-add and e-mail add form for customers
- added various missing hidden-fields in templates (Classic-theme)

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-04 11:46:40 +01:00
Michael Kaufmann (d00p)
adeac9cce1 Merge branch 'master' of git.froxlor.org:froxlor 2011-03-04 08:48:49 +01:00
Michael Kaufmann (d00p)
5a743b2005 add missing traffic-images to theme 'Froxlor' and correct templates to reflect the new directory-layout, fixes #634
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-04 08:46:20 +01:00
Andreas Burchert (scarya)
dc1f33f494 Added fallback solution in getTemplate() for 3rd party modules.
Thanks to atari.
2011-03-02 10:15:46 +01:00
Michael Kaufmann (d00p)
e04ae041ab add save/reset button to the end of each form, fixes #631
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-02 07:54:57 +01:00
Michael Kaufmann (d00p)
236377c28e many fixes in Classic and Froxlor templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-02 07:46:32 +01:00
Michael Kaufmann (d00p)
687b28016e Merge branch 'master' of git.froxlor.org:froxlor 2011-03-02 07:27:24 +01:00
Florian Aders (EleRas)
00edba1d0d Fixing dynamic selection of themes in settings, fixes #628
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-01 20:38:09 +01:00
Florian Aders (EleRas)
207e9e1b43 Fixed adding of email-forwarding in classic template, too, fixes #626 again
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-01 20:15:07 +01:00
Florian Aders (EleRas)
0afbad5ff1 Fixed adding of email-forwarding, fixes #626
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-01 20:07:48 +01:00
Florian Aders (EleRas)
357e60c054 Reworked admin -> customerslist, fixes #619
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-01 19:52:34 +01:00
Florian Aders (EleRas)
9d45759613 Fixing paths in CSS, now relative instead of absolute
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-01 19:28:34 +01:00
Florian Aders (EleRas)
9503ae0ac5 Fixed syntax error in configfiles_index
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-01 19:12:04 +01:00
Florian Aders (EleRas)
97d20199fe Fixed missing nginx in installer
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-03-01 19:10:46 +01:00
Michael Kaufmann (d00p)
d66d32066d fix php-syntax error in configfiles_index.inc.php, fixes #622
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-01 14:34:27 +01:00
Michael Kaufmann (d00p)
13bde22344 - updated outdated domains_add & domains_edit templates in Classic-theme
- fixed formfield when path-mode is 'Manual'
fixes #620

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-01 10:31:38 +01:00
Michael Kaufmann (d00p)
fb430e55d2 don't show input-fields for editing ftp@domain users as it should not be done, fixes #617 2011-03-01 07:46:42 +01:00
Michael Kaufmann (d00p)
5fde181fdc don't create fpm-socket in own vhost if not enabled, fixes #613
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-03-01 07:39:29 +01:00
Michael Kaufmann (d00p)
4da7b815f3 add missing hidden-field for 'id' in emails_edit.tpl
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-28 21:54:03 +01:00
Michael Kaufmann (d00p)
84e17ab91f correct main httpd.conf path, fixes #615
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-28 21:43:27 +01:00
Michael Kaufmann (d00p)
95d0830584 setting version to 0.9.18
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-28 10:26:35 +01:00
Michael Kaufmann (d00p)
a8fa13dd3c correct dovecot-sql configuration for Gentoo, fixes #568 2011-02-28 08:23:52 +01:00
Florian Aders (EleRas)
a7a8c51c18 Merged brach redesign to master
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-27 13:06:31 +01:00
Michael Kaufmann (d00p)
50ae198164 check whether directory is executable for the webserver user, fixes #612
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-25 16:38:34 +01:00
Michael Kaufmann (d00p)
b325e50da1 add 'fastcgi_param HTTPS on' for nginx generally if ssl is enabled, refs #610
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-25 09:13:42 +01:00
Michael Kaufmann (d00p)
c6afcc57d9 - in function findDirs() just skip if a directory cannot be read instead of returning the list till this dir, fixes #611
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-25 08:00:06 +01:00
Michael Kaufmann (d00p)
ff4b03f4fa - add 'fastcgi_param HTTPS on' for nginx+fpm if domain uses SSL, fixes #610 2011-02-25 07:58:13 +01:00
Michael Kaufmann (d00p)
393a5ce570 - let makePathfield return usable values for the formfield (dynamically changing between select, text and hidden, depending on settings)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-24 10:50:59 +01:00
Michael Kaufmann (d00p)
ca9128bdbf - fix two TODO's where a second field has to be stuck next to the previous 2011-02-24 10:07:38 +01:00
Michael Kaufmann (d00p)
6837852f52 - check for field 'theme' in table 'panel_session' as it's being used before the update, fixes #607
- add some missing css-classes for the updater

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-23 08:47:14 +01:00
Michael Kaufmann (d00p)
957a0e78a3 Merge branch 'redesign' of git.froxlor.org:froxlor into redesign 2011-02-23 08:28:11 +01:00
Florian Aders (EleRas)
656d725b58 Adding admin to customer - list
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-22 20:49:02 +01:00
Florian Aders (EleRas)
ffed226a4f Fixing typo in paging-
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-22 20:15:42 +01:00
Michael Kaufmann (d00p)
215abeb105 don't output templated error in cron_usage.inc.diskspace.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-18 13:22:48 +01:00
Michael Kaufmann (d00p)
68c8faa8cb - don't use templated errors in cron,
- fix usage of wrong variable

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-18 07:34:26 +01:00
Michael Kaufmann (d00p)
d2e86e936b Merge branch 'master' of git.froxlor.org:froxlor 2011-02-16 14:02:48 +01:00
Michael Kaufmann (d00p)
d2fe9be860 do not generate any unnecessary webserver configuration-lines for deactivated users, fixes #599
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-16 14:01:37 +01:00
Michael Kaufmann (d00p)
357614992e add missing image in 'change theme' on admin-side
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-15 21:49:18 +01:00
Florian Aders (EleRas)
134250d1c1 Added icon for changetheme made by scarya
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-15 21:14:02 +01:00
Florian Aders (EleRas)
8a8d485c39 Merge branch 'master' into redesign 2011-02-13 22:29:42 +01:00
Florian Aders (EleRas)
d06b08f020 Added configuration for gentoo / dovecot2
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 22:28:45 +01:00
Florian Aders (EleRas)
7a70257b95 Forgot one file in the last commit
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 18:40:34 +01:00
Florian Aders (EleRas)
4400125c7e Fixed icon naming
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 18:36:56 +01:00
Florian Aders (EleRas)
88d0fe5752 Fixing customer ticket reply - view
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 18:01:41 +01:00
Florian Aders (EleRas)
cc1b45ac6e Readded files which were deleted during broken merge 7b01cb47de
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 13:10:11 +01:00
Florian Aders (EleRas)
61d5d4a150 Fixed naming of icon in MySQL edit
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 12:52:12 +01:00
Florian Aders (EleRas)
107c84fdbc Fixed typo in customer -> add ticket form
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 12:48:21 +01:00
Florian Aders (EleRas)
f85d983c84 Fixed naming of icon in FTP edit
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 12:45:19 +01:00
Florian Aders (EleRas)
a0406c9749 Fixed naming of icon in add domain
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 12:41:50 +01:00
Michael Kaufmann (d00p)
840d9f5915 fix unmerged templates to use actual $lng-values 2011-02-13 12:33:10 +01:00
Michael Kaufmann (d00p)
59f8002a5d fix undefined index in templates_edit template 2011-02-13 12:30:56 +01:00
Florian Aders (EleRas)
0b38e192d4 Now with the auto-date-setter
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 20:03:08 +01:00
Florian Aders (EleRas)
014e350a9e It's 2011 :P
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 19:54:31 +01:00
Florian Aders (EleRas)
382cf45e08 Changing customer -> ticket to new formfield - stuff
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 18:54:44 +01:00
Florian Aders (EleRas)
abe8446736 Merge branch 'redesign' of git.froxlor.org:froxlor into redesign 2011-02-12 18:38:09 +01:00
Florian Aders (EleRas)
ed4acb0118 Fixing forms in customer -> mysql classic template
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 18:37:11 +01:00
Andreas Burchert (scarya)
8032addc0a Finished template for Classic: extras 2011-02-12 18:36:00 +01:00
Florian Aders (EleRas)
0cfc75976f Fixing customer -> ftp in classic layout
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 18:33:59 +01:00
Michael Kaufmann (d00p)
8e83c5f788 bugfix domain-formfields (again) 2011-02-12 18:27:32 +01:00
Andreas Burchert (scarya)
7b01cb47de Merge branch 'redesign' of git.froxlor.org:froxlor into redesign
Conflicts:
	templates/Froxlor/customer/email/emails_add.tpl
	templates/Froxlor/customer/email/emails_edit.tpl
	templates/Froxlor/customer/email/forwarder_add.tpl
2011-02-12 18:25:19 +01:00
Andreas Burchert (scarya)
b13d20d44c Fixed email templates in design: Classic, Froxlor 2011-02-12 18:20:22 +01:00
Michael Kaufmann (d00p)
b8ab1edc56 fix domain-formfields 2011-02-12 18:16:54 +01:00
Michael Kaufmann (d00p)
cc96aef50f fix integration of formfields in customer-domains 2011-02-12 17:48:54 +01:00
Michael Kaufmann (d00p)
9ddd3a2a58 fix typo 2011-02-12 17:42:02 +01:00
Michael Kaufmann (d00p)
fea75e2c2f fix even more templates 2011-02-12 17:34:20 +01:00
Michael Kaufmann (d00p)
87b15ce57d fix more templates for fieldform usage 2011-02-12 17:32:36 +01:00
Michael Kaufmann (d00p)
a807ffd918 fix more customer_email formfiled usage 2011-02-12 17:24:07 +01:00
Michael Kaufmann (d00p)
f3d505170a bugfix customer_email formfield integration 2011-02-12 17:17:13 +01:00
Michael Kaufmann (d00p)
13904cfd7b Merge branch 'redesign' of git.froxlor.org:froxlor into redesign 2011-02-12 16:48:27 +01:00
Michael Kaufmann (d00p)
3e83ae8a6e use htpasswd-formfields 2011-02-12 16:47:07 +01:00
Michael Kaufmann (d00p)
44febee357 use htaccess-formfields 2011-02-12 16:42:25 +01:00
unknown
0b20a154f5 Finished email stuff. 2011-02-12 16:18:24 +01:00
Michael Kaufmann (d00p)
b9101b2041 Merge branch 'redesign' of git.froxlor.org:froxlor into redesign 2011-02-12 16:14:33 +01:00
Michael Kaufmann (d00p)
9e798c6362 add formfields for customer_extras 2011-02-12 16:13:57 +01:00
Florian Aders (EleRas)
9e1bd811a5 Merge branch 'redesign' of git.froxlor.org:froxlor into redesign 2011-02-12 16:08:10 +01:00
Florian Aders (EleRas)
26aed64bf8 Converted customer -> ftp to new formbuilder
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 16:08:05 +01:00
Michael Kaufmann (d00p)
3f93044121 add formields for email stuff 2011-02-12 15:47:37 +01:00
Florian Aders (EleRas)
8cb615df5f Converted customer -> mysql to new formbuilder 2011-02-12 15:15:55 +01:00
Andreas Burchert
885bf7e88c Added customer/domain formfields. 2011-02-11 22:08:22 +01:00
Florian Aders (EleRas)
efabfd7183 Merge branch 'master' into redesign 2011-02-11 13:39:07 +01:00
Florian Aders (EleRas)
d8b43f60b8 Added missing smtpd_sasl_type = dovecot for gentoo-postfix-config 2011-02-11 13:32:22 +01:00
Michael Kaufmann (d00p)
0a2fed06cb test
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-09 10:56:12 +01:00
Michael Kaufmann (d00p)
e13d588c07 Merge branch 'master' into redesign 2011-02-09 10:54:31 +01:00
Michael Kaufmann (d00p)
460e153c6f FreeBSD's dovecot uses ssl=yes as default value (even if commented out), so we have to set it to 'no' if no ssl is used, fixes #572
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-09 09:55:33 +01:00
Michael Kaufmann (d00p)
cb36615228 check database-connection after each customer in traffic-cron (sometimes analyzing big access-logs takes too long), fixes #544
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-09 09:53:05 +01:00
Michael Kaufmann (d00p)
6dca567827 added parameter '-k' to the 'du' command in traffic-cron, -k displays block counts in 1024-byte (1-Kbyte) blocks (lead to wrong filesize-calculations on FreeBSD), fixes #578
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-09 09:47:44 +01:00
Florian Aders (EleRas)
80379232a9 Remove IDs from settings, makes merging easier 2011-02-08 15:35:08 +01:00
Michael Kaufmann (d00p)
3a3aa73d2d update idna_converter-class, thx to mathias, fixes #579 2011-02-08 14:31:21 +01:00
Michael Kaufmann (d00p)
c949c153ed fix undefined index in classic-theme
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 14:03:18 +01:00
Michael Kaufmann (d00p)
a4dba36f82 beautify message if there are no customers to add a new ticket for
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 14:00:22 +01:00
Michael Kaufmann (d00p)
bee19fabfa merged more of the re-design files to current state
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 13:17:24 +01:00
Michael Kaufmann (d00p)
43770d37e1 manually merged re-design changes to 80% of the files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 12:53:24 +01:00
Michael Kaufmann (d00p)
7b6b145229 add more new files for re-design
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 10:38:47 +01:00
Michael Kaufmann (d00p)
57d52bd59e merge/add new formfield-files for re-design
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 10:34:14 +01:00
Michael Kaufmann (d00p)
d6b4bd8d36 add new images and templates for re-design
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 10:30:03 +01:00
Michael Kaufmann (d00p)
c28f70d885 fixed endless redirection with lighty when accessing webalizer, thx to vmp32k 2011-02-08 07:58:14 +01:00
Michael Kaufmann (d00p)
fad2ae873d show message when trying to delete a domain which is used as alias-domain instead of blank page, fixes #571 2011-02-06 09:57:31 +00:00
Michael Kaufmann (d00p)
30c025202c set base-path dynamically in crond-config for freebsd, fixes #575 2011-02-02 06:26:21 +00:00
Michael Kaufmann (d00p)
9cb64e34dc fix path in powerdns-configs (bind-path is a setting), fixes #574 2011-02-01 21:24:47 +00:00
Michael Kaufmann (d00p)
72af7c600f correct postfix mx-access commands for FreeBSD, fixes #573 2011-01-31 17:14:32 +00:00
Michael Kaufmann (d00p)
903a91b9ea - replace placeholder with actual email address, fixes #566 2011-01-27 12:35:27 +00:00
Michael Kaufmann (d00p)
2b699849ca fix install-sql 2011-01-26 21:13:18 +00:00
Michael Kaufmann (d00p)
a7ae6e54de - set correct version for svn1
- correct default-php.ini for open_basedir
- fix upgrading from SysCP (getPhpConfigs() fails cause the table is being added after it's being used in the update-process)
2011-01-26 15:01:19 +00:00
Michael Kaufmann (d00p)
1396aca657 - fix missing language-entries for usage-mail template (no fallback to english in e-mail templates, we're looking for translaters btw :P), refs #564
- fix possible missing setting in database (httgroup), fixes #564
2011-01-26 11:41:35 +00:00
Michael Kaufmann (d00p)
b19cabef79 round values in usage-cron, fixes #563 2011-01-26 11:20:19 +00:00
Michael Kaufmann (d00p)
c3f5e6c4db fix inserting of deletion-task for ftp-accounts, fixes #553, refs #293 2011-01-26 10:58:59 +00:00
Michael Kaufmann (d00p)
f4b6d9930f - respect domain openbasedir settings when using php-fpm, fixes #562
- various improvements/cleanings in the gentoo configfiles array
2011-01-26 09:44:09 +00:00
Michael Kaufmann (d00p)
f77ddac4ed set version to 0.9.17 for upcoming release 2011-01-25 06:23:31 +00:00
Michael Kaufmann (d00p)
932e1f95c5 fix maxlength of textbox in admin:edit, fixes #559 2011-01-19 06:28:48 +00:00
Michael Kaufmann (d00p)
a8b52d50af - prework for docroot-settings-extension, refs #533 2011-01-18 07:18:28 +00:00
Michael Kaufmann (d00p)
f10f63b6be add missing language-string for database_edit, fixes #554 2011-01-16 11:58:24 +00:00
Michael Kaufmann (d00p)
c5cdd9f567 - fix minor issues diskspace-usage-report, refs #466
- show current year for copyright in footer
2011-01-14 07:31:01 +00:00
Michael Kaufmann (d00p)
e5b2fd90c0 Add "Notification mail for customers when 90% percent of disk space is exhausted", fixes #466 2011-01-14 07:09:53 +00:00
Michael Kaufmann (d00p)
f7b43f470f remove double $$, fixes #552 2011-01-13 11:43:40 +00:00
Michael Kaufmann (d00p)
515e542179 - localize path setting (dropdown/manual), thx to arnoldB, fixes #547
- include diskusage- (todo) and traffic-report cron, refs #466, fixes #153
- allow customzing of warning-level in percent for diskusage- and traffic-report cron, refs #466
2011-01-11 08:40:59 +00:00
Michael Kaufmann (d00p)
cc4637095d respect ssl_redirect setting for domains, fixes #542 2011-01-09 16:25:32 +00:00
Michael Kaufmann (d00p)
bffa8817d9 ftp user cannot be edited, fixes #337 2011-01-09 13:44:10 +00:00
Michael Kaufmann (d00p)
98b82ed0c6 improve behavior of ssl-redirect, fixes #541 2011-01-08 11:58:14 +00:00
Michael Kaufmann (d00p)
4f52982a7e more fixes for freebsd (more to follow) 2011-01-07 19:22:24 +00:00
Michael Kaufmann (d00p)
1edba0c368 +mailbox_size_limit = 0 for FreeBSD-postfix 2011-01-07 18:33:14 +00:00
Michael Kaufmann (d00p)
06983ca382 some freebsd-config enhancements, fixes #537 2011-01-06 09:37:49 +00:00
Michael Kaufmann (d00p)
c53ef5b96e fix libnss-nsswitch.conf for FreeBSD, fixes 538 2011-01-06 09:17:25 +00:00
Michael Kaufmann (d00p)
a2b7f98332 add missing 'description' field to sql-query to avoid undefined index in resultset, thx to adlerweb 2011-01-04 21:27:09 +00:00
Michael Kaufmann (d00p)
c25ad76200 remove unnecessary variable $entry in error-message in autoresponder, thx to monotek for finding thi 2011-01-04 20:16:25 +00:00
Florian Aders (EleRas)
7057984534 remove now unneeded inserttasks, refs #535 2011-01-04 11:41:44 +00:00
Florian Aders (EleRas)
02a4fd4e1d Rebuild configurations after a setting is changed, fixes #535 2011-01-04 11:39:04 +00:00
Michael Kaufmann (d00p)
57ec429776 settings version for upcoming release 2010-12-28 11:07:40 +00:00
Andreas Burchert (scarya)
c52d3819af - forgot some update queries from early installations (regarding #529) 2010-12-25 23:36:26 +00:00
Andreas Burchert (scarya)
85f35abe2d - changed sql query to work with version <= 5.5 (fixes #529)
- added php-xml extension check ti installation (fixes #530)
-> thanks to lando
2010-12-25 22:43:42 +00:00
Michael Kaufmann (d00p)
58674a2f8f - fix possible undefined variable 2010-12-22 13:10:12 +00:00
Michael Kaufmann (d00p)
968137a967 - use php symlink to binary, fixes #526 2010-12-22 12:47:31 +00:00
Michael Kaufmann (d00p)
66b274c1bf - fine-tune php-fpm-config, create tmp-folder if not exists, refs #524 2010-12-21 13:15:26 +00:00
Michael Kaufmann (d00p)
b9d68a17fa fix deletion of htpasswd/diroption files if no more htpasswds/diroptions are in the database 2010-12-21 10:55:08 +00:00
Michael Kaufmann (d00p)
ced64138e8 fix order of variables in configuration-path, fixes #521 2010-12-17 22:28:28 +00:00
Michael Kaufmann (d00p)
4fdaed5cc4 fix 'new' fcgid path for froxlor's own vhost php-fcgi-starter 2010-12-14 21:19:52 +00:00
Michael Kaufmann (d00p)
0fd11afdcb use makeCorrectDir() to output sane path 2010-12-10 12:16:03 +00:00
Michael Kaufmann (d00p)
8202cc96e7 - fixed double-declaration of variable causing nginx-cron to fail on mysql_fetch_array() for htpasswd-entries, fixes #516 2010-12-09 11:49:07 +00:00
Michael Kaufmann (d00p)
59bf7ba22f - restore still used settings in 120.system.php
- check for $createifnotexists in phpinterface_* classes
2010-12-07 11:08:41 +00:00
Michael Kaufmann (d00p)
9c075c05f5 - don't create standard-openbasedir config for froxlor-panel vhost 2010-12-06 09:17:48 +00:00
Michael Kaufmann (d00p)
6815501c1d - use local-username for froxlor in fpm-config, because froxlor.panel is only the directory/loginname 2010-12-06 09:00:53 +00:00
Michael Kaufmann (d00p)
f11aa9a1c4 - forgot to save lighttpd_fcgid-class with own-vhost settings for php-fpm 2010-12-06 08:56:39 +00:00
Michael Kaufmann (d00p)
3b33dde9ac add language-strings for php-fpm settings 2010-12-06 08:49:24 +00:00
Michael Kaufmann (d00p)
7fb0e88313 - implement php-fpm for Froxlor-vhost, fixes #505 2010-12-06 07:38:55 +00:00
Michael Kaufmann (d00p)
9615aaa83a update dutch language file, thx to Frits Letteboer, fixes #506 2010-12-05 17:18:24 +00:00
Michael Kaufmann (d00p)
16cc53146c replace correct line-break when sending forgotten password, fixes #507 2010-12-05 17:15:24 +00:00
Michael Kaufmann (d00p)
56e9f748f4 beautify update (forgot one status-output) 2010-12-03 11:15:58 +00:00
Michael Kaufmann (d00p)
80e338610f don't allow activation of FCGID and PHP-FPM at the same time 2010-12-03 10:41:12 +00:00
Michael Kaufmann (d00p)
93abbf4a10 - hide php-reload and php-backend-server setting if nginx is used with php-fpm (useless settings) 2010-12-03 10:20:49 +00:00
Michael Kaufmann (d00p)
0271ccfc28 - outsource fcgid/php-fpm configurations/file-creations/etc 2010-12-03 09:23:40 +00:00
Michael Kaufmann (d00p)
dae3e416a2 - include nginx_phpfpm cron in cron_tasks.php
- show parts of fcgid also when lighttpd is used
2010-12-03 08:58:44 +00:00
Michael Kaufmann (d00p)
759213f8b9 add extra configuration for Apache + PHP-FPM, fixes #482 2010-12-02 12:51:14 +00:00
Michael Kaufmann (d00p)
01b313a3ce merged php-fpm branch 2010-12-02 12:15:58 +00:00
Michael Kaufmann (d00p)
4567f7c781 only call validatePassword() when creating a customer if the password is not empty, cause otherwise no random password can be generated if field is left empty 2010-12-02 09:52:56 +00:00
Michael Kaufmann (d00p)
ef76635508 added missing language-definitions for integer-validation 2010-12-02 08:25:01 +00:00
Michael Kaufmann (d00p)
30235ff3eb don't show settings which are not needed for used webserver, fixes #502 2010-12-02 08:18:46 +00:00
Michael Kaufmann (d00p)
ebb390a1fd fix false initialization of variable (wrong variable name) 2010-11-30 10:45:51 +00:00
Michael Kaufmann (d00p)
0c1a4f692a fix password_query for dovecot when sending e-mail, fixes #500 2010-11-30 07:50:49 +00:00
Michael Kaufmann (d00p)
0c25611d26 - set version to 0.9.15 for upcoming release 2010-11-29 08:56:27 +00:00
Michael Kaufmann (d00p)
cd79670438 fix for awstats aliases if the customerdocroot is equal to the domaindocroot 2010-11-29 07:44:24 +00:00
Michael Kaufmann (d00p)
6b46b31818 reintegrated nginx-branch changes, refs #103 2010-11-29 07:37:00 +00:00
Michael Kaufmann (d00p)
713cb1b3ac use correct id in libnss-query, fixes #495 2010-11-29 06:46:21 +00:00
Michael Kaufmann (d00p)
e492c4aca6 - show database description on delete database confirmation-page, fixes #494 2010-11-29 06:40:35 +00:00
Michael Kaufmann (d00p)
5496915e19 fix hardcoded awstats-configuration path, fixes #493 2010-11-29 06:37:46 +00:00
Robert Foerster (Dessa)
f77d084a53 remove hardcoded stuff 2010-11-27 10:46:24 +00:00
Robert Foerster (Dessa)
060b3f8782 recorded merge of revisions 1486-1491 via svnmerge from http://Dessa@svn.froxlor.org/branches/philderbeast 2010-11-27 10:37:44 +00:00
Robert Foerster (Dessa)
e4b7bf799d gentoo is not debian, at least not since i last checked :) 2010-11-26 12:32:47 +00:00
Robert Foerster (Dessa)
6066601568 - recorded merge of revisions 737-1483 via svnmerge from http://Dessa@svn.froxlor.org/branches/philderbeast
- fixes #103
2010-11-26 12:30:54 +00:00
Michael Kaufmann (d00p)
01404187cc %Ls for dovecot is only being replaced by 'imap' or 'pop3' for the password_query, not the user_query, refs #486 2010-11-23 10:11:15 +00:00
Michael Kaufmann (d00p)
a9da673a31 added --force parameter to froxlor_master_cronjob.php so webserver- and bind-configurations can be rebuild everytime 2010-11-23 06:40:58 +00:00
Michael Kaufmann (d00p)
d1a9460117 - validate if used mail-service (imap, pop3) is allowed for user, fixes #475 2010-11-22 07:13:56 +00:00
Michael Kaufmann (d00p)
bde278430e fix link for adding ticket-categories 2010-11-16 12:01:17 +00:00
Michael Kaufmann (d00p)
9c36b31ad2 - show vmail-uid/gid from settings in freebsd-configtemplate, fixes #483 2010-11-16 06:22:02 +00:00
Michael Kaufmann (d00p)
b528b93178 - fix sender-address of responder-mail (only 'common'-setups!!!), fixes #476 2010-11-11 09:23:53 +00:00
Michael Kaufmann (d00p)
7ca00d56be - added possibility to unlock customers who got locked because of too many login-fails, fixes #473 2010-11-09 09:32:52 +00:00
Michael Kaufmann (d00p)
39f17b1a9e - check for correct variable value for store_defaultindex, fixes #459
- fix possible undefined variable in init-script
2010-11-09 09:16:08 +00:00
Michael Kaufmann (d00p)
08e17f7d16 - put customer standard-subdomains to the 20_* vhost configs (subdomains) so they are parsed before the main-domain, fixes #465 2010-11-08 07:41:51 +00:00
Michael Kaufmann (d00p)
a638dddec9 - actually show the latest logical order number (yeah, forgot to save the file again :P), refs #464 2010-11-08 07:11:52 +00:00
Michael Kaufmann (d00p)
59bbfcef4f - show next logical order number when creating new ticket category, fixes #464 2010-11-08 07:11:00 +00:00
Michael Kaufmann (d00p)
5cd1c1284a - remove multiserver-stuff from trunk/
- allow admins with customer_see_all-flag to see their support-tickets too
- sanitize date-stuff in install.php
- fixed wrong usage of standard_error() in ticket::sendMail()
- fix issue with lighttpd server.bind when IP is IPv6
2010-11-03 06:36:22 +00:00
Michael Kaufmann (d00p)
f81826fd9b - display determined Froxlor path in cron.d-configurationtemplates, fixes #455 2010-11-01 11:26:36 +00:00
Michael Kaufmann (d00p)
2e59e2bfdf - correct variable name to avoid undefined variable error, fixes #454 2010-11-01 10:36:15 +00:00
Michael Kaufmann (d00p)
03a8a9c8c9 - remove some more realtime-leftovers 2010-10-31 08:29:39 +00:00
Michael Kaufmann (d00p)
689cb40bcc - fix possible undefined variables 2010-10-29 17:53:49 +00:00
Michael Kaufmann (d00p)
1c2a1b8c69 - no multiserver stuff in trunk/ at this time 2010-10-28 12:42:14 +00:00
Michael Kaufmann (d00p)
3d187fd0a0 - fix undefined indexes in ips and ports if ssl is not enabled
- fix getSwap() and getMemory() in FroxlorHostInfo-class
2010-10-28 06:33:58 +00:00
Robert Foerster (Dessa)
2fc057d670 murder etch templates 2010-10-25 11:51:02 +00:00
Michael Kaufmann (d00p)
e7b030fa30 setting version to 0.9.14 for release 2010-10-25 11:22:29 +00:00
Robert Foerster (Dessa)
e74262c81e some spelling fixage 2010-10-25 08:48:03 +00:00
Michael Kaufmann (d00p)
d1a52ca85c - various language corrections, fixes #439 2010-10-25 07:02:36 +00:00
Michael Kaufmann (d00p)
44b53ffd2c - fixed regex for domains to allow a port and/or subfolders/files, fixes #431 2010-10-25 06:45:15 +00:00
Michael Kaufmann (d00p)
ffe49e8acd outsource makeChownWithNewStats function to lib/functions/ because it is now also used outside the cron-area, refs #258 2010-10-24 20:59:52 +00:00
Michael Kaufmann (d00p)
58b3a19ae7 - remove multiserver-stuff from current-trunk
- fix FroxlorSshTransport
2010-10-24 19:16:26 +00:00
Andreas Burchert (scarya)
0be29498b0 - fix in FroxlorSshTransport::close() 2010-10-24 18:58:23 +00:00
Michael Kaufmann (d00p)
1b4069f01e - remove realtime-feature-stuff 2010-10-24 16:57:17 +00:00
Michael Kaufmann (d00p)
5f284c31ab - remove realtime configurations and install-instructions from the panel 2010-10-24 08:59:00 +00:00
Florian Aders (EleRas)
1c892a0f9c Removing duplicate function, fixes #447 2010-10-23 15:20:23 +00:00
Robert Foerster (Dessa)
8fb5a3ae7c deprecate etch config templates, which will be removed with 0.9.15 2010-10-23 12:33:55 +00:00
Michael Kaufmann (d00p)
3c731661a0 actually update to new version :P 2010-10-23 10:44:35 +00:00
Michael Kaufmann (d00p)
ed5e2ba39d fixing update-process, reverting multiserver-support-changes (now in branch) 2010-10-23 10:37:43 +00:00
Michael Kaufmann (d00p)
22eb0e19cc remove deprecated realtime-functionality 2010-10-23 10:24:03 +00:00
Florian Aders (EleRas)
ad31b07a04 Reverting the multiserver-stuff, we'll do this inside the branch 2010-10-23 10:20:23 +00:00
Michael Kaufmann (d00p)
99696ff6cb - allow 4-character tld's (like .info or .mobi) 2010-10-23 07:50:26 +00:00
Michael Kaufmann (d00p)
8b3c634652 minor work on multiserver-client-deployment 2010-10-22 21:29:47 +00:00
Andreas Burchert (scarya)
26084a19fa - replaced die() with throw new Exception() 2010-10-21 08:59:46 +00:00
Andreas Burchert (scarya)
84637d82d4 - updated demousage
- updated FroxlorPkgCreator (fix for manual added files)
- first cron version for remote server data deploying
2010-10-20 21:33:39 +00:00
Andreas Burchert (scarya)
7a83a01095 - added function to FroxlorPkgCreator::addFile($name, $data) 2010-10-20 21:09:52 +00:00
Andreas Burchert (scarya)
71d3410b4f - added exlude dir variable to DfC
- updated demousage
2010-10-20 20:54:57 +00:00
Andreas Burchert (scarya)
b58a9d3b88 - add support for multiple directories 2010-10-20 20:29:47 +00:00
Andreas Burchert (scarya)
05897c3e01 - fix in FroxlorPkgCreator::pack() (better file name, path fix)
- added FroxlorDeployfileCreator
2010-10-20 19:47:31 +00:00
Andreas Burchert (scarya)
a06211b497 - description fix in FroxlorSshTransport
- added FroxlorPkgCreator
2010-10-20 19:07:51 +00:00
Michael Kaufmann (d00p)
db2cca8e86 - add a few images to beautify multiserver-client overview 2010-10-20 13:00:30 +00:00
Michael Kaufmann (d00p)
aa5e574d5d - more work on multiserver-client settings 2010-10-20 11:41:43 +00:00
Michael Kaufmann (d00p)
09c5bbcb63 - more work in multiserver-client-settings (save-methods) 2010-10-20 10:05:54 +00:00
Michael Kaufmann (d00p)
cadab96bae - set server-id parameter for inserttask in customer_ftp.php
- call inserttask in admin_clients::deploy
2010-10-20 09:12:21 +00:00
Michael Kaufmann (d00p)
0c9ab91373 - added multiserver-client-deploy-cron
- outsourcing Deploy() function from froxlorclient to client_deployer
2010-10-20 09:01:34 +00:00
Michael Kaufmann (d00p)
836b7fb056 - correct links on client-settings page
- added new server_id parameter to buildFormEx, so getFormGroupOutput will use the correct template (with correct links)
2010-10-20 07:40:34 +00:00
Michael Kaufmann (d00p)
d3fd4ee2f4 - more work on froxlor-client settings (multiserver mode) 2010-10-19 20:42:55 +00:00
Michael Kaufmann (d00p)
58499a068f - added "deploy" menu to Froxlor-client (multiserver-support) 2010-10-19 19:50:20 +00:00
Michael Kaufmann (d00p)
ce83e8f92b - chown newly created awstats-directory when new domain has been created, fixes #258 2010-10-19 19:32:53 +00:00
Michael Kaufmann (d00p)
fc5aea1c33 - implement multiserver-client edit
- fix various undefined variables
2010-10-19 16:07:48 +00:00
Michael Kaufmann (d00p)
89bf0aa128 - finish adding of multiserver-clients 2010-10-19 15:05:19 +00:00
Michael Kaufmann (d00p)
b2ea0cb666 - added form to add new froxlor-clients (no deploy etc.)
- implemented function to return all active client-id's for inserttask-function (task for all clients+master)
2010-10-19 14:35:33 +00:00
Andreas Burchert (scarya)
c0b19fa2b2 - small fix in if condition for scp/sftp switch 2010-10-19 09:20:32 +00:00
Michael Kaufmann (d00p)
9e028ef0f7 - use correct heading for mysql-editing-form, fixes #444 2010-10-19 08:29:24 +00:00
Michael Kaufmann (d00p)
a8460b7570 - fix loading of settings in case of older Froxlor versions which do not support multiserver-mode 2010-10-19 08:10:22 +00:00
Michael Kaufmann (d00p)
f42fa0ee7b few minor changes for multiserver-support 2010-10-18 11:34:19 +00:00
Michael Kaufmann (d00p)
8d27f71cee admin_ipsandports.php does not need a server_id (multiserver-support) yet 2010-10-18 10:44:14 +00:00
Michael Kaufmann (d00p)
3a9813c1b5 - removing deprecated legacy_cron entry from database
- minor changes for multiserver-support
2010-10-18 09:48:26 +00:00
Michael Kaufmann (d00p)
699f451234 - more work on settings for FroxlorClients (upcoming multiserver-mode) 2010-10-18 09:20:17 +00:00
Michael Kaufmann (d00p)
cad3c02f08 forgot to save the file :) 2010-10-18 07:55:47 +00:00
Michael Kaufmann (d00p)
7484ab1bc9 - added functions to get/set client settings
- added function for deployment of FroxlorClients
2010-10-18 07:48:54 +00:00
Michael Kaufmann (d00p)
8f87aa6636 - added class for FroxlorClients
- added admin_clients.php file for managing FroxlorClients 
- added Multiserver-Menu 
(unfinished, just base-layout for further developing, disabled by hardcoded setting)
2010-10-18 06:49:06 +00:00
Andreas Burchert (scarya)
15486ed764 - added destructor for FroxlorSshTransport
- added a fix for close() operation to prevent missing file writing on remote disk
- added a switch for scp/sftp to sendFile
2010-10-17 20:46:39 +00:00
Michael Kaufmann (d00p)
118693471c - correct sql-query in update to drop table, fixes #440
- use correct language-variable for ips-and-ports docroot-setting, fixes #441
2010-10-17 02:01:18 +00:00
Michael Kaufmann (d00p)
382bd88344 - prepare inserttask()-function for multiserver-support 2010-10-17 01:44:58 +00:00
Andreas Burchert (scarya)
2a4d618bcc - fixed eol-style 2010-10-17 00:32:41 +00:00
Andreas Burchert (scarya)
14b56d9287 - fixed eol-style from FroxlorSshTransport
- added a demo usage script for FroxlorSshTransport
2010-10-17 00:29:04 +00:00
Florian Aders (EleRas)
ba35677cf6 Hint for removed stuff 2010-10-16 23:59:36 +00:00
Andreas Burchert (scarya)
c4723fc3f2 - added FroxlorSshTransport for upcoming multiserver-support 2010-10-16 23:31:38 +00:00
Michael Kaufmann (d00p)
3aff47d983 - first commit for upcoming multiserver-support :) 2010-10-16 20:00:24 +00:00
Michael Kaufmann (d00p)
9fe6db8cd9 - forgot to add setting for SSLCertificateChainFile to the settings-array, refs #418 2010-10-15 11:55:28 +00:00
Michael Kaufmann (d00p)
15a03f63a9 - only use makeCorrectFile() on SSLCertificateChainFile if not empty 2010-10-15 11:51:15 +00:00
Michael Kaufmann (d00p)
d7b5c4bc71 - added possibility to allow customer to login with their domain-name, fixes #374 2010-10-15 11:48:05 +00:00
Michael Kaufmann (d00p)
db05ea5f32 - added possibility to set a custom docroot for any ip/port combination, fixes #417
- sort vhosts-file by type (subdomain, sub-of-main, main-domain), fixes #437
2010-10-15 10:41:58 +00:00
Michael Kaufmann (d00p)
ceedab3a6e - put enable/disable ssl in the settings overview
- added SSLCertificateChainFile to IPs and ports and webserver-cron, fixes #418
- added domain-specific ssl-settings for lighttpd
2010-10-15 08:32:35 +00:00
Michael Kaufmann (d00p)
0b6bb64600 - fix loop-in-loop effect when calculating traffic with awstats, fixes #246 2010-10-15 07:32:16 +00:00
Michael Kaufmann (d00p)
2985a08a8d - add awstats-icon alias to vhost-content, fixes #257
- removing unnecessary (and partly wrong) language-file entries
2010-10-15 06:50:25 +00:00
Michael Kaufmann (d00p)
a1b26c91d2 small dkim-filter.conf-fixes; refs #384
OMG OMG OMG this commit is LEET :) - wohoooo
2010-10-14 06:52:35 +00:00
Michael Kaufmann (d00p)
7d54744e9a - add DKIM-milter install/configuration instructions for Debian/Ubuntu, fixes #384 2010-10-14 06:49:05 +00:00
Michael Kaufmann (d00p)
7afc7e2797 - show correct values on update-counters overview (subdomains had the used-tickets value) 2010-10-12 06:50:28 +00:00
Michael Kaufmann (d00p)
8d1f894622 - set used-ticket-cycle on update too
- setting version to 0.9.14-svn2
2010-10-12 06:32:29 +00:00
Michael Kaufmann (d00p)
3f0a491f8c - set used-ticket-cycle directly as INTERVAL for the cronjob 2010-10-12 06:21:08 +00:00
Michael Kaufmann (d00p)
9787089615 . remove customers htaccess/diroptions after deleting the customer, refs #424 2010-10-11 08:44:24 +00:00
Michael Kaufmann (d00p)
076c07b4be add aps-packages to the updateCounters() function and recalculate resources overview, fixes #425 2010-10-10 11:37:49 +00:00
Michael Kaufmann (d00p)
6887dad1a9 - fixed misspelling in german language-file, fixes #434 2010-10-10 10:50:56 +00:00
Michael Kaufmann (d00p)
5fee795b5c - set correct config for special-characters (umlauts) in HTMLPurifier, refs #129 2010-10-10 08:20:32 +00:00
Michael Kaufmann (d00p)
146c205f6c - updated italian language file, thx to Emilien 2010-10-08 10:13:23 +00:00
Michael Kaufmann (d00p)
5c87e2210c - be sure customer-docroot-prefix is never the same or within the fcgid-configurations-folder 2010-10-05 20:25:52 +00:00
Michael Kaufmann (d00p)
db6bdfd931 - always check that HTMLPurifier's cache folder is writable 2010-10-05 20:24:08 +00:00
Michael Kaufmann (d00p)
b796f02a3d - add note to fcgid-config-dir setting that this folders gets cleaned on every cronrun 2010-10-04 12:20:10 +00:00
Michael Kaufmann (d00p)
a86140cec0 - set version to 0.9.13.1 (support-ticket-system bugfix) 2010-10-01 06:10:45 +00:00
Michael Kaufmann (d00p)
1f9caedc16 - fix postfix main.cf for FreeBSD, fixes #420 2010-10-01 05:13:31 +00:00
Michael Kaufmann (d00p)
dc6034796a - fix regex if reply-to header is present in autoresponder, fixes #423 2010-10-01 05:10:01 +00:00
Michael Kaufmann (d00p)
be8d38b478 - fix require for htmlpurifier, thx to Timo for the hint 2010-09-30 12:53:34 +00:00
Michael Kaufmann (d00p)
d3cd83eb93 - add possibility to specify php.ini for Froxlor-Vhost (if enabled), fixes #414 2010-09-28 09:21:13 +00:00
Michael Kaufmann (d00p)
984849d2c8 - set correct default langauge for main-admin after installation 2010-09-27 10:37:02 +00:00
Michael Kaufmann (d00p)
bc82c8fead - preselect panel language instead of admin-language when adding a new customer 2010-09-27 09:53:12 +00:00
Michael Kaufmann (d00p)
3b9f580bac - set version to 0.9.13 for upcoming release 2010-09-27 07:06:00 +00:00
Michael Kaufmann (d00p)
84d9212582 - fix deletion of old php-fcgi-starter (again), refs #367 2010-09-27 06:38:42 +00:00
Michael Kaufmann (d00p)
9c7142817d - fix check for mysql-result in installation (backup of old database part), thx Lantizia 2010-09-26 17:25:48 +00:00
Michael Kaufmann (d00p)
1217483894 - remove old 22_* vhost config files too, fixes #415 2010-09-24 17:16:33 +00:00
Michael Kaufmann (d00p)
71d592e38b - secure ticket-system with HTML-Purifier 2010-09-23 07:45:04 +00:00
Michael Kaufmann (d00p)
59b7ced862 - remove bad html-tags in ticket-subject and -message, thx to Edward Fjellskaal 2010-09-23 06:08:23 +00:00
Michael Kaufmann (d00p)
29d54671d3 - added limitation for autoresponder, fixes #377
refs #377
2010-09-20 07:56:32 +00:00
Michael Kaufmann (d00p)
7676acf1f2 - go back as many pages as we have security-questions in admin_domains.php, so we always return to the main form, fixes #332
refs #332
2010-09-20 06:07:54 +00:00
Michael Kaufmann (d00p)
ca44db25a0 - don't use loginname for chowning when not in fcgid-mode (pureftp-quota-calculation), fixes #407 2010-09-17 17:54:22 +00:00
Michael Kaufmann (d00p)
8c5f5ba629 - check for magic_quotes_runtime in installation and init-script (for updaters) because of strange behavior of Froxlor if enabled (deactivating it temporarily if so, but better fix php.ini) 2010-09-17 10:33:58 +00:00
Michael Kaufmann (d00p)
ef97f63b73 - only show redirect-info on "path"-field for domain-pages, not for path-options pages, fixes #408
refs #408
2010-09-17 05:16:06 +00:00
Michael Kaufmann (d00p)
b103d719ea - add missing comma 2010-09-16 12:00:48 +00:00
Michael Kaufmann (d00p)
ad0828df12 - implemented sender address restriction for postfix, fixes #379
refs #379
2010-09-13 06:11:25 +00:00
Michael Kaufmann (d00p)
719fac7f88 - pass month/year parameter to awstats, fixes #240
refs #240
2010-09-13 06:07:39 +00:00
Michael Kaufmann (d00p)
b1b2eec21f - fix Ubuntu Lucid dovecot-configuration-templates, fixes #401
refs #401
2010-09-13 05:50:10 +00:00
Michael Kaufmann (d00p)
6169328647 - removed old 'cmusieve' plugin, refs #401 2010-09-07 12:00:00 +00:00
Michael Kaufmann (d00p)
fbd93b879c - Don't let the autoresponder answer to autoresponded-answers, fixes #399 2010-09-07 10:56:58 +00:00
Michael Kaufmann (d00p)
af43ccf37e - only create folder for active stats-programm, fixes #370 2010-09-07 10:49:29 +00:00
Michael Kaufmann (d00p)
e356957592 - added yes/no to decide whether to store the default index-file to a new customers docroot or not, fixes #369 2010-09-07 10:46:50 +00:00
Michael Kaufmann (d00p)
1fee5d7242 - Allow CGI in APS-packages as we can handle that now, fixes #404 2010-09-07 10:36:58 +00:00
Florian Aders (EleRas)
3e55073188 Updated italian languagefile, thx to Emilien 2010-09-05 07:57:42 +00:00
Michael Kaufmann (d00p)
fb66ed078a - fix sql-query in admin_customers, fixes #397 2010-08-29 15:42:41 +00:00
Michael Kaufmann (d00p)
d4f93f07ee - only display domains owned by the current admin or customer_see_all = true, refs #394 2010-08-27 06:08:52 +00:00
Michael Kaufmann (d00p)
6e3bc87302 - removed customer-id limitations in domains-edit, fixes #394
- added permission-check to cron-init script if mod_fcgid_ownvhost is enabled
2010-08-27 05:53:25 +00:00
Michael Kaufmann (d00p)
28f525fb5c - don't show regular expression on password-complexity-error, fixes #392 2010-08-24 12:34:22 +00:00
Michael Kaufmann (d00p)
def6a7c051 - fix html linebreaks in autoresponder 2010-08-24 11:05:27 +00:00
Michael Kaufmann (d00p)
5d36c7228d - set version to 0.9.12, preparing for tag 2010-08-23 06:43:22 +00:00
Michael Kaufmann (d00p)
cf2dabc714 - use correct function to validate directory, fixes #385 2010-08-20 14:45:37 +00:00
Michael Kaufmann (d00p)
a63e752dde - various language improvements/corrections, fixes #380 #381 2010-08-18 05:23:30 +00:00
Michael Kaufmann (d00p)
ec1696ebab - woops, fixed language-file, refs #354 2010-08-17 06:47:13 +00:00
Michael Kaufmann (d00p)
7730a57dbf - add missing language-strings, refs #354 2010-08-17 06:45:46 +00:00
Michael Kaufmann (d00p)
e444ebff62 - clear php-fcgi-starter directories so no old files for non-existing domains are on the filesystem, fixes #367 2010-08-17 06:40:20 +00:00
Michael Kaufmann (d00p)
015f51f8d3 - added email template for "forgot password" function, fixes #354 2010-08-17 06:19:57 +00:00
Michael Kaufmann (d00p)
40ba41497b - added 'company' and 'salutation' to some templates, fixes #376 2010-08-17 06:02:31 +00:00
Michael Kaufmann (d00p)
2a5494c85a - remove unused replacer-variable in admin_customers.php
- add already-implemented replacers to the templates so users actually know they exist
2010-08-13 08:39:56 +00:00
Michael Kaufmann (d00p)
ffe20960d5 - add redirect-code descriptions to customer-domain view, fixes #360 2010-08-12 12:32:26 +00:00
Michael Kaufmann (d00p)
040f151d65 - added possibility to customize authname of directory-protection, fixes #345 2010-08-11 07:48:56 +00:00
Michael Kaufmann (d00p)
db286077f8 - setting cronjob interval of "reset support ticket usage" to 1 day (there is a cycle-setting which controls the reset) 2010-08-11 07:09:57 +00:00
Michael Kaufmann (d00p)
90bd5c3512 - possibility to enter a different path for 'awstats.pl' because it might not be in the same directory as 'awstats_buildsstaticpages.pl', fixes #343 2010-08-10 12:07:53 +00:00
Michael Kaufmann (d00p)
ee29c406ab - add possibility to define email templates for "new database by customer" and "new ftp account by customer" 2010-08-10 09:21:07 +00:00
Michael Kaufmann (d00p)
599d179c4d - fix returnvalue of _getImmutableFunction() 2010-08-10 08:20:20 +00:00
Michael Kaufmann (d00p)
4b84d978d1 - check for 'chattr' command, and use 'chflags' (FreeBSD) if not found, fixes #339
- add license-header to function.storeDefaultIndex.php
2010-08-10 07:57:48 +00:00
Michael Kaufmann (d00p)
91c1928309 - only check for ticket-values if ticket-system is enabled when adding/editing an admin 2010-08-09 11:07:27 +00:00
Michael Kaufmann (d00p)
9d4d6efdb9 - set / as default value for ftp-homedir in customer_ftp, fixes #338 2010-08-09 06:35:16 +00:00
Michael Kaufmann (d00p)
81cef92443 - set "add_date" also for standard-subdomain, fixes #340 2010-08-09 06:30:03 +00:00
Michael Kaufmann (d00p)
734686ff33 - add trailing slash to validate path if needed, fixes #331
- correct HTML special-character in german.lng.php
2010-08-09 06:11:41 +00:00
Michael Kaufmann (d00p)
0d897f13e3 - prevent "sub-but-full-domain" to be used as "sub-but-full-domain" again 2010-08-06 08:46:55 +00:00
Michael Kaufmann (d00p)
05436211dd - just some minor fixes in gentoo-dovecot.conf 2010-08-06 07:09:52 +00:00
Michael Kaufmann (d00p)
ed9235d341 - add possibility to add a subdomain of another domain as "full"-domain in admin-interface, fixes #329 2010-08-06 05:43:28 +00:00
Michael Kaufmann (d00p)
ee7177bdec - fix function correctErrorDocument(), refs #267 2010-08-05 07:36:24 +00:00
Michael Kaufmann (d00p)
74da53c822 - allow setting path-to-file or simple-string as error-document (only file is valid for lighttpd), fixes #267 2010-08-05 07:10:27 +00:00
Michael Kaufmann (d00p)
0f0ae6eb6d - set correct default-value on "change password" view, fixes #317 2010-08-05 06:32:40 +00:00
Michael Kaufmann (d00p)
472291e59d - merging branch d00p/perl-suexec-workaround to trunk, fixes #319 2010-08-05 06:19:53 +00:00
Michael Kaufmann (d00p)
86c881a63c - use correct commands with apache on Gentoo when creating vhosts-dir/-file 2010-08-04 11:51:57 +00:00
Michael Kaufmann (d00p)
f95431c55e - only validate password if given in customer_mysql, fixes #325 2010-08-03 05:29:57 +00:00
Michael Kaufmann (d00p)
f2f022ba30 - add ftp-quota-sql for pure-ftpd under gentoo 2010-08-02 07:30:56 +00:00
Michael Kaufmann (d00p)
1a62e9413d - remove base_dir-directive from dovecot.conf as we use the default value anyway, fixes #311
- added pure-ftp configuration-template for Gentoo
2010-08-02 06:54:57 +00:00
Michael Kaufmann (d00p)
e53e3f9843 - correct description for "save mailpasswords in cleartext" settting, fixes #315 2010-07-30 07:50:28 +00:00
Michael Kaufmann (d00p)
69391309bc - use correct $_POST-values on update 2010-07-30 05:42:19 +00:00
Michael Kaufmann (d00p)
038e9947c1 - remove deprecated function mysql_list_tables() from install.php 2010-07-29 11:00:27 +00:00
Michael Kaufmann (d00p)
5c4a38e4de - beautification in gentoo-config-templates 2010-07-28 12:23:59 +00:00
Michael Kaufmann (d00p)
a0d7997778 - forgot to set version string to 0.9.12-svn1 2010-07-28 10:44:47 +00:00
Michael Kaufmann (d00p)
d660165470 - fixed configuration permissions for pure-ftp, fixes #309
- fixed configuration permissions for dovecot, fixes #310
- fixed some minor config-template issues
2010-07-28 06:08:14 +00:00
Michael Kaufmann (d00p)
735f890e56 - improve autoresponder-cron, refs #308
- let phpMailer-Class throw its exception so we can catch them
2010-07-27 09:59:53 +00:00
Michael Kaufmann (d00p)
a2ab73fa41 - add possibility to use FCGID also for Froxlor itself, fixes #305
- make extra settings menu for FCGID
- replace deprecated function 'ereg_replace' in lighttpd-cronjob
2010-07-27 08:42:59 +00:00
Michael Kaufmann (d00p)
f7f1907546 - set version to 0.9.11 2010-07-26 07:43:12 +00:00
Michael Kaufmann (d00p)
ced78ac6f7 - use correct table-field for email deletion, refs #245 2010-07-24 19:42:03 +00:00
Michael Kaufmann (d00p)
fe3728d522 - fix wrong variable in e-mail data deletion, it actually does work now :P (thx to acidfreeze), fixes #245 2010-07-24 18:55:48 +00:00
Michael Kaufmann (d00p)
f858f045d6 - add task to remove ftp-user data on filesystem correctly 2010-07-24 17:59:05 +00:00
Michael Kaufmann (d00p)
51673f3569 - only show checkbox for e-mail file deletion if there really is some data on the filesystem 2010-07-24 17:26:24 +00:00
Michael Kaufmann (d00p)
e430092eda - fixed lang-variable in getRedirectCodes() 2010-07-22 07:01:47 +00:00
Michael Kaufmann (d00p)
eaf70765d5 - possibility to specify perl path (only necessary on lighttpd) 2010-07-22 06:56:17 +00:00
Michael Kaufmann (d00p)
9191bc6c08 - don't cut single slash if diroptions path is equal to the docroot 2010-07-22 06:36:24 +00:00
Michael Kaufmann (d00p)
d1d772f790 - added possibility to run perl-scripts (if allowed by admin) via directory-options
- for use in lighttpd you have to add "mod_cgi" to the modules-list (and maybe patch lighttpd-cron if perl is not installed in /usr/bin)
2010-07-22 06:02:38 +00:00
Michael Kaufmann (d00p)
edc7a91519 - tell PHPMailer to throw Exceptions so we can catch them, fixes #298 2010-07-22 05:28:21 +00:00
Michael Kaufmann (d00p)
4eb177e65f - set umask in php-starter files (fcgid), fixes #299 2010-07-19 09:48:54 +00:00
Michael Kaufmann (d00p)
5f34dfa968 - add possibility to define password-complexity, fixes #292 2010-07-19 08:06:18 +00:00
Michael Kaufmann (d00p)
c43574a714 - possibility to remove email data also if only account is being removed but not the address itself, refs #245
- possibility to remove ftp-homedir on deletion of a ftp-user, fixes #293
2010-07-19 06:03:49 +00:00
Michael Kaufmann (d00p)
525b6ee98d - keep consistence in filenames, fixes #290
refs #290
2010-07-19 05:35:32 +00:00
Michael Kaufmann (d00p)
e5814b14d9 - fix correct insert of domain-redirect code, fixes #296 2010-07-14 06:37:08 +00:00
Michael Kaufmann (d00p)
e5cd9ad727 - fix accessibility of Froxlor
- added option to decide how Froxlor is being reached
- set version to 0.9.10
2010-06-28 08:53:41 +00:00
Michael Kaufmann (d00p)
cc5c30cc69 - check for defined variable in makeCorrectFile as an undefined may return unwanted values 2010-06-28 08:23:11 +00:00
Michael Kaufmann (d00p)
cf2104e989 - fix wrong variable name 2010-06-28 08:18:12 +00:00
Michael Kaufmann (d00p)
14b7be0a4f - fix undefined (and also unneeded) variable in cron-job 2010-06-25 05:27:09 +00:00
Michael Kaufmann (d00p)
e6c385da10 - fix maildir checking (returned error even if the path exists and is readable) 2010-06-24 20:10:47 +00:00
Michael Kaufmann (d00p)
57124d040d - don't delete everything if the path is the domains document-root (protect basedir, awstats|webalizer-dir and place default index), fixes #273
refs #273
2010-06-24 08:11:43 +00:00
Michael Kaufmann (d00p)
67c55c5a25 - remove installed files when APS packages has been removed, fixes #273
refs #273
2010-06-24 07:26:49 +00:00
Michael Kaufmann (d00p)
f86e4f39d3 - add missing label-string for httpuser and httpgroup settings 2010-06-21 08:38:13 +00:00
Michael Kaufmann (d00p)
5e162b018d - nicer and safer way of determine the customer-id out of the aps-database name 2010-06-17 11:32:14 +00:00
Michael Kaufmann (d00p)
9851ac53cc - show aps-databases also customer-mysql overview, fixes #272
- aps-databases are now increasing the customers mysql-contingent, refs #278
- customers viewing the aps-list are now notified if a package requires a database but the contingent is used up
- the update will add all web[X]aps[Y] databases to the according customer regardless of contingent
- fix tiny issue in preconfig
- setting version to 0.9.10-svn2


refs #272,278
2010-06-17 09:21:14 +00:00
Michael Kaufmann (d00p)
794c4d3b55 - show message-box if customer has no/insufficient aps-contingent, fixed #278
refs #278
2010-06-17 06:30:59 +00:00
Michael Kaufmann (d00p)
530b6da6e8 - fix htpasswd stuff in lighty, fixes #281 2010-06-17 05:56:36 +00:00
Florian Aders (EleRas)
6986ffefbe Fixed bug in languageselect 2010-06-16 20:13:12 +00:00
Florian Aders (EleRas)
e6eefc9913 Fixed typo, fixes #279 2010-06-16 20:02:28 +00:00
Florian Aders (EleRas)
3cd66a9fc4 Now the same for trunk, if someone only checks out trunk ;) 2010-06-16 18:16:37 +00:00
Florian Aders (EleRas)
a1c98e4012 Fixing login - languageselector, fixes #277 2010-06-16 16:26:31 +00:00
Florian Aders (EleRas)
cc7610d436 I hate stupid bugs, still fixing #276 2010-06-16 12:38:53 +00:00
Florian Aders (EleRas)
36efb04f86 Stupid bug-- 2010-06-16 12:34:22 +00:00
Florian Aders (EleRas)
dcc5859eb8 remove waiting createuser - tasks while removing a customer, fixes #276 2010-06-16 12:28:32 +00:00
Michael Kaufmann (d00p)
1557e5b7a3 - only ask for httpgroup/httpuser if not set before
- version decrease back to 0.9.10-svn1 (the two update-procedures have to be executed at the same update-level)
2010-06-16 12:18:14 +00:00
Michael Kaufmann (d00p)
9a41d35f98 - forgot a dot xD 2010-06-16 12:07:36 +00:00
Michael Kaufmann (d00p)
65a7983edc - don't make httpuser/httpgroup-setting hidden
- setting version to 0.9.10-svn2
2010-06-16 12:04:28 +00:00
Michael Kaufmann (d00p)
7b4a34ee69 - use system-settings of awstats-path for configuration-commands, fixes #275 2010-06-16 11:34:48 +00:00
Michael Kaufmann (d00p)
fb63dac2d1 - sorry, wrong checking, corrected now 2010-06-16 10:11:29 +00:00
Michael Kaufmann (d00p)
f9b014f640 - check for missing settings due to forgotten updates in syscp-installs (years ago)
- setting version to 0.9.10-svn1
2010-06-16 10:02:17 +00:00
Michael Kaufmann (d00p)
fe15ff4913 - determine correct path of Froxlor in webserver-cron, fixes #270 2010-06-15 05:40:08 +00:00
Michael Kaufmann (d00p)
cb128e5020 - implemented APS-1.2 standard 2010-06-14 08:09:17 +00:00
Florian Aders (EleRas)
2c3a11cff9 Preparing tagging of 0.9.9 2010-06-14 07:58:38 +00:00
Robert Foerster (Dessa)
7dbb715f04 partly revert r547 2010-06-09 11:42:36 +00:00
Robert Foerster (Dessa)
cdc2c8b1e4 gentoo apparently ships mod_cgi.conf by default unconditionally (but does not enable it), so lets just indicate that in the config as well 2010-06-09 10:55:29 +00:00
Michael Kaufmann (d00p)
ba33268596 - use username or guid depending on fcgid settings for chowning awstats/webalizer files 2010-06-08 20:39:21 +00:00
Michael Kaufmann (d00p)
fd96e4b42e - give ssl-vhost files another name that non-ssl vhost files, now really fixes #254 2010-06-08 11:13:22 +00:00
Michael Kaufmann (d00p)
950c9d7373 - on ssl-redirect, only create webroot for vhost, fixes #254 2010-06-08 06:16:48 +00:00
Michael Kaufmann (d00p)
470fb9a02a - found a better place to run the chowning, refs #258 2010-06-08 05:53:07 +00:00
Michael Kaufmann (d00p)
f2a4c52110 - chown awstats/webalizer directory after traffic-cron, fixes #258 2010-06-08 05:51:23 +00:00
Michael Kaufmann (d00p)
10cfdb137a - fix sed-command in config-templates, fixes #263 2010-06-07 11:14:49 +00:00
Michael Kaufmann (d00p)
323e2210c3 - don't create absolut paths additionally as relative paths in customers docroot, fixes #259 2010-06-04 05:50:23 +00:00
Michael Kaufmann (d00p)
d256ddfcbc - added possibility to let the cron create mail-specific A-records (mail, imap, pop3, smtp) even when MX-servers are given, fixes #242 2010-06-02 10:08:01 +00:00
Michael Kaufmann (d00p)
de250df0cb - added possiblility for customer to get its e-mail account data deleted from the filesystem when removing an account from the panel, fixes #245 2010-06-02 05:57:44 +00:00
Michael Kaufmann (d00p)
e7c9b4d402 - variable name corrections, fixes #256 2010-06-01 05:17:53 +00:00
Michael Kaufmann (d00p)
f3719d339e - set version to 0.9.8 2010-05-31 09:01:29 +00:00
Michael Kaufmann (d00p)
efc353256d - only check for colon if document-root is not a domain-name (redirect), fixes #253 2010-05-31 08:28:12 +00:00
Michael Kaufmann (d00p)
f4026c1df5 - catch exception if update.log can't be opened in /tmp/ (which should never happen) 2010-05-31 06:04:51 +00:00
Michael Kaufmann (d00p)
eed7776e86 - use better english 2010-05-30 09:31:11 +00:00
Robert Foerster (Dessa)
aface6b425 fix some typos in preconfig, thanks to tomreyn 2010-05-29 22:03:26 +00:00
Florian Aders (EleRas)
b0fb3a31f7 correczing functionname makeCorrectPath to makeCorrectDir, fixes #252 2010-05-29 18:53:16 +00:00
Florian Aders (EleRas)
b01d37d085 Updated italian languagefile, thx to Emilien :) 2010-05-27 21:10:40 +00:00
Michael Kaufmann (d00p)
72e6e2af24 - change minimum value for dns-TTL to 1 hour instead of 1 day, refs #166 2010-05-27 20:34:49 +00:00
Michael Kaufmann (d00p)
0db11bf0f8 - same with 05_froxlor_default_errorhandler.conf 2010-05-27 10:20:37 +00:00
Michael Kaufmann (d00p)
07e388c554 - secure path to 05_froxlor_dirfix_nofcgid.conf apache config file 2010-05-27 10:18:57 +00:00
Robert Foerster (Dessa)
84c9ac7e82 tweak dovecot configuration for lucid to work, fixes 248 2010-05-25 22:19:29 +00:00
Michael Kaufmann (d00p)
e572c072a9 - corrected 'last password change' calculation in libnss-configurations, fixes #244 2010-05-21 05:24:18 +00:00
Florian Aders (EleRas)
f6f7b2e4be Fixing it on the right place, d00p was correct, i apologize -.- 2010-05-19 12:29:32 +00:00
Michael Kaufmann (d00p)
5a0973dfa3 - respect lighttpd user and don't put "DocumentRoot" into the ip-specialsettings 2010-05-19 10:59:01 +00:00
Michael Kaufmann (d00p)
268f3b0a24 bugfix template 2010-05-19 10:46:42 +00:00
Michael Kaufmann (d00p)
348de6da35 - simplify awstats configuration, fixes #241 2010-05-19 06:07:02 +00:00
Michael Kaufmann (d00p)
82958cd8c2 - check for disabled accounts in libnss-configurations, fixes #237 2010-05-19 05:54:13 +00:00
Michael Kaufmann (d00p)
264bc50451 - respect admins open_basedir path settings (if more than one path), fixes #238 2010-05-18 11:48:58 +00:00
Michael Kaufmann (d00p)
2ce7e9728f set version to 0.9.7 final 2010-05-17 10:23:25 +00:00
Robert Foerster (Dessa)
8c0bef06c6 consistency is hard... it is... really! 2010-05-17 09:24:23 +00:00
Robert Foerster (Dessa)
7a493fad80 - remove empty apache2 dir from the templates
- actually include lucid in the templates (do'h)
- reworded comments in dovecot configs and fix a typo
- recorded merge of revision 898 via svnmerge from http://Dessa@svn.froxlor.org/branches/mgozdzik
2010-05-17 09:14:30 +00:00
Michael Kaufmann (d00p)
891835d542 don't use the same varname twice 2010-05-17 09:10:02 +00:00
Michael Kaufmann (d00p)
1876ed1459 - validate our update.log file, if not writeable etc. create it in /tmp/ 2010-05-17 08:52:37 +00:00
Michael Kaufmann (d00p)
711f54662c - show START and END of update.log
- tiny beautification in updater
2010-05-17 08:42:32 +00:00
Robert Foerster (Dessa)
f331dee8a1 add Ubuntu Lucid Config Templates, fixes #171 2010-05-17 08:42:17 +00:00
Michael Kaufmann (d00p)
3f0d94c157 fixing sql-queries in updater 2010-05-17 08:29:02 +00:00
Michael Kaufmann (d00p)
f5576606e1 - added description for redirect-codes
- increase version number to 0.9.7-svn3
2010-05-17 08:26:55 +00:00
Michael Kaufmann (d00p)
34de2c03c4 - removed potential undefined variable in admin_index.php
- show also outstanding APS-tasks in admin-overview, fixes #231
2010-05-17 07:01:46 +00:00
Michael Kaufmann (d00p)
225be93610 - correcting constructor-call of FileLogger 2010-05-17 06:15:03 +00:00
Michael Kaufmann (d00p)
089b03de38 - create update.log on update in folder /install/ 2010-05-17 06:09:30 +00:00
Michael Kaufmann (d00p)
785e8f0938 - added configuration templates for FreeBSD's libnss-mysql, fixes #228 2010-05-17 05:33:32 +00:00
Florian Aders (EleRas)
ea24918785 Don't revert preconfig if no domain is found for open_basedir - update 2010-05-14 16:32:46 +00:00
Florian Aders (EleRas)
daa8e45582 Decode the Punycode wshile showing domains with wrong open_basedir 2010-05-12 13:14:18 +00:00
Florian Aders (EleRas)
aa45bf5f70 Forgot that we have http:// in documentroots 2010-05-12 13:08:06 +00:00
Florian Aders (EleRas)
b64bfaeb92 Updating all "wrong" domains regarding open_basedir to use the customerroot instead the documentroot 2010-05-12 13:02:56 +00:00
Michael Kaufmann (d00p)
659d673ffa - renaming file (typo) 2010-05-12 06:52:41 +00:00
Michael Kaufmann (d00p)
65e0962111 - fixed open_basedir issues, fixes #227 2010-05-12 06:52:11 +00:00
Michael Kaufmann (d00p)
a5cf1a0ac9 - pre-select correct domain-path on domain-edit (customer-panel), fixes #225 2010-05-11 11:16:14 +00:00
Michael Kaufmann (d00p)
465f29531e - Customer can now select http-redirect-code for domains (if path is an URL), only works for apache as lighttpd does not support this until version 1.5.0, fixes #184 2010-05-11 08:50:35 +00:00
Florian Aders (EleRas)
88b0c70d0c Renamed username and passwiort - fields while adding a customer to prevent autocomplete of the browsers, fixes #224 2010-05-11 06:19:44 +00:00
Michael Kaufmann (d00p)
4c1b30a081 - pass 'awstatsprog' parameter to awstats_buildstaticpages.pl, fixes #213 2010-05-10 12:18:12 +00:00
Michael Kaufmann (d00p)
afdd94ff9e - corrected postfix/main.cf for dovecot-usage, fixes #217 2010-05-10 09:02:56 +00:00
Michael Kaufmann (d00p)
0b8c1441ef - remove all APS-related data when removing a customer, fixes #216 2010-05-10 08:42:50 +00:00
Michael Kaufmann (d00p)
83b1d85730 - fixed overwriting of mysql-result-array, fixes #215
- fixed invalid SQL-query, fixes #212
2010-05-10 05:37:24 +00:00
Florian Aders (EleRas)
399664c65a Adding documwentroot to default ip, fixes #211 2010-05-07 14:25:08 +00:00
Michael Kaufmann (d00p)
2830bb722f - added possibility to get new ftp-user data e-mailed to customer, fixes #208 2010-05-07 06:13:07 +00:00
Michael Kaufmann (d00p)
7e733e60ee - wups, one escaping too much :p 2010-05-04 10:31:25 +00:00
Michael Kaufmann (d00p)
1f6e3c271b - validateUrl needed to idna-convert the url if its a domain, also needed new regex (subfolder, etc.) 2010-05-04 10:30:02 +00:00
Michael Kaufmann (d00p)
9c79654cf4 - corrected validation of Domain and URL (stupid php-bug) 2010-05-04 09:54:10 +00:00
Michael Kaufmann (d00p)
7ea04992e3 - remove old fcgi-starter files etc. if customer has been deleted (only if 'delete userfiles' is checked!), fixes #200 2010-05-04 07:04:08 +00:00
Michael Kaufmann (d00p)
29a949d3d2 - display number of results in overview, fixes #195 2010-05-04 06:43:23 +00:00
Michael Kaufmann (d00p)
36ed2b4dc2 set default resource-values on create-customer form, fixes #190 2010-05-04 05:56:42 +00:00
Florian Aders (EleRas)
9d50eca251 Damn, overlooked the line disabling quota again, refs #13 2010-05-03 13:58:23 +00:00
Michael Kaufmann (d00p)
c28a0291d7 - setting version to 0.9.6 2010-05-03 12:08:45 +00:00
Michael Kaufmann (d00p)
e9ba9e089e fix another possible undefined variable in updater 2010-05-03 11:53:20 +00:00
Florian Aders (EleRas)
01b58cf247 Fixed typo in precheck - questions 2010-05-03 11:48:28 +00:00
Michael Kaufmann (d00p)
aa532806d0 - fixed undefined index under specific circumstances 2010-05-03 11:47:06 +00:00
Florian Aders (EleRas)
6ddfe7a378 Fixed bug in updater not showing the updater - questions 2010-05-03 11:45:29 +00:00
Florian Aders (EleRas)
01a2690cf1 Fixed contant - notice in installer 2010-05-03 11:40:48 +00:00
Robert Foerster (Dessa)
8692a107ab recorded merge of revisions 825,853 via svnmerge from http://Dessa@svn.froxlor.org/branches/mgozdzik 2010-05-02 20:32:12 +00:00
Michael Kaufmann (d00p)
d8b0221c91 - minor fixes in admin_tickets (display of name)
- fixes of undefined mailer-class if admin-mail is invalid
2010-05-02 07:46:20 +00:00
Michael Kaufmann (d00p)
a6408bf398 - correct display of username in ticket-system, thanks to arnoldB 2010-05-01 14:54:09 +00:00
Michael Kaufmann (d00p)
433c8669f4 - minor fixes in update-process for ftp-quota stuff, refs #13 2010-05-01 14:08:52 +00:00
Florian Aders (EleRas)
43aebcccff This looks better in the updater 2010-05-01 12:41:22 +00:00
Florian Aders (EleRas)
1e22b96d9a Added FTP - quota - patch made by monotek, fixes #13 2010-05-01 12:37:05 +00:00
Michael Kaufmann (d00p)
962abd34c7 - add setting for default php-configuration, fixes #182
- set version to 0.9.6-svn5
2010-04-30 19:51:19 +00:00
Robert Foerster (Dessa)
c6a45789bc updated postfix configuration for debian lenny, ubuntu hardy and gentoo
- split up postfix configs for courier and dovecot, so people do not do/install unneeded stuff
- renamed deprecated config keys (upstream is backwards compatible until further notice, so you don't need to change them unless you really want to)
- removed most default values, distros ship the default configs in /usr/share anyway.
- debian etch is untouched, so is suse (for now)
2010-04-30 16:38:02 +00:00
Michael Kaufmann (d00p)
9d48bbf2f3 - fix logger-message in phpsettings when adding new php-config, thx freaky[t] 2010-04-30 05:07:34 +00:00
Michael Kaufmann (d00p)
bdc002978a - ensure alias-domains have the same ip/port combination as the target-domain, fixes #176 2010-04-29 07:40:55 +00:00
Michael Kaufmann (d00p)
7ce1781f57 - fix false logout when no updates are available and accessing admin_updates.php 2010-04-29 06:50:35 +00:00
Michael Kaufmann (d00p)
fde4d53f1d - fix selection of default-ip/port combination in admin_domains
- beautification of update-process
2010-04-29 06:49:03 +00:00
Michael Kaufmann (d00p)
862265ab60 forgot to add $lng to the global variables list in parseAndOutputPreconfig(), refs #178 2010-04-29 05:41:25 +00:00
Michael Kaufmann (d00p)
8ac41a28b9 - add setting for default support-ticket priority, fixes #178 2010-04-29 05:38:32 +00:00
Michael Kaufmann (d00p)
fb4b0e3920 - more work on default-webserver-error-documents 2010-04-28 09:34:50 +00:00
Michael Kaufmann (d00p)
49297ee5e2 ugh, bugfix makeyesno-call 2010-04-28 09:28:31 +00:00
Michael Kaufmann (d00p)
046be275a7 beautified update-texts 2010-04-28 08:27:25 +00:00
Michael Kaufmann (d00p)
5054eec852 - update procedure for new webserver-settings
- set version to 0.9.6-svn3
2010-04-28 07:41:34 +00:00
Michael Kaufmann (d00p)
a7041e0399 - don't spam "PHP Warning: readdir() expects parameter 1 to be resource, boolean given" when webserver-configuration-directories do not exist in wipeOutOldConfigs 2010-04-28 07:04:01 +00:00
Michael Kaufmann (d00p)
5f5650f53a - fixed deletion of created webserver-configs, misread the code-line in the first place, damn
- started implementing default errordocument feature
2010-04-28 06:41:50 +00:00
Michael Kaufmann (d00p)
606f8fe557 - fix check for admin-mail
- save newly entered admin-mail (if invalid)
2010-04-27 11:33:57 +00:00
Michael Kaufmann (d00p)
fd6a0597a6 - check for broken admin-e-mail if phpMailerClass validation fails 2010-04-26 12:28:05 +00:00
Michael Kaufmann (d00p)
62fa764b4c fix some awstats config-file namings for debian-bases distros and suse, fixes #165 2010-04-26 06:32:40 +00:00
Michael Kaufmann (d00p)
9217d9977f fix deletion of old configs, fixes #102 2010-04-26 06:22:43 +00:00
Michael Kaufmann (d00p)
31231a5f60 - fixed validateUrl-function to work with buggy php-5.2.13 and php-5.3.2 (filter_var-bug) 2010-04-21 10:40:58 +00:00
Michael Kaufmann (d00p)
4cf8e2f2ea merged ticketcategories branch to trunk, fixes #157 2010-04-21 07:54:46 +00:00
Michael Kaufmann (d00p)
fd74671760 beautification 2010-04-21 07:07:56 +00:00
Michael Kaufmann (d00p)
28d626f882 - add current session to redirect-url so we don't have to re-login after the update-procedure 2010-04-21 07:02:25 +00:00
Michael Kaufmann (d00p)
09d69945f1 - fixed version-check for preconfig 2010-04-21 06:34:35 +00:00
Michael Kaufmann (d00p)
b87e4277f2 fix regex to add domains when using php-5.2.13 or php-5.3.2, thx to felauten 2010-04-20 21:35:30 +00:00
Michael Kaufmann (d00p)
24efe70335 fix warning if sql-result is empty in customer-traffic-overview 2010-04-20 10:58:28 +00:00
Michael Kaufmann (d00p)
a26b37c270 - remove 05_dirfix file when using fcgid 2010-04-20 09:42:46 +00:00
Michael Kaufmann (d00p)
3d67143903 updating configuration string, refs #166 2010-04-20 06:25:55 +00:00
Michael Kaufmann (d00p)
96219f406d added configuration for bind's TTL value, fixes #166 2010-04-20 06:22:11 +00:00
Michael Kaufmann (d00p)
4f5cb34f00 include "awstats.model.conf" before customize settings in it, refs #165 2010-04-20 05:21:48 +00:00
Robert Foerster (Dessa)
d4f3093ae3 - recorded merge of revisions 733,805 via svnmerge from http://Dessa@svn.froxlor.org/branches/mgozdzik
- add a missing german language string
- set version to 0.9.5
- improve debian/postinst message a bit
2010-04-19 13:32:24 +00:00
Michael Kaufmann (d00p)
cc89f26982 corrected special character in german-language file, fixes #164 2010-04-17 11:08:39 +00:00
Michael Kaufmann (d00p)
8155484ee9 - highlight temporary locked customers for admins, fixes #159 2010-04-15 11:00:27 +00:00
Michael Kaufmann (d00p)
97e3b30415 - show last login of customer in admin-customer-overview, fixes #158 2010-04-15 10:39:47 +00:00
Michael Kaufmann (d00p)
07b2c26bec - bugfixing 'servername guessing' on installation
- fixed undefined constant SERVER_SOFTWARE
- bugfixed form-validation on installation (thx to kTitan)
2010-04-15 10:13:41 +00:00
Michael Kaufmann (d00p)
afe431b72f - fixed possibility to add subdomains for domains with wildcarddomain=yes, fixes #150 2010-04-15 05:58:43 +00:00
Michael Kaufmann (d00p)
f5f796344c text beautifications 2010-04-14 10:33:47 +00:00
Michael Kaufmann (d00p)
8ee56d23ba - fixed password-reset $adminchecked; if no user is given don't output (admins) "password reset not allowed" 2010-04-14 10:27:28 +00:00
Michael Kaufmann (d00p)
f62dba4e1b - removed undefined variable in forgot-pwd 2010-04-14 10:09:31 +00:00
Michael Kaufmann (d00p)
87f84c694a - fixed awstats traffic value, save as KB (like webalizer) instead of Bytes, fixes #124 2010-04-14 08:26:13 +00:00
Michael Kaufmann (d00p)
f5a0727b8e - fixing improved update-procedure + beautification 2010-04-14 08:22:25 +00:00
Michael Kaufmann (d00p)
4d5dcb82d6 - fixed some more "Deprecated: Call-time pass-by-reference" issues 2010-04-14 07:48:41 +00:00
Michael Kaufmann (d00p)
7fa901bebb - improved update-procedure
- updated version to 0.9.4-svn2
2010-04-14 07:36:38 +00:00
Michael Kaufmann (d00p)
1159bde3eb - merged wildcardsubdomain-branch to trunk, refs #123, refs #150 2010-04-14 06:42:14 +00:00
Michael Kaufmann (d00p)
9013062ae9 - show domain-destination IP in customer-panel (domain-edit-view), fixes #95 2010-04-13 11:21:25 +00:00
Michael Kaufmann (d00p)
47b2fe7c7c - put 'server.error-handler-404' to the right place + beautification 2010-04-13 07:10:30 +00:00
Michael Kaufmann (d00p)
cfaae63657 - merged settings branch, fixes #134 2010-04-13 05:41:09 +00:00
Michael Kaufmann (d00p)
98e79d933c - check for regular file when deleting old zonefiles (don't try to delete directories), fixes #147 2010-04-12 17:16:46 +00:00
Michael Kaufmann (d00p)
ae27e06675 - fixing domain validation
- added validation for local hosts (mysql-hosts)
2010-04-12 16:36:09 +00:00
Michael Kaufmann (d00p)
209ab4dff9 - wups, forgot to use the conditional selected webalizer-binary-value :P, refs #140 2010-04-12 11:14:32 +00:00
Michael Kaufmann (d00p)
cf18590b84 - implemented alternative regex-validation for broken php "filter_var" function in various php-versions, refs #109, #122, #138
- check for webalizer binary in /usr/bin and in /usr/local/bin (freebsd), fixes #140
2010-04-12 11:09:53 +00:00
Michael Kaufmann (d00p)
6c25cd1c85 - fix domain-sorting in customer-panel (domain-overview), fixes #126
- add dkim-milter restart command to bind-cron
2010-04-12 06:15:16 +00:00
Michael Kaufmann (d00p)
0d3df6e1fe - fixed some left-overs when using safe_exec which have not been escaped correctly, fixes #136 2010-04-12 05:49:16 +00:00
Michael Kaufmann (d00p)
b11d0c5cd9 - fixed link to awstats in customer-panel (domain-overview), fixes #137 2010-04-12 05:34:34 +00:00
Robert Foerster (Dessa)
afc3ab8a8b correct bind permissions in config templates, refs #135 2010-04-11 20:13:54 +00:00
Florian Aders (EleRas)
1903f34dea If we don't have a wildcard - domain and no special - MX - hosts, we add the three special - subdomains imap, smtp and pop3, fixes #82 2010-04-10 07:52:53 +00:00
Florian Aders (EleRas)
ee7e50004a Adjusting svn:ignore for packages and temporary - directory 2010-04-10 07:47:03 +00:00
Robert Foerster (Dessa)
96d26d0d94 - correct freebsd proftpd template, fixes #132
- don't display mkdir statement for deactivated docroot when it is not defined, this was already done in the other templates but got somehow lost for etch
2010-04-10 00:44:09 +00:00
Florian Aders (EleRas)
7c12ab82c5 fixing stupid if in lng - tool 2010-04-09 19:30:52 +00:00
Florian Aders (EleRas)
5c152a9754 Updating languagefiles (mostly removing old strings, translating some strings from english to german) 2010-04-09 19:24:17 +00:00
Michael Kaufmann (d00p)
5a4fffbce6 -create awstats-configuration-folder if it does not exist 2010-04-09 12:04:09 +00:00
Michael Kaufmann (d00p)
220118f4bc corrected index-name of array 2010-04-08 14:54:42 +00:00
Florian Aders (EleRas)
5d214e5bd7 fixing bug where old awstats - config will not be removed due to check on wrong panel - name 2010-04-08 14:36:20 +00:00
Michael Kaufmann (d00p)
43fe968ad0 added awstats configuration to FreeBSD, thx to jenus for the great help 2010-04-08 12:05:26 +00:00
Michael Kaufmann (d00p)
7daa7eb0bc - also send database-hostname in information-mail (customer::add-mysql), fixes #108 2010-04-08 10:45:02 +00:00
Michael Kaufmann (d00p)
a0274b083b - make path to awstats configuration folder a setting (again), fixes #125 2010-04-08 10:28:48 +00:00
Michael Kaufmann (d00p)
04c7aae433 - correct path to awstats-folder in traffic-cron, thx to kTitan 2010-04-08 05:47:03 +00:00
Michael Kaufmann (d00p)
5a99950a8f support for older Froxlor-versions in update-process (we had the awstats_path setting already in older releases), refs #120 2010-04-07 11:31:31 +00:00
Michael Kaufmann (d00p)
4659d8e24a beautification of update-process 2010-04-07 11:24:53 +00:00
Michael Kaufmann (d00p)
5e3a4fb1ab - re-enable setting for "path to awstats 'awstats_buildstaticpages.pl' script", fixes #120 2010-04-07 11:14:43 +00:00
Michael Kaufmann (d00p)
1839264f7a - don't block mails from localhost
- added postfix-mxaccess for freebsd
refs #119
2010-04-07 10:52:15 +00:00
Michael Kaufmann (d00p)
5f9d90a293 added Postfix MX-Access, fixes #119 2010-04-07 10:35:50 +00:00
Michael Kaufmann (d00p)
5c825e3206 fixed undefined variables in lighty-cron 2010-04-07 09:43:46 +00:00
Michael Kaufmann (d00p)
a54a27d6ba fixing up german-language file, thx monotek, refs #108 2010-04-07 08:15:50 +00:00
Michael Kaufmann (d00p)
16135fb92b - implemented check for used APS packages on domain-deletion, fixes #110 2010-04-07 07:47:20 +00:00
Michael Kaufmann (d00p)
f8d0472274 - added possibility to send new database information via email to the customer, fixes #108 2010-04-07 06:57:27 +00:00
Michael Kaufmann (d00p)
368e6a5c50 - improved 'edit ftp-account', fixes #116 2010-04-07 06:08:09 +00:00
Michael Kaufmann (d00p)
fb4ade70d2 fixing wrong variable name in autoresponder, fixes #115 2010-04-06 19:28:39 +00:00
Michael Kaufmann (d00p)
6a0fcc1fd9 set namevirtualhost_statement default to 'On', so froxlor is still reachable after addition of first customer 2010-04-06 17:36:22 +00:00
Michael Kaufmann (d00p)
0eec533647 - fix undefined variable in lighttpd-cron 2010-04-06 12:35:01 +00:00
Michael Kaufmann (d00p)
941b887b75 - fixed typo in field-name (just beautification, no functions affected)
- don't show delete-link for std-subdomains (they can be deactivated individually for each user when editing a user), fixes #101
2010-04-06 05:58:03 +00:00
Florian Aders (EleRas)
43595df977 Deactivating limitation of commands in safe_exec, we'll just check if there are redirects and stuff like that
The original reason for safe_exec is already allowed: rm
2010-04-05 13:03:58 +00:00
Michael Kaufmann (d00p)
8d652183a0 - set version to 0.9.4 for upcoming release 2010-04-05 08:26:47 +00:00
Michael Kaufmann (d00p)
6af37fb40e - corrected e-mail validation in APS-System, fixes #112 2010-04-04 08:32:34 +00:00
Michael Kaufmann (d00p)
d3ceeb3f14 - adding feature to set a hostname for customer-standard-subdomain to replace froxlor-system-hostname (optional)
- set version to 0.9.3-svn5
2010-04-02 13:51:25 +00:00
Michael Kaufmann (d00p)
7182b245b3 - assign correct (parentdomains) php-configuration to new subdomains, fixes #107 2010-04-01 10:18:05 +00:00
Michael Kaufmann (d00p)
a48d6ae174 - removed unnecessary language-entries for the autoresponder-module, fixes #106 2010-04-01 05:52:32 +00:00
Michael Kaufmann (d00p)
521d6bbd4d - fixing most of the special characters in czech language file, fixes #104 2010-03-31 07:33:14 +00:00
Michael Kaufmann (d00p)
e4f0144bbc - fix regex in wipeOutOldConfigs() in lighttpd-cron 2010-03-31 05:16:01 +00:00
Michael Kaufmann (d00p)
2c50107bea - some more bugfixing of undefined variable notices 2010-03-30 09:40:02 +00:00
Michael Kaufmann (d00p)
043ca2ff5a - fixing some undefined variables
- added missing dkim_notes field to settings-table
2010-03-30 09:18:22 +00:00
Michael Kaufmann (d00p)
ab1e3c3fc8 - don't use validate* functions before checking php-filter-extension, fixes #98 2010-03-29 13:08:01 +00:00
Michael Kaufmann (d00p)
230c2a1cf3 - added freebsd to configfiles array so it shows up in the menu, fixes #97
- check for mysqldump also in /usr/local/bin (freebsd), fixes #99
2010-03-29 12:06:50 +00:00
Florian Aders (EleRas)
7bea15a7a9 Deferred dirprotection until 0.9.5, refs #72 2010-03-29 09:17:58 +00:00
Robert Foerster (Dessa)
2b2d44166d fix a bunch of svn props (no functional changes):
- add svn:eol-style native where needed, seems that we forgot some files last time
- nuke svn:keywords from some files where it is not used
2010-03-28 15:57:53 +00:00
Robert Foerster (Dessa)
70dc03098c revert r695 since we have no way to get the path for awstats.pl at the moment (to appened it to the awbsp command to be able to place it somewhere else then cgi-bin since it doesn't really belong there), so it needs to stay in the same path as we *expect* awstats.pl to be, otherwise it won't work 2010-03-27 09:44:45 +00:00
Robert Foerster (Dessa)
16b7d7f029 corrected conditional for debian to look in the path where the package installs the awbsp script, fixes #96 2010-03-27 08:58:11 +00:00
Michael Kaufmann (d00p)
81dad796ee - added some more language-parts
- changed store-function for dkim-settings as they need to insert a bind-rebuild-configs-task
refs #94
2010-03-26 10:55:01 +00:00
Michael Kaufmann (d00p)
8a28c6e0ef quick template fix for cronjob-edit, refs #75 2010-03-26 08:53:03 +00:00
Michael Kaufmann (d00p)
fc5d14d223 - added admin_cronjobs.php to change cronjob intervals and possibility to enable/disable them, refs #75 2010-03-26 08:42:13 +00:00
Florian Aders (EleRas)
0ec2238e4b Adding new DKIM - stuff d00p made, fixes #94 2010-03-25 12:14:56 +00:00
Michael Kaufmann (d00p)
8077a2e3b1 - fix redirect-statement in lighttpd-cronjobm refs #89 2010-03-25 10:54:21 +00:00
Michael Kaufmann (d00p)
677cd54e1c - correct language-name, fixes #85 2010-03-25 08:28:12 +00:00
Michael Kaufmann (d00p)
a3a3dec68c - place redirect to vhost content if documentroot is a domain, fixes #89 2010-03-25 06:51:02 +00:00
Michael Kaufmann (d00p)
bb6860532c - add hidden field to install form (check for requirements), fixes #88 2010-03-24 18:39:26 +00:00
Florian Aders (EleRas)
68b4edd1e1 sabling the default lighty - fastcgi and cgi - support in debian 7 ubuntu, froxlor will ad it again, fixes #90 2010-03-24 17:46:44 +00:00
Michael Kaufmann (d00p)
9dff94f1c8 - corrected awstats-statsfile-parsing and traffic-calculation, refs #58 2010-03-24 11:22:53 +00:00
Michael Kaufmann (d00p)
f5e2d13c53 - corrected path to 'awstats_buildstaticpages.pl' under debian (note: additional configuration has been added, awstats_buildstaticpages.pl default is *not* in the correct path), #fixes 87 2010-03-24 09:58:24 +00:00
Michael Kaufmann (d00p)
15e7441ab9 - added new language: polish, thx to Michal Gozdzik, refs #85 2010-03-23 10:02:16 +00:00
Michael Kaufmann (d00p)
12e63a3eea - make specific cronjobs run only at night, timestamp correction 2010-03-22 18:06:55 +00:00
Michael Kaufmann (d00p)
4e1405ca39 fixing php-error (using $this where there should not be one), fixes #83 2010-03-22 16:14:23 +00:00
Michael Kaufmann (d00p)
0e1d82db8b corrected file-comment 2010-03-22 13:27:55 +00:00
Michael Kaufmann (d00p)
952edd380f corrected paths and commands for awstats, refs #57, refs #58 2010-03-22 13:25:37 +00:00
Michael Kaufmann (d00p)
9b843a8ad5 merging awstats branch to trunk, fixes #57, fixes #58 2010-03-22 12:36:59 +00:00
Michael Kaufmann (d00p)
d4e310d150 - replace tabs (\t) with spaces in string-values (settings), fixes #81 2010-03-22 11:46:38 +00:00
Robert Foerster (Dessa)
e0e57da5b8 small wording change 2010-03-22 00:48:00 +00:00
Robert Foerster (Dessa)
00b881f49b bump to -svn2 2010-03-21 21:49:51 +00:00
Michael Kaufmann (d00p)
080eeb29ec add reply-to address and sender-name configuration to panel, fixes #76 2010-03-21 20:21:29 +00:00
Michael Kaufmann (d00p)
db74c99098 - commented out directory-protection, needs refactoring (bad regex)
- bugfixed vhost-file include path if vhost-settings is set to a folder for lighttpd, refs #70
2010-03-21 17:13:23 +00:00
Michael Kaufmann (d00p)
d3599dc8c0 - check Froxlor-requirements before main-install-process, fixes #78 2010-03-21 09:32:57 +00:00
Michael Kaufmann (d00p)
6eba5f5318 - correcting c'n'p error (default index.html not being placed correclty on user creation) 2010-03-20 15:37:20 +00:00
Michael Kaufmann (d00p)
16bca3c665 - don't show empty line in commands for webserver is no deactivated-root-dir is set (and therefore no command is shown but an empty line) 2010-03-20 14:50:58 +00:00
Michael Kaufmann (d00p)
dcb32c1bb5 - use makeCorrectDir() on fcgid-tmp-directory (trailing slash needed) 2010-03-20 14:44:47 +00:00
Michael Kaufmann (d00p)
f76df2252d - fix access-log filename in lighttpd cron, fixes #77 2010-03-20 12:51:39 +00:00
Florian Aders (EleRas)
402e8620a9 Removed duplicate entry from configfiles (will be added via command) 2010-03-19 22:26:00 +00:00
Michael Kaufmann (d00p)
ccf40fc89b - corrected regex for lighttpd - apache needs fixing too, refs #72 2010-03-19 20:29:02 +00:00
Michael Kaufmann (d00p)
660bede9c5 - implemented 'Create vHost-Container' and 'Own vHost-Settings' for lighttpd
- implemented Froxlor-directory protection (apache and lighttpd), fixes #72
- enable `vhostcontainer` and `vhostcontainer_servername_statement` by default
2010-03-19 17:29:31 +00:00
Michael Kaufmann (d00p)
1db572e010 - added Domainkey-Filter configuration for FreeBSD (thx to hedo)
- bugfixed DKIM verification failure when using .private file-extension (also thx to hedo), fixes #63
2010-03-19 10:46:09 +00:00
Michael Kaufmann (d00p)
d4c4a0c05f - if folder given as vhosts-"file" for lighttpd, now seperate files are being generated and included to the $SERVER["socket"]-part, fixes #70 2010-03-19 10:23:45 +00:00
Michael Kaufmann (d00p)
6b7a3e73f1 - bugfixing function getLoginNameByUid, refs #68 2010-03-17 12:32:27 +00:00
Michael Kaufmann (d00p)
55aab4004c create default index-file also in subfolders if newly created (and enabled), needs testing, fixes #68 2010-03-17 12:20:14 +00:00
Michael Kaufmann (d00p)
c1de55f3d5 - added possibility to set a minimum password length for all passwords (does not count for old passwords already saved), fixes #59
- set version to 0.9.3-svn1
2010-03-17 07:51:16 +00:00
Michael Kaufmann (d00p)
f9d84a09f1 - also decode ticket-subject in ticket-class, thx to Michał Goździk for the hint, fixes #67 2010-03-17 06:23:10 +00:00
Robert Foerster (Dessa)
e79fe3e510 fix link here too 2010-03-15 07:53:03 +00:00
Michael Kaufmann (d00p)
eddb2a2623 set correct wiki entry for realtime-documentation 2010-03-15 07:42:59 +00:00
Michael Kaufmann (d00p)
ae595b0f2f show [OK] when only updating version 2010-03-15 06:26:04 +00:00
Michael Kaufmann (d00p)
423fd7b7df set version to 0.9.3 2010-03-15 06:16:37 +00:00
Robert Foerster (Dessa)
7f6a21ceec - remove phpmailer.lang-en.php as its not used it this release
- its PHPMailer not phpMailer
2010-03-15 01:40:58 +00:00
Robert Foerster (Dessa)
f11c180ea8 - add apt-get for proftpd command for debian + derivates 2010-03-14 12:10:43 +00:00
Michael Kaufmann (d00p)
a7f22a3426 - added $branding for package-specific-patch-indication, fixes #60 2010-03-12 16:23:21 +00:00
Michael Kaufmann (d00p)
2c12c51977 - don't set $_die to false on warnings on installation because this would make it possible to continue even without the requirements 2010-03-11 13:11:22 +00:00
Michael Kaufmann (d00p)
ee7f83aede - correcting safe_exec check in function.safe_exec.php, fixes #56 2010-03-10 12:19:20 +00:00
Michael Kaufmann (d00p)
6f37aa2209 - corrected dbversion-setting when upgrading from syscp-stable (1.4.2.1), fixes #54 2010-03-10 07:30:53 +00:00
Michael Kaufmann (d00p)
1d03f04e1e - show reasonable errormessage in function validateFormFieldHidden() when hidden fields changed
- don't show error if cronjob-timestamps changed while editing settings, fixes #52
2010-03-09 06:45:36 +00:00
Michael Kaufmann (d00p)
8ec1b723a2 - only select customerid from panel_customers on edit-domains (admin), documentroot comes from panel_domains, fixes #51 2010-03-08 15:47:33 +00:00
Michael Kaufmann (d00p)
fb75e43511 set user-defined tmp-directory for php-socket in lighttpd.conf 2010-03-08 15:04:05 +00:00
Michael Kaufmann (d00p)
3e4dc2f1d8 forgot to save freebsd-file, refs #50 2010-03-07 15:38:08 +00:00
Michael Kaufmann (d00p)
6c233818f2 only display command if folder is set in configs, refs #50 2010-03-07 15:37:26 +00:00
Michael Kaufmann (d00p)
9a18dbcc36 add command to create the "deactivated users"-folder, fixes #50 2010-03-07 15:23:28 +00:00
Michael Kaufmann (d00p)
cbfb89f86a - set correct html-linebreaks when sending e-mails in ticket-class
- prevent usage of <script>-tag in tickets
- design-correction in archive-search
2010-03-05 07:55:04 +00:00
Michael Kaufmann (d00p)
491e5363a7 - set correct html-linebreaks when sending e-mails
- disallow email-add form when no (email-)domain is added yet
2010-03-05 07:13:00 +00:00
Robert Foerster (Dessa)
b5465f602f unbreak SQL-Query for Ticketcreation, fixes bug #47 2010-03-04 01:59:07 +00:00
Florian Aders (EleRas)
49ff638e20 Create logfiles if they do not exist, fixes #46 2010-03-03 18:36:50 +00:00
Michael Kaufmann (d00p)
cb2ad2261b added Postfix and Dovecot configuration-templates for FreeBSD 2010-03-03 09:57:54 +00:00
Michael Kaufmann (d00p)
a6909a8cec updated phpMailer-Class to version 5.1 (PHP5/PHP6), fixes #35 2010-03-03 08:51:13 +00:00
Michael Kaufmann (d00p)
a0c557c405 - check for existing awstats-configuration-directory and model-file, fixes #45 2010-03-02 22:03:55 +00:00
Michael Kaufmann (d00p)
0cd452de28 fixing function checkLastGuid() 2010-03-01 17:43:47 +00:00
Michael Kaufmann (d00p)
91d461b122 fix logging in checklastguid() when not called from cronjob 2010-03-01 16:30:16 +00:00
Michael Kaufmann (d00p)
098afe7cf8 - started to add FreeBSD configuration to Froxlor, refs #37 2010-03-01 10:39:08 +00:00
Michael Kaufmann (d00p)
25b1478261 - added dependecies to settings (now only used in password-reset functions), fixes #40 2010-03-01 07:42:07 +00:00
Robert Foerster (Dessa)
adf79b3b1d - fixed SQL query for password resets for admins, fixes #38
- tell the user that passwordreset is disabled also when trying to reset an admin password
2010-02-25 19:06:02 +00:00
Michael Kaufmann (d00p)
0461e4cbd9 fix header-graphic on upgrade (SysCP => Froxlor) 2010-02-25 13:35:53 +00:00
Michael Kaufmann (d00p)
b289a6746a - improved last-guid sanity check on update to 0.9.1, fixes #34
- replacing deprecated functions in PHP-5.3 (no external libraries for now like phpmailer), refs #35
2010-02-25 07:05:23 +00:00
Michael Kaufmann (d00p)
1d2193d0e2 define a standard <Directory>-statement if no FCGID is used with Apache, fixes #32 2010-02-24 11:42:03 +00:00
Michael Kaufmann (d00p)
8fb23fcf62 better display when newer version is available 2010-02-24 07:59:17 +00:00
Michael Kaufmann (d00p)
525499b987 added apt-get command to awstats-configuration, fixes #28 2010-02-24 06:29:42 +00:00
Michael Kaufmann (d00p)
f8b3da48fc - show correct path in APS-error message, fixes #30 2010-02-24 06:12:34 +00:00
Michael Kaufmann (d00p)
dd0aa8e10c syscp-trunk is f*cked 2010-02-23 13:33:51 +00:00
Michael Kaufmann (d00p)
fea80269ed - fix update from syscp-trunk (current rev 2739), fixes #27 2010-02-23 13:24:56 +00:00
Michael Kaufmann (d00p)
dd9b72e45e - versionchecking via url_fopen now works again and looks better 2010-02-23 09:19:41 +00:00
Michael Kaufmann (d00p)
7aba67af11 forgot to add $path to the $file_url 2010-02-23 07:54:02 +00:00
Michael Kaufmann (d00p)
a1561618e9 fix sql-query in ticket::customerHasTickets(), fixes #26 2010-02-22 20:11:35 +00:00
Michael Kaufmann (d00p)
c549e17795 correct urlencoding in ApsUpdater 2010-02-22 13:43:45 +00:00
Robert Foerster (Dessa)
3c59d37dd2 assorted spelling fixes 2010-02-22 12:33:57 +00:00
Michael Kaufmann (d00p)
d236a5ceda - setting version to 0.9.2
- checking for sane last-system-guid on update
- added a bit of cronlogging to ApsUpdater (only in paranoid mode)
2010-02-22 12:24:45 +00:00
Michael Kaufmann (d00p)
66d5ea8f9e - fix checklastguid, ignore nogroup/nobody with very high guids (>65500) 2010-02-22 09:51:16 +00:00
Michael Kaufmann (d00p)
e8de3d45e5 - removed some undefined variables
- fixed function openRootDB
- fixed realtime-function (it's now a tcp connection), fixes #24
- fixed missing $-sign befor variable in makePathfield
2010-02-21 21:09:48 +00:00
Michael Kaufmann (d00p)
c192d19d7e - corrected file-names for bind-configuration, fixes #20 2010-02-17 11:36:32 +00:00
Michael Kaufmann (d00p)
ada8ecf04a - adding statement "virtual_mailbox_limit = 0" to the postfix configuration-template (main.cf), fixes #19 2010-02-17 08:02:15 +00:00
Michael Kaufmann (d00p)
2d3701c5a3 - fixing the "Could not open input file: [...]/install_scripts/configure install" issue in ApsInstaller 2010-02-15 12:49:38 +00:00
Michael Kaufmann (d00p)
0488a3c2a4 - fixing RootDir in ApsInstaller and ApsUpdater, fixes #14 and #15
- fixed root_db connection in openRootDB()
2010-02-15 12:05:15 +00:00
1718 changed files with 93400 additions and 15054 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
packages/*
temp/*

562
COPYING
View File

@@ -1,281 +1,281 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* @version $Id$
*
*/
return array(
@@ -32,6 +32,16 @@ return array(
'option_options_method' => 'getLanguages',
'save_method' => 'storeSettingField',
),
'panel_default_theme' => array(
'label' => $lng['serversettings']['default_theme'],
'settinggroup' => 'panel',
'varname' => 'default_theme',
'type' => 'option',
'default' => 'Froxlor',
'option_mode' => 'one',
'option_options_method' => 'getThemes',
'save_method' => 'storeSettingField',
),
'panel_natsorting' => array(
'label' => $lng['serversettings']['natsorting'],
'settinggroup' => 'panel',
@@ -64,7 +74,7 @@ return array(
'type' => 'option',
'default' => 'Manual',
'option_mode' => 'one',
'option_options' => array('Manual' => 'Manual', 'Dropdown' => 'Dropdown'),
'option_options' => array('Manual' => $lng['serversettings']['manual'], 'Dropdown' => $lng['serversettings']['dropdown']),
'save_method' => 'storeSettingField',
),
'panel_adminmail' => array(
@@ -77,6 +87,24 @@ return array(
'default' => '',
'save_method' => 'storeSettingField',
),
'panel_adminmail_defname' => array(
'label' => $lng['serversettings']['adminmail_defname'],
'settinggroup' => 'panel',
'varname' => 'adminmail_defname',
'type' => 'string',
'default' => 'Froxlor Administrator',
'save_method' => 'storeSettingField',
),
'panel_adminmail_return' => array(
'label' => $lng['serversettings']['adminmail_return'],
'settinggroup' => 'panel',
'varname' => 'adminmail_return',
'type' => 'string',
'string_type' => 'mail',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'panel_decimal_places' => array(
'label' => $lng['serversettings']['decimal_places'],
'settinggroup' => 'panel',
@@ -133,14 +161,6 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
),
'admin_froxlor_graphic' => array(
'label' => $lng['admin']['froxlor_graphic'],
'settinggroup' => 'admin',
'varname' => 'froxlor_graphic',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'panel_allow_domain_change_admin' => array(
'label' => $lng['serversettings']['panel_allow_domain_change_admin'],
'settinggroup' => 'panel',

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -38,6 +38,14 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
),
'login_domain_login' => array(
'label' => $lng['serversettings']['login_domain_login'],
'settinggroup' => 'login',
'varname' => 'domain_login',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'login_maxloginattempts' => array(
'label' => $lng['serversettings']['maxloginattempts'],
'settinggroup' => 'login',
@@ -54,6 +62,23 @@ return array(
'default' => 900,
'save_method' => 'storeSettingField',
),
'panel_password_min_length' => array(
'label' => $lng['serversettings']['panel_password_min_length'],
'settinggroup' => 'panel',
'varname' => 'password_min_length',
'type' => 'int',
'default' => 0,
'save_method' => 'storeSettingField',
),
'panel_password_regex' => array(
'label' => $lng['serversettings']['panel_password_regex'],
'settinggroup' => 'panel',
'varname' => 'password_regex',
'type' => 'string',
'default' => '',
/* 'plausibility_check_method' => 'checkValidRegEx', */
'save_method' => 'storeSettingField',
),
'customer_accountprefix' => array(
'label' => $lng['serversettings']['accountprefix'],
'settinggroup' => 'customer',
@@ -95,6 +120,14 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'dependency' => array(
'fieldname' => 'panel_allow_preset_admin',
'fielddata' => array(
'settinggroup' => 'panel',
'varname' => 'allow_preset_admin',
),
'onlyif' => 0
)
),
'panel_allow_preset_admin' => array(
'label' => $lng['serversettings']['allow_password_reset_admin'],
@@ -103,6 +136,14 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'dependency' => array(
'fieldname' => 'panel_allow_preset',
'fielddata' => array(
'settinggroup' => 'panel',
'varname' => 'allow_preset',
),
'onlyif' => 1
)
),
),
),

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -27,8 +27,10 @@ return array(
'settinggroup' => 'system',
'varname' => 'documentroot_prefix',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/webs/',
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkPathConflicts'
),
'system_ipaddress' => array(
'label' => $lng['serversettings']['ipaddress'],
@@ -57,6 +59,31 @@ return array(
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingHostname',
'plausibility_check_method' => 'checkHostname',
),
'system_froxlordirectlyviahostname' => array(
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
'settinggroup' => 'system',
'varname' => 'froxlordirectlyviahostname',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_validatedomain' => array(
'label' => $lng['serversettings']['validate_domain'],
'settinggroup' => 'system',
'varname' => 'validate_domain',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'system_stdsubdomain' => array(
'label' => $lng['serversettings']['stdsubdomainhost'],
'settinggroup' => 'system',
'varname' => 'stdsubdomain',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingHostname',
),
'system_mysql_access_host' => array(
'label' => $lng['serversettings']['mysql_access_host'],
@@ -67,15 +94,6 @@ return array(
'plausibility_check_method' => 'checkMysqlAccessHost',
'save_method' => 'storeSettingMysqlAccessHost',
),
'system_realtime_port' => array(
'label' => $lng['serversettings']['system_realtime_port'],
'settinggroup' => 'system',
'varname' => 'realtime_port',
'type' => 'int',
'int_max' => 65535,
'default' => 0,
'save_method' => 'storeSettingField',
),
'system_index_file_extension' => array(
'label' => $lng['serversettings']['index_file_extension'],
'settinggroup' => 'system',
@@ -85,6 +103,14 @@ return array(
'default' => 'html',
'save_method' => 'storeSettingField',
),
'system_store_index_file_subs' => array(
'label' => $lng['serversettings']['system_store_index_file_subs'],
'settinggroup' => 'system',
'varname' => 'store_index_file_subs',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'system_httpuser' => array(
'settinggroup' => 'system',
'varname' => 'httpuser',
@@ -97,6 +123,35 @@ return array(
'type' => 'hidden',
'default' => 'www-data',
),
'system_report_enable' => array(
'label' => $lng['serversettings']['report']['report'],
'settinggroup' => 'system',
'varname' => 'report_enable',
'type' => 'bool',
'default' => true,
'cronmodule' => 'froxlor/reports',
'save_method' => 'storeSettingField',
),
'system_report_webmax' => array(
'label' => $lng['serversettings']['report']['webmax'],
'settinggroup' => 'system',
'varname' => 'report_webmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 99,
'default' => 90,
'save_method' => 'storeSettingField',
),
'system_report_trafficmax' => array(
'label' => $lng['serversettings']['report']['trafficmax'],
'settinggroup' => 'system',
'varname' => 'report_trafficmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 99,
'default' => 90,
'save_method' => 'storeSettingField',
),
'system_debug_cron' => array(
'label' => $lng['serversettings']['cron']['debug'],
'settinggroup' => 'system',
@@ -110,4 +165,4 @@ return array(
),
);
?>
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -27,9 +27,26 @@ return array(
'settinggroup' => 'system',
'varname' => 'webserver',
'type' => 'option',
'default' => 'Apache2',
'default' => 'apache2',
'option_mode' => 'one',
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd'),
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd', 'nginx' => 'Nginx'),
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_httpuser' => array(
'label' => $lng['admin']['webserver_user'],
'settinggroup' => 'system',
'varname' => 'httpuser',
'type' => 'string',
'default' => 'www-data',
'save_method' => 'storeSettingField',
),
'system_httpgroup' => array(
'label' => $lng['admin']['webserver_group'],
'settinggroup' => 'system',
'varname' => 'httpgroup',
'type' => 'string',
'default' => 'www-data',
'save_method' => 'storeSettingField',
),
'system_apacheconf_vhost' => array(
@@ -59,22 +76,6 @@ return array(
'default' => '/etc/apache2/htpasswd/',
'save_method' => 'storeSettingField',
),
'system_apachereload_command' => array(
'label' => $lng['serversettings']['apachereload_command'],
'settinggroup' => 'system',
'varname' => 'apachereload_command',
'type' => 'string',
'default' => '/etc/init.d/apache2 reload',
'save_method' => 'storeSettingField',
),
'system_mod_log_sql' => array(
'label' => $lng['serversettings']['mod_log_sql'],
'settinggroup' => 'system',
'varname' => 'mod_log_sql',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_logfiles_directory' => array(
'label' => $lng['serversettings']['logfiles_directory'],
'settinggroup' => 'system',
@@ -111,6 +112,104 @@ return array(
'default' => '',
'save_method' => 'storeSettingField',
),
'system_apachereload_command' => array(
'label' => $lng['serversettings']['apachereload_command'],
'settinggroup' => 'system',
'varname' => 'apachereload_command',
'type' => 'string',
'default' => '/etc/init.d/apache2 reload',
'save_method' => 'storeSettingField',
),
'system_phpreload_command' => array(
'label' => $lng['serversettings']['phpreload_command'],
'settinggroup' => 'system',
'varname' => 'phpreload_command',
'type' => (getSetting('phpfpm', 'enabled') == '1') ? 'hidden' : 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'system_nginx_php_backend' => array(
'label' => $lng['serversettings']['nginx_php_backend'],
'settinggroup' => 'system',
'varname' => 'nginx_php_backend',
'type' => (getSetting('phpfpm', 'enabled') == '1') ? 'hidden' : 'string',
'default' => '127.0.0.1:8888',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'system_mod_log_sql' => array(
'label' => $lng['serversettings']['mod_log_sql'],
'settinggroup' => 'system',
'varname' => 'mod_log_sql',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'defaultwebsrverrhandler_enabled' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'defaultwebsrverrhandler_err401' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err401'],
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'err401',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'defaultwebsrverrhandler_err403' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'err403',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'defaultwebsrverrhandler_err404' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'err404',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'defaultwebsrverrhandler_err500' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err500'],
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'err500',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'customredirect_enabled' => array(
'label' => $lng['serversettings']['customredirect_enabled'],
'settinggroup' => 'customredirect',
'varname' => 'enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'lighttpd')
),
'customredirect_default' => array(
'label' => $lng['serversettings']['customredirect_default'],
'settinggroup' => 'customredirect',
'varname' => 'default',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getRedirectCodes',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'lighttpd')
),
),
),
'ssl' => array(
@@ -123,6 +222,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_ssl_cert_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
@@ -154,6 +254,16 @@ return array(
'default' => '',
'save_method' => 'storeSettingField',
),
'system_ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile'],
'settinggroup' => 'system',
'varname' => 'ssl_cert_chainfile',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_ssl_openssl_cnf' => array(
'label' => $lng['serversettings']['ssl']['openssl_cnf'],
'settinggroup' => 'system',
@@ -167,4 +277,4 @@ return array(
),
);
?>
?>

View File

@@ -0,0 +1,143 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'fcgid' => array(
'title' => $lng['admin']['fcgid_settings'],
'websrv_avail' => array('apache2', 'lighttpd'),
'fields' => array(
'system_mod_fcgid_enabled' => array(
'label' => $lng['serversettings']['mod_fcgid'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkFcgidPhpFpm',
'overview_option' => true
),
'system_mod_fcgid_configdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_configdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/www/php-fcgi-scripts/',
'plausibility_check_method' => 'checkPathConflicts',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_tmpdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_tmpdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/tmp/',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_peardir' => array(
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_peardir',
'type' => 'string',
'string_type' => 'dir',
'string_delimiter' => ':',
'string_emptyallowed' => true,
'default' => '/usr/share/php/:/usr/share/php5/',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_wrapper' => array(
'label' => $lng['serversettings']['mod_fcgid']['wrapper'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_wrapper',
'type' => 'option',
'option_options' => array(0 => 'ScriptAlias', 1=> 'FCGIWrapper'),
'default' => 1,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_starter' => array(
'label' => $lng['serversettings']['mod_fcgid']['starter'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_starter',
'type' => 'int',
'default' => 0,
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_maxrequests' => array(
'label' => $lng['serversettings']['mod_fcgid']['maxrequests'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_maxrequests',
'type' => 'int',
'default' => 250,
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_defaultini' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_defaultini',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_enabled_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid_ownvhost'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_ownvhost',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_httpuser' => array(
'label' => $lng['admin']['mod_fcgid_user'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_httpuser',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_httpgroup' => array(
'label' => $lng['admin']['mod_fcgid_group'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_httpgroup',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_defaultini_ownvhost',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
)
)
)
);
?>

View File

@@ -0,0 +1,161 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'phpfpm' => array(
'title' => $lng['admin']['phpfpm_settings'],
'fields' => array(
'system_phpfpm_enabled' => array(
'label' => $lng['serversettings']['phpfpm'],
'settinggroup' => 'phpfpm',
'varname' => 'enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkFcgidPhpFpm',
'overview_option' => true
),
'system_phpfpm_enabled_ownvhost' => array(
'label' => $lng['phpfpm']['ownvhost'],
'settinggroup' => 'phpfpm',
'varname' => 'enabled_ownvhost',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_phpfpm_httpuser' => array(
'label' => $lng['phpfpm']['vhost_httpuser'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_httpuser',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField'
),
'system_phpfpm_httpgroup' => array(
'label' => $lng['phpfpm']['vhost_httpgroup'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_httpgroup',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField'
),
/*
* @TODO implement if phpfpm knows custom php.ini files
*
'system_phpfpm_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_defaultini',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
),
*/
'system_phpfpm_configdir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
'settinggroup' => 'phpfpm',
'varname' => 'configdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/php-fpm.d/',
'save_method' => 'storeSettingField',
),
'system_phpfpm_tmpdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
'settinggroup' => 'phpfpm',
'varname' => 'tmpdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/tmp/',
'save_method' => 'storeSettingField',
),
'system_phpfpm_peardir' => array(
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
'settinggroup' => 'phpfpm',
'varname' => 'peardir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/usr/share/php/:/usr/share/php5/',
'save_method' => 'storeSettingField',
),
'system_phpfpm_reload' => array(
'label' => $lng['serversettings']['phpfpm_settings']['reload'],
'settinggroup' => 'phpfpm',
'varname' => 'reload',
'type' => 'string',
'default' => '/etc/init.d/php-fpm restart',
'save_method' => 'storeSettingField',
),
'system_phpfpm_pm' => array(
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'settinggroup' => 'phpfpm',
'varname' => 'pm',
'type' => 'option',
'default' => 'static',
'option_mode' => 'one',
'option_options' => array('static' => 'static', 'dynamic' => 'dynamic'),
'save_method' => 'storeSettingField',
),
'system_phpfpm_max_children' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_children'],
'settinggroup' => 'phpfpm',
'varname' => 'max_children',
'type' => 'int',
'default' => 1,
'save_method' => 'storeSettingField',
),
'system_phpfpm_start_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['start_servers'],
'settinggroup' => 'phpfpm',
'varname' => 'start_servers',
'type' => 'int',
'default' => 20,
'save_method' => 'storeSettingField',
),
'system_phpfpm_min_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers'],
'settinggroup' => 'phpfpm',
'varname' => 'min_spare_servers',
'type' => 'int',
'default' => 5,
'save_method' => 'storeSettingField',
),
'system_phpfpm_max_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers'],
'settinggroup' => 'phpfpm',
'varname' => 'max_spare_servers',
'type' => 'int',
'default' => 35,
'save_method' => 'storeSettingField',
),
'system_phpfpm_max_requests' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_requests'],
'settinggroup' => 'phpfpm',
'varname' => 'max_requests',
'type' => 'int',
'default' => 0,
'save_method' => 'storeSettingField',
),
),
),
),
);
?>

View File

@@ -0,0 +1,65 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'perl' => array(
'title' => $lng['admin']['perl_settings'],
'fields' => array(
'perl_path' => array(
'label' => $lng['serversettings']['perl_path'],
'settinggroup' => 'system',
'varname' => 'perl_path',
'type' => 'string',
'default' => '/usr/bin/perl',
'save_method' => 'storeSettingField',
'websrv_avail' => array('lighttpd')
),
'system_perl_suexecworkaround' => array(
'label' => $lng['serversettings']['perl']['suexecworkaround'],
'settinggroup' => 'perl',
'varname' => 'suexecworkaround',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_perl_suexeccgipath' => array(
'label' => $lng['serversettings']['perl']['suexeccgipath'],
'settinggroup' => 'perl',
'varname' => 'suexecpath',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/www/cgi-bin/',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'perl_server' => array(
'label' => $lng['serversettings']['perl_server'],
'settinggroup' => 'serversettings',
'varname' => 'perl_server',
'type' => 'string',
'default' => 'unix:/var/run/nginx/cgiwrap-dispatch.sock',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
),
),
),
);
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -40,45 +40,45 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
),
'system_awstats_domain_file' => array(
'label' => $lng['serversettings']['awstats_domain_file'],
'settinggroup' => 'system',
'varname' => 'awstats_domain_file',
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/awstats/',
'save_method' => 'storeSettingField',
),
'system_awstats_model_file' => array(
'label' => $lng['serversettings']['awstats_model_file'],
'settinggroup' => 'system',
'varname' => 'awstats_model_file',
'type' => 'string',
'string_type' => 'file',
'default' => '/etc/awstats/awstats.model.conf.syscp',
'save_method' => 'storeSettingField',
),
'system_awstats_path' => array(
'label' => $lng['serversettings']['awstats_path'],
'settinggroup' => 'system',
'varname' => 'awstats_path',
'type' => 'string',
'string_type' => 'dir',
'default' => '/usr/share/awstats/VERSION/webroot/cgi-bin/',
'default' => '/usr/bin/',
'save_method' => 'storeSettingField',
),
'system_awstats_updateall_command' => array(
'label' => $lng['serversettings']['awstats_updateall_command'],
'system_awstats_awstatspath' => array(
'label' => $lng['serversettings']['awstats_awstatspath'],
'settinggroup' => 'system',
'varname' => 'awstats_updateall_command',
'varname' => 'awstats_awstatspath',
'type' => 'string',
'string_type' => 'file',
'default' => '/usr/bin/awstats_updateall.pl',
'string_type' => 'dir',
'default' => '/usr/bin/',
'save_method' => 'storeSettingField',
),
),
),
),
'system_awstats_conf' => array(
'label' => $lng['serversettings']['awstats_conf'],
'settinggroup' => 'system',
'varname' => 'awstats_conf',
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/awstats/',
'save_method' => 'storeSettingField',
),
'system_awstats_icons' => array(
'label' => $lng['serversettings']['awstats_icons'],
'settinggroup' => 'system',
'varname' => 'awstats_icons',
'type' => 'string',
'string_type' => 'dir',
'default' => '/usr/share/awstats/icon/',
'save_method' => 'storeSettingField',
)
)
)
)
);
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -75,7 +75,7 @@ return array(
'default' => 100,
'save_method' => 'storeSettingField',
),
'systen_autoresponder_enabled' => array(
'system_autoresponder_enabled' => array(
'label' => $lng['serversettings']['autoresponder_active'],
'settinggroup' => 'autoresponder',
'varname' => 'autoresponder_active',
@@ -84,7 +84,7 @@ return array(
'cronmodule' => 'froxlor/autoresponder',
'save_method' => 'storeSettingField',
),
'systen_last_autoresponder_run' => array(
'system_last_autoresponder_run' => array(
'settinggroup' => 'autoresponder',
'varname' => 'last_autoresponder_run',
'type' => 'hidden',

View File

@@ -0,0 +1,40 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'ftpserver' => array(
'title' => $lng['admin']['ftpserversettings'],
'fields' => array(
'ftpserver' => array(
'label' => $lng['admin']['ftpserver'],
'settinggroup' => 'system',
'varname' => 'ftpserver',
'type' => 'option',
'default' => 'proftpd',
'option_mode' => 'one',
'option_options' => array('proftpd' => 'Proftpd', 'pureftpd' => 'Pureftpd'),
'save_method' => 'storeSettingField',
),
),
),
)
);
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -59,6 +59,24 @@ return array(
'default' => '',
'save_method' => 'storeSettingField',
),
'system_dns_createmailentry' => array(
'label' => $lng['serversettings']['mail_also_with_mxservers'],
'settinggroup' => 'system',
'varname' => 'dns_createmailentry',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_defaultttl' => array(
'label' => $lng['serversettings']['defaultttl'],
'settinggroup' => 'system',
'varname' => 'defaultttl',
'type' => 'int',
'default' => 604800, /* 1 week */
'int_min' => 3600, /* 1 hour */
'int_max' => 2147483647, /* integer max */
'save_method' => 'storeSettingField',
),
),
),
),

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -29,6 +29,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'logger_severity' => array(
'label' => $lng['serversettings']['logger']['severity'],

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -28,13 +28,15 @@ return array(
'varname' => 'use_dkim',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'save_method' => 'storeSettingFieldInsertBindTask',
'overview_option' => true
),
'dkim_prefix' => array(
'label' => $lng['dkim']['dkim_prefix'],
'settinggroup' => 'dkim',
'varname' => 'dkim_prefix',
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/postfix/dkim/',
'save_method' => 'storeSettingField',
),
@@ -56,6 +58,63 @@ return array(
'default' => 'dkim-keys.conf',
'save_method' => 'storeSettingField',
),
'dkim_algorithm' => array(
'label' => $lng['dkim']['dkim_algorithm'],
'settinggroup' => 'dkim',
'varname' => 'dkim_algorithm',
'type' => 'option',
'default' => 'all',
'option_mode' => 'multiple',
'option_options' => array('all' => 'All', 'sha1' => 'SHA1', 'sha256' => 'SHA256'),
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_servicetype' => array(
'label' => $lng['dkim']['dkim_servicetype'],
'settinggroup' => 'dkim',
'varname' => 'dkim_servicetype',
'type' => 'option',
'default' => '0',
'option_mode' => 'one',
'option_options' => array('0' => 'All', '1' => 'E-Mail'),
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_keylength' => array(
'label' => $lng['dkim']['dkim_keylength'],
'settinggroup' => 'dkim',
'varname' => 'dkim_keylength',
'type' => 'option',
'default' => '1024',
'option_mode' => 'one',
'option_options' => array('1024' => '1024 Bit', '2048' => '2048 Bit'),
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_notes' => array(
'label' => $lng['dkim']['dkim_notes'],
'settinggroup' => 'dkim',
'varname' => 'dkim_notes',
'type' => 'string',
'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => '',
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_add_adsp' => array(
'label' => $lng['dkim']['dkim_add_adsp'],
'settinggroup' => 'dkim',
'varname' => 'dkim_add_adsp',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_add_adsppolicy' => array(
'label' => $lng['dkim']['dkim_add_adsppolicy'],
'settinggroup' => 'dkim',
'varname' => 'dkim_add_adsppolicy',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options' => array('0' => 'Unknown', '1' => 'All', '2' => 'Discardable'),
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkimrestart_command' => array(
'label' => $lng['dkim']['dkimrestart_command'],
'settinggroup' => 'dkim',

View File

@@ -12,7 +12,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -26,7 +26,8 @@ return array(
'varname' => 'use_spf',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
'save_method' => 'storeSettingField',
'overview_option' => true
),
'spf_entry' => array(
'label' => $lng['spf']['spf_entry'],

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -30,6 +30,7 @@ return array(
'default' => false,
'cronmodule' => 'froxlor/ticket',
'save_method' => 'storeSettingField',
'overview_option' => true
),
'ticket_noreply_email' => array(
'label' => $lng['serversettings']['ticket']['noreply_email'],
@@ -57,6 +58,7 @@ return array(
'option_mode' => 'one',
'option_options' => array(0 => html_entity_decode($lng['admin']['tickets']['daily']), 1 => html_entity_decode($lng['admin']['tickets']['weekly']), 2 => html_entity_decode($lng['admin']['tickets']['monthly']), 3 => html_entity_decode($lng['admin']['tickets']['yearly'])),
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'setCycleOfCronjob',
),
'ticket_concurrently_open' => array(
'label' => $lng['serversettings']['ticket']['concurrentlyopen'],
@@ -124,9 +126,19 @@ return array(
'type' => 'hidden',
'default' => '',
),
'ticket_default_priority' => array(
'label' => $lng['serversettings']['ticket']['default_priority'],
'settinggroup' => 'ticket',
'varname' => 'default_priority',
'type' => 'option',
'default' => 2,
'option_mode' => 'one',
'option_options' => array(1 => $lng['ticket']['high'], 2 => $lng['ticket']['normal'], 3 => $lng['ticket']['low']),
'save_method' => 'storeSettingField',
),
),
),
)
);
?>
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -30,6 +30,7 @@ return array(
'default' => false,
'cronmodule' => 'froxlor/aps',
'save_method' => 'storeSettingField',
'overview_option' => true
),
'aps_items_per_page' => array(
'label' => $lng['aps']['packages_per_page'],
@@ -58,7 +59,7 @@ return array(
'type' => 'option',
'default' => '',
'option_mode' => 'multiple',
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap'),
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap', 'json' => 'json', 'ldap' => 'LDAP', 'hash' => 'hash', 'mbstring' => 'mbstring'),
'save_method' => 'storeSettingApsPhpExtensions',
),
'aps_php-function' => array(

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -38,68 +38,6 @@ return array(
'default' => true,
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_enabled' => array(
'label' => $lng['serversettings']['mod_fcgid'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_configdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_configdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/www/php-fcgi-scripts/',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_tmpdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_tmpdir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/tmp/',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_peardir' => array(
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_peardir',
'type' => 'string',
'string_type' => 'dir',
'string_delimiter' => ':',
'string_emptyallowed' => true,
'default' => '/usr/share/php/:/usr/share/php5/',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_wrapper' => array(
'label' => $lng['serversettings']['mod_fcgid']['wrapper'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_wrapper',
'type' => 'option',
'option_options' => array(0 => 'ScriptAlias', 1=> 'FCGIWrapper'),
'default' => 0,
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_starter' => array(
'label' => $lng['serversettings']['mod_fcgid']['starter'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_starter',
'type' => 'int',
'default' => 0,
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_maxrequests' => array(
'label' => $lng['serversettings']['mod_fcgid']['maxrequests'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_maxrequests',
'type' => 'int',
'default' => 250,
'save_method' => 'storeSettingField',
),
),
),
),

View File

@@ -0,0 +1,117 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'backup' => array(
'title' => $lng['backup'],
'fields' => array(
'backup_enabled' => array(
'label' => $lng['serversettings']['backup_enabled'],
'settinggroup' => 'system',
'varname' => 'backup_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'backup_dir' => array(
'label' => $lng['serversettings']['backupdir']['description'],
'settinggroup' => 'system',
'varname' => 'backup_dir',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/backups/',
'string_regexp' => '^/.*/$',
'save_method' => 'storeSettingField',
),
'backup_mysqldump_path' => array(
'label' => $lng['serversettings']['mysqldump_path']['description'],
'settinggroup' => 'system',
'varname' => 'backup_mysqldump_path',
'type' => 'string',
'default' => '/usr/bin/mysqldump',
'save_method' => 'storeSettingField',
),
'backup_count' => array(
'label' => $lng['serversettings']['backup_count'],
'settinggroup' => 'system',
'varname' => 'backup_count',
'type' => 'bool',
'default' => 'true',
'save_method' => 'storeSettingField',
'overview_option' => false
),
'backup_bigfile' => array(
'label' => $lng['serversettings']['backup_bigfile'],
'settinggroup' => 'system',
'varname' => 'backup_bigfile',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => false
),
'backup_ftp_enabled_' => array(
'label' => $lng['serversettings']['backup_ftp_enabled'],
'settinggroup' => 'system',
'varname' => 'backup_ftp_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => false
),
'backup_server' => array(
'label' => $lng['serversettings']['backup_ftp_server'],
'settinggroup' => 'system',
'varname' => 'backup_ftp_server',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'backup_user' => array(
'label' => $lng['serversettings']['backup_ftp_user'],
'settinggroup' => 'system',
'varname' => 'backup_ftp_user',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'backup_pass' => array(
'label' => $lng['serversettings']['backup_ftp_pass'],
'settinggroup' => 'system',
'varname' => 'backup_ftp_pass',
'type' => 'hiddenstring',
'default' => '',
'save_method' => 'storeSettingField',
),
'backup_passive_mode' => array(
'label' => $lng['serversettings']['backup_ftp_passive_mode'],
'settinggroup' => 'system',
'varname' => 'backup_ftp_passive',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
'overview_option' => false,
),
),
),
),
);
?>

View File

@@ -0,0 +1,60 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2011 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2011-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'diskquota' => array(
'title' => $lng['diskquota'],
'fields' => array(
'diskquota_enabled' => array(
'label' => $lng['serversettings']['diskquota_enabled'],
'settinggroup' => 'system',
'varname' => 'diskquota_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'diskquota_repquota_path' => array(
'label' => $lng['serversettings']['diskquota_repquota_path']['description'],
'settinggroup' => 'system',
'varname' => 'diskquota_repquota_path',
'type' => 'string',
'default' => '/usr/sbin/repquota',
'save_method' => 'storeSettingField',
),
'diskquota_quotatool_path' => array(
'label' => $lng['serversettings']['diskquota_quotatool_path']['description'],
'settinggroup' => 'system',
'varname' => 'diskquota_quotatool_path',
'type' => 'string',
'default' => '/usr/bin/quotatool',
'save_method' => 'storeSettingField',
),
'diskquota_customer_partition' => array(
'label' => $lng['serversettings']['diskquota_customer_partition']['description'],
'settinggroup' => 'system',
'varname' => 'diskquota_customer_partition',
'type' => 'string',
'default' => '/dev/root',
'save_method' => 'storeSettingField',
),
),
),
),
);
?>

View File

@@ -0,0 +1,67 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'logrotate' => array(
'title' => $lng['logrotate'],
'fields' => array(
'logrotate_enabled' => array(
'label' => $lng['logrotate_enabled'],
'settinggroup' => 'system',
'varname' => 'logrotate_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'logrotate_binary' => array(
'label' => $lng['logrotate_binary'],
'settinggroup' => 'system',
'varname' => 'logrotate_binary',
'type' => 'string',
'default' => '/usr/sbin/logrotate',
'save_method' => 'storeSettingField',
'overview_option' => false
),
'logrotate_interval' => array(
'label' => $lng['logrotate_interval'],
'settinggroup' => 'system',
'varname' => 'logrotate_interval',
'type' => 'option',
'default' => 'weekly',
'option_mode' => 'one',
'option_options' => array('daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly'),
'save_method' => 'storeSettingField',
'overview_option' => false
),
'logrotate_keep' => array(
'label' => $lng['logrotate_keep'],
'settinggroup' => 'system',
'varname' => 'logrotate_keep',
'type' => 'string',
'default' => '4',
'save_method' => 'storeSettingField',
'overview_option' => false
),
),
),
),
);
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -47,6 +47,7 @@ if($page == 'admins'
'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
'traffic' => $lng['customer']['traffic'],
'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
/*
'mysqls' => $lng['customer']['mysqls'],
'mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
'ftps' => $lng['customer']['ftps'],
@@ -63,6 +64,9 @@ if($page == 'admins'
'email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')',
'email_quota' => $lng['customer']['email_quota'],
'email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
'email_autoresponder' => $lng['customer']['autoresponder'],
'email_autoresponder_used' => $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')',
*/
'deactivated' => $lng['admin']['deactivated']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_ADMINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
@@ -84,7 +88,20 @@ if($page == 'admins'
$row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
$row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains tickets');
/**
* 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;
}
/* */
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps subdomains tickets');
$row = htmlentities_array($row);
eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";");
$count++;
@@ -93,6 +110,7 @@ if($page == 'admins'
$i++;
}
$admincount = $db->num_rows($result);
eval("echo \"" . getTemplate("admins/admins") . "\";");
}
elseif($action == 'su')
@@ -154,6 +172,7 @@ if($page == 'admins'
$loginname = validate($_POST['loginname'], 'loginname');
$password = validate($_POST['admin_password'], 'password');
$password = validatePassword($password);
$def_language = validate($_POST['def_language'], 'default language');
$customers = intval_ressource($_POST['customers']);
@@ -211,6 +230,20 @@ if($page == 'admins'
$email_quota = - 1;
}
if($settings['autoresponder']['autoresponder_active'] == '1')
{
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
if(isset($_POST['email_autoresponder_ul']))
{
$email_autoresponder = - 1;
}
}
else
{
$email_autoresponder = 0;
}
$ftps = intval_ressource($_POST['ftps']);
if(isset($_POST['ftps_ul']))
@@ -218,12 +251,18 @@ if($page == 'admins'
$ftps = - 1;
}
$tickets = intval_ressource($_POST['tickets']);
if(isset($_POST['tickets_ul'])
&& $settings['ticket']['enabled'] == '1')
if($settings['ticket']['enabled'] == 1)
{
$tickets = - 1;
$tickets = intval_ressource($_POST['tickets']);
if(isset($_POST['tickets_ul']))
{
$tickets = - 1;
}
}
else
{
$tickets = 0;
}
$mysqls = intval_ressource($_POST['mysqls']);
@@ -250,10 +289,21 @@ if($page == 'admins'
$can_manage_aps_packages = 0;
}
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = intval($_POST['change_serversettings']);
$customers_see_all = 0;
if(isset($_POST['customers_see_all']))
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = 0;
if(isset($_POST['domains_see_all']))
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = 0;
if(isset($_POST['caneditphpsettings']))
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = 0;
if(isset($_POST['change_serversettings']))
$change_serversettings = intval($_POST['change_serversettings']);
$diskspace = intval_ressource($_POST['diskspace']);
@@ -336,8 +386,38 @@ if($page == 'admins'
$change_serversettings = '0';
}
$result = $db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` (`loginname`, `password`, `name`, `email`, `def_language`, `change_serversettings`, `customers`, `customers_see_all`, `domains`, `domains_see_all`, `caneditphpsettings`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `ip`, `can_manage_aps_packages`, `aps_packages`)
VALUES ('" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($email) . "','" . $db->escape($def_language) . "', '" . $db->escape($change_serversettings) . "', '" . $db->escape($customers) . "', '" . $db->escape($customers_see_all) . "', '" . $db->escape($domains) . "', '" . $db->escape($domains_see_all) . "', '" . (int)$caneditphpsettings . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '" . (int)$ipaddress . "', " . (int)$can_manage_aps_packages . ", " . (int)$number_of_aps_packages . ")");
$_theme = $settings['panel']['default_theme'];
$result = $db->query("INSERT INTO
`" . TABLE_PANEL_ADMINS . "`
SET
`loginname` = '" . $db->escape($loginname) . "',
`password` = '" . md5($password) . "',
`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 . "',
`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) . "',
`ftps` = '" . $db->escape($ftps) . "',
`tickets` = '" . $db->escape($tickets) . "',
`mysqls` = '" . $db->escape($mysqls) . "',
`ip` = '" . (int)$ipaddress . "',
`can_manage_aps_packages` = '" . (int)$can_manage_aps_packages . "',
`aps_packages` = '" . (int)$number_of_aps_packages . "',
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
`theme` = '".$db->escape($_theme)."';
");
$adminid = $db->insert_id();
$log->logAction(ADM_ACTION, LOG_INFO, "added admin '" . $loginname . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -379,16 +459,23 @@ if($page == 'admins'
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$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';
$admin_add_form = htmlform::genHTMLForm($admin_add_data);
$title = $admin_add_data['admin_add']['title'];
$image = $admin_add_data['admin_add']['image'];
eval("echo \"" . getTemplate("admins/admins_add") . "\";");
}
}
@@ -417,6 +504,7 @@ if($page == 'admins'
$email_accounts = $result['email_accounts'];
$email_forwarders = $result['email_forwarders'];
$email_quota = $result['email_quota'];
$email_autoresponder = $result['email_autoresponder'];
$ftps = $result['ftps'];
$tickets = $result['tickets'];
$mysqls = $result['mysqls'];
@@ -491,18 +579,39 @@ if($page == 'admins'
$email_quota = - 1;
}
if($settings['autoresponder']['autoresponder_active'] == '1')
{
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
if(isset($_POST['email_autoresponder_ul']))
{
$email_autoresponder = - 1;
}
}
else
{
$email_autoresponder = 0;
}
$ftps = intval_ressource($_POST['ftps']);
if(isset($_POST['ftps_ul']))
{
$ftps = - 1;
}
$tickets = intval_ressource($_POST['tickets']);
if(isset($_POST['tickets_ul']))
if($settings['ticket']['enabled'] == 1)
{
$tickets = - 1;
$tickets = intval_ressource($_POST['tickets']);
if(isset($_POST['tickets_ul']))
{
$tickets = - 1;
}
}
else
{
$tickets = 0;
}
$mysqls = intval_ressource($_POST['mysqls']);
@@ -519,12 +628,24 @@ if($page == 'admins'
$number_of_aps_packages = - 1;
}
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = intval($_POST['change_serversettings']);
$can_manage_aps_packages = intval($_POST['can_manage_aps_packages']);
$customers_see_all = 0;
if(isset($_POST['customers_see_all']))
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = 0;
if(isset($_POST['domains_see_all']))
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = 0;
if(isset($_POST['caneditphpsettings']))
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = 0;
if(isset($_POST['change_serversettings']))
$change_serversettings = intval($_POST['change_serversettings']);
$diskspace = intval($_POST['diskspace']);
if(isset($_POST['diskspace_ul']))
@@ -560,6 +681,7 @@ if($page == 'admins'
{
if($password != '')
{
$password = validatePassword($password);
$password = md5($password);
}
else
@@ -592,7 +714,7 @@ 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) . "', `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) . "'");
$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) . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "edited admin '#" . $id . "'");
$redirect_props = Array(
'page' => $page,
@@ -670,6 +792,13 @@ if($page == 'admins'
$result['email_quota'] = '';
}
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, $result['email_autoresponder'], true, true);
if($result['email_autoresponder'] == '-1')
{
$result['email_autoresponder'] = '';
}
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
if($result['ftps'] == '-1')
@@ -723,14 +852,21 @@ 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';
$admin_edit_form = htmlform::genHTMLForm($admin_edit_data);
$title = $admin_edit_data['admin_edit']['title'];
$image = $admin_edit_data['admin_edit']['image'];
eval("echo \"" . getTemplate("admins/admins_edit") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
// Required code

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -95,9 +95,10 @@ if($userinfo['change_serversettings'] == '1')
'<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'],
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
'<AWSTATS_PATH>' => $settings['system']['awstats_path'],
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
'<REALTIME_PORT>' => $settings['system']['realtime_port']
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : '/tmp/',
'<BASE_PATH>' => makeCorrectDir(dirname(__FILE__)),
'<BIND_CONFIG_PATH>' => makeCorrectDir($settings['system']['bindconf_directory'])
);
$files = '';
$configpage = '';
@@ -110,6 +111,7 @@ if($userinfo['change_serversettings'] == '1')
if(is_array($value))
{
$commands = implode("\n", $value);
$commands = str_replace("\n\n", "\n", $commands);
if($commands != '')
{

View File

@@ -12,7 +12,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -75,12 +75,6 @@ if($page == 'cronjobs'
$description = $lng['crondesc'][$row['desc_lng_key']];
/*
* don't allow deletion of 'froxlor' cronjobs
*/
$vendor_a = explode('/', $row['module']);
$vendor = $vendor_a[0];
eval("\$crons.=\"" . getTemplate("cronjobs/cronjobs_cronjob") . "\";");
$count++;
}
@@ -94,21 +88,74 @@ if($page == 'cronjobs'
elseif($action == 'new')
{
/*
* @TODO Finish me
* @TODO later
*/
}
elseif($action == 'edit'
&& $id != 0)
{
/*
* @TODO Finish me
*/
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `id`='" . (int)$id . "'");
if ($result['cronfile'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$isactive = intval($_POST['isactive']);
$interval_value = validate($_POST['interval_value'], 'interval_value', '/^([0-9]+)$/Di', 'stringisempty');
$interval_interval = validate($_POST['interval_interval'], 'interval_interval');
if($isactive != 1)
{
$isactive = 0;
}
$interval = $interval_value.' '.strtoupper($interval_interval);
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "`
SET `isactive` = '".(int)$isactive."',
`interval` = '".$interval."'
WHERE `id` = '" . (int)$id . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
#$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
// interval
$interval_nfo = explode(' ', $result['interval']);
$interval_value = $interval_nfo[0];
$interval_interval = '';
$interval_interval.= makeoption($lng['cronmgmt']['seconds'], 'SECOND', $interval_nfo[1]);
$interval_interval.= makeoption($lng['cronmgmt']['minutes'], 'MINUTE', $interval_nfo[1]);
$interval_interval.= makeoption($lng['cronmgmt']['hours'], 'HOUR', $interval_nfo[1]);
$interval_interval.= makeoption($lng['cronmgmt']['days'], 'DAY', $interval_nfo[1]);
$interval_interval.= makeoption($lng['cronmgmt']['weeks'], 'WEEK', $interval_nfo[1]);
$interval_interval.= makeoption($lng['cronmgmt']['months'], 'MONTH', $interval_nfo[1]);
// end of interval
$change_cronfile = false;
if (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor')
{
$change_cronfile = true;
}
$cronjobs_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php';
$cronjobs_edit_form = htmlform::genHTMLForm($cronjobs_edit_data);
$title = $cronjobs_edit_data['cronjobs_edit']['title'];
$image = $cronjobs_edit_data['cronjobs_edit']['image'];
eval("echo \"" . getTemplate("cronjobs/cronjob_edit") . "\";");
}
}
}
elseif($action == 'delete'
&& $id != 0)
{
/*
* @TODO Finish me
* @TODO later
*/
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -40,6 +40,9 @@ if($page == 'customers'
{
if($action == '')
{
// clear request data
unset($_SESSION['requestData']);
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_customers");
$fields = array(
'c.loginname' => $lng['login']['username'],
@@ -51,6 +54,8 @@ if($page == 'customers'
'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'],
@@ -66,18 +71,29 @@ if($page == 'customers'
'c.email_quota' => $lng['customer']['email_quota'],
'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
'c.deactivated' => $lng['admin']['deactivated'],
'c.phpenabled' => $lng['admin']['phpenabled']
'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'],
'c.phpenabled' => $lng['admin']['phpenabled'],
'c.perlenabled' => $lng['admin']['perlenabled']
*/
);
/*
if($settings['ticket']['enabled'] == 1)
{
$fields['c.tickets'] = $lng['customer']['tickets'];
$fields['c.tickets_used'] = $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')';
}
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() . " " . $paging->getSqlLimit());
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy(false) . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng, true);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -96,7 +112,38 @@ if($page == 'customers'
$row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
$row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains');
$last_login = ((int)$row['lastlogin_succ'] == 0) ? $lng['panel']['neverloggedin'] : date('d.m.Y', $row['lastlogin_succ']);
/**
* percent-values for progressbar
*/
//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;
}
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;
}
$column_style = '';
$unlock_link = '';
if($row['loginfail_count'] >= $settings['login']['maxloginattempts']
&& $row['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
) {
$column_style = ' style="background-color: #f99122;"';
$unlock_link = '<a href="'.$filename.'?s='.$s.'&amp;page='.$page.'&amp;action=unlock&amp;id='.$row['customerid'].'">'.$lng['panel']['unlock'].'</a><br />';
}
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains email_autoresponder');
$row = htmlentities_array($row);
eval("\$customers.=\"" . getTemplate("customers/customers_customer") . "\";");
$count++;
@@ -105,6 +152,7 @@ if($page == 'customers'
$i++;
}
$customercount = $db->num_rows($result);
eval("echo \"" . getTemplate("customers/customers") . "\";");
}
elseif($action == 'su'
@@ -126,6 +174,31 @@ if($page == 'customers'
redirectTo('index.php', Array('action' => 'login'));
}
}
elseif($action == 'unlock'
&& $id != 0)
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$id . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . $db->escape($userinfo['adminid']) . "' "));
if($result['loginname'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$result = $db->query("UPDATE
`" . TABLE_PANEL_CUSTOMERS . "`
SET
`loginfail_count` = '0'
WHERE
`customerid`= '" . (int)$id . "'"
);
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
ask_yesno('customer_reallyunlock', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['loginname']);
}
}
}
elseif($action == 'delete'
&& $id != 0)
{
@@ -155,8 +228,8 @@ if($page == 'customers'
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
{
$mysql_access_host = trim($mysql_access_host);
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('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) . '"');
}
@@ -170,13 +243,39 @@ if($page == 'customers'
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$id . "'");
$domains_deleted = $db->affected_rows();
$db->query("DELETE FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$id . "' AND `adminsession` = '0'");
$db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$id . "'");
$result2 = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
while($row = $db->fetch_array($result2))
{
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name`='" . $row['username'] . "'");
}
$db->query("DELETE FROM `" . TABLE_FTP_GROUPS . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
// Delete all waiting "create user" -tasks for this user, #276
// Note: the WHERE selects part of a serialized array, but it should be safe this way
$db->query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '2' AND `data` LIKE '%:\"" . $db->escape($result['loginname']) . "\";%';");
// remove everything APS-related, #216
$apsresult = $db->query("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
while($apsrow = $db->fetch_array($apsresult))
{
// remove all package related settings
$db->query("DELETE FROM `".TABLE_APS_SETTINGS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
// maybe some leftovers in the tasks
$db->query("DELETE FROM `".TABLE_APS_TASKS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
}
// now remove all user instances
$db->query("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
// eventually some temp-setting-leftovers
$db->query("DELETE FROM `".TABLE_APS_TEMP_SETTINGS."` WHERE `CustomerID`='".(int)$id."'");
// eof APS-related removings, #216
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` - 1 ";
$admin_update_query.= ", `domains_used` = `domains_used` - 0" . (int)($domains_deleted - $result['subdomains_used']);
@@ -205,6 +304,11 @@ if($page == 'customers'
$admin_update_query.= ", `email_quota_used` = `email_quota_used` - 0" . (int)$result['email_quota'];
}
if($result['email_autoresponder'] != '-1')
{
$admin_update_query.= ", `email_autoresponder` = `email_autoresponder` - 0" . (int)$result['email_autoresponder'];
}
if($result['subdomains'] != '-1')
{
$admin_update_query.= ", `subdomains_used` = `subdomains_used` - 0" . (int)$result['subdomains'];
@@ -220,6 +324,11 @@ if($page == 'customers'
$admin_update_query.= ", `tickets_used` = `tickets_used` - 0" . (int)$result['tickets'];
}
if($result['aps_packages'] != '-1')
{
$admin_update_query.= ", `aps_packages` = `aps_packages` - 0" . (int)$result['aps_packages'];
}
if(($result['diskspace'] / 1024) != '-1')
{
$admin_update_query.= ", `diskspace_used` = `diskspace_used` - 0" . (int)$result['diskspace'];
@@ -230,13 +339,19 @@ if($page == 'customers'
$log->logAction(ADM_ACTION, LOG_INFO, "deleted user '" . $result['loginname'] . "'");
inserttask('1');
inserttask('4');
if(isset($_POST['delete_userfiles'])
&& (int)$_POST['delete_userfiles'] == 1)
{
inserttask('6', $result['loginname']);
}
# Using filesystem - quota, insert a task which cleans the filesystem - quota
if ($settings['system']['diskquota_enabled'])
{
inserttask('10');
}
/*
* move old tickets to archive
*/
@@ -254,8 +369,8 @@ if($page == 'customers'
$mainticket->Archive();
$log->logAction(ADM_ACTION, LOG_NOTICE, "archived ticket '" . $mainticket->Get('subject') . "'");
}
}
}
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
@@ -284,6 +399,7 @@ if($page == 'customers'
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
$def_language = validate($_POST['def_language'], 'default language');
$diskspace = intval_ressource($_POST['diskspace']);
$gender = intval_ressource($_POST['gender']);
if(isset($_POST['diskspace_ul']))
{
@@ -339,9 +455,31 @@ if($page == 'customers'
$email_quota = - 1;
}
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = intval_ressource($_POST['ftps']);
if($settings['autoresponder']['autoresponder_active'] == '1')
{
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
if(isset($_POST['email_autoresponder_ul']))
{
$email_autoresponder = - 1;
}
}
else
{
$email_autoresponder = 0;
}
$email_imap = 0;
if(isset($_POST['email_imap']))
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = 0;
if(isset($_POST['email_pop3']))
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = 0;
if(isset($_POST['ftps']))
$ftps = intval_ressource($_POST['ftps']);
if(isset($_POST['ftps_ul']))
{
@@ -377,10 +515,47 @@ if($page == 'customers'
$number_of_aps_packages = 0;
}
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$password = validate($_POST['customer_password'], 'password');
$sendpassword = intval($_POST['sendpassword']);
$phpenabled = intval($_POST['phpenabled']);
$createstdsubdomain = 0;
if(isset($_POST['createstdsubdomain']))
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$password = validate($_POST['new_customer_password'], 'password');
// only check if not empty,
// cause empty == generate password automatically
if($password != '')
{
$password = validatePassword($password);
}
$backup_allowed = 0;
if(isset($_POST['backup_allowed']))
$backup_allowed = intval($_POST['backup_allowed']);
if ($backup_allowed != 0)
{
$backup_allowed = 1;
}
// gender out of range? [0,2]
if ($gender < 0 || $gender > 2) {
$gender = 0;
}
$sendpassword = 0;
if(isset($_POST['sendpassword']))
$sendpassword = intval($_POST['sendpassword']);
$phpenabled = 0;
if(isset($_POST['phpenabled']))
$phpenabled = intval($_POST['phpenabled']);
$perlenabled = 0;
if(isset($_POST['perlenabled']))
$perlenabled = intval($_POST['perlenabled']);
$store_defaultindex = 0;
if(isset($_POST['store_defaultindex']))
$store_defaultindex = intval($_POST['store_defaultindex']);
$diskspace = $diskspace * 1024;
$traffic = $traffic * 1024 * 1024;
@@ -390,6 +565,7 @@ if($page == 'customers'
|| ((($userinfo['email_accounts_used'] + $email_accounts) > $userinfo['email_accounts']) && $userinfo['email_accounts'] != '-1')
|| ((($userinfo['email_forwarders_used'] + $email_forwarders) > $userinfo['email_forwarders']) && $userinfo['email_forwarders'] != '-1')
|| ((($userinfo['email_quota_used'] + $email_quota) > $userinfo['email_quota']) && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|| ((($userinfo['email_autoresponder_used'] + $email_autoresponder) > $userinfo['email_autoresponder']) && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|| ((($userinfo['ftps_used'] + $ftps) > $userinfo['ftps']) && $userinfo['ftps'] != '-1')
|| ((($userinfo['tickets_used'] + $tickets) > $userinfo['tickets']) && $userinfo['tickets'] != '-1')
|| ((($userinfo['subdomains_used'] + $subdomains) > $userinfo['subdomains']) && $userinfo['subdomains'] != '-1')
@@ -400,6 +576,7 @@ if($page == 'customers'
|| ($email_accounts == '-1' && $userinfo['email_accounts'] != '-1')
|| ($email_forwarders == '-1' && $userinfo['email_forwarders'] != '-1')
|| ($email_quota == '-1' && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|| ($email_autoresponder == '-1' && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|| ($ftps == '-1' && $userinfo['ftps'] != '-1')
|| ($tickets == '-1' && $userinfo['tickets'] != '-1')
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
@@ -431,11 +608,11 @@ if($page == 'customers'
}
else
{
if(isset($_POST['loginname'])
&& $_POST['loginname'] != '')
if(isset($_POST['new_loginname'])
&& $_POST['new_loginname'] != '')
{
$accountnumber = intval($settings['system']['lastaccountnumber']);
$loginname = validate($_POST['loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
$loginname = validate($_POST['new_loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
// Accounts which match systemaccounts are not allowed, filtering them
@@ -483,12 +660,57 @@ if($page == 'customers'
$phpenabled = '1';
}
if($perlenabled != '0')
{
$perlenabled = '1';
}
if($password == '')
{
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
}
$result = $db->query("INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` (`adminid`, `loginname`, `password`, `name`, `firstname`, `company`, `street`, `zipcode`, `city`, `phone`, `fax`, `email`, `customernumber`, `def_language`, `documentroot`, `guid`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `standardsubdomain`, `phpenabled`, `imap`, `pop3`, `aps_packages`) VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($firstname) . "', '" . $db->escape($company) . "', '" . $db->escape($street) . "', '" . $db->escape($zipcode) . "', '" . $db->escape($city) . "', '" . $db->escape($phone) . "', '" . $db->escape($fax) . "', '" . $db->escape($email) . "', '" . $db->escape($customernumber) . "','" . $db->escape($def_language) . "', '" . $db->escape($documentroot) . "', '" . $db->escape($guid) . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '0', '" . $db->escape($phpenabled) . "', '" . $db->escape($email_imap) . "', '" . $db->escape($email_pop3) . "', '" . (int)$number_of_aps_packages . "')");
$_theme = $settings['panel']['default_theme'];
$result = $db->query(
"INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` SET
`adminid` = '" . (int)$userinfo['adminid'] . "',
`loginname` = '" . $db->escape($loginname) . "',
`password` = '" . md5($password) . "',
`name` = '" . $db->escape($name) . "',
`firstname` = '" . $db->escape($firstname) . "',
`gender` = '" . (int)$gender . "',
`company` = '" . $db->escape($company) . "',
`street` = '" . $db->escape($street) . "',
`zipcode` = '" . $db->escape($zipcode) . "',
`city` = '" . $db->escape($city) . "',
`phone` = '" . $db->escape($phone) . "',
`fax` = '" . $db->escape($fax) . "',
`email` = '" . $db->escape($email) . "',
`customernumber` = '" . $db->escape($customernumber) . "',
`def_language` = '" . $db->escape($def_language) . "',
`documentroot` = '" . $db->escape($documentroot) . "',
`guid` = '" . $db->escape($guid) . "',
`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) . "',
`ftps` = '" . $db->escape($ftps) . "',
`tickets` = '" . $db->escape($tickets) . "',
`mysqls` = '" . $db->escape($mysqls) . "',
`standardsubdomain` = '0',
`phpenabled` = '" . $db->escape($phpenabled) . "',
`imap` = '" . $db->escape($email_imap) . "',
`pop3` = '" . $db->escape($email_pop3) . "',
`aps_packages` = '" . (int)$number_of_aps_packages . "',
`perlenabled` = '" . $db->escape($perlenabled) . "',
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
`backup_allowed` = '" . $db->escape($backup_allowed) . "',
`theme` = '" . $db->escape($_theme) . "'"
);
$customerid = $db->insert_id();
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` + 1";
@@ -517,6 +739,12 @@ if($page == 'customers'
$admin_update_query.= ", `email_quota_used` = `email_quota_used` + 0" . (int)$email_quota;
}
if($email_autoresponder != '-1'
&& $settings['autoresponder']['autoresponder_active'] == 1)
{
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` + 0" . (int)$email_autoresponder;
}
if($subdomains != '-1')
{
$admin_update_query.= ", `subdomains_used` = `subdomains_used` + 0" . (int)$subdomains;
@@ -553,8 +781,13 @@ if($page == 'customers'
}
$log->logAction(ADM_ACTION, LOG_INFO, "added user '" . $loginname . "'");
inserttask('2', $loginname, $guid, $guid);
inserttask('2', $loginname, $guid, $guid, $store_defaultindex);
# Using filesystem - quota, insert a task which cleans the filesystem - quota
if ($settings['system']['diskquota_enabled'])
{
inserttask('10');
}
// Add htpasswd for the webalizer stats
if(CRYPT_STD_DES == 1)
@@ -567,36 +800,50 @@ if($page == 'customers'
$htpasswdPassword = crypt($password);
}
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/webalizer/')) . "')");
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added webalizer htpasswd for user '" . $loginname . "'");
if($settings['system']['awstats_enabled'] == '1')
{
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/awstats/')) . "')");
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added awstats htpasswd for user '" . $loginname . "'");
}
else
{
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/webalizer/')) . "')");
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added webalizer htpasswd for user '" . $loginname . "'");
}
inserttask('1');
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
$result = $db->query("INSERT INTO `" . TABLE_FTP_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 . "'");
if($createstdsubdomain == '1')
{
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
"`domain` = '". $db->escape($loginname . '.' . $settings['system']['hostname']) . "', " .
if (isset($settings['system']['stdsubdomain'])
&& $settings['system']['stdsubdomain'] != ''
) {
$_stdsubdomain = $loginname . '.' . $settings['system']['stdsubdomain'];
}
else
{
$_stdsubdomain = $loginname . '.' . $settings['system']['hostname'];
}
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
"`domain` = '". $db->escape($_stdsubdomain) . "', " .
"`customerid` = '" . (int)$customerid . "', " .
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
"`parentdomainid` = '-1', " .
"`ipandport` = '" . $db->escape($settings['system']['defaultip']) . "', " .
"`documentroot` = '" . $db->escape($documentroot) . "', " .
"`ipandport` = '" . $db->escape($settings['system']['defaultip']) . "', " .
"`documentroot` = '" . $db->escape($documentroot) . "', " .
"`zonefile` = '', " .
"`isemaildomain` = '0', " .
"`caneditdomain` = '0', " .
"`caneditdomain` = '0', " .
"`openbasedir` = '1', " .
"`safemode` = '1', " .
"`speciallogfile` = '0', " .
"`specialsettings` = ''");
"`specialsettings` = '', " .
"`add_date` = '".date('Y-m-d')."'");
$domainid = $db->insert_id();
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$customerid . '\'');
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $loginname . "'");
@@ -608,7 +855,6 @@ if($page == 'customers'
$replace_arr = array(
'FIRSTNAME' => $firstname,
'NAME' => $name,
'TITLE' => $title,
'COMPANY' => $company,
'SALUTATION' => getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)),
'USERNAME' => $loginname,
@@ -622,23 +868,22 @@ if($page == 'customers'
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'createcustomer_mailbody\'');
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['createcustomer']['mailbody']), $replace_arr));
$mail->From = $userinfo['email'];
$mail->FromName = $userinfo['name'];
$mail->Subject = $mail_subject;
$mail->Body = $mail_body;
$mail->AddAddress($email, getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)));
if(!$mail->Send())
{
if($mail->ErrorInfo != '')
{
$mailerr_msg = $mail->ErrorInfo;
}
else
{
$mailerr_msg = $email;
}
$_mailerror = false;
try {
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($email, getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)));
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $email);
}
@@ -656,7 +901,7 @@ if($page == 'customers'
while(list($language_file, $language_name) = each($languages))
{
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
$language_options.= makeoption($language_name, $language_file, $settings['panel']['standardlanguage'], true);
}
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
@@ -666,15 +911,30 @@ if($page == 'customers'
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$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);
$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');
#$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', '1');
#$email_imap = makeyesno('email_imap', '1', '0', '1');
#$email_pop3 = makeyesno('email_pop3', '1', '0', '1');
#$sendpassword = makeyesno('sendpassword', '1', '0', '1');
#$phpenabled = makeyesno('phpenabled', '1', '0', '1');
#$perlenabled = makeyesno('perlenabled', '1', '0', '0');
#$store_defaultindex = makeyesno('store_defaultindex', '1', '0', '1');
$backup_allowed = makeyesno('backup_allowed', '1', '0', '0');
$gender_options = makeoption($lng['gender']['undef'], 0, true, true, true);
$gender_options .= makeoption($lng['gender']['male'], 1, null, true, true);
$gender_options .= makeoption($lng['gender']['female'], 2, null, true, true);
$customer_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_add.php';
$customer_add_form = htmlform::genHTMLForm($customer_add_data);
$title = $customer_add_data['customer_add']['title'];
$image = $customer_add_data['customer_add']['image'];
eval("echo \"" . getTemplate("customers/customers_add") . "\";");
}
}
@@ -700,8 +960,9 @@ if($page == 'customers'
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
$def_language = validate($_POST['def_language'], 'default language');
$password = validate($_POST['customer_password'], 'new password');
$password = validate($_POST['new_customer_password'], 'new password');
$diskspace = intval_ressource($_POST['diskspace']);
$gender = intval_ressource($_POST['gender']);
if(isset($_POST['diskspace_ul']))
{
@@ -757,9 +1018,31 @@ if($page == 'customers'
$email_quota = - 1;
}
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = intval_ressource($_POST['ftps']);
if($settings['autoresponder']['autoresponder_active'] == '1')
{
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
if(isset($_POST['email_autoresponder_ul']))
{
$email_autoresponder = - 1;
}
}
else
{
$email_autoresponder = 0;
}
$email_imap = 0;
if(isset($_POST['email_imap']))
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = 0;
if(isset($_POST['email_pop3']))
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = 0;
if(isset($_POST['ftps']))
$ftps = intval_ressource($_POST['ftps']);
if(isset($_POST['ftps_ul']))
{
@@ -774,23 +1057,57 @@ if($page == 'customers'
$tickets = - 1;
}
$mysqls = intval_ressource($_POST['mysqls']);
$backup_allowed = 0;
if (isset($_POST['backup_allowed']))
$backup_allowed = intval($_POST['backup_allowed']);
if($backup_allowed != '0'){
$backup_allowed = 1;
}
// gender out of range? [0,2]
if ($gender < 0 || $gender > 2) {
$gender = 0;
}
$mysqls = 0;
if(isset($_POST['mysqls']))
$mysqls = intval_ressource($_POST['mysqls']);
if(isset($_POST['mysqls_ul']))
{
$mysqls = - 1;
}
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
if(isset($_POST['number_of_aps_packages_ul']))
if($settings['aps']['aps_active'] == '1')
{
$number_of_aps_packages = - 1;
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
if(isset($_POST['number_of_aps_packages_ul']))
{
$number_of_aps_packages = - 1;
}
}
else
{
$number_of_aps_packages = 0;
}
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$deactivated = intval($_POST['deactivated']);
$phpenabled = intval($_POST['phpenabled']);
$createstdsubdomain = 0;
if(isset($_POST['createstdsubdomain']))
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$deactivated = 0;
if(isset($_POST['deactivated']))
$deactivated = intval($_POST['deactivated']);
$phpenabled = 0;
if(isset($_POST['phpenabled']))
$phpenabled = intval($_POST['phpenabled']);
$perlenabled = 0;
if(isset($_POST['perlenabled']))
$perlenabled = intval($_POST['perlenabled']);
$diskspace = $diskspace * 1024;
$traffic = $traffic * 1024 * 1024;
@@ -800,6 +1117,7 @@ if($page == 'customers'
|| ((($userinfo['email_accounts_used'] + $email_accounts - $result['email_accounts']) > $userinfo['email_accounts']) && $userinfo['email_accounts'] != '-1')
|| ((($userinfo['email_forwarders_used'] + $email_forwarders - $result['email_forwarders']) > $userinfo['email_forwarders']) && $userinfo['email_forwarders'] != '-1')
|| ((($userinfo['email_quota_used'] + $email_quota - $result['email_quota']) > $userinfo['email_quota']) && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|| ((($userinfo['email_autoresponder_used'] + $email_autoresponder - $result['email_autoresponder']) > $userinfo['email_autoresponder']) && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|| ((($userinfo['ftps_used'] + $ftps - $result['ftps']) > $userinfo['ftps']) && $userinfo['ftps'] != '-1')
|| ((($userinfo['tickets_used'] + $tickets - $result['tickets']) > $userinfo['tickets']) && $userinfo['tickets'] != '-1')
|| ((($userinfo['subdomains_used'] + $subdomains - $result['subdomains']) > $userinfo['subdomains']) && $userinfo['subdomains'] != '-1')
@@ -810,6 +1128,7 @@ if($page == 'customers'
|| ($email_accounts == '-1' && $userinfo['email_accounts'] != '-1')
|| ($email_forwarders == '-1' && $userinfo['email_forwarders'] != '-1')
|| ($email_quota == '-1' && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|| ($email_autoresponder == '-1' && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|| ($ftps == '-1' && $userinfo['ftps'] != '-1')
|| ($tickets == '-1' && $userinfo['tickets'] != '-1')
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
@@ -843,6 +1162,7 @@ if($page == 'customers'
{
if($password != '')
{
$password = validatePassword($password);
$password = md5($password);
}
else
@@ -858,7 +1178,17 @@ if($page == 'customers'
if($createstdsubdomain == '1'
&& $result['standardsubdomain'] == '0')
{
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($result['loginname'] . '.' . $settings['system']['hostname']) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '')");
if (isset($settings['system']['stdsubdomain'])
&& $settings['system']['stdsubdomain'] != ''
) {
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['stdsubdomain'];
}
else
{
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
}
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`, `add_date`) " . "VALUES ('" . $db->escape($_stdsubdomain) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '', '".date('Y-m-d')."')");
$domainid = $db->insert_id();
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\'');
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $result['loginname'] . "'");
@@ -884,7 +1214,13 @@ if($page == 'customers'
$phpenabled = '1';
}
if($phpenabled != $result['phpenabled'])
if($perlenabled != '0')
{
$perlenabled = '1';
}
if($phpenabled != $result['phpenabled']
|| $perlenabled != $result['perlenabled'])
{
inserttask('1');
}
@@ -894,6 +1230,47 @@ if($page == 'customers'
$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_FTP_USERS . "` SET `login_enabled`='" . (($deactivated) ? 'N' : 'Y') . "' WHERE `customerid`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `deactivated`='" . (int)$deactivated . "' WHERE `customerid`='" . (int)$id . "'");
/* Retrieve customer's databases */
$databases = $db->query("SELECT * FROM " . TABLE_PANEL_DATABASES . " WHERE customerid='" . (int)$id . "' ORDER BY `dbserver`");
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
unset($db_root->password);
$last_dbserver = 0;
/* For each of them */
while($row_database = $db->fetch_array($databases))
{
if($last_dbserver != $row_database['dbserver'])
{
$db_root->query('FLUSH PRIVILEGES;');
$db_root->close();
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
unset($db_root->password);
$last_dbserver = $row_database['dbserver'];
}
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
{
$mysql_access_host = trim($mysql_access_host);
/* 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) . '`');
}
else /* Otherwise grant access */
{
$db_root->query('GRANT ALL PRIVILEGES ON `' . $db_root->escape($row_database['databasename']) .'`.* TO `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('GRANT ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * TO `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
}
}
}
/* At last flush the new privileges */
$db_root->query('FLUSH PRIVILEGES;');
$db_root->close();
$log->logAction(ADM_ACTION, LOG_INFO, "deactivated user '" . $result['loginname'] . "'");
inserttask('1');
}
@@ -912,9 +1289,16 @@ if($page == 'customers'
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `imap`='" . (int)$email_imap . "' WHERE `customerid`='" . (int)$id . "'");
}
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "' WHERE `customerid`='" . (int)$id . "'");
// $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "' WHERE `customerid`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `gender`='" . $db->escape($gender) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "', `backup_allowed`='" . $db->escape($backup_allowed) . "' WHERE `customerid`='" . (int)$id . "'");
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
# Using filesystem - quota, insert a task which cleans the filesystem - quota
if ($settings['system']['diskquota_enabled'])
{
inserttask('10');
}
if($mysqls != '-1'
|| $result['mysqls'] != '-1')
{
@@ -995,6 +1379,22 @@ if($page == 'customers'
}
}
if($email_autoresponder != '-1'
|| $result['email_autoresponder'] != '-1')
{
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` ";
if($email_autoresponder != '-1')
{
$admin_update_query.= " + 0" . (int)$email_autoresponder . " ";
}
if($result['email_autoresponder'] != '-1')
{
$admin_update_query.= " - 0" . (int)$result['email_autoresponder'] . " ";
}
}
if($subdomains != '-1'
|| $result['subdomains'] != '-1')
{
@@ -1147,6 +1547,13 @@ if($page == 'customers'
$result['email_quota'] = '';
}
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, $result['email_autoresponder'], true, true);
if($result['email_autoresponder'] == '-1')
{
$result['email_autoresponder'] = '';
}
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
if($result['ftps'] == '-1')
@@ -1175,13 +1582,25 @@ if($page == 'customers'
$result['aps_packages'] = '';
}
$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', (($result['standardsubdomain'] != '0') ? '1' : '0'));
$phpenabled = makeyesno('phpenabled', '1', '0', $result['phpenabled']);
$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
$email_imap = makeyesno('email_imap', '1', '0', $result['imap']);
$email_pop3 = makeyesno('email_pop3', '1', '0', $result['pop3']);
#$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', (($result['standardsubdomain'] != '0') ? '1' : '0'));
#$phpenabled = makeyesno('phpenabled', '1', '0', $result['phpenabled']);
#$perlenabled = makeyesno('perlenabled', '1', '0', $result['perlenabled']);
#$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
#$email_imap = makeyesno('email_imap', '1', '0', $result['imap']);
#$email_pop3 = makeyesno('email_pop3', '1', '0', $result['pop3']);
$backup_allowed = makeyesno('backup_allowed', '1', '0', $result['backup_allowed']);
$result = htmlentities_array($result);
$gender_options = makeoption($lng['gender']['undef'], 0, ($result['gender'] == '0' ? true : false), true, true);
$gender_options .= makeoption($lng['gender']['male'], 1, ($result['gender'] == '1' ? true : false), true, true);
$gender_options .= makeoption($lng['gender']['female'], 2, ($result['gender'] == '2' ? true : false), true, true);
$customer_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_edit.php';
$customer_edit_form = htmlform::genHTMLForm($customer_edit_data);
$title = $customer_edit_data['customer_edit']['title'];
$image = $customer_edit_data['customer_edit']['image'];
eval("echo \"" . getTemplate("customers/customers_edit") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -130,6 +130,8 @@ if($page == 'domains'
$i++;
}
$domainscount = $db->num_rows($result);
// Display the list
eval("echo \"" . getTemplate("domains/domains") . "\";");
@@ -142,12 +144,28 @@ if($page == 'domains'
$alias_check = $db->query_first('SELECT COUNT(`id`) AS `count` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$id . '\'');
if($result['domain'] != ''
&& $alias_check['count'] == 0)
{
&& $alias_check['count'] == 0
) {
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"';
/*
* check for APS packages used with this domain, #110
*/
if(domainHasApsInstances($id))
{
standard_error('domains_cantdeletedomainwithapsinstances');
}
// check for deletion of main-domains which are logically subdomains, #329
$rsd_sql = '';
$remove_subbutmain_domains = isset($_POST['delete_userfiles']) ? 1 : 0;
if($remove_subbutmain_domains == 1)
{
$rsd_sql .= ' OR `ismainbutsubto` = "'.(int)$id.'"';
}
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '"'.$rsd_sql.') AND `isemaildomain`="1"';
$subResult = $db->query($query);
$idString = array();
@@ -167,20 +185,29 @@ if($page == 'domains'
$log->logAction(ADM_ACTION, LOG_NOTICE, "deleted domain/s from mail-tables");
}
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'");
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'".$rsd_sql);
$deleted_domains = (int)$db->affected_rows();
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` - " . (int)($deleted_domains - 1) . " WHERE `customerid` = '" . (int)$result['customerid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$userinfo['adminid'] . "'");
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'0\' WHERE `standardsubdomain`=\'' . (int)$result['id'] . '\' AND `customerid`=\'' . (int)$result['customerid'] . '\'');
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINREDIRECTS . "` WHERE `did` = '".(int)$id."'");
$log->logAction(ADM_ACTION, LOG_INFO, "deleted domain/subdomains (#" . $result['id'] . ")");
updateCounters();
inserttask('1');
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
elseif ($alias_check['count'] > 0) {
standard_error('domains_cantdeletedomainwithaliases');
}
else
{
ask_yesno('admin_domain_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain']));
$showcheck = false;
if(domainHasMainSubDomains($id))
{
$showcheck = true;
}
ask_yesno_withcheckbox('admin_domain_reallydelete', 'remove_subbutmain_domains', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain']), $showcheck);
}
}
}
@@ -200,11 +227,25 @@ if($page == 'domains'
$domain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['domain'], 'domain')));
$subcanemaildomain = intval($_POST['subcanemaildomain']);
$isemaildomain = 0;
if(isset($_POST['isemaildomain']))
$isemaildomain = intval($_POST['isemaildomain']);
$email_only = intval($_POST['email_only']);
$wwwserveralias = intval($_POST['wwwserveralias']);
$speciallogfile = intval($_POST['speciallogfile']);
$email_only = 0;
if(isset($_POST['email_only']))
$email_only = intval($_POST['email_only']);
$wwwserveralias = 0;
if(isset($_POST['wwwserveralias']))
$wwwserveralias = intval($_POST['wwwserveralias']);
$speciallogfile = 0;
if(isset($_POST['speciallogfile']))
$speciallogfile = intval($_POST['speciallogfile']);
$aliasdomain = intval($_POST['alias']);
$issubof = intval($_POST['issubof']);
$customerid = intval($_POST['customerid']);
$customer = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$customerid . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ");
@@ -232,7 +273,8 @@ if($page == 'domains'
}
$documentroot = $customer['documentroot'];
$registration_date = validate($_POST['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', ''));
$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', ''));
if($userinfo['change_serversettings'] == '1')
{
@@ -298,7 +340,7 @@ if($page == 'domains'
}
else
{
$phpsettingid = '1';
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
$mod_fcgid_starter = '-1';
$mod_fcgid_maxrequests = '-1';
}
@@ -307,7 +349,7 @@ if($page == 'domains'
{
$openbasedir = '1';
$safemode = '1';
$phpsettingid = '1';
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
$mod_fcgid_starter = '-1';
$mod_fcgid_maxrequests = '-1';
}
@@ -334,12 +376,15 @@ if($page == 'domains'
if($settings['system']['use_ssl'] == "1"
&& isset($_POST['ssl'])
&& isset($_POST['ssl_redirect'])
/*&& isset($_POST['ssl_redirect'])*/
&& isset($_POST['ssl_ipandport'])
&& $_POST['ssl'] != '0')
{
$ssl = (int)$_POST['ssl'];
$ssl_redirect = (int)$_POST['ssl_redirect'];
$ssl_redirect = 0;
if (isset($_POST['ssl_redirect'])) {
$ssl_redirect = (int)$_POST['ssl_redirect'];
}
$ssl_ipandport = (int)$_POST['ssl_ipandport'];
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition);
@@ -359,7 +404,14 @@ if($page == 'domains'
if(!preg_match('/^https?\:\/\//', $documentroot))
{
$documentroot = makeCorrectDir($documentroot);
if(strstr($documentroot, ":") !== FALSE)
{
standard_error('pathmaynotcontaincolon');
}
else
{
$documentroot = makeCorrectDir($documentroot);
}
}
$domain_check = $db->query_first("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'");
@@ -369,7 +421,8 @@ if($page == 'domains'
if($aliasdomain != 0)
{
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
// also check ip/port combination to be the same, #176
$aliasdomain_check = $db->query_first('SELECT `d`.`id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
}
if($openbasedir != '1')
@@ -428,11 +481,17 @@ if($page == 'domains'
$caneditdomain = '0';
}
if($issubof <= '0')
{
$issubof = '0';
}
if($domain == '')
{
standard_error(array('stringisempty', 'mydomain'));
}
elseif(!validateDomain($domain))
/* Check whether domain validation is enabled and if, validate the domain */
elseif($settings['system']['validate_domain'] && !validateDomain($domain))
{
standard_error(array('stringiswrong', 'mydomain'));
}
@@ -481,13 +540,15 @@ if($page == 'domains'
'mod_fcgid_starter' => $mod_fcgid_starter,
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
'specialsettings' => $specialsettings,
'registration_date' => $registration_date
'registration_date' => $registration_date,
'issubof' => $issubof
);
$security_questions = array(
'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'),
'reallydisablesecuritysetting' => ($openbasedir == '0' && $userinfo['change_serversettings'] == '1'),
'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot))
);
$question_nr = 1;
foreach($security_questions as $question_name => $question_launch)
{
if($question_launch !== false)
@@ -497,13 +558,14 @@ if($page == 'domains'
if(!isset($_POST[$question_name])
|| $_POST[$question_name] != $question_name)
{
ask_yesno('admin_domain_' . $question_name, $filename, $params);
ask_yesno('admin_domain_' . $question_name, $filename, $params, $question_nr);
exit;
}
}
$question_nr++;
}
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "')");
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `ismainbutsubto`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "', '".(int)$issubof."')");
$domainid = $db->insert_id();
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` + 1 WHERE `adminid` = '" . (int)$adminid . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "added domain '" . $domain . "'");
@@ -555,7 +617,7 @@ if($page == 'domains'
$row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']';
}
$ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id']);
$ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id'], $settings['system']['defaultip']);
}
$ssl_ipsandports = '';
@@ -595,28 +657,42 @@ if($page == 'domains'
$domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
}
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, true);
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain`, `c`.`loginname` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`ismainbutsubto`=0 " . $standardsubdomains . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "'") . " AND `d`.`customerid`=`c`.`customerid` ORDER BY `loginname`, `domain` ASC");
while($row_domain = $db->fetch_array($result_domains))
{
$subtodomains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
}
$phpconfigs = '';
$configs = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
while($row = $db->fetch_array($configs))
{
$phpconfigs.= makeoption($row['description'], $row['id'], '1', true, true);
$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');
#$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');
#$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';
$domain_add_form = htmlform::genHTMLForm($domain_add_data);
$title = $domain_add_data['domain_add']['title'];
$image = $domain_add_data['domain_add']['image'];
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
}
}
@@ -624,7 +700,11 @@ if($page == 'domains'
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`adminid`, `d`.`email_only`, `d`.`documentroot`, `d`.`ssl`, `d`.`ssl_redirect`, `d`.`ssl_ipandport`,`d`.`ipandport`, `d`.`aliasdomain`, `d`.`isbinddomain`, `d`.`isemaildomain`, `d`.`subcanemaildomain`, `d`.`dkim`, `d`.`caneditdomain`, `d`.`zonefile`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `d`.`add_date`, `d`.`registration_date`, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `d`.`phpsettingid`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "WHERE `d`.`parentdomainid`='0' AND `d`.`id`='" . (int)$id . "'" . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' "));
$result = $db->query_first("SELECT `d`.*, `c`.`customerid` FROM `" . TABLE_PANEL_DOMAINS . "` `d`
LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`)
WHERE `d`.`parentdomainid`='0'
AND `d`.`id`='" . (int)$id . "'"
. ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' "));
if($result['domain'] != '')
{
@@ -701,12 +781,23 @@ if($page == 'domains'
}
$aliasdomain = intval($_POST['alias']);
$isemaildomain = intval($_POST['isemaildomain']);
$email_only = intval($_POST['email_only']);
$issubof = intval($_POST['issubof']);
$subcanemaildomain = intval($_POST['subcanemaildomain']);
$caneditdomain = intval($_POST['caneditdomain']);
$wwwserveralias = intval($_POST['wwwserveralias']);
$registration_date = validate($_POST['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', ''));
$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', ''));
$isemaildomain = 0;
if(isset($_POST['isemaildomain']))
$isemaildomain = intval($_POST['isemaildomain']);
$email_only = 0;
if(isset($_POST['email_only']))
$email_only = intval($_POST['email_only']);
$wwwserveralias = 0;
if(isset($_POST['wwwserveralias']))
$wwwserveralias = intval($_POST['wwwserveralias']);
if($userinfo['change_serversettings'] == '1')
{
@@ -729,6 +820,12 @@ if($page == 'domains'
{
$documentroot = $customer['documentroot'];
}
if(!preg_match('/^https?\:\/\//', $documentroot)
&& strstr($documentroot, ":") !== FALSE
) {
standard_error('pathmaynotcontaincolon');
}
}
else
{
@@ -798,12 +895,15 @@ if($page == 'domains'
if($settings['system']['use_ssl'] == "1"
&& isset($_POST['ssl'])
&& isset($_POST['ssl_redirect'])
/*&& isset($_POST['ssl_redirect'])*/
&& isset($_POST['ssl_ipandport'])
&& $_POST['ssl'] != '0')
{
$ssl = (int)$_POST['ssl'];
$ssl_redirect = (int)$_POST['ssl_redirect'];
$ssl_redirect = 0;
if (isset($_POST['ssl_redirect'])) {
$ssl_redirect = (int)$_POST['ssl_redirect'];
}
$ssl_ipandport = (int)$_POST['ssl_ipandport'];
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition);
@@ -878,7 +978,8 @@ if($page == 'domains'
if($aliasdomain != 0)
{
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
// also check ip/port combination to be the same, #176
$aliasdomain_check = $db->query_first('SELECT `d`.`id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
}
if($aliasdomain_check['id'] != $aliasdomain)
@@ -886,6 +987,11 @@ if($page == 'domains'
standard_error('domainisaliasorothercustomer');
}
if($issubof <= '0')
{
$issubof = '0';
}
$params = array(
'id' => $id,
'page' => $page,
@@ -912,11 +1018,12 @@ if($page == 'domains'
'mod_fcgid_starter' => $mod_fcgid_starter,
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
'specialsettings' => $specialsettings,
'registration_date' => $registration_date
'registration_date' => $registration_date,
'issubof' => $issubof
);
$security_questions = array(
'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'),
'reallydisablesecuritysetting' => ($openbasedir == '0' && $userinfo['change_serversettings'] == '1'),
'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot))
);
foreach($security_questions as $question_name => $question_launch)
@@ -946,7 +1053,9 @@ if($page == 'domains'
|| $mod_fcgid_starter != $result['mod_fcgid_starter']
|| $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests']
|| $specialsettings != $result['specialsettings']
|| $aliasdomain != $result['aliasdomain'])
|| $aliasdomain != $result['aliasdomain']
|| $issubof != $result['ismainbutsubto']
|| $email_only != $result['email_only'])
{
inserttask('1');
}
@@ -1000,15 +1109,15 @@ if($page == 'domains'
if($ssfs == 1)
{
$upd_specialsettings = ", `specialsettings`='" . $db->escape($specialsettings) . "' ";
}
else
}
else
{
$upd_specialsettings = '';
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `specialsettings`='' WHERE `parentdomainid`='" . (int)$id . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
}
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "' WHERE `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "', `ismainbutsubto`='" . (int)$issubof . "' WHERE `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
$redirect_props = Array(
@@ -1064,6 +1173,14 @@ if($page == 'domains'
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']);
}
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, true);
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `c`.`customerid`=`d`.`customerid`". ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "'") . " ORDER BY `d`.`domain` ASC");
while($row_domain = $db->fetch_array($result_domains))
{
$subtodomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['ismainbutsubto']);
}
if($userinfo['ip'] == "-1")
{
$result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' ORDER BY `ip`, `port` ASC");
@@ -1101,20 +1218,20 @@ 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']);
#$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']);
#$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']);
@@ -1126,9 +1243,16 @@ if($page == 'domains'
$phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true);
}
$specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1');
#$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';
$domain_edit_form = htmlform::genHTMLForm($domain_edit_data);
$title = $domain_edit_data['domain_edit']['title'];
$image = $domain_edit_data['domain_edit']['image'];
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -61,6 +61,7 @@ if($page == 'overview')
SUM(`email_accounts_used`) AS `email_accounts_used`,
SUM(`email_forwarders_used`) AS `email_forwarders_used`,
SUM(`email_quota_used`) AS `email_quota_used`,
SUM(`email_autoresponder_used`) AS `email_autoresponder_used`,
SUM(`ftps_used`) AS `ftps_used`,
SUM(`tickets_used`) AS `tickets_used`,
SUM(`subdomains_used`) AS `subdomains_used`,
@@ -84,26 +85,38 @@ if($page == 'overview')
$webserverinterface = strtoupper(@php_sapi_name());
if((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes')
|| (isset($lookfornewversion) && $lookfornewversion == 'yes'))
|| (isset($lookfornewversion) && $lookfornewversion == 'yes'))
{
$update_check_uri = 'http://version.froxlor.org/Froxlor/legacy/' . $version;
if(strtolower(ini_get('allow_url_fopen')) == 'on')
if(ini_get('allow_url_fopen'))
{
$latestversion = @file($update_check_uri);
$latestversion = explode(':', $latestversion);
if(is_array($latestversion)
&& count($latestversion) >= 2)
if (isset($latestversion[0]))
{
$lookfornewversion_lable = $latestversion[0];
$lookfornewversion_link = $latestversion[1];
$lookfornewversion_addinfo = '';
if(count($latestversion) >= 3)
$latestversion = explode('|', $latestversion[0]);
if(is_array($latestversion)
&& count($latestversion) >= 1)
{
$lookfornewversion_addinfo = $latestversion[2];
$_version = $latestversion[0];
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
$lookfornewversion_lable = $_version;
$lookfornewversion_link = $_link;
$lookfornewversion_addinfo = $_message;
if (version_compare($version, $_version) == -1) {
$isnewerversion = 1;
} else {
$isnewerversion = 0;
}
}
else
{
redirectTo($update_check_uri.'/pretty', NULL);
}
}
else
@@ -121,13 +134,14 @@ if($page == 'overview')
$lookfornewversion_lable = $lng['admin']['lookfornewversion']['clickhere'];
$lookfornewversion_link = htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
$lookfornewversion_addinfo = '';
$isnewerversion = 0;
}
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $settings['panel']['decimal_places']);
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains aps_packages');
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps tickets subdomains aps_packages');
$cron_last_runs = getCronjobsLastRun();
$outstanding_tasks = getOutstandingTasks();
@@ -172,13 +186,13 @@ if($page == 'overview')
}
// Try to get the uptime
// First: With exec (let's hope it's enabled for the SysCP - vHost)
// First: With exec (let's hope it's enabled for the Froxlor - vHost)
$uptime_array = explode(" ", @file_get_contents("/proc/uptime"));
if(is_array($uptime_array)
&& isset($uptime_array[0])
&& is_numeric($uptime_array[0]))
&& isset($uptime_array[0])
&& is_numeric($uptime_array[0]))
{
// Some calculatioon to get a nicly formatted display
@@ -207,7 +221,7 @@ if($page == 'overview')
elseif($page == 'change_password')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
&& $_POST['send'] == 'send')
{
$old_password = validate($_POST['old_password'], 'old password');
@@ -251,7 +265,7 @@ elseif($page == 'change_password')
elseif($page == 'change_language')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
&& $_POST['send'] == 'send')
{
$def_language = validate($_POST['def_language'], 'default language');
@@ -268,13 +282,47 @@ elseif($page == 'change_language')
{
$language_options = '';
$default_lang = $settings['panel']['standardlanguage'];
if($userinfo['def_language'] != '') {
$default_lang = $userinfo['def_language'];
}
while(list($language_file, $language_name) = each($languages))
{
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
$language_options.= makeoption($language_name, $language_file, $default_lang, true);
}
eval("echo \"" . getTemplate("index/change_language") . "\";");
}
}
elseif($page == 'change_theme')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$theme = validate($_POST['theme'], 'theme');
?>
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
$log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her theme to '" . $theme . "'");
redirectTo($filename, Array('s' => $s));
}
else
{
$theme_options = '';
$default_theme = $settings['panel']['default_theme'];
if($userinfo['theme'] != '') {
$default_theme = $userinfo['theme'];
}
$themes_avail = getThemes();
foreach($themes_avail as $t)
{
$theme_options.= makeoption($t, $t, $default_theme, true);
}
eval("echo \"" . getTemplate("index/change_theme") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -141,11 +141,22 @@ if($page == 'ipsandports'
$vhostcontainer = intval($_POST['vhostcontainer']);
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
$ssl = intval($_POST['ssl']);
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
$docroot = validate($_POST['docroot'], 'docroot');
if((int)$settings['system']['use_ssl'] == 1)
{
$ssl = intval($_POST['ssl']);
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
} else {
$ssl = 0;
$ssl_cert_file = '';
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
}
if($listen_statement != '1')
{
@@ -187,6 +198,20 @@ if($page == 'ipsandports'
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
}
if($ssl_cert_chainfile != '')
{
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
}
if(strlen(trim($docroot)) > 0)
{
$docroot = makeCorrectDir($docroot);
}
else
{
$docroot = '';
}
$result_checkfordouble = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($ip) . "' AND `port`='" . (int)$port . "'");
if($result_checkfordouble['id'] != '')
@@ -195,7 +220,23 @@ if($page == 'ipsandports'
}
else
{
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "` (`ip`, `port`, `listen_statement`, `namevirtualhost_statement`, `vhostcontainer`, `vhostcontainer_servername_statement`, `specialsettings`, `ssl`, `ssl_cert_file`, `ssl_key_file`, `ssl_ca_file`, `default_vhostconf_domain`) VALUES ('" . $db->escape($ip) . "', '" . (int)$port . "', '" . (int)$listen_statement . "', '" . (int)$namevirtualhost_statement . "', '" . (int)$vhostcontainer . "', '" . (int)$vhostcontainer_servername_statement . "', '" . $db->escape($specialsettings) . "', '" . (int)$ssl . "', '" . $db->escape($ssl_cert_file) . "', '" . $db->escape($ssl_key_file) . "', '" . $db->escape($ssl_ca_file) . "', '" . $db->escape($default_vhostconf_domain) . "')");
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "`
SET
`ip` = '" . $db->escape($ip) . "',
`port` = '" . (int)$port . "',
`listen_statement` = '" . (int)$listen_statement . "',
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
`vhostcontainer` = '" . (int)$vhostcontainer . "',
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
`specialsettings` = '" . $db->escape($specialsettings) . "',
`ssl` = '" . (int)$ssl . "',
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
`docroot` = '" . $db->escape($docroot) . "';
");
if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
{
@@ -210,11 +251,18 @@ 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);
$title = $ipsandports_add_data['ipsandports_add']['title'];
$image = $ipsandports_add_data['ipsandports_add']['image'];
eval("echo \"" . getTemplate("ipsandports/ipsandports_add") . "\";");
}
}
@@ -237,11 +285,22 @@ if($page == 'ipsandports'
$vhostcontainer = intval($_POST['vhostcontainer']);
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
$ssl = intval($_POST['ssl']);
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
$docroot = validate($_POST['docroot'], 'docroot');
if((int)$settings['system']['use_ssl'] == 1)
{
$ssl = intval($_POST['ssl']);
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
} else {
$ssl = 0;
$ssl_cert_file = '';
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
}
if($listen_statement != '1')
{
@@ -283,6 +342,20 @@ if($page == 'ipsandports'
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
}
if($ssl_cert_chainfile != '')
{
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
}
if(strlen(trim($docroot)) > 0)
{
$docroot = makeCorrectDir($docroot);
}
else
{
$docroot = '';
}
if($result['ip'] != $ip
&& $result['ip'] == $settings['system']['ipaddress']
&& $result_sameipotherport['id'] == '')
@@ -296,7 +369,26 @@ if($page == 'ipsandports'
}
else
{
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "` SET `ip`='" . $db->escape($ip) . "', `port`='" . (int)$port . "', `listen_statement`='" . (int)$listen_statement . "', `namevirtualhost_statement`='" . (int)$namevirtualhost_statement . "', `vhostcontainer`='" . (int)$vhostcontainer . "', `vhostcontainer_servername_statement`='" . (int)$vhostcontainer_servername_statement . "', `specialsettings`='" . $db->escape($specialsettings) . "', `ssl`='" . (int)$ssl . "', `ssl_cert_file`='" . $db->escape($ssl_cert_file) . "', `ssl_key_file`='" . $db->escape($ssl_key_file) . "', `ssl_ca_file`='" . $db->escape($ssl_ca_file) . "', `default_vhostconf_domain`='" . $db->escape($default_vhostconf_domain) . "' WHERE `id`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "`
SET
`ip` = '" . $db->escape($ip) . "',
`port` = '" . (int)$port . "',
`listen_statement` = '" . (int)$listen_statement . "',
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
`vhostcontainer` = '" . (int)$vhostcontainer . "',
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
`specialsettings` = '" . $db->escape($specialsettings) . "',
`ssl` = '" . (int)$ssl . "',
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
`docroot` = '" . $db->escape($docroot) . "'
WHERE `id`='" . (int)$id . "'
");
$log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
inserttask('1');
inserttask('4');
@@ -305,12 +397,19 @@ if($page == 'ipsandports'
}
else
{
$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
#$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']);
#$listen_statement = makeyesno('listen_statement', '1', '0', $result['listen_statement']);
#$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', $result['namevirtualhost_statement']);
#$vhostcontainer = makeyesno('vhostcontainer', '1', '0', $result['vhostcontainer']);
#$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', $result['vhostcontainer_servername_statement']);
$ipsandports_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php';
$ipsandports_edit_form = htmlform::genHTMLForm($ipsandports_edit_data);
$title = $ipsandports_edit_data['ipsandports_edit']['title'];
$image = $ipsandports_edit_data['ipsandports_edit']['image'];
eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -31,10 +31,10 @@ if($page == 'log'
if($action == '')
{
$fields = array(
'action' => $lng['logger']['action'],
'date' => $lng['logger']['date'],
'type' => $lng['logger']['type'],
'user' => $lng['logger']['user']
'user' => $lng['logger']['user'],
'text' => $lng['logger']['action']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_LOG, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'date';
@@ -167,5 +167,3 @@ if($page == 'log'
}
}
}
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -39,6 +39,7 @@ if($page == 'overview')
if($action == '')
{
$tablecontent = '';
$count = 0;
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
while($row = $db->fetch_array($result))
@@ -68,6 +69,7 @@ if($page == 'overview')
$domains = $lng['admin']['phpsettings']['notused'];
}
$count ++;
eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";");
}
@@ -97,12 +99,19 @@ if($page == 'overview')
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "'");
inserttask('1');
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $value . "' has been created by '" . $userinfo['loginname'] . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been created by '" . $userinfo['loginname'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
$phpconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
$phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data);
$title = $phpconfig_add_data['phpconfig_add']['title'];
$image = $phpconfig_add_data['phpconfig_add']['image'];
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
}
}
@@ -172,6 +181,12 @@ if($page == 'overview')
}
else
{
$phpconfig_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php';
$phpconfig_edit_form = htmlform::genHTMLForm($phpconfig_edit_data);
$title = $phpconfig_edit_data['phpconfig_edit']['title'];
$image = $phpconfig_edit_data['phpconfig_edit']['image'];
eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -31,20 +31,88 @@ if(($page == 'settings' || $page == 'overview')
&& $userinfo['change_serversettings'] == '1')
{
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
$settings = loadSettings(&$settings_data, &$db);
$settings = loadSettings($settings_data, $db);
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if(processForm(&$settings_data, &$_POST, array('filename' => $filename, 'action' => $action, 'page' => $page)))
$_part = isset($_GET['part']) ? $_GET['part'] : '';
if($_part == '')
{
$_part = isset($_POST['part']) ? $_POST['part'] : '';
}
if($_part != '')
{
if($_part == 'all')
{
$settings_all = true;
$settings_part = false;
}
else
{
$settings_all = false;
$settings_part = true;
}
$only_enabledisable = false;
}
else
{
$settings_all = false;
$settings_part = false;
$only_enabledisable = true;
}
// check if the session timeout is too low #815
if (isset($_POST['session_sessiontimeout']) && $_POST['session_sessiontimeout'] <= 60) {
standard_error($lng['error']['session_timeout'], $lng['error']['session_timeout_desc']);
}
if(processFormEx(
$settings_data,
$_POST,
array('filename' => $filename, 'action' => $action, 'page' => $page),
$_part,
$settings_all,
$settings_part,
$only_enabledisable
)
) {
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
inserttask('1');
inserttask('4');
inserttask('5');
inserttask('9');
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
}
}
else
{
$fields = buildForm(&$settings_data);
eval("echo \"" . getTemplate("settings/settings") . "\";");
$_part = isset($_GET['part']) ? $_GET['part'] : '';
if($_part == '')
{
$_part = isset($_POST['part']) ? $_POST['part'] : '';
}
$fields = buildFormEx($settings_data, $_part);
$settings_page = '';
if($_part == '')
{
eval("\$settings_page .= \"" . getTemplate("settings/settings_overview") . "\";");
}
else
{
eval("\$settings_page .= \"" . getTemplate("settings/settings") . "\";");
}
eval("echo \"" . getTemplate("settings/settings_form_begin") . "\";");
eval("echo \$settings_page;");
eval("echo \"" . getTemplate("settings/settings_form_end") . "\";");
}
}
elseif($page == 'rebuildconfigs'
@@ -57,7 +125,9 @@ elseif($page == 'rebuildconfigs'
inserttask('1');
inserttask('4');
inserttask('5');
redirectTo('admin_index.php', array('s' => $s));
inserttask('9');
inserttask('10');
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
}
else
{
@@ -157,5 +227,3 @@ elseif($page == 'enforcequotas'
ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page));
}
}
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -48,12 +48,16 @@ elseif(isset($_GET['id']))
$available_templates = array(
'createcustomer',
'pop_success',
'trafficninetypercent',
'trafficmaxpercent',
'diskmaxpercent',
'new_ticket_by_customer',
'new_ticket_for_customer',
'new_ticket_by_staff',
'new_reply_ticket_by_customer',
'new_reply_ticket_by_staff'
'new_reply_ticket_by_staff',
'new_database_by_customer',
'new_ftpaccount_by_customer',
'password_reset'
);
$file_templates = array(
'index_html'
@@ -148,7 +152,7 @@ elseif($action == 'delete'
}
}
}
elseif($action == 'delete'
elseif($action == 'deletef'
&& $id != 0)
{
//file templates
@@ -205,6 +209,12 @@ elseif($action == 'add')
$template_options.= makeoption($lng['admin']['templates'][$template], $template, NULL, true);
}
$template_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_add.php';
$template_add_form = htmlform::genHTMLForm($template_add_data);
$title = $template_add_data['template_add']['title'];
$image = $template_add_data['template_add']['image'];
eval("echo \"" . getTemplate("templates/templates_add_2") . "\";");
}
elseif(isset($_POST['send'])
@@ -308,6 +318,12 @@ elseif($action == 'add')
$free_templates.= makeoption($lng['admin']['templates'][$template], $template, '', true);
}
$filetemplate_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_add.php';
$filetemplate_add_form = htmlform::genHTMLForm($filetemplate_add_data);
$title = $filetemplate_add_data['filetemplate_add']['title'];
$image = $filetemplate_add_data['filetemplate_add']['image'];
eval("echo \"" . getTemplate("templates/filetemplates_add") . "\";");
}
}
@@ -340,11 +356,18 @@ elseif($action == 'edit'
$result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `id`='$mailbodyid'");
$result = htmlentities_array($result);
$mailbody = $result['value'];
$template_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_edit.php';
$template_edit_form = htmlform::genHTMLForm($template_edit_data);
$title = $template_edit_data['template_edit']['title'];
$image = $template_edit_data['template_edit']['image'];
eval("echo \"" . getTemplate("templates/templates_edit") . "\";");
}
}
}
elseif($action == 'edit'
elseif($action == 'editf'
&& $id != 0)
{
//file templates
@@ -368,6 +391,13 @@ elseif($action == 'edit'
else
{
$row = htmlentities_array($row);
$filetemplate_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_edit.php';
$filetemplate_edit_form = htmlform::genHTMLForm($filetemplate_edit_data);
$title = $filetemplate_edit_data['filetemplate_edit']['title'];
$image = $filetemplate_edit_data['filetemplate_edit']['image'];
eval("echo \"" . getTemplate("templates/filetemplates_edit") . "\";");
}
}
@@ -377,5 +407,3 @@ elseif($action == 'edit'
exit;
}
}
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -41,7 +41,7 @@ if($page == 'tickets'
$countcustomers = $db->query_first("SELECT COUNT(`customerid`) as `countcustomers` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . "");
$countcustomers = (int)$countcustomers['countcustomers'];
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets");
@@ -56,7 +56,7 @@ if($page == 'tickets'
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'lastchange';
$paging->sortorder = 'desc';
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `adminid` = "' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" ' . ($userinfo['customers_see_all'] ? '' : ' AND `adminid` = "' . (int)$userinfo['adminid'] . '"') . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -102,15 +102,16 @@ if($page == 'tickets'
if($_cid != $row['customerid'])
{
$cid = $row['customerid'];
$usr = $db->query_first('SELECT `firstname`, `name`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"');
if(isset($usr['loginname'])) {
$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
//$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
} else {
$customer = $lng['ticket']['nonexistingcustomer'];
}
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
}
$tickets_count++;
@@ -139,12 +140,13 @@ if($page == 'tickets'
$cananswer = 1;
}
$row['subject'] = html_entity_decode($row['subject']);
if(strlen($row['subject']) > 20)
{
$row['subject'] = substr($row['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";");
eval("\$tickets.=\"" . getTemplate("tickets/tickets_tickets") . "\";");
$count++;
$_cid = $row['customerid'];
}
@@ -153,7 +155,7 @@ if($page == 'tickets'
$i++;
}
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
}
elseif($action == 'new')
{
@@ -167,8 +169,8 @@ if($page == 'tickets'
$newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
$newticket->Set('customer', validate($_POST['customer'], 'customer'), true, false);
$newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
$newticket->Set('customer', (int)$_POST['customer'], true, false);
$newticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
if($newticket->Get('subject') == null)
{
@@ -197,12 +199,12 @@ if($page == 'tickets'
else
{
$categories = '';
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `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 . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `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))
{
@@ -219,28 +221,20 @@ if($page == 'tickets'
while($row_customer = $db->fetch_array($result_customers))
{
if($row_customer['company'] == '')
{
$customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
else
{
if($row_customer['name'] != ''
&& $row_customer['firstname'] != '')
{
$customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' | ' . $row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
else
{
$customers.= makeoption($row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
}
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
$priorities = makeoption($lng['ticket']['unf_high'], '1');
$priorities.= makeoption($lng['ticket']['unf_normal'], '2');
$priorities.= makeoption($lng['ticket']['unf_low'], '3');
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['low'], '3', $settings['ticket']['default_priority']);
$ticket_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_new.php';
$ticket_new_form = htmlform::genHTMLForm($ticket_new_data);
$title = $ticket_new_data['ticket_new']['title'];
$image = $ticket_new_data['ticket_new']['image'];
eval("echo \"" . getTemplate("tickets/tickets_new") . "\";");
}
}
else
@@ -257,7 +251,7 @@ if($page == 'tickets'
$replyticket = ticket::getInstanceOf($userinfo, $db, $settings, -1);
$replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$replyticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
$replyticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
if($replyticket->Get('message') == null)
{
@@ -319,7 +313,7 @@ if($page == 'tickets'
$subject = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
$row = $db->fetch_array($result);
@@ -341,7 +335,7 @@ if($page == 'tickets'
$subject = $subticket->Get('subject');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
@@ -351,8 +345,13 @@ if($page == 'tickets'
$ticket_replies_count = $db->num_rows($andere) + 1;
// don't forget the main-ticket!
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_reply.php';
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
$title = $ticket_reply_data['ticket_reply']['title'];
$image = $ticket_reply_data['ticket_reply']['image'];
eval("echo \"" . getTemplate("tickets/tickets_reply") . "\";");
}
}
elseif($action == 'close'
@@ -435,10 +434,11 @@ elseif($page == 'categories'
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::categories");
$fields = array(
'name' => $lng['ticket']['category']
'name' => $lng['ticket']['category'],
'logicalorder' => $lng['ticket']['logicalorder']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKET_CATS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `main`.`id`, `main`.`name`, (
$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'] . "')
@@ -466,14 +466,14 @@ elseif($page == 'categories'
{
$row = htmlentities_array($row);
$closedtickets_count = ($row['ticketcount'] - $row['ticketcountnotclosed']);
eval("\$ticketcategories.=\"" . getTemplate("ticket/tickets_categories") . "\";");
eval("\$ticketcategories.=\"" . getTemplate("tickets/tickets_categories") . "\";");
$count++;
}
$i++;
}
eval("echo \"" . getTemplate("ticket/categories") . "\";");
eval("echo \"" . getTemplate("tickets/categories") . "\";");
}
elseif($action == 'addcategory')
{
@@ -481,6 +481,13 @@ elseif($page == 'categories'
&& $_POST['send'] == 'send')
{
$category = validate($_POST['category'], 'category');
$order = validate($_POST['logicalorder'], 'logicalorder');
if($order < 1 || $order >= 1000)
{
// use the latest available
$order = ticket::getHighestOrderNumber($db) + 1;
}
if($category == '')
{
@@ -488,14 +495,22 @@ elseif($page == 'categories'
}
else
{
ticket::addCategory($db, $category, $userinfo['adminid']);
ticket::addCategory($db, $category, $userinfo['adminid'], $order);
$log->logAction(ADM_ACTION, LOG_INFO, "added ticket-category '" . $category . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
eval("echo \"" . getTemplate("ticket/tickets_newcategory") . "\";");
$order = ticket::getHighestOrderNumber($db) + 1;
$category_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_new.php';
$category_new_form = htmlform::genHTMLForm($category_new_data);
$title = $category_new_data['category_new']['title'];
$image = $category_new_data['category_new']['image'];
eval("echo \"" . getTemplate("tickets/tickets_newcategory") . "\";");
}
}
elseif($action == 'editcategory'
@@ -505,6 +520,12 @@ elseif($page == 'categories'
&& $_POST['send'] == 'send')
{
$category = validate($_POST['category'], 'category');
$order = validate($_POST['logicalorder'], 'logicalorder');
if($order < 1 || $order >= 1000)
{
$order = 1;
}
if($category == '')
{
@@ -512,7 +533,7 @@ elseif($page == 'categories'
}
else
{
ticket::editCategory($db, $category, $id);
ticket::editCategory($db, $category, $id, $order);
$log->logAction(ADM_ACTION, LOG_INFO, "edited ticket-category '" . $category . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
@@ -520,7 +541,14 @@ elseif($page == 'categories'
else
{
$row = $db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$id . '"');
eval("echo \"" . getTemplate("ticket/tickets_editcategory") . "\";");
$category_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_edit.php';
$category_edit_form = htmlform::genHTMLForm($category_edit_data);
$title = $category_edit_data['category_edit']['title'];
$image = $category_edit_data['category_edit']['image'];
eval("echo \"" . getTemplate("tickets/tickets_editcategory") . "\";");
}
}
elseif($action == 'deletecategory'
@@ -569,8 +597,7 @@ elseif($page == 'archive'
{
$categories[$x] = isset($_POST['category' . $x]) ? $_POST['category' . $x] : '';
}
$query = ticket::getArchiveSearchStatement($subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
$query = ticket::getArchiveSearchStatement($db, $subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
$fields = array(
'lastchange' => $lng['ticket']['lastchange'],
'ticket_answers' => $lng['ticket']['ticket_answers'],
@@ -628,24 +655,34 @@ elseif($page == 'archive'
{
if($paging->checkDisplay($i))
{
$ticket = htmlentities_array($ticket);
$ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
if($_cid != $ticket['customerid'])
{
$cid = $ticket['customerid'];
$usr = $db->query_first('SELECT `firstname`, `name`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"');
if(isset($usr['loginname'])) {
$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
} else {
$customer = $lng['ticket']['nonexistingcustomer'];
}
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
}
$tickets_count++;
switch ($ticket['priority'])
{
case 1: $ticket['display'] = 'high';
break;
case 2: $ticket['display'] = 'normal';
break;
case 3: $ticket['display'] = 'low';
break;
default: $ticket['display'] = 'unknown';
}
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
if($ticket['lastreplier'] == '1')
@@ -661,8 +698,8 @@ elseif($page == 'archive'
{
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
$ticket = htmlentities_array($ticket);
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
$count++;
$_cid = $ticket['customerid'];
}
@@ -671,7 +708,7 @@ elseif($page == 'archive'
$i++;
}
eval("echo \"" . getTemplate("ticket/archivesearch") . "\";");
eval("echo \"" . getTemplate("tickets/archivesearch") . "\";");
}
else
{
@@ -700,13 +737,13 @@ elseif($page == 'archive'
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
}
}
$priorities_options = makecheckbox('priority1', $lng['ticket']['unf_high'], '1');
$priorities_options.= makecheckbox('priority2', $lng['ticket']['unf_normal'], '2');
$priorities_options.= makecheckbox('priority3', $lng['ticket']['unf_low'], '3');
$priorities_options = makecheckbox('priority1', $lng['ticket']['high'], '1');
$priorities_options.= makecheckbox('priority2', $lng['ticket']['normal'], '2');
$priorities_options.= makecheckbox('priority3', $lng['ticket']['low'], '3');
$category_options = '';
$ccount = 0;
$result = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
@@ -718,21 +755,14 @@ elseif($page == 'archive'
}
$customers = makeoption($lng['ticket']['nocustomer'], '-1', '-1');
$result = $db->query_first('SELECT `customerid` FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . ($userinfo['customers_see_all'] ? '' : ' WHERE `adminid` = "' . (int)$userinfo['adminid'] . '" ') . 'ORDER BY `name` ASC');
$result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY `name` ASC");
if(isset($result['customerid'])
&& $result['customerid'] != '')
while($row_customer = $db->fetch_array($result_customers))
{
$result2 = $db->query('SELECT `customerid`, `loginname`, `firstname`, `name`
FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . ($userinfo['customers_see_all'] ? '' : ' WHERE `adminid` = "' . (int)$userinfo['adminid'] . '" ') . ' ORDER BY `name` ASC');
while($row = $db->fetch_array($result2))
{
$customers.= makeoption($row['name'] . ', ' . $row['firstname'] . ' (' . $row['loginname'] . ')', $row['customerid']);
}
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
eval("echo \"" . getTemplate("ticket/archive") . "\";");
eval("echo \"" . getTemplate("tickets/archive") . "\";");
}
}
elseif($action == 'view'
@@ -755,9 +785,9 @@ elseif($page == 'archive'
$by = $lng['ticket']['customer'];
}
$subject = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
$subject = htmlentities($mainticket->Get('subject'));
$message = htmlentities($mainticket->Get('message'));
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
$row = $db->fetch_array($result);
@@ -777,20 +807,20 @@ elseif($page == 'archive'
$by = $lng['ticket']['customer'];
}
$subject = $subticket->Get('subject');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
$subject = htmlentities($subticket->Get('subject'));
$message = htmlentities($subticket->Get('message'));
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true);
$subject = $mainticket->Get('subject');
$priorities = makeoption($lng['ticket']['high'], '1', htmlentities($mainticket->Get('priority')), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', htmlentities($mainticket->Get('priority')), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', htmlentities($mainticket->Get('priority')), true, true);
$subject = htmlentities($mainticket->Get('subject'));
$ticket_replies_count = $db->num_rows($andere) + 1;
// don't forget the main-ticket!
eval("echo \"" . getTemplate("ticket/tickets_view") . "\";");
eval("echo \"" . getTemplate("tickets/tickets_view") . "\";");
}
elseif($action == 'delete'
&& $id != 0)

148
admin_traffic.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Morton Jonuschat <m.jonuschat@chrome-it.de>
* @license GPLv2 http://files.syscp.org/misc/COPYING.txt
* @package Panel
*
*/
define('AREA', 'admin');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require ("./lib/init.php");
if($action == 'logout')
{
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['adminid'] . "' AND `adminsession` = '1'");
redirectTo('index.php');
exit;
}
if(isset($_POST['id']))
{
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
$id = intval($_GET['id']);
}
$months = array(
'0' => 'empty',
'1' => 'jan',
'2' => 'feb',
'3' => 'mar',
'4' => 'apr',
'5' => 'may',
'6' => 'jun',
'7' => 'jul',
'8' => 'aug',
'9' => 'sep',
'10' => 'oct',
'11' => 'nov',
'12' => 'dec',
);
if($page == 'overview' || $page == 'customers')
{
if($action == 'su' && $id != 0)
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$id . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' "));
if($result['loginname'] != '')
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$userinfo['userid'] . "'");
$s = md5(uniqid(microtime(), 1));
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$id . "', '" . $db->escape($result['ipaddress']) . "', '" . $db->escape($result['useragent']) . "', '" . time() . "', '" . $db->escape($result['language']) . "', '0')");
redirectTo('customer_traffic.php', Array(
's' => $s
));
}
else
{
redirectTo('index.php', Array(
'action' => 'login'
));
}
}
$customerview = 1;
$stats_tables = '';
$minyear = $db->query_first("SELECT `year` FROM `". TABLE_PANEL_TRAFFIC . "` ORDER BY `year` ASC LIMIT 1");
if (!isset($minyear['year']) || $minyear['year'] == 0)
{
$maxyears = 0;
}
else
{
$maxyears = date("Y") - $minyear['year'];
}
for($years = 0; $years<=$maxyears; $years++) {
$overview['year'] = date("Y")-$years;
$overview['type'] = $lng['traffic']['customer'];
$domain_list = '';
$customer_name_list = $db->query("SELECT `customerid`,`company`,`name`,`firstname` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `deactivated`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY name");
$totals = array(
'jan' => 0,
'feb' => 0,
'mar' => 0,
'apr' => 0,
'may' => 0,
'jun' => 0,
'jul' => 0,
'aug' => 0,
'sep' => 0,
'oct' => 0,
'nov' => 0,
'dec' => 0,
);
while($customer_name = $db->fetch_array($customer_name_list)) {
$virtual_host = array(
'name' => ($customer_name['company'] == '' ? $customer_name['name'] . ", " . $customer_name['firstname'] : $customer_name['company']),
'customerid' => $customer_name['customerid'],
'jan' => '-',
'feb' => '-',
'mar' => '-',
'apr' => '-',
'may' => '-',
'jun' => '-',
'jul' => '-',
'aug' => '-',
'sep' => '-',
'oct' => '-',
'nov' => '-',
'dec' => '-',
);
$traffic_list = $db->query("SELECT month, SUM(http+ftp_up+ftp_down+mail)*1024 AS traffic FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE year = " . (date("Y")-$years) . " AND `customerid` = '" . $customer_name['customerid'] . "' GROUP BY month ORDER BY month");
while($traffic_month = $db->fetch_array($traffic_list)) {
$virtual_host[$months[(int)$traffic_month['month']]] = size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.3f %s');
$totals[$months[(int)$traffic_month['month']]] += $traffic_month['traffic'];
}
eval("\$domain_list .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
}
// sum up totals
$virtual_host = array(
'name' => $lng['traffic']['months']['total'],
);
foreach($totals as $month => $bytes) {
$virtual_host[$month] = ($bytes == 0 ? '-' : size_readable($bytes, 'GiB', 'bi', '%01.3f %s'));
}
$customerview = 0;
eval("\$total_list = sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
eval("\$stats_tables .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table") . "\");");
}
eval("echo \"" . getTemplate("traffic/index") . "\";");
}

View File

@@ -12,7 +12,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -21,47 +21,104 @@ require ("./lib/init.php");
if($page == 'overview')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
/**
* this is a dirty hack but syscp 1.4.2.1 does not
* has any version/dbversion in the database (don't know why)
* so we have to set them both to run a correct upgrade
*/
if (!isFroxlor()) {
if (!isset($settings['panel']['version'])
|| $settings['panel']['version'] == ''
) {
$settings['panel']['version'] = '1.4.2.1';
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel','version','".$settings['panel']['version']."')");
}
if (!isset($settings['system']['dbversion'])
|| $settings['system']['dbversion'] == ''
) {
/**
* for syscp-stable (1.4.2.1) this value has to be 0
* so the required table-fields are added correctly
* and the svn-version has its value in the database
* -> bug #54
*/
$result = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'");
if(isset($result['value']))
{
$settings['system']['dbversion'] = (int)$result['value'];
} else {
$settings['system']['dbversion'] = 0;
}
}
}
if(hasUpdates($version))
{
$successful_update = false;
$message = '';
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if((isset($_POST['update_preconfig'])
&& isset($_POST['update_changesagreed'])
&& intval($_POST['update_changesagreed']) != 0)
|| !isset($_POST['update_preconfig'])
) {
eval("echo \"" . getTemplate("update/update_start") . "\";");
eval("echo \"" . getTemplate("update/update_start") . "\";");
include_once('./install/updatesql.php');
$redirect_url = 'admin_index.php';
eval("echo \"" . getTemplate("update/update_end") . "\";");
include_once './install/updatesql.php';
updateCounters();
inserttask('1');
@chmod('./lib/userdata.inc.php', 0440);
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate("update/update_end") . "\";");
updateCounters();
inserttask('1');
@chmod('./lib/userdata.inc.php', 0440);
$successful_update = true;
}
else
{
$message = '<br /><strong style="color:#ff0000;">You have to agree that you have read the update notifications.</strong>';
}
}
else
if(!$successful_update)
{
$current_version = $settings['panel']['version'];
$new_version = $version;
$ui_text = $lng['update']['update_information'];
$ui_text = $lng['update']['update_information']['part_a'];
$ui_text = str_replace('%curversion', $current_version, $ui_text);
$ui_text = str_replace('%newversion', $new_version, $ui_text);
$update_information = $ui_text;
include_once './install/updates/preconfig.php';
$preconfig = getPreConfig($current_version);
if($preconfig != '')
{
$update_information .= '<br />'.$preconfig.$message;
}
$update_information .= $lng['update']['update_information']['part_b'];
eval("echo \"" . getTemplate("update/index") . "\";");
}
}
else
{
/*
* @TODO version-webcheck check here
* @TODO version-webcheck check here
*/
$success_message = $lng['update']['noupdatesavail'];
$redirect_url = 'admin_index.php';
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate("update/noupdatesavail") . "\";");
}
}
?>

1
cache/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*

0
cache/.keep vendored Normal file
View File

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
// Required code

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
// Required code
@@ -32,13 +32,13 @@ if($action == "add")
$account = trim($_POST['account']);
$subject = trim($_POST['subject']);
$message = trim($_POST['message']);
$date_from_off = isset($_POST['date_from_off']) ? -1 : 0;
$date_until_off = isset($_POST['date_until_off']) ? -1 : 0;
/*
* @TODO validate date (DD-MM-YYYY)
*/
* @TODO validate date (DD-MM-YYYY)
*/
$ts_from = -1;
$ts_until = -1;
@@ -87,6 +87,7 @@ if($action == "add")
`subject` = '" . $db->escape($subject) . "',
`customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_autoresponder_used` = `email_autoresponder_used` + 1 WHERE `customerid` = '" . $db->escape((int)$userinfo['customerid']). "'");
redirectTo($filename, Array('s' => $s));
}
@@ -105,11 +106,19 @@ if($action == "add")
{
$accounts.= "<option value=\"" . $row['email'] . "\">" . $row['email'] . "</option>";
}
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
$date_until_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
eval("echo \"" . getTemplate("email/autoresponder_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');
$autoresponder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/autoresponder/formfield.autoresponder_add.php';
$autoresponder_add_form = htmlform::genHTMLForm($autoresponder_add_data);
$title = $autoresponder_add_data['autoresponder_add']['title'];
$image = $autoresponder_add_data['autoresponder_add']['image'];
eval("echo \"" . getTemplate("autoresponder/autoresponder_add") . "\";");
}
// Edit autoresponder
@@ -127,10 +136,10 @@ if($action == "edit")
$date_from_off = isset($_POST['date_from_off']) ? -1 : 0;
$date_until_off = isset($_POST['date_until_off']) ? -1 : 0;
/*
* @TODO validate date (DD-MM-YYYY)
*/
* @TODO validate date (DD-MM-YYYY)
*/
$ts_from = -1;
$ts_until = -1;
@@ -143,7 +152,7 @@ if($action == "edit")
{
$date_until = $_POST['date_until'];
$ts_until = mktime(0, 0, 0, substr($date_until, 3, 2), substr($date_until, 0, 2), substr($date_until, 6, 4));
}
}
if(empty($account)
|| empty($subject)
@@ -182,7 +191,7 @@ if($action == "edit")
SET `message` = '" . $db->escape($message) . "',
`enabled` = '" . (int)$ResponderActive . "',
`date_from` = '" . (int)$ts_from . "',
`date_until` = '" . (int)$ts_until . "',
`date_until` = '" . (int)$ts_until . "',
`subject` = '" . $db->escape($subject) . "'
WHERE `email` = '" . $db->escape($account) . "'
AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
@@ -204,13 +213,14 @@ if($action == "edit")
$row = $db->fetch_array($result);
$subject = htmlspecialchars($row['subject']);
$message = htmlspecialchars($row['message']);
$date_from = (int)$row['date_from'];
$date_until = (int)$row['date_until'];
if($date_from == -1)
{
$deactivated = '-1';
$date_from = '';
}
else
{
@@ -218,27 +228,28 @@ if($action == "edit")
$date_from = date('d-m-Y', $date_from);
}
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
if($date_until == -1)
{
$deactivated = '-1';
$date_until = '-1';
$date_until = '';
}
else
{
$deactivated = '0';
$date_until = date('d-m-Y', $date_until);
}
$date_from_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
$checked = '';
#$isactive = makeyesno('active', '1', '0', $row['enabled']);
if($row['enabled'] == 1)
{
$checked = "checked=\"checked\"";
}
$autoresponder_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/autoresponder/formfield.autoresponder_edit.php';
$autoresponder_edit_form = htmlform::genHTMLForm($autoresponder_edit_data);
eval("echo \"" . getTemplate("email/autoresponder_edit") . "\";");
$title = $autoresponder_edit_data['autoresponder_edit']['title'];
$image = $autoresponder_edit_data['autoresponder_edit']['image'];
eval("echo \"" . getTemplate("autoresponder/autoresponder_edit") . "\";");
}
// Delete autoresponder
@@ -265,6 +276,7 @@ if($action == "delete")
WHERE `email` = '" . $db->escape($account) . "'
AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_autoresponder_used` = `email_autoresponder_used` - 1 WHERE `customerid` = '" . $db->escape((int)$userinfo['customerid']). "'");
redirectTo($filename, Array('s' => $s));
}
@@ -274,9 +286,10 @@ if($action == "delete")
// List existing autoresponders
else
else
{
$autoresponder = '';
$count = 0;
$result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' ORDER BY email ASC");
while($row = $db->fetch_array($result))
@@ -292,15 +305,14 @@ else
elseif($row['date_from'] != -1 && $row['date_until'] == -1)
{
$activated_date = $lng['autoresponder']['date_from'].': '.date('d-m-Y', $row['date_from']);
}
}
else
{
$activated_date = date('d-m-Y', $row['date_from']) . ' - ' . date('d-m-Y', $row['date_until']);
}
eval("\$autoresponder.=\"" . getTemplate("email/autoresponder_autoresponder") . "\";");
}
eval("\$autoresponder.=\"" . getTemplate("autoresponder/autoresponder_autoresponder") . "\";");
$count++;
}
eval("echo \"" . getTemplate("email/autoresponder") . "\";");
eval("echo \"" . getTemplate("autoresponder/autoresponder") . "\";");
}
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -68,13 +68,13 @@ elseif($page == 'domains')
$row['domainalias'] = $idna_convert->decode($row['domainalias']);
if($row['parentdomainid'] == '0'
&& $row['iswildcarddomain'] != '1'
&& $row['caneditdomain'] == '1')
{
$parentdomains_count++;
}
$domains_count++;
/*
$domainparts = explode('.', $row['domain']);
$domainparts = array_reverse($domainparts);
$sortkey = '';
@@ -82,8 +82,9 @@ elseif($page == 'domains')
{
$sortkey.= $part . '.';
}
$domain_array[$sortkey] = $row;
*/
$domain_array[$row['domain']] = $row;
}
ksort($domain_array);
@@ -125,6 +126,11 @@ elseif($page == 'domains')
if($paging->checkDisplay($i))
{
$row = htmlentities_array($domain_array[$sortkey]);
if($settings['system']['awstats_enabled'] == '1') {
$statsapp = 'awstats';
} else {
$statsapp = 'webalizer';
}
eval("\$domains.=\"" . getTemplate("domains/domains_delimiter") . "\";");
if($paging->sortfield == 'd.domain'
@@ -178,6 +184,14 @@ elseif($page == 'domains')
}
}
/*
* check for APS packages used with this domain, #110
*/
if(domainHasApsInstances($id))
{
standard_error('domains_cantdeletedomainwithapsinstances');
}
$log->logAction(USR_ACTION, LOG_INFO, "deleted subdomain '" . $idna_convert->decode($result['domain']) . "'");
$result = $db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`-1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
@@ -205,17 +219,19 @@ elseif($page == 'domains')
{
$subdomain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['subdomain'], 'subdomain', '', 'subdomainiswrong')));
$domain = $idna_convert->encode($_POST['domain']);
$domain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($domain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `iswildcarddomain`='0' AND `caneditdomain`='1' ");
$domain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($domain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `caneditdomain`='1' ");
$completedomain = $subdomain . '.' . $domain;
$completedomain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($completedomain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `email_only`='0' AND `caneditdomain` = '1'");
$aliasdomain = intval($_POST['alias']);
$aliasdomain_check = array(
'id' => 0
);
$_doredirect = false;
if($aliasdomain != 0)
{
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
// also check ip/port combination to be the same, #176
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$domain_check['ipandport'].'\'');
}
if(isset($_POST['url'])
@@ -223,6 +239,7 @@ elseif($page == 'domains')
&& validateUrl($idna_convert->encode($_POST['url'])))
{
$path = $_POST['url'];
$_doredirect = true;
}
else
{
@@ -234,6 +251,14 @@ elseif($page == 'domains')
{
$path = $userinfo['documentroot'] . '/' . $path;
$path = makeCorrectDir($path);
if (strstr($path, ":") !== FALSE)
{
standard_error('pathmaynotcontaincolon');
}
}
else
{
$_doredirect = true;
}
if(isset($_POST['openbasedir_path'])
@@ -286,7 +311,38 @@ elseif($page == 'domains')
}
else
{
$result = $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`customerid`, `domain`, `documentroot`, `ipandport`, `aliasdomain`, `parentdomainid`, `isemaildomain`, `openbasedir`, `openbasedir_path`, `safemode`, `speciallogfile`, `specialsettings`, `ssl_redirect`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($completedomain) . "', '" . $db->escape($path) . "', '" . $db->escape($domain_check['ipandport']) . "', " . (($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") . ", '" . (int)$domain_check['id'] . "', '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "', '" . $db->escape($domain_check['openbasedir']) . "', '" . $db->escape($openbasedir_path) . "', '" . $db->escape($domain_check['safemode']) . "', '" . $db->escape($domain_check['speciallogfile']) . "', '" . $db->escape($domain_check['specialsettings']) . "', '" . $ssl_redirect . "')");
// get the phpsettingid from parentdomain, #107
$phpsid_result = $db->query_first("SELECT `phpsettingid` FROM `".TABLE_PANEL_DOMAINS."` WHERE `id` = '".(int)$domain_check['id']."'");
if(!isset($phpsid_result['phpsettingid'])
|| (int)$phpsid_result['phpsettingid'] <= 0
) {
// assign default config
$phpsid_result['phpsettingid'] = 1;
}
$result = $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET
`customerid` = '" . (int)$userinfo['customerid'] . "',
`domain` = '" . $db->escape($completedomain) . "',
`documentroot` = '" . $db->escape($path) . "',
`ipandport` = '" . $db->escape($domain_check['ipandport']) . "',
`aliasdomain` = ".(($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") .",
`parentdomainid` = '" . (int)$domain_check['id'] . "',
`isemaildomain` = '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "',
`openbasedir` = '" . $db->escape($domain_check['openbasedir']) . "',
`openbasedir_path` = '" . $db->escape($openbasedir_path) . "',
`safemode` = '" . $db->escape($domain_check['safemode']) . "',
`speciallogfile` = '" . $db->escape($domain_check['speciallogfile']) . "',
`specialsettings` = '" . $db->escape($domain_check['specialsettings']) . "',
`ssl_redirect` = '" . $ssl_redirect . "',
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
if($_doredirect)
{
$did = $db->insert_id();
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : $settings['customredirect']['default'];
addRedirectToDomain($did, $redirect);
}
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
inserttask('1');
@@ -296,7 +352,7 @@ elseif($page == 'domains')
}
else
{
$result = $db->query("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `iswildcarddomain`='0' AND `caneditdomain`='1' ORDER BY `domain` ASC");
$result = $db->query("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `caneditdomain`='1' ORDER BY `domain` ASC");
$domains = '';
while($row = $db->fetch_array($result))
@@ -312,9 +368,26 @@ elseif($page == 'domains')
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
}
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
$redirectcode = '';
if($settings['customredirect']['enabled'] == '1')
{
$codes = getRedirectCodesArray();
foreach($codes as $rc)
{
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $settings['customredirect']['default']);
}
}
#$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']);
$subdomain_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_add.php';
$subdomain_add_form = htmlform::genHTMLForm($subdomain_add_data);
$title = $subdomain_add_data['domain_add']['title'];
$image = $subdomain_add_data['domain_add']['image'];
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
}
}
@@ -322,9 +395,10 @@ elseif($page == 'domains')
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path` ,`pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
$alias_check = $alias_check['count'];
$_doredirect = false;
if(isset($result['customerid'])
&& $result['customerid'] == $userinfo['customerid'])
@@ -337,6 +411,7 @@ elseif($page == 'domains')
&& validateUrl($idna_convert->encode($_POST['url'])))
{
$path = $_POST['url'];
$_doredirect = true;
}
else
{
@@ -348,6 +423,14 @@ elseif($page == 'domains')
{
$path = $userinfo['documentroot'] . '/' . $path;
$path = makeCorrectDir($path);
if (strstr($path, ":") !== FALSE)
{
standard_error('pathmaynotcontaincolon');
}
}
else
{
$_doredirect = true;
}
$aliasdomain = intval($_POST['alias']);
@@ -355,16 +438,7 @@ elseif($page == 'domains')
if(isset($_POST['iswildcarddomain'])
&& $_POST['iswildcarddomain'] == '1'
&& $result['parentdomainid'] == '0'
&& $userinfo['subdomains'] != '0')
{
$wildcarddomaincheck = $db->query("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `parentdomainid` = '" . (int)$result['id'] . "'");
if($db->num_rows($wildcarddomaincheck) != '0')
{
standard_error('firstdeleteallsubdomains');
exit;
}
){
$iswildcarddomain = '1';
}
else
@@ -431,6 +505,12 @@ elseif($page == 'domains')
$log->logAction(USR_ACTION, LOG_NOTICE, "automatically deleted mail-table entries for '" . $idna_convert->decode($result['domain']) . "'");
}
if($_doredirect)
{
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : false;
updateRedirectOfDomain($id, $redirect);
}
if($path != $result['documentroot']
|| $isemaildomain != $result['isemaildomain']
|| $iswildcarddomain != $result['iswildcarddomain']
@@ -439,9 +519,9 @@ elseif($page == 'domains')
|| $ssl_redirect != $result['ssl_redirect'])
{
$log->logAction(USR_ACTION, LOG_INFO, "edited domain '" . $idna_convert->decode($result['domain']) . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `documentroot`='" . $db->escape($path) . "', `isemaildomain`='" . (int)$isemaildomain . "', `iswildcarddomain`='" . (int)$iswildcarddomain . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ",`openbasedir_path`='" . $db->escape($openbasedir_path) . "', `ssl_redirect`='" . $ssl_redirect . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
inserttask('1');
inserttask('4');
$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 . "'");
}
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -451,7 +531,8 @@ elseif($page == 'domains')
{
$result['domain'] = $idna_convert->decode($result['domain']);
$domains = makeoption($lng['domains']['noaliasdomain'], 0, $result['aliasdomain'], true);
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC");
// also check ip/port combination to be the same, #176
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` AND `d`.`ipandport` = '".(int)$result['ipandport']."' ORDER BY `d`.`domain` ASC");
while($row_domain = $db->fetch_array($result_domains))
{
@@ -460,10 +541,17 @@ elseif($page == 'domains')
if(preg_match('/^https?\:\/\//', $result['documentroot'])
&& validateUrl($idna_convert->encode($result['documentroot']))
&& $settings['panel']['pathedit'] == 'Dropdown')
{
$urlvalue = $result['documentroot'];
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
) {
if($settings['panel']['pathedit'] == 'Dropdown')
{
$urlvalue = $result['documentroot'];
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
}
else
{
$urlvalue = '';
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot'], true);
}
}
else
{
@@ -471,15 +559,35 @@ elseif($page == 'domains')
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
}
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
$redirectcode = '';
if($settings['customredirect']['enabled'] == '1')
{
$def_code = getDomainRedirectId($id);
$codes = getRedirectCodesArray();
foreach($codes as $rc)
{
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $def_code);
}
}
#$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']."'");
if(filter_var($result_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
{
$result_ipandport['ip'] = '[' . $result_ipandport['ip'] . ']';
}
$domainip = $result_ipandport['ip'];
$result = htmlentities_array($result);
if($settings['system']['use_ssl'] == "1")
{
}
$subdomain_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_edit.php';
$subdomain_edit_form = htmlform::genHTMLForm($subdomain_edit_data);
$title = $subdomain_edit_data['domain_edit']['title'];
$image = $subdomain_edit_data['domain_edit']['image'];
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -139,8 +139,10 @@ elseif($page == 'emails')
}
}
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
$emaildomains_count = $emaildomains_count['count'];
$emailscount = $db->num_rows($result);
eval("echo \"" . getTemplate("email/emails") . "\";");
}
elseif($action == 'delete'
@@ -182,6 +184,12 @@ elseif($page == 'emails')
$number_forwarders = 0;
}
if(isset($_POST['delete_userfiles'])
&& (int)$_POST['delete_userfiles'] == 1)
{
inserttask('7', $userinfo['loginname'], $result['email_full']);
}
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `emails_used`=`emails_used` - 1 , `email_forwarders_used` = `email_forwarders_used` - " . (int)$number_forwarders . " $update_users_query_addon WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$log->logAction(USR_ACTION, LOG_INFO, "deleted email address '" . $result['email'] . "'");
@@ -189,7 +197,12 @@ elseif($page == 'emails')
}
else
{
ask_yesno('email_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
if(maildirExists($result)) {
$show_checkbox = true;
} else {
$show_checkbox = false;
}
ask_yesno_withcheckbox('email_reallydelete', 'admin_customer_alsoremovemail', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']), $show_checkbox);
}
}
}
@@ -268,7 +281,14 @@ 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';
$email_add_form = htmlform::genHTMLForm($email_add_data);
$title = $email_add_data['emails_add']['title'];
$image = $email_add_data['emails_add']['image'];
eval("echo \"" . getTemplate("email/emails_add") . "\";");
}
}
@@ -308,6 +328,13 @@ elseif($page == 'emails')
$destinations_count = count($result['destination']);
$result = htmlentities_array($result);
$email_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_edit.php';
$email_edit_form = htmlform::genHTMLForm($email_edit_data);
$title = $email_edit_data['emails_edit']['title'];
$image = $email_edit_data['emails_edit']['image'];
eval("echo \"" . getTemplate("email/emails_edit") . "\";");
}
}
@@ -372,6 +399,7 @@ elseif($page == 'accounts')
$email_full = $result['email_full'];
$username = $idna_convert->decode($email_full);
$password = validate($_POST['email_password'], 'password');
$password = validatePassword($password);
if($settings['panel']['sendalternativemail'] == 1)
{
@@ -427,25 +455,26 @@ elseif($page == 'accounts')
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['subject']), $replace_arr));
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_mailbody\'');
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success']['mailbody']), $replace_arr));
$mail->From = $admin['email'];
$mail->FromName = getCorrectUserSalutation($admin);
$mail->Subject = $mail_subject;
$mail->Body = $mail_body;
$mail->AddAddress($email_full, getCorrectUserSalutation($userinfo));
if(!$mail->Send())
{
if($mail->ErrorInfo != '')
{
$mailerr_msg = $mail->ErrorInfo;
}
else
{
$mailerr_msg = $email;
}
$_mailerror = false;
try {
$mail->SetFrom($admin['email'], getCorrectUserSalutation($admin));
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($email_full, getCorrectUserSalutation($userinfo));
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $email);
standard_error('errorsendingmail', $email_full);
}
$mail->ClearAddresses();
@@ -457,23 +486,24 @@ elseif($page == 'accounts')
$mail_subject = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['subject']), $replace_arr);
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($userinfo['def_language']) . '\' AND `templategroup`=\'mails\' AND `varname`=\'pop_success_alternative_mailbody\'');
$mail_body = replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['pop_success_alternative']['mailbody']), $replace_arr);
$mail->From = $admin['email'];
$mail->FromName = getCorrectUserSalutation($admin);
$mail->Subject = $mail_subject;
$mail->Body = $mail_body;
$mail->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($userinfo));
if(!$mail->Send())
{
if($mail->ErrorInfo != '')
{
$mailerr_msg = $mail->ErrorInfo;
}
else
{
$mailerr_msg = $alternative_email;
}
$_mailerror = false;
try {
$mail->SetFrom($admin['email'], getCorrectUserSalutation($admin));
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($userinfo));
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error(array('errorsendingmail', $alternative_email));
}
@@ -489,6 +519,13 @@ elseif($page == 'accounts')
$result['email_full'] = $idna_convert->decode($result['email_full']);
$result = htmlentities_array($result);
$quota = $settings['system']['mail_quota'];
$account_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addaccount.php';
$account_add_form = htmlform::genHTMLForm($account_add_data);
$title = $account_add_data['emails_addaccount']['title'];
$image = $account_add_data['emails_addaccount']['image'];
eval("echo \"" . getTemplate("email/account_add") . "\";");
}
}
@@ -516,17 +553,24 @@ elseif($page == 'accounts')
standard_error(array('stringisempty', 'mypassword'));
exit;
}
else
{
$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'] . "'");
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
}
$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'] . "'");
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
}
else
{
$result['email_full'] = $idna_convert->decode($result['email_full']);
$result = htmlentities_array($result);
$account_changepw_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php';
$account_changepw_form = htmlform::genHTMLForm($account_changepw_data);
$title = $account_changepw_data['emails_accountchangepasswd']['title'];
$image = $account_changepw_data['emails_accountchangepasswd']['image'];
eval("echo \"" . getTemplate("email/account_changepw") . "\";");
}
}
@@ -568,6 +612,13 @@ elseif($page == 'accounts')
{
$result['email_full'] = $idna_convert->decode($result['email_full']);
$result = htmlentities_array($result);
$quota_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangequota.php';
$quota_edit_form = htmlform::genHTMLForm($quota_edit_data);
$title = $quota_edit_data['emails_accountchangequota']['title'];
$image = $quota_edit_data['emails_accountchangequota']['image'];
eval("echo \"" . getTemplate("email/account_changequota") . "\";");
}
}
@@ -597,13 +648,19 @@ elseif($page == 'accounts')
$quota = 0;
}
if(isset($_POST['delete_userfiles'])
&& (int)$_POST['delete_userfiles'] == 1)
{
inserttask('7', $userinfo['loginname'], $result['email_full']);
}
$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, "deleted email account for '" . $result['email_full'] . "'");
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
}
else
{
ask_yesno('email_reallydelete_account', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
ask_yesno_withcheckbox('email_reallydelete_account', 'admin_customer_alsoremovemail', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
}
}
}
@@ -656,6 +713,13 @@ elseif($page == 'forwarders')
{
$result['email_full'] = $idna_convert->decode($result['email_full']);
$result = htmlentities_array($result);
$forwarder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addforwarder.php';
$forwarder_add_form = htmlform::genHTMLForm($forwarder_add_data);
$title = $forwarder_add_data['emails_addforwarder']['title'];
$image = $forwarder_add_data['emails_addforwarder']['image'];
eval("echo \"" . getTemplate("email/forwarder_add") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -39,6 +39,31 @@ if($page == 'overview')
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras");
eval("echo \"" . getTemplate("extras/extras") . "\";");
}
elseif($page == 'backup')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras_backup");
$result = $db->query("SELECT `backup_enabled` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$row = $db->fetch_array($result);
$backup_enabled = makeyesno('backup_enabled', '1', '0', $row['backup_enabled']);
if(isset($_POST['send']) && $_POST['send'] == 'send'){
$backup_enabled = ($_POST['backup_enabled'] == '1' ? '1' : '0');
$backup_ftp_enabled = ($_POST['backup_ftp_enabled'] == '1' ? '1' : '0');
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `backup_enabled`='" . $backup_enabled . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
$backup_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.backup.php';
$backup_form = htmlform::genHTMLForm($backup_data);
$title = $backup_data['backup']['title'];
$image = $backup_data['backup']['image'];
eval("echo \"" . getTemplate("extras/backup") . "\";");
}
elseif($page == 'htpasswds')
{
if($action == '')
@@ -49,7 +74,7 @@ elseif($page == 'htpasswds')
'path' => $lng['panel']['path']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_HTPASSWDS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -81,7 +106,7 @@ elseif($page == 'htpasswds')
elseif($action == 'delete'
&& $id != 0)
{
$result = $db->query_first("SELECT `id`, `customerid`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
if(isset($result['username'])
&& $result['username'] != '')
@@ -114,6 +139,7 @@ elseif($page == 'htpasswds')
$userpath = $path;
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
$username = validate($_POST['username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
validate($_POST['directory_password'], 'password');
$username_path_check = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `username`='" . $db->escape($username) . "' AND `path`='" . $db->escape($path) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
@@ -151,7 +177,7 @@ elseif($page == 'htpasswds')
}
else
{
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` (`customerid`, `username`, `password`, `path`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($password) . "', '" . $db->escape($path) . "')");
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` (`customerid`, `username`, `password`, `path`, `authname`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($password) . "', '" . $db->escape($path) . "', '" . $db->escape($authname) . "')");
$log->logAction(USR_ACTION, LOG_INFO, "added htpasswd for '" . $username . " (" . $path . ")'");
inserttask('1');
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -160,13 +186,20 @@ elseif($page == 'htpasswds')
else
{
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
$htpasswd_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_add.php';
$htpasswd_add_form = htmlform::genHTMLForm($htpasswd_add_data);
$title = $htpasswd_add_data['htpasswd_add']['title'];
$image = $htpasswd_add_data['htpasswd_add']['image'];
eval("echo \"" . getTemplate("extras/htpasswds_add") . "\";");
}
}
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
if(isset($result['username'])
&& $result['username'] != '')
@@ -175,6 +208,7 @@ elseif($page == 'htpasswds')
&& $_POST['send'] == 'send')
{
validate($_POST['directory_password'], 'password');
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
if(CRYPT_STD_DES == 1)
{
@@ -186,13 +220,25 @@ elseif($page == 'htpasswds')
$password = crypt($_POST['directory_password']);
}
if($_POST['directory_password'] == '')
$pwd_sql = '';
if($_POST['directory_password'] != '')
{
standard_error(array('stringisempty', 'mypassword'));
$pwd_sql = "`password`='" . $db->escape($password) . "' ";
}
else
$auth_sql = '';
if($authname != $result['authname'])
{
$db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET `password`='" . $db->escape($password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$auth_sql = "`authname`='" . $db->escape($authname) . "' ";
}
if($pwd_sql != '' || $auth_sql != '')
{
if($pwd_sql !='' && $auth_sql != '') {
$pwd_sql.= ', ';
}
$db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET ".$pwd_sql.$auth_sql." WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$log->logAction(USR_ACTION, LOG_INFO, "edited htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
inserttask('1');
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -206,6 +252,13 @@ elseif($page == 'htpasswds')
}
$result = htmlentities_array($result);
$htpasswd_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_edit.php';
$htpasswd_edit_form = htmlform::genHTMLForm($htpasswd_edit_data);
$title = $htpasswd_edit_data['htpasswd_edit']['title'];
$image = $htpasswd_edit_data['htpasswd_edit']['image'];
eval("echo \"" . getTemplate("extras/htpasswds_edit") . "\";");
}
}
@@ -221,10 +274,11 @@ elseif($page == 'htaccess')
'options_indexes' => $lng['extras']['view_directory'],
'error404path' => $lng['extras']['error404path'],
'error403path' => $lng['extras']['error403path'],
'error500path' => $lng['extras']['error500path']
'error500path' => $lng['extras']['error500path'],
'options_cgi' => $lng['extras']['execute_perl']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_HTACCESS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `id`, `path`, `options_indexes`, `error404path`, `error403path`, `error500path` FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -234,6 +288,8 @@ elseif($page == 'htaccess')
$count = 0;
$htaccess = '';
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
@@ -241,10 +297,14 @@ elseif($page == 'htaccess')
if(strpos($row['path'], $userinfo['documentroot']) === 0)
{
$row['path'] = substr($row['path'], strlen($userinfo['documentroot']));
// don't show nothing wehn it's the docroot, show slash
if ($row['path'] == '') { $row['path'] = '/'; }
}
$row['options_indexes'] = str_replace('1', $lng['panel']['yes'], $row['options_indexes']);
$row['options_indexes'] = str_replace('0', $lng['panel']['no'], $row['options_indexes']);
$row['options_cgi'] = str_replace('1', $lng['panel']['yes'], $row['options_cgi']);
$row['options_cgi'] = str_replace('0', $lng['panel']['no'], $row['options_cgi']);
$row = htmlentities_array($row);
eval("\$htaccess.=\"" . getTemplate("extras/htaccess_htaccess") . "\";");
$count++;
@@ -293,35 +353,18 @@ elseif($page == 'htaccess')
standard_error('invalidpath');
}
if(($_POST['error404path'] === '')
|| (validateUrl($idna_convert->encode($_POST['error404path']))))
if(isset($_POST['options_cgi']))
{
$error404path = $_POST['error404path'];
$options_cgi = intval($_POST['options_cgi']);
}
else
{
standard_error('mustbeurl');
}
$options_cgi = '0';
}
if(($_POST['error403path'] === '')
|| (validateUrl($idna_convert->encode($_POST['error403path']))))
{
$error403path = $_POST['error403path'];
}
else
{
standard_error('mustbeurl');
}
if(($_POST['error500path'] === '')
|| (validateUrl($idna_convert->encode($_POST['error500path']))))
{
$error500path = $_POST['error500path'];
}
else
{
standard_error('mustbeurl');
}
$error404path = correctErrorDocument($_POST['error404path']);
$error403path = correctErrorDocument($_POST['error403path']);
$error500path = correctErrorDocument($_POST['error500path']);
if($path_dupe_check['path'] == $path)
{
@@ -333,7 +376,15 @@ elseif($page == 'htaccess')
}
else
{
$db->query('INSERT INTO `' . TABLE_PANEL_HTACCESS . '` (`customerid`, `path`, `options_indexes`, `error404path`, `error403path`, `error500path` ) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($path) . '", "' . $db->escape($_POST['options_indexes'] == '1' ? '1' : '0') . '", "' . $db->escape($error404path) . '", "' . $db->escape($error403path) . '", "' . $db->escape($error500path) . '" )');
$db->query('INSERT INTO `' . TABLE_PANEL_HTACCESS . '` SET
`customerid` = "'.(int)$userinfo['customerid'].'",
`path` = "'.$db->escape($path).'",
`options_indexes` = "'.$db->escape($_POST['options_indexes'] == '1' ? '1' : '0').'",
`error404path` = "'.$db->escape($error404path).'",
`error403path` = "'.$db->escape($error403path).'",
`error500path` = "'.$db->escape($error500path).'",
`options_cgi` = "'.$db->escape($options_cgi).'"');
$log->logAction(USR_ACTION, LOG_INFO, "added htaccess for '" . $path . "'");
inserttask('1');
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -342,7 +393,16 @@ elseif($page == 'htaccess')
else
{
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
$options_indexes = makeyesno('options_indexes', '1', '0', '1');
#$options_indexes = makeyesno('options_indexes', '1', '0', '0');
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
#$options_cgi = makeyesno('options_cgi', '1', '0', '0');
$htaccess_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_add.php';
$htaccess_add_form = htmlform::genHTMLForm($htaccess_add_data);
$title = $htaccess_add_data['htaccess_add']['title'];
$image = $htaccess_add_data['htaccess_add']['image'];
eval("echo \"" . getTemplate("extras/htaccess_add") . "\";");
}
}
@@ -359,49 +419,30 @@ elseif($page == 'htaccess')
&& $_POST['send'] == 'send')
{
$option_indexes = intval($_POST['options_indexes']);
$options_cgi = isset($_POST['options_cgi']) ? intval($_POST['options_cgi']) : 0;
if($option_indexes != '1')
{
$option_indexes = '0';
}
if(($_POST['error404path'] === '')
|| (validateUrl($idna_convert->encode($_POST['error404path']))))
if($options_cgi != '1')
{
$error404path = $_POST['error404path'];
}
else
{
standard_error('mustbeurl');
$options_cgi = '0';
}
if(($_POST['error403path'] === '')
|| (validateUrl($idna_convert->encode($_POST['error403path']))))
{
$error403path = $_POST['error403path'];
}
else
{
standard_error('mustbeurl');
}
if(($_POST['error500path'] === '')
|| (validateUrl($idna_convert->encode($_POST['error500path']))))
{
$error500path = $_POST['error500path'];
}
else
{
standard_error('mustbeurl');
}
$error404path = correctErrorDocument($_POST['error404path']);
$error403path = correctErrorDocument($_POST['error403path']);
$error500path = correctErrorDocument($_POST['error500path']);
if(($option_indexes != $result['options_indexes'])
|| ($error404path != $result['error404path'])
|| ($error403path != $result['error403path'])
|| ($error500path != $result['error500path']))
|| ($error500path != $result['error500path'])
|| ($options_cgi != $result['options_cgi']))
{
inserttask('1');
$db->query('UPDATE `' . TABLE_PANEL_HTACCESS . '` SET `options_indexes` = "' . $db->escape($option_indexes) . '", `error404path` = "' . $db->escape($error404path) . '", `error403path` = "' . $db->escape($error403path) . '", `error500path` = "' . $db->escape($error500path) . '" WHERE `customerid` = "' . (int)$userinfo['customerid'] . '" AND `id` = "' . (int)$id . '"');
$db->query('UPDATE `' . TABLE_PANEL_HTACCESS . '` SET `options_indexes` = "' . $db->escape($option_indexes) . '", `error404path` = "' . $db->escape($error404path) . '", `error403path` = "' . $db->escape($error403path) . '", `error500path` = "' . $db->escape($error500path) . '", `options_cgi` = "' . $db->escape($options_cgi) . '" WHERE `customerid` = "' . (int)$userinfo['customerid'] . '" AND `id` = "' . (int)$id . '"');
$log->logAction(USR_ACTION, LOG_INFO, "edited htaccess for '" . str_replace($userinfo['documentroot'], '', $result['path']) . "'");
}
@@ -412,13 +453,24 @@ elseif($page == 'htaccess')
if(strpos($result['path'], $userinfo['documentroot']) === 0)
{
$result['path'] = substr($result['path'], strlen($userinfo['documentroot']));
// don't show nothing wehn it's the docroot, show slash
if ($result['path'] == '') { $result['path'] = '/'; }
}
$result['error404path'] = $result['error404path'];
$result['error403path'] = $result['error403path'];
$result['error500path'] = $result['error500path'];
$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
#$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
#$options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
$result = htmlentities_array($result);
$htaccess_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_edit.php';
$htaccess_edit_form = htmlform::genHTMLForm($htaccess_edit_data);
$title = $htaccess_edit_data['htaccess_edit']['title'];
$image = $htaccess_edit_data['htaccess_edit']['image'];
eval("echo \"" . getTemplate("extras/htaccess_edit") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -49,7 +49,7 @@ elseif($page == 'accounts')
'homedir' => $lng['panel']['path']
);
$paging = new paging($userinfo, $db, TABLE_FTP_USERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' AND `username` NOT LIKE '%_backup'" . $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);
@@ -97,12 +97,12 @@ elseif($page == 'accounts')
&& $_POST['send'] == 'send')
{
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `up_count`=`up_count`+'" . (int)$result['up_count'] . "', `up_bytes`=`up_bytes`+'" . (int)$result['up_bytes'] . "', `down_count`=`down_count`+'" . (int)$result['down_count'] . "', `down_bytes`=`down_bytes`+'" . (int)$result['down_bytes'] . "' WHERE `username`='" . $db->escape($userinfo['loginname']) . "'");
$result = $db->query_first("SELECT `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $db->escape($result['username']) . "'");
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=REPLACE(`members`,'," . $db->escape($result['username']) . "','') WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
// $db->query("DELETE FROM `".TABLE_FTP_GROUPS."` WHERE `customerid`='".$userinfo['customerid']."' AND `id`='$id'");
if($userinfo['ftps_used'] == '1')
{
$resetaccnumber = " , `ftp_lastaccountnumber`='0'";
@@ -112,12 +112,19 @@ elseif($page == 'accounts')
$resetaccnumber = '';
}
// refs #293
if(isset($_POST['delete_userfiles'])
&& (int)$_POST['delete_userfiles'] == 1)
{
inserttask('8', $userinfo['loginname'], $result['homedir']);
}
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`-1 $resetaccnumber WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
ask_yesno('ftp_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
ask_yesno_withcheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
}
}
else
@@ -135,6 +142,13 @@ elseif($page == 'accounts')
{
$path = validate($_POST['path'], 'path');
$password = validate($_POST['ftp_password'], 'password');
$password = validatePassword($password);
$sendinfomail = intval($_POST['sendinfomail']);
if($sendinfomail != 1)
{
$sendinfomail = 0;
}
if($settings['customer']['ftpatdomain'] == '1')
{
@@ -172,26 +186,172 @@ elseif($page == 'accounts')
}
else
{
$userpath = makeCorrectDir($path);
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
$db->query("INSERT INTO `" . TABLE_FTP_USERS . "` (`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($path) . "', 'y', '" . (int)$userinfo['guid'] . "', '" . (int)$userinfo['guid'] . "')");
$result = $db->query("SELECT `bytes_in_used` FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $userinfo['loginname'] . "'");
while($row = $db->fetch_array($result))
{
$db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($username) . "', 'user', '" . $db->escape($row['bytes_in_used']) . "', '0', '0', '0', '0', '0')");
}
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'");
// $db->query("INSERT INTO `".TABLE_FTP_GROUPS."` (`customerid`, `groupname`, `gid`, `members`) VALUES ('".$userinfo['customerid']."', '$username', '$uid', '$username')");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
// $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value`='$uid' WHERE settinggroup='ftp' AND varname='lastguid'");
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
inserttask(5);
if($sendinfomail == 1)
{
$replace_arr = array(
'CUST_NAME' => getCorrectUserSalutation($userinfo),
'USR_NAME' => $username,
'USR_PASS' => $password,
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
);
$def_language = $userinfo['def_language'];
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_ftpaccount_by_customer_subject\'');
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_subject']), $replace_arr));
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_ftpaccount_by_customer_mailbody\'');
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_body']['main']), $replace_arr));
$_mailerror = false;
try {
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $userinfo['email']);
}
$mail->ClearAddresses();
}
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], '/');
if($settings['customer']['ftpatdomain'] == '1')
{
$domainlist = array();
$domains = '';
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
while($row_domain = $db->fetch_array($result_domains))
{
$domainlist[] = $row_domain['domain'];
}
sort($domainlist);
if(isset($domainlist[0]) && $domainlist[0] != '')
{
foreach($domainlist as $dom)
{
$domains .= makeoption($idna_convert->decode($dom), $dom);
}
}
}
#$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);
$title = $ftp_add_data['ftp_add']['title'];
$image = $ftp_add_data['ftp_add']['image'];
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
}
}
}
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT `id`, `username`, `homedir`, `uid`, `gid` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
if(isset($result['username'])
&& $result['username'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$path = validate($_POST['path'], 'path');
$_setnewpass = false;
if(isset($_POST['ftp_password']) && $_POST['ftp_password'] != '')
{
$password = validate($_POST['ftp_password'], 'password');
$password = validatePassword($password);
$_setnewpass = true;
}
if($_setnewpass)
{
if($password == '')
{
standard_error(array('stringisempty', 'mypassword'));
exit;
}
else
{
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account password for '" . $result['username'] . "'");
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
// 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'");
}
}
}
if($path != '')
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
if($path != $result['homedir'])
{
if(!file_exists($path))
{
mkDirWithCorrectOwnership($userinfo['documentroot'], $path, $result['uid'], $result['gid']);
inserttask(5); /* Let the cronjob do the rest */
}
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account homdir for '" . $result['username'] . "'");
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `homedir`= '" . $db->escape($path) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
}
}
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
if(strpos($result['homedir'], $userinfo['documentroot']) === 0)
{
$homedir = substr($result['homedir'], strlen($userinfo['documentroot']));
}
else
{
$homedir = $result['homedir'];
}
$homedir = makeCorrectDir($homedir);
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $homedir);
if($settings['customer']['ftpatdomain'] == '1')
{
@@ -205,41 +365,16 @@ elseif($page == 'accounts')
}
}
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
}
}
}
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$ftp_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_edit.php';
$ftp_edit_form = htmlform::genHTMLForm($ftp_edit_data);
if(isset($result['username'])
&& $result['username'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$password = validate($_POST['ftp_password'], 'password');
$title = $ftp_edit_data['ftp_edit']['title'];
$image = $ftp_edit_data['ftp_edit']['image'];
if($password == '')
{
standard_error(array('stringisempty', 'mypassword'));
exit;
}
else
{
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$log->logAction(USR_ACTION, LOG_INFO, "edited ftp-account '" . $result['username'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";");
}
}
}
}
?>
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -67,7 +67,7 @@ if($page == 'overview')
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains aps_packages');
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps tickets subdomains aps_packages');
$opentickets = 0;
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `customerid` = "' . $userinfo['customerid'] . '"
@@ -172,13 +172,46 @@ elseif($page == 'change_language')
{
$language_options = '';
$default_lang = $settings['panel']['standardlanguage'];
if($userinfo['def_language'] != '') {
$default_lang = $userinfo['def_language'];
}
while(list($language_file, $language_name) = each($languages))
{
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
$language_options.= makeoption($language_name, $language_file, $default_lang, true);
}
eval("echo \"" . getTemplate("index/change_language") . "\";");
}
}
elseif($page == 'change_theme')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$theme = validate($_POST['theme'], 'theme');
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'");
redirectTo($filename, Array('s' => $s));
}
else
{
$theme_options = '';
?>
$default_theme = $settings['panel']['default_theme'];
if($userinfo['theme'] != '') {
$default_theme = $userinfo['theme'];
}
$themes_avail = getThemes();
foreach($themes_avail as $t)
{
$theme_options.= makeoption($t, $t, $default_theme, true);
}
eval("echo \"" . getTemplate("index/change_theme") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -52,7 +52,7 @@ elseif($page == 'mysqls')
'description' => $lng['mysql']['databasedescription']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_DATABASES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `id`, `databasename`, `description`, `dbserver` FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -62,17 +62,24 @@ elseif($page == 'mysqls')
$count = 0;
$mysqls = '';
// Begin root-session
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
unset($db_root->password);
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
$row = htmlentities_array($row);
$mbdata = $db_root->query_first("SELECT SUM( data_length + index_length) / 1024 / 1024 'MB' FROM information_schema.TABLES WHERE table_schema = '" . $db_root->escape($row['databasename']) . "' GROUP BY table_schema ;");
$row['size'] = number_format($mbdata['MB'], 3, '.', '');
eval("\$mysqls.=\"" . getTemplate("mysql/mysqls_database") . "\";");
$count++;
}
$i++;
}
$db_root->close();
// End root-session
$mysqls_count = $db->num_rows($result);
eval("echo \"" . getTemplate("mysql/mysqls") . "\";");
@@ -80,7 +87,7 @@ elseif($page == 'mysqls')
elseif($action == 'delete'
&& $id != 0)
{
$result = $db->query_first('SELECT `id`, `databasename`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
$result = $db->query_first('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
if(isset($result['databasename'])
&& $result['databasename'] != '')
@@ -126,7 +133,11 @@ elseif($page == 'mysqls')
}
else
{
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['databasename']);
$dbnamedesc = $result['databasename'];
if(isset($result['description']) && $result['description'] != '') {
$dbnamedesc.= ' ('.$result['description'].')';
}
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc);
}
}
}
@@ -139,6 +150,13 @@ elseif($page == 'mysqls')
&& $_POST['send'] == 'send')
{
$password = validate($_POST['mysql_password'], 'password');
$password = validatePassword($password);
$sendinfomail = intval($_POST['sendinfomail']);
if($sendinfomail != 1)
{
$sendinfomail = 0;
}
if($password == '')
{
@@ -184,6 +202,53 @@ elseif($page == 'mysqls')
$databasedescription = validate($_POST['description'], 'description');
$result = $db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($username) . '", "' . $db->escape($databasedescription) . '", "' . $db->escape($dbserver) . '")');
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1, `mysql_lastaccountnumber`=`mysql_lastaccountnumber`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
if($sendinfomail == 1)
{
$pma = $lng['admin']['notgiven'];
if($settings['panel']['phpmyadmin_url'] != '')
{
$pma = $settings['panel']['phpmyadmin_url'];
}
$replace_arr = array(
'CUST_NAME' => getCorrectUserSalutation($userinfo),
'DB_NAME' => $username,
'DB_PASS' => $password,
'DB_DESC' => $databasedescription,
'DB_SRV' => $sql_root[$dbserver]['host'],
'PMA_URI' => $pma
);
$def_language = $userinfo['def_language'];
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_database_by_customer_subject\'');
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_subject']), $replace_arr));
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_database_by_customer_mailbody\'');
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_body']['main']), $replace_arr));
$_mailerror = false;
try {
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $userinfo['email']);
}
$mail->ClearAddresses();
}
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
@@ -196,6 +261,14 @@ elseif($page == 'mysqls')
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
}
#$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);
$title = $mysql_add_data['mysql_add']['title'];
$image = $mysql_add_data['mysql_add']['image'];
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
}
}
@@ -217,13 +290,14 @@ elseif($page == 'mysqls')
&& $_POST['send'] == 'send')
{
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
$password = validate($_POST['mysql_password'], 'password');
if($password != '')
{
// Begin root-session
// validate password
$password = validatePassword($password);
// Begin root-session
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
unset($db_root->password);
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
@@ -246,10 +320,16 @@ elseif($page == 'mysqls')
}
else
{
$mysql_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_edit.php';
$mysql_edit_form = htmlform::genHTMLForm($mysql_edit_data);
$title = $mysql_edit_data['mysql_edit']['title'];
$image = $mysql_edit_data['mysql_edit']['image'];
eval("echo \"" . getTemplate("mysql/mysqls_edit") . "\";");
}
}
}
}
?>
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -37,7 +37,7 @@ elseif(isset($_GET['id']))
if($page == 'overview')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets");
eval("echo \"" . getTemplate("ticket/ticket") . "\";");
eval("echo \"" . getTemplate("tickets/ticket") . "\";");
}
elseif($page == 'tickets')
{
@@ -98,12 +98,13 @@ elseif($page == 'tickets')
$cananswer = 0;
}
$row['subject'] = html_entity_decode($row['subject']);
if(strlen($row['subject']) > 20)
{
$row['subject'] = substr($row['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";");
eval("\$tickets.=\"" . getTemplate("tickets/tickets_tickets") . "\";");
$count++;
}
@@ -156,7 +157,7 @@ elseif($page == 'tickets')
}
$ticketsopen = (int)$opentickets['count'];
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
}
elseif($action == 'new')
{
@@ -209,12 +210,12 @@ elseif($page == 'tickets')
else
{
$categories = '';
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
if(isset($result['name'])
&& $result['name'] != '')
{
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
while($row = $db->fetch_array($result2))
{
@@ -226,9 +227,9 @@ elseif($page == 'tickets')
$categories = makeoption($lng['ticket']['no_cat'], '0');
}
$priorities = makeoption($lng['ticket']['unf_high'], '1');
$priorities.= makeoption($lng['ticket']['unf_normal'], '2');
$priorities.= makeoption($lng['ticket']['unf_low'], '3');
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['low'], '3', $settings['ticket']['default_priority']);
$ticketsopen = 0;
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `customerid` = "' . $userinfo['customerid'] . '"
@@ -246,7 +247,14 @@ elseif($page == 'tickets')
}
$ticketsopen = (int)$opentickets['count'];
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
$ticket_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/tickets/formfield.ticket_add.php';
$ticket_add_form = htmlform::genHTMLForm($ticket_add_data);
$title = $ticket_add_data['ticket_add']['title'];
$image = $ticket_add_data['ticket_add']['image'];
eval("echo \"" . getTemplate("tickets/tickets_new") . "\";");
}
}
else
@@ -326,7 +334,7 @@ elseif($page == 'tickets')
$subject = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
$row = $db->fetch_array($result);
@@ -348,7 +356,7 @@ elseif($page == 'tickets')
$subject = $subticket->Get('subject');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
@@ -359,7 +367,13 @@ elseif($page == 'tickets')
// don't forget the main-ticket!
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/customer/tickets/formfield.ticket_reply.php';
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
$title = $ticket_reply_data['ticket_reply']['title'];
$image = $ticket_reply_data['ticket_reply']['image'];
eval("echo \"" . getTemplate("tickets/tickets_reply") . "\";");
}
}
elseif($action == 'close'

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -174,17 +174,22 @@ if(!is_null($month)
}
else
{
$result = $db->query("(SELECT SUM(`http`) as sum FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid` = '" . $userinfo['customerid'] . "'
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) UNION
(SELECT SUM(`ftp_up`+`ftp_down`) FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid` = '" . $userinfo['customerid'] . "'
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) UNION
(SELECT SUM(`mail`) FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid` = '" . $userinfo['customerid'] . "'
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) ORDER BY sum DESC LIMIT 1");
$row = $db->fetch_array($result);
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));;
$result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`)
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid`='" . $userinfo['customerid'] . "'
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
$nums = mysql_num_rows($result);
if($nums > 0)
{
$row = mysql_fetch_row($result);
rsort($row);
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));
} else {
// no records yet
$traf['max'] = 0;
}
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");

View File

Before

Width:  |  Height:  |  Size: 51 B

After

Width:  |  Height:  |  Size: 51 B

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
images/Classic/default.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/Classic/error.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/Classic/info.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
images/Classic/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 62 B

After

Width:  |  Height:  |  Size: 62 B

View File

Before

Width:  |  Height:  |  Size: 60 B

After

Width:  |  Height:  |  Size: 60 B

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 86 B

After

Width:  |  Height:  |  Size: 86 B

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 69 B

After

Width:  |  Height:  |  Size: 69 B

View File

Before

Width:  |  Height:  |  Size: 66 B

After

Width:  |  Height:  |  Size: 66 B

View File

Before

Width:  |  Height:  |  Size: 82 B

After

Width:  |  Height:  |  Size: 82 B

View File

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 105 B

View File

Before

Width:  |  Height:  |  Size: 827 B

After

Width:  |  Height:  |  Size: 827 B

BIN
images/Froxlor/bar.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/Froxlor/bargrey.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/Froxlor/barred.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/Froxlor/bg_cover.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

BIN
images/Froxlor/header_g.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 B

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