Compare commits

...

436 Commits

Author SHA1 Message Date
Michael Kaufmann (d00p)
c97b3f3e0c add note that opendkim is currently not supported
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-27 11:45:21 +02:00
Michael Kaufmann
e50e9cbd8d Merge pull request #103 from misdoro/master
fix regex-pattern in validateDomain to allow IDN TLDs (punycode), fixes #640
2013-08-25 22:49:41 -07:00
misdoro
d90af956de Update function.validateDomain.php
Fix pattern to support IDN TLDs, like .рф that becomes .xn--p1ai in punycode at this point. (inserted as .рф in domain edit page)
2013-08-25 20:46:08 +02:00
Robert Förster (Dessa)
ef688bd0c0 add htmlpurifier Serializer dir to .gitignore.
Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2013-08-20 07:12:08 +02:00
Michael Kaufmann (d00p)
022b83d881 remove notice of undefined variable when adding/editing a customer as admin
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-20 06:55:56 +02:00
Michael Kaufmann (d00p)
14bd4c927b show real loginname instead of just <froxloruser> so people won't get confused, refs #1251
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-19 12:23:28 +02:00
Michael Kaufmann (d00p)
6bfec9dc40 adding cipher-order to ssl-vhosts when using apache, thx to Marcel
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-19 11:20:39 +02:00
Michael Kaufmann (d00p)
60ddcc221c fix undefined index 'openbasedir' when creating a subdomain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-18 21:17:41 +02:00
Michael Kaufmann (d00p)
c11460cfcc use correct html-characters to display lower-than and greater-than signs in backup-info-text, fixes #1251
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-18 13:00:07 +02:00
Michael Kaufmann (d00p)
a181954864 remove duplicate, old and wrong language entry in dutch language file, fixes #1250
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-18 12:07:08 +02:00
Michael Kaufmann (d00p)
dc57eb1394 remove unknown user 'froxlorftp' and use nobody/nogroup (default) for proftpd on gentoo, fixes #1249
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-18 12:00:28 +02:00
Michael Kaufmann (d00p)
a33b3b3fd9 remove duplicate config-entry in proftpd.conf for gentoo, fixes #1247
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-08-18 11:55:43 +02:00
Michael Kaufmann (d00p)
e4a4755ed0 add missing icon, thx to novaflash
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-19 12:08:45 +02:00
Michael Kaufmann (d00p)
ab8975ccc3 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-07-14 11:24:17 +02:00
Michael Kaufmann (d00p)
d4d02bfa7d fix undefined variables and domain-edit of php-config when FPM is enabled
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-14 11:23:52 +02:00
Robert Förster (Dessa)
fbb4c81e53 - put proper smtpd_relay_restrictions also in gentoo template, postfix 2.10 is stable for a while now (and the only available version besides masked 2.11 anyway)
- fix 80 char "limit" per line for wheezy postfix templates (only cosmetic)
2013-07-12 09:22:21 +02:00
Michael Kaufmann (d00p)
6d06187df4 make e-mail address and compare-address lowercase, thx to DasTho from the forum
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-10 13:45:52 +02:00
Michael Kaufmann (d00p)
1870a88f6b fix possible undefined variable in error-message, thx to Dessa
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-09 21:46:56 +02:00
Michael Kaufmann (d00p)
d02c739640 fix proftpd-config-templates for debian wheezy, thx to finnq & Spacey
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-09 20:54:06 +02:00
Robert Förster (Dessa)
26326937b1 (probably) fixed postfix configuration
Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2013-07-08 18:40:10 +02:00
Michael Kaufmann (d00p)
3267cdfda7 fix undefined variable in wheezy-config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-05 10:55:42 +02:00
Michael Kaufmann (d00p)
b7a4b69ee0 enhance php-fpm configuration options to use custom-ini-settings, refs #587
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-05 10:54:52 +02:00
Michael Kaufmann
69e2c7dee1 Merge pull request #101 from 23networks/master
"White text on light background"-fix
2013-07-04 10:24:01 -07:00
Michael Kaufmann (d00p)
7589e7a21b fix incorrect database-field regarding Maildir setting, fixes #1242 ; set version to 0.9.29-rc1
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-04 19:20:20 +02:00
Michael Kaufmann (d00p)
272de00af2 php-fpm--config 'log_errors_max_len' belongs to php_value and not php_flag, fixes #1241
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-04 19:03:06 +02:00
Michael Kaufmann (d00p)
ff66f62831 Merge branch 'master' of github.com:Froxlor/Froxlor 2013-07-03 11:34:45 +02:00
Michael Kaufmann (d00p)
68fb822160 give possibility to change php.ini-values for fpm-pool configurations (only pre-defined sections are possible for now), refs #587
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-07-03 11:34:34 +02:00
Johannes Matheis
c00edd399e override fg color to obtain readability 2013-07-03 08:47:42 +00:00
Robert Förster (Dessa)
a75dad35dd massive update of the wheezy templates, but take them with a grain of salt for now, in particular:
- dkim is broken (pending code changes, this affects *everyone* with opendkim i suppose)
- it has received *no* testing (yet)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Andreas Burchert (scarya) <scarya@froxlor.org>
2011-11-25 11:16:44 +01:00
Florian Aders (EleRas)
a177c0558e Fixing vuln. in php + nginx - config, thx altmir for reporting, fixes #980
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-19 11:39:40 +01:00
886 changed files with 18893 additions and 18644 deletions

8
.gitignore vendored
View File

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

11
COPYING
View File

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

View File

@@ -33,7 +33,7 @@ return array(
'save_method' => 'storeSettingField',
),
'panel_default_theme' => array(
'label' => $lng['serversettings']['default_theme'],
'label' => array('title' => $lng['panel']['theme'], 'description' => $lng['serversettings']['default_theme']),
'settinggroup' => 'panel',
'varname' => 'default_theme',
'type' => 'option',
@@ -42,6 +42,22 @@ return array(
'option_options_method' => 'getThemes',
'save_method' => 'storeSettingField',
),
'panel_allow_theme_change_customer' => array(
'label' => $lng['serversettings']['panel_allow_theme_change_customer'],
'settinggroup' => 'panel',
'varname' => 'allow_theme_change_customer',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'panel_allow_theme_change_admin' => array(
'label' => $lng['serversettings']['panel_allow_theme_change_admin'],
'settinggroup' => 'panel',
'varname' => 'allow_theme_change_admin',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField'
),
'panel_natsorting' => array(
'label' => $lng['serversettings']['natsorting'],
'settinggroup' => 'panel',
@@ -77,6 +93,23 @@ return array(
'option_options' => array('Manual' => $lng['serversettings']['manual'], 'Dropdown' => $lng['serversettings']['dropdown']),
'save_method' => 'storeSettingField',
),
'use_webfonts' => array(
'label' => $lng['serversettings']['enablewebfonts'],
'settinggroup' => 'panel',
'varname' => 'use_webfonts',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'webfont' => array(
'label' => $lng['serversettings']['definewebfont']['title'],
'settinggroup' => 'panel',
'varname' => 'webfont',
'type' => 'string',
'default' => 'Numans',
'string_emptyallowed' => false,
'save_method' => 'storeSettingField',
),
'panel_adminmail' => array(
'label' => $lng['serversettings']['adminmail'],
'settinggroup' => 'panel',
@@ -177,6 +210,14 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
),
'panel_phpconfigs_hidestdsubdomain' => array(
'label' => $lng['serversettings']['panel_phpconfigs_hidestdsubdomain'],
'settinggroup' => 'panel',
'varname' => 'phpconfigs_hidestdsubdomain',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
),
),
),

View File

@@ -32,6 +32,14 @@ return array(
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkPathConflicts'
),
'system_documentroot_use_default_value' => array(
'label' => $lng['serversettings']['documentroot_use_default_value'],
'settinggroup' => 'system',
'varname' => 'documentroot_use_default_value',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_ipaddress' => array(
'label' => $lng['serversettings']['ipaddress'],
'settinggroup' => 'system',
@@ -138,7 +146,7 @@ return array(
'varname' => 'report_webmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 99,
'int_max' => 150,
'default' => 90,
'save_method' => 'storeSettingField',
),
@@ -148,7 +156,7 @@ return array(
'varname' => 'report_trafficmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 99,
'int_max' => 150,
'default' => 90,
'save_method' => 'storeSettingField',
),
@@ -159,7 +167,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
),
),
),
),

View File

@@ -33,6 +33,15 @@ return array(
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_apache_24' => array(
'label' => $lng['serversettings']['apache_24'],
'settinggroup' => 'system',
'varname' => 'apache24',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_httpuser' => array(
'label' => $lng['admin']['webserver_user'],
'settinggroup' => 'system',
@@ -85,6 +94,15 @@ return array(
'default' => '/var/customers/logs/',
'save_method' => 'storeSettingField',
),
'system_customersslpath' => array(
'label' => $lng['serversettings']['customerssl_directory'],
'settinggroup' => 'system',
'varname' => 'customer_ssl_path',
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/apache2/ssl/',
'save_method' => 'storeSettingField',
),
'system_phpappendopenbasedir' => array(
'label' => $lng['serversettings']['phpappendopenbasedir'],
'settinggroup' => 'system',
@@ -124,7 +142,7 @@ return array(
'label' => $lng['serversettings']['phpreload_command'],
'settinggroup' => 'system',
'varname' => 'phpreload_command',
'type' => (getSetting('phpfpm', 'enabled') == '1') ? 'hidden' : 'string',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
@@ -133,19 +151,20 @@ return array(
'label' => $lng['serversettings']['nginx_php_backend'],
'settinggroup' => 'system',
'varname' => 'nginx_php_backend',
'type' => (getSetting('phpfpm', 'enabled') == '1') ? 'hidden' : 'string',
'type' => 'string',
'default' => '127.0.0.1:8888',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'system_mod_log_sql' => array(
'label' => $lng['serversettings']['mod_log_sql'],
'settinggroup' => 'system',
'varname' => 'mod_log_sql',
'type' => 'bool',
'default' => false,
'nginx_fastcgiparams' => array(
'label' => $lng['serversettings']['nginx_fastcgiparams'],
'settinggroup' => 'nginx',
'varname' => 'fastcgiparams',
'type' => 'string',
'string_type' => 'file',
'default' => '/etc/nginx/fastcgi_params',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
'websrv_avail' => array('nginx')
),
'defaultwebsrverrhandler_enabled' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
@@ -209,72 +228,8 @@ return array(
'option_options_method' => 'getRedirectCodes',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'lighttpd')
),
),
),
'ssl' => array(
'title' => $lng['admin']['sslsettings'],
'fields' => array(
'system_ssl_enabled' => array(
'label' => $lng['serversettings']['ssl']['use_ssl'],
'settinggroup' => 'system',
'varname' => 'use_ssl',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_ssl_cert_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
'settinggroup' => 'system',
'varname' => 'ssl_cert_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '/etc/apache2/apache2.pem',
'save_method' => 'storeSettingField',
),
'system_ssl_key_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_key_file'],
'settinggroup' => 'system',
'varname' => 'ssl_key_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '/etc/apache2/apache2.key',
'save_method' => 'storeSettingField',
),
'system_ssl_ca_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_ca_file'],
'settinggroup' => 'system',
'varname' => 'ssl_ca_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile'],
'settinggroup' => 'system',
'varname' => 'ssl_cert_chainfile',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_ssl_openssl_cnf' => array(
'label' => $lng['serversettings']['ssl']['openssl_cnf'],
'settinggroup' => 'system',
'varname' => 'openssl_cnf',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
),
),
),
),
)
)
)
)
);
?>

View File

@@ -0,0 +1,77 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'ssl' => array(
'title' => $lng['admin']['sslsettings'],
'fields' => array(
'system_ssl_enabled' => array(
'label' => $lng['serversettings']['ssl']['use_ssl'],
'settinggroup' => 'system',
'varname' => 'use_ssl',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_ssl_cert_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
'settinggroup' => 'system',
'varname' => 'ssl_cert_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '/etc/apache2/apache2.pem',
'save_method' => 'storeSettingField',
),
'system_ssl_key_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_key_file'],
'settinggroup' => 'system',
'varname' => 'ssl_key_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '/etc/apache2/apache2.key',
'save_method' => 'storeSettingField',
),
'system_ssl_ca_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_ca_file'],
'settinggroup' => 'system',
'varname' => 'ssl_ca_file',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile'],
'settinggroup' => 'system',
'varname' => 'ssl_cert_chainfile',
'type' => 'string',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
)
)
)
)
);

View File

@@ -30,7 +30,7 @@ return array(
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkFcgidPhpFpm',
'overview_option' => true
),
),
'system_mod_fcgid_configdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
'settinggroup' => 'system',
@@ -66,7 +66,7 @@ return array(
'settinggroup' => 'system',
'varname' => 'mod_fcgid_wrapper',
'type' => 'option',
'option_options' => array(0 => 'ScriptAlias', 1=> 'FCGIWrapper'),
'option_options' => array(0 => 'ScriptAlias', 1=> 'FcgidWrapper'),
'default' => 1,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
@@ -135,6 +135,14 @@ return array(
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_idle_timeout' => array(
'label' => $lng['serversettings']['mod_fcgid']['idle_timeout'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_idle_timeout',
'type' => 'int',
'default' => 30,
'save_method' => 'storeSettingField'
),
)
)
)

View File

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

View File

@@ -51,6 +51,16 @@ return array(
'default' => '/var/customers/mail/',
'save_method' => 'storeSettingField',
),
'system_vmail_maildirname' => array(
'label' => $lng['serversettings']['vmail_maildirname'],
'settinggroup' => 'system',
'varname' => 'vmail_maildirname',
'type' => 'string',
'string_type' => 'dir',
'default' => 'Maildir',
'string_emptyallowed' => true,
'save_method' => 'storeSettingField',
),
'panel_sendalternativemail' => array(
'label' => $lng['serversettings']['sendalternativemail'],
'settinggroup' => 'panel',
@@ -90,9 +100,17 @@ return array(
'type' => 'hidden',
'default' => 0,
),
'system_catchall_enabled' => array(
'label' => $lng['serversettings']['catchall_enabled'],
'settinggroup' => 'catchall',
'varname' => 'catchall_enabled',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingResetCatchall',
),
),
),
),
);
?>
?>

View File

@@ -22,6 +22,15 @@ return array(
'nameserver' => array(
'title' => $lng['admin']['nameserversettings'],
'fields' => array(
'nameserver_enable' => array(
'label' => $lng['serversettings']['bindenable'],
'settinggroup' => 'system',
'varname' => 'bind_enable',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_bindconf_directory' => array(
'label' => $lng['serversettings']['bindconf_directory'],
'settinggroup' => 'system',
@@ -59,6 +68,16 @@ return array(
'default' => '',
'save_method' => 'storeSettingField',
),
'system_axfrservers' => array(
'label' => $lng['serversettings']['axfrservers'],
'settinggroup' => 'system',
'varname' => 'axfrservers',
'type' => 'string',
'string_type' => 'validate_ip',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_dns_createmailentry' => array(
'label' => $lng['serversettings']['mail_also_with_mxservers'],
'settinggroup' => 'system',

View File

@@ -17,6 +17,8 @@
*
*/
global $settings;
return array(
'groups' => array(
'dkim' => array(
@@ -79,7 +81,10 @@ return array(
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_keylength' => array(
'label' => $lng['dkim']['dkim_keylength'],
'label' => array(
'title' => $lng['dkim']['dkim_keylength']['title'],
'description' => sprintf($lng['dkim']['dkim_keylength']['description'],$settings['dkim']['dkim_prefix'])
),
'settinggroup' => 'dkim',
'varname' => 'dkim_keylength',
'type' => 'option',

View File

@@ -59,7 +59,7 @@ return array(
'type' => 'option',
'default' => '',
'option_mode' => 'multiple',
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap', 'json' => 'json', 'ldap' => 'LDAP', 'hash' => 'hash', 'mbstring' => 'mbstring'),
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap', 'json' => 'json', 'ldap' => 'LDAP', 'hash' => 'hash', 'mbstring' => 'mbstring', 'Zend Optimizer' => 'Zend Guard'),
'save_method' => 'storeSettingApsPhpExtensions',
),
'aps_php-function' => array(

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2011 the Froxlor Team (see authors).
* Copyright (c) 2011- the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the

View File

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

View File

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

View File

@@ -48,52 +48,22 @@ if($page == 'customers'
'c.loginname' => $lng['login']['username'],
'a.loginname' => $lng['admin']['admin'],
'c.name' => $lng['customer']['name'],
'c.email' => $lng['customer']['email'],
'c.firstname' => $lng['customer']['firstname'],
'c.company' => $lng['customer']['company'],
'c.diskspace' => $lng['customer']['diskspace'],
'c.diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
'c.traffic' => $lng['customer']['traffic'],
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
'c.backup_allowed' => $lng['backup_allowed']
/*
'c.mysqls' => $lng['customer']['mysqls'],
'c.mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
'c.ftps' => $lng['customer']['ftps'],
'c.ftps_used' => $lng['customer']['ftps'] . ' (' . $lng['panel']['used'] . ')',
'c.subdomains' => $lng['customer']['subdomains'],
'c.subdomains_used' => $lng['customer']['subdomains'] . ' (' . $lng['panel']['used'] . ')',
'c.emails' => $lng['customer']['emails'],
'c.emails_used' => $lng['customer']['emails'] . ' (' . $lng['panel']['used'] . ')',
'c.email_accounts' => $lng['customer']['accounts'],
'c.email_accounts_used' => $lng['customer']['accounts'] . ' (' . $lng['panel']['used'] . ')',
'c.email_forwarders' => $lng['customer']['forwarders'],
'c.email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')',
'c.email_quota' => $lng['customer']['email_quota'],
'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
'c.deactivated' => $lng['admin']['deactivated'],
'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'],
'c.phpenabled' => $lng['admin']['phpenabled'],
'c.perlenabled' => $lng['admin']['perlenabled']
*/
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')'
);
/*
if($settings['ticket']['enabled'] == 1)
{
$fields['c.tickets'] = $lng['customer']['tickets'];
$fields['c.tickets_used'] = $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')';
if ($settings['system']['backup_enabled'] == '1') {
$field['c.backup_allowed'] = $lng['backup_allowed'];
}
if($settings['autoresponder']['autoresponder_active'] == 1)
{
$fields['c.email_autoresponder'] = $lng['customer']['autoresponder'];
$fields['c.email_autoresponder_used'] = $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')';
}
*/
$paging = new paging($userinfo, $db, TABLE_PANEL_CUSTOMERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$customers = '';
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy(false) . " " . $paging->getSqlLimit());
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy($settings['panel']['natsorting']) . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng, true);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -163,11 +133,14 @@ if($page == 'customers'
if($destination_user != '')
{
if ($result['deactivated'] == '1') {
standard_error("usercurrentlydeactivated", $destination_user);
}
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$userinfo['userid'] . "' AND `hash`='" . $db->escape($s) . "'");
$s = md5(uniqid(microtime(), 1));
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$id . "', '" . $db->escape($result['ipaddress']) . "', '" . $db->escape($result['useragent']) . "', '" . time() . "', '" . $db->escape($result['language']) . "', '0')");
$log->logAction(ADM_ACTION, LOG_INFO, "switched user and is now '" . $destination_user . "'");
redirectTo('customer_index.php', Array('s' => $s));
redirectTo('customer_index.php', Array('s' => $s), true);
}
else
{
@@ -211,7 +184,6 @@ if($page == 'customers'
{
$databases = $db->query("SELECT * FROM " . TABLE_PANEL_DATABASES . " WHERE customerid='" . (int)$id . "' ORDER BY `dbserver`");
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
unset($db_root->password);
$last_dbserver = 0;
while($row_database = $db->fetch_array($databases))
@@ -221,16 +193,20 @@ if($page == 'customers'
$db_root->query('FLUSH PRIVILEGES;');
$db_root->close();
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
unset($db_root->password);
$last_dbserver = $row_database['dbserver'];
}
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
if(mysql_get_server_info() < '5.0.2') {
// failsafe if user has been deleted manually (requires MySQL 4.1.2+)
$db_root->query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM \'' . $db_root->escape($row_database['databasename']) .'\'',false,true);
}
$host_res = $db_root->query("SELECT `Host` FROM `mysql`.`user` WHERE `User`='" . $db_root->escape($row_database['databasename']) . "'");
while($host = $db_root->fetch_array($host_res))
{
$mysql_access_host = trim($mysql_access_host);
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`',false,true);
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`',false,true);
$db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($row_database['databasename']) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"');
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
$db_root->query('DROP USER \'' . $db_root->escape($row_database['databasename']). '\'@\'' . $db_root->escape($host['Host']) . '\'', false, true);
}
$db_root->query('DROP DATABASE IF EXISTS `' . $db_root->escape($row_database['databasename']) . '`');
@@ -306,7 +282,7 @@ if($page == 'customers'
if($result['email_autoresponder'] != '-1')
{
$admin_update_query.= ", `email_autoresponder` = `email_autoresponder` - 0" . (int)$result['email_autoresponder'];
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` - 0" . (int)$result['email_autoresponder'];
}
if($result['subdomains'] != '-1')
@@ -326,7 +302,7 @@ if($page == 'customers'
if($result['aps_packages'] != '-1')
{
$admin_update_query.= ", `aps_packages` = `aps_packages` - 0" . (int)$result['aps_packages'];
$admin_update_query.= ", `aps_packages_used` = `aps_packages_used` - 0" . (int)$result['aps_packages'];
}
if(($result['diskspace'] / 1024) != '-1')
@@ -338,19 +314,18 @@ if($page == 'customers'
$db->query($admin_update_query);
$log->logAction(ADM_ACTION, LOG_INFO, "deleted user '" . $result['loginname'] . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
if(isset($_POST['delete_userfiles'])
&& (int)$_POST['delete_userfiles'] == 1)
{
if (isset($_POST['delete_userfiles'])
&& (int)$_POST['delete_userfiles'] == 1
) {
inserttask('6', $result['loginname']);
}
# Using filesystem - quota, insert a task which cleans the filesystem - quota
if ($settings['system']['diskquota_enabled'])
{
inserttask('10');
}
// Using filesystem - quota, insert a task which cleans the filesystem - quota
inserttask('10');
/*
* move old tickets to archive
@@ -620,6 +595,11 @@ if($page == 'customers'
{
standard_error('loginnameissystemaccount', $settings['customer']['accountprefix']);
}
//Additional filtering for Bug #962
if(function_exists('posix_getpwnam') && !in_array("posix_getpwnam",explode(",",ini_get('disable_functions'))) && posix_getpwnam($loginname)) {
standard_error('loginnameissystemaccount', $settings['customer']['accountprefix']);
}
}
else
{
@@ -783,13 +763,10 @@ if($page == 'customers'
$log->logAction(ADM_ACTION, LOG_INFO, "added user '" . $loginname . "'");
inserttask('2', $loginname, $guid, $guid, $store_defaultindex);
# Using filesystem - quota, insert a task which cleans the filesystem - quota
if ($settings['system']['diskquota_enabled'])
{
inserttask('10');
}
// Add htpasswd for the webalizer stats
// Using filesystem - quota, insert a task which cleans the filesystem - quota
inserttask('10');
// Add htpasswd for the webalizer stats
if(CRYPT_STD_DES == 1)
{
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
@@ -812,7 +789,8 @@ if($page == 'customers'
}
inserttask('1');
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
$cryptPassword = makeCryptPassword($password);
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($cryptPassword) . "', '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
$result = $db->query("INSERT INTO `" . TABLE_FTP_GROUPS . "` " . "(`customerid`, `groupname`, `gid`, `members`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($guid) . "', '" . $db->escape($loginname) . "')");
$result = $db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($loginname) . "', 'user', '0', '0', '0', '0', '0', '0')");
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added ftp-account for user '" . $loginname . "'");
@@ -840,7 +818,6 @@ if($page == 'customers'
"`isemaildomain` = '0', " .
"`caneditdomain` = '0', " .
"`openbasedir` = '1', " .
"`safemode` = '1', " .
"`speciallogfile` = '0', " .
"`specialsettings` = '', " .
"`add_date` = '".date('Y-m-d')."'");
@@ -916,14 +893,6 @@ if($page == 'customers'
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
#$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', '1');
#$email_imap = makeyesno('email_imap', '1', '0', '1');
#$email_pop3 = makeyesno('email_pop3', '1', '0', '1');
#$sendpassword = makeyesno('sendpassword', '1', '0', '1');
#$phpenabled = makeyesno('phpenabled', '1', '0', '1');
#$perlenabled = makeyesno('perlenabled', '1', '0', '0');
#$store_defaultindex = makeyesno('store_defaultindex', '1', '0', '1');
$backup_allowed = makeyesno('backup_allowed', '1', '0', '0');
$gender_options = makeoption($lng['gender']['undef'], 0, true, true, true);
$gender_options .= makeoption($lng['gender']['male'], 1, null, true, true);
@@ -1188,7 +1157,7 @@ if($page == 'customers'
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
}
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`, `add_date`) " . "VALUES ('" . $db->escape($_stdsubdomain) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '', '".date('Y-m-d')."')");
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `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', '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'] . "'");
@@ -1227,14 +1196,13 @@ if($page == 'customers'
if($deactivated != $result['deactivated'])
{
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `postfix`='" . (($deactivated) ? 'N' : 'Y') . "', `pop3`='" . (($deactivated) ? '0' : '1') . "', `imap`='" . (($deactivated) ? '0' : '1') . "' WHERE `customerid`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `postfix`='" . (($deactivated) ? 'N' : 'Y') . "', `pop3`='" . (($deactivated) ? '0' : (int)$result['pop3']) . "', `imap`='" . (($deactivated) ? '0' : (int)$result['imap']) . "' WHERE `customerid`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `login_enabled`='" . (($deactivated) ? 'N' : 'Y') . "' WHERE `customerid`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `deactivated`='" . (int)$deactivated . "' WHERE `customerid`='" . (int)$id . "'");
/* Retrieve customer's databases */
$databases = $db->query("SELECT * FROM " . TABLE_PANEL_DATABASES . " WHERE customerid='" . (int)$id . "' ORDER BY `dbserver`");
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
unset($db_root->password);
$last_dbserver = 0;
/* For each of them */
@@ -1245,7 +1213,6 @@ if($page == 'customers'
$db_root->query('FLUSH PRIVILEGES;');
$db_root->close();
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
unset($db_root->password);
$last_dbserver = $row_database['dbserver'];
}
@@ -1256,8 +1223,8 @@ if($page == 'customers'
/* Prevent access, if deactivated */
if($deactivated)
{
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
// failsafe if user has been deleted manually (requires MySQL 4.1.2+)
$db_root->query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM \'' . $db_root->escape($row_database['databasename']) .'\'',false,true);
}
else /* Otherwise grant access */
{
@@ -1293,11 +1260,8 @@ if($page == 'customers'
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `gender`='" . $db->escape($gender) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "', `backup_allowed`='" . $db->escape($backup_allowed) . "' WHERE `customerid`='" . (int)$id . "'");
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
# Using filesystem - quota, insert a task which cleans the filesystem - quota
if ($settings['system']['diskquota_enabled'])
{
inserttask('10');
}
// Using filesystem - quota, insert a task which cleans the filesystem - quota
inserttask('10');
if($mysqls != '-1'
|| $result['mysqls'] != '-1')
@@ -1582,13 +1546,6 @@ if($page == 'customers'
$result['aps_packages'] = '';
}
#$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', (($result['standardsubdomain'] != '0') ? '1' : '0'));
#$phpenabled = makeyesno('phpenabled', '1', '0', $result['phpenabled']);
#$perlenabled = makeyesno('perlenabled', '1', '0', $result['perlenabled']);
#$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
#$email_imap = makeyesno('email_imap', '1', '0', $result['imap']);
#$email_pop3 = makeyesno('email_pop3', '1', '0', $result['pop3']);
$backup_allowed = makeyesno('backup_allowed', '1', '0', $result['backup_allowed']);
$result = htmlentities_array($result);
$gender_options = makeoption($lng['gender']['undef'], 0, ($result['gender'] == '0' ? true : false), true, true);

View File

@@ -194,7 +194,10 @@ if($page == 'domains'
$log->logAction(ADM_ACTION, LOG_INFO, "deleted domain/subdomains (#" . $result['id'] . ")");
updateCounters();
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
elseif ($alias_check['count'] > 0) {
@@ -278,9 +281,16 @@ if($page == 'domains'
if($userinfo['change_serversettings'] == '1')
{
$isbinddomain = intval($_POST['isbinddomain']);
$caneditdomain = intval($_POST['caneditdomain']);
$zonefile = validate($_POST['zonefile'], 'zonefile');
$caneditdomain = isset($_POST['caneditdomain']) ? intval($_POST['caneditdomain']) : 0;
$isbinddomain = '0';
$zonefile = '';
if ($settings['system']['bind_enable'] == '1') {
if (isset($_POST['isbinddomain'])) {
$isbinddomain = intval($_POST['isbinddomain']);
}
$zonefile = validate($_POST['zonefile'], 'zonefile');
}
if(isset($_POST['dkim']))
{
@@ -294,11 +304,13 @@ if($page == 'domains'
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
validate($_POST['documentroot'], 'documentroot');
// If path is empty and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
// set default path to subdomain or domain name
if(isset($_POST['documentroot'])
&& $_POST['documentroot'] != '')
&& ($_POST['documentroot'] != ''))
{
if(substr($_POST['documentroot'], 0, 1) != '/'
&& !preg_match('/^https?\:\/\//', $_POST['documentroot']))
&& !preg_match('/^https?\:\/\//', $_POST['documentroot']))
{
$documentroot.= '/' . $_POST['documentroot'];
}
@@ -307,10 +319,19 @@ if($page == 'domains'
$documentroot = $_POST['documentroot'];
}
}
elseif (isset($_POST['documentroot'])
&& ($_POST['documentroot'] == '')
&& ($settings['system']['documentroot_use_default_value'] == 1))
{
$documentroot = makeCorrectDir($customer['documentroot'] . '/' . $domain);
}
}
else
{
$isbinddomain = '1';
$isbinddomain = '0';
if ($settings['system']['bind_enable'] == '1') {
$isbinddomain = '1';
}
$caneditdomain = '1';
$zonefile = '';
$dkim = '1';
@@ -320,10 +341,9 @@ if($page == 'domains'
if($userinfo['caneditphpsettings'] == '1'
|| $userinfo['change_serversettings'] == '1')
{
$openbasedir = intval($_POST['openbasedir']);
$safemode = intval($_POST['safemode']);
$openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0;
if((int)$settings['system']['mod_fcgid'] == 1)
if((int)$settings['system']['mod_fcgid'] == 1 || (int)$settings['phpfpm']['enabled'] == 1)
{
$phpsettingid = (int)$_POST['phpsettingid'];
$phpsettingid_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$phpsettingid);
@@ -335,12 +355,21 @@ if($page == 'domains'
standard_error('phpsettingidwrong');
}
$mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', ''));
$mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', ''));
if( (int)$settings['system']['mod_fcgid'] == 1) {
$mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', ''));
$mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', ''));
} else {
$mod_fcgid_starter = '-1';
$mod_fcgid_maxrequests = '-1';
}
}
else
{
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
if ((int)$settings['phpfpm']['enabled'] == 1) {
$phpsettingid = $settings['phpfpm']['defaultini'];
} else {
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
}
$mod_fcgid_starter = '-1';
$mod_fcgid_maxrequests = '-1';
}
@@ -348,8 +377,11 @@ if($page == 'domains'
else
{
$openbasedir = '1';
$safemode = '1';
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
if ((int)$settings['phpfpm']['enabled'] == 1) {
$phpsettingid = $settings['phpfpm']['defaultini'];
} else {
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
}
$mod_fcgid_starter = '-1';
$mod_fcgid_maxrequests = '-1';
}
@@ -380,7 +412,7 @@ if($page == 'domains'
&& isset($_POST['ssl_ipandport'])
&& $_POST['ssl'] != '0')
{
$ssl = (int)$_POST['ssl'];
$ssl = 1; // if ssl is set and != 0 it can only be 1
$ssl_redirect = 0;
if (isset($_POST['ssl_redirect'])) {
$ssl_redirect = (int)$_POST['ssl_redirect'];
@@ -430,11 +462,6 @@ if($page == 'domains'
$openbasedir = '0';
}
if($safemode != '1')
{
$safemode = '0';
}
if($speciallogfile != '1')
{
$speciallogfile = '0';
@@ -535,7 +562,6 @@ if($page == 'domains'
'ssl_redirect' => $ssl_redirect,
'ssl_ipandport' => $ssl_ipandport,
'openbasedir' => $openbasedir,
'safemode' => $safemode,
'phpsettingid' => $phpsettingid,
'mod_fcgid_starter' => $mod_fcgid_starter,
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
@@ -565,12 +591,15 @@ if($page == 'domains'
$question_nr++;
}
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `ismainbutsubto`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "', '".(int)$issubof."')");
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `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($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 . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
@@ -670,21 +699,14 @@ if($page == 'domains'
while($row = $db->fetch_array($configs))
{
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true);
if ((int)$settings['phpfpm']['enabled'] == 1) {
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['phpfpm']['defaultini'], true, true);
} else {
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true);
}
}
#$isbinddomain = makeyesno('isbinddomain', '1', '0', '1');
#$isemaildomain = makeyesno('isemaildomain', '1', '0', '1');
#$email_only = makeyesno('email_only', '1', '0', '0');
$subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['always'], '3', '0', true, true);
#$dkim = makeyesno('dkim', '1', '0', '1');
#$wwwserveralias = makeyesno('wwwserveralias', '1', '0', '1');
#$caneditdomain = makeyesno('caneditdomain', '1', '0', '1');
#$openbasedir = makeyesno('openbasedir', '1', '0', '1');
#$safemode = makeyesno('safemode', '1', '0', '1');
#$speciallogfile = makeyesno('speciallogfile', '1', '0', '0');
#$ssl = makeyesno('ssl', '1', '0', '0');
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', '0');
$add_date = date('Y-m-d');
$domain_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_add.php';
@@ -783,7 +805,7 @@ if($page == 'domains'
$aliasdomain = intval($_POST['alias']);
$issubof = intval($_POST['issubof']);
$subcanemaildomain = intval($_POST['subcanemaildomain']);
$caneditdomain = intval($_POST['caneditdomain']);
$caneditdomain = isset($_POST['caneditdomain']) ? intval($_POST['caneditdomain']) : 0;
$registration_date = trim($_POST['registration_date']);
$registration_date = validate($registration_date, 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));
@@ -799,14 +821,25 @@ if($page == 'domains'
if(isset($_POST['wwwserveralias']))
$wwwserveralias = intval($_POST['wwwserveralias']);
$speciallogfile = 0;
if(isset($_POST['speciallogfile']))
$speciallogfile = intval($_POST['speciallogfile']);
if($userinfo['change_serversettings'] == '1')
{
$isbinddomain = intval($_POST['isbinddomain']);
$zonefile = validate($_POST['zonefile'], 'zonefile');
$isbinddomain = $result['isbinddomain'];
$zonefile = $result['zonefile'];
if ($settings['system']['bind_enable'] == '1') {
if (isset($_POST['isbinddomain'])) {
$isbinddomain = (int)$_POST['isbinddomain'];
}
$zonefile = validate($_POST['zonefile'], 'zonefile');
}
if($settings['dkim']['use_dkim'] == '1')
{
$dkim = intval($_POST['dkim']);
$dkim = isset($_POST['dkim']) ? 1 : 0;
}
else
{
@@ -818,7 +851,16 @@ if($page == 'domains'
if($documentroot == '')
{
$documentroot = $customer['documentroot'];
// If path is empty and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
// set default path to subdomain or domain name
if ($settings['system']['documentroot_use_default_value'] == 1)
{
$documentroot = makeCorrectDir($customer['documentroot'] . '/' . $result['domain']);
}
else
{
$documentroot = $customer['documentroot'];
}
}
if(!preg_match('/^https?\:\/\//', $documentroot)
@@ -839,10 +881,9 @@ if($page == 'domains'
if($userinfo['caneditphpsettings'] == '1'
|| $userinfo['change_serversettings'] == '1')
{
$openbasedir = intval($_POST['openbasedir']);
$safemode = intval($_POST['safemode']);
$openbasedir = isset($_POST['openbasedir']) ? intval($_POST['openbasedir']) : 0;
if((int)$settings['system']['mod_fcgid'] == 1)
if((int)$settings['system']['mod_fcgid'] == 1 || (int)$settings['phpfpm']['enabled'] == 1)
{
$phpsettingid = (int)$_POST['phpsettingid'];
$phpsettingid_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$phpsettingid);
@@ -854,8 +895,13 @@ if($page == 'domains'
standard_error('phpsettingidwrong');
}
$mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', ''));
$mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', ''));
if ((int)$settings['system']['mod_fcgid'] == 1) {
$mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', ''));
$mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', ''));
} else {
$mod_fcgid_starter = $result['mod_fcgid_starter'];
$mod_fcgid_maxrequests = $result['mod_fcgid_maxrequests'];
}
}
else
{
@@ -867,7 +913,6 @@ if($page == 'domains'
else
{
$openbasedir = $result['openbasedir'];
$safemode = $result['safemode'];
$phpsettingid = $result['phpsettingid'];
$mod_fcgid_starter = $result['mod_fcgid_starter'];
$mod_fcgid_maxrequests = $result['mod_fcgid_maxrequests'];
@@ -899,7 +944,7 @@ if($page == 'domains'
&& isset($_POST['ssl_ipandport'])
&& $_POST['ssl'] != '0')
{
$ssl = (int)$_POST['ssl'];
$ssl = 1; // if ssl is set and != 0, it can only be 1
$ssl_redirect = 0;
if (isset($_POST['ssl_redirect'])) {
$ssl_redirect = (int)$_POST['ssl_redirect'];
@@ -931,11 +976,6 @@ if($page == 'domains'
$openbasedir = '0';
}
if($safemode != '1')
{
$safemode = '0';
}
if($isbinddomain != '1')
{
$isbinddomain = '0';
@@ -1013,13 +1053,13 @@ if($page == 'domains'
'ssl_redirect' => $ssl_redirect,
'ssl_ipandport' => $ssl_ipandport,
'openbasedir' => $openbasedir,
'safemode' => $safemode,
'phpsettingid' => $phpsettingid,
'mod_fcgid_starter' => $mod_fcgid_starter,
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
'specialsettings' => $specialsettings,
'registration_date' => $registration_date,
'issubof' => $issubof
'issubof' => $issubof,
'speciallogfile' => $speciallogfile
);
$security_questions = array(
@@ -1048,18 +1088,20 @@ if($page == 'domains'
|| $ssl_ipandport != $result['ssl_ipandport']
|| $wwwserveralias != $result['wwwserveralias']
|| $openbasedir != $result['openbasedir']
|| $safemode != $result['safemode']
|| $phpsettingid != $result['phpsettingid']
|| $mod_fcgid_starter != $result['mod_fcgid_starter']
|| $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests']
|| $specialsettings != $result['specialsettings']
|| $aliasdomain != $result['aliasdomain']
|| $issubof != $result['ismainbutsubto']
|| $email_only != $result['email_only'])
|| $email_only != $result['email_only']
|| ($speciallogfile != $result['speciallogfile'] && $_POST['speciallogverified'] == '1'))
{
inserttask('1');
}
if($speciallogfile != $result['speciallogfile'] && $_POST['speciallogverified'] != '1') $speciallogfile = $result['speciallogfile'];
if($isbinddomain != $result['isbinddomain']
|| $zonefile != $result['zonefile']
|| $dkim != $result['dkim']
@@ -1105,7 +1147,7 @@ if($page == 'domains'
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$result['adminid'] . "' ");
}
$ssfs = isset($_POST['specialsettingsforsubdomains']) ? intval($_POST['specialsettingsforsubdomains']) : 1;
$ssfs = isset($_POST['specialsettingsforsubdomains']) ? 1 : 0;
if($ssfs == 1)
{
$upd_specialsettings = ", `specialsettings`='" . $db->escape($specialsettings) . "' ";
@@ -1117,8 +1159,8 @@ if($page == 'domains'
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
}
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "', `ismainbutsubto`='" . (int)$issubof . "' WHERE `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
$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) . "', `speciallogfile`='" . $db->escape($speciallogfile) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "', `ismainbutsubto`='" . (int)$issubof . "' WHERE `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `speciallogfile`='" . $db->escape($speciallogfile) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
$redirect_props = Array(
'page' => $page,
@@ -1218,20 +1260,11 @@ if($page == 'domains'
}
$result['specialsettings'] = $result['specialsettings'];
#$isbinddomain = makeyesno('isbinddomain', '1', '0', $result['isbinddomain']);
#$wwwserveralias = makeyesno('wwwserveralias', '1', '0', $result['wwwserveralias']);
#$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
#$email_only = makeyesno('email_only', '1', '0', $result['email_only']);
#$ssl = makeyesno('ssl', '1', '0', $result['ssl']);
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
$subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', $result['subcanemaildomain'], true, true);
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', $result['subcanemaildomain'], true, true);
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', $result['subcanemaildomain'], true, true);
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['always'], '3', $result['subcanemaildomain'], true, true);
#$dkim = makeyesno('dkim', '1', '0', $result['dkim']);
#$caneditdomain = makeyesno('caneditdomain', '1', '0', $result['caneditdomain']);
#$openbasedir = makeyesno('openbasedir', '1', '0', $result['openbasedir']);
#$safemode = makeyesno('safemode', '1', '0', $result['safemode']);
$speciallogfile = ($result['speciallogfile'] == 1 ? $lng['panel']['yes'] : $lng['panel']['no']);
$result['add_date'] = date('Y-m-d', $result['add_date']);
@@ -1243,8 +1276,6 @@ if($page == 'domains'
$phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true);
}
#$specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1');
$result = htmlentities_array($result);
$domain_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_edit.php';
@@ -1253,6 +1284,8 @@ if($page == 'domains'
$title = $domain_edit_data['domain_edit']['title'];
$image = $domain_edit_data['domain_edit']['image'];
$speciallogwarning = sprintf($lng['admin']['speciallogwarning'], $lng['admin']['delete_statistics']);
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
}
}

View File

@@ -104,11 +104,13 @@ if($page == 'overview')
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
$lookfornewversion_lable = $_version;
// add the branding so debian guys are not gettings confused
// about their version-number
$lookfornewversion_lable = $_version.$branding;
$lookfornewversion_link = $_link;
$lookfornewversion_addinfo = $_message;
if (version_compare($version, $_version) == -1) {
if (version_compare2($version, $_version) == -1) {
$isnewerversion = 1;
} else {
$isnewerversion = 0;

View File

@@ -104,7 +104,10 @@ if($page == 'ipsandports'
$db->query("DELETE FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$id . "'");
$log->logAction(ADM_ACTION, LOG_WARNING, "deleted IP/port '" . $result['ip'] . ":" . $result['port'] . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
@@ -136,11 +139,11 @@ if($page == 'ipsandports'
{
$ip = validate_ip($_POST['ip']);
$port = validate($_POST['port'], 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array('stringisempty', 'myport'));
$listen_statement = intval($_POST['listen_statement']);
$namevirtualhost_statement = intval($_POST['namevirtualhost_statement']);
$vhostcontainer = intval($_POST['vhostcontainer']);
$listen_statement = isset($_POST['listen_statement']) ? 1 : 0;
$namevirtualhost_statement = isset($_POST['namevirtualhost_statement']) ? 1 : 0;
$vhostcontainer = isset($_POST['vhostcontainer']) ? 1 : 0;
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
$vhostcontainer_servername_statement = isset($_POST['vhostcontainer_servername_statement']) ? 1 : 0;
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
$docroot = validate($_POST['docroot'], 'docroot');
if((int)$settings['system']['use_ssl'] == 1)
@@ -245,17 +248,22 @@ if($page == 'ipsandports'
$log->logAction(ADM_ACTION, LOG_WARNING, "added IP/port '" . $ip . ":" . $port . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
#$enable_ssl = makeyesno('ssl', '1', '0', '0');
#$listen_statement = makeyesno('listen_statement', '1', '0', '1');
#$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', '1');
#$vhostcontainer = makeyesno('vhostcontainer', '1', '0', '1');
#$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', '1');
/*
$enable_ssl = makeyesno('ssl', '1', '0', '0');
$listen_statement = makeyesno('listen_statement', '1', '0', '1');
$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', '1');
$vhostcontainer = makeyesno('vhostcontainer', '1', '0', '1');
$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', '1');
*/
$ipsandports_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
$ipsandports_add_form = htmlform::genHTMLForm($ipsandports_add_data);
@@ -280,16 +288,23 @@ if($page == 'ipsandports'
$port = validate($_POST['port'], 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array('stringisempty', 'myport'));
$result_checkfordouble = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($ip) . "' AND `port`='" . (int)$port . "'");
$result_sameipotherport = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($result['ip']) . "' AND `id`!='" . (int)$id . "'");
$listen_statement = intval($_POST['listen_statement']);
$namevirtualhost_statement = intval($_POST['namevirtualhost_statement']);
$vhostcontainer = intval($_POST['vhostcontainer']);
$listen_statement = isset($_POST['listen_statement']) ? 1 : 0;
$namevirtualhost_statement = isset($_POST['namevirtualhost_statement']) ? 1 : 0;
$vhostcontainer = isset($_POST['vhostcontainer']) ? 1 : 0;
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
$vhostcontainer_servername_statement = isset($_POST['vhostcontainer_servername_statement']) ? 1 : 0;
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
$docroot = validate($_POST['docroot'], 'docroot');
if((int)$settings['system']['use_ssl'] == 1)
{
$ssl = intval($_POST['ssl']);
if((int)$settings['system']['use_ssl'] == 1
/*
* check here if ssl is even checked, cause if not, we don't need
* to validate and set all the $ssl_*_file vars
*/
&& isset($_POST['ssl'])
&& $_POST['ssl'] != 0
) {
$ssl = 1;
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
@@ -391,18 +406,23 @@ if($page == 'ipsandports'
$log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
#$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
$result = htmlentities_array($result);
#$listen_statement = makeyesno('listen_statement', '1', '0', $result['listen_statement']);
#$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', $result['namevirtualhost_statement']);
#$vhostcontainer = makeyesno('vhostcontainer', '1', '0', $result['vhostcontainer']);
#$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', $result['vhostcontainer_servername_statement']);
/*
$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
$listen_statement = makeyesno('listen_statement', '1', '0', $result['listen_statement']);
$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', $result['namevirtualhost_statement']);
$vhostcontainer = makeyesno('vhostcontainer', '1', '0', $result['vhostcontainer']);
$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', $result['vhostcontainer_servername_statement']);
*/
$ipsandports_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php';
$ipsandports_edit_form = htmlform::genHTMLForm($ipsandports_edit_data);

View File

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

View File

@@ -22,79 +22,60 @@ define('AREA', 'admin');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require('./lib/init.php');
require ("./lib/init.php");
if(isset($_POST['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'message')
{
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed panel_message");
if ($page == 'message') {
if ($action == '') {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'viewed panel_message');
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if($_POST['receipient'] == 0
&& $userinfo['customers_see_all'] == '1')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to admins");
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
if ($_POST['receipient'] == 0
&& $userinfo['customers_see_all'] == '1'
) {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to admins');
$result = $db->query('SELECT `name`, `email` FROM `' . TABLE_PANEL_ADMINS . "`");
}
elseif($_POST['receipient'] == 1)
{
if($userinfo['customers_see_all'] == "1")
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to ALL customers");
} elseif ($_POST['receipient'] == 1) {
if ($userinfo['customers_see_all'] == '1') {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to ALL customers');
$result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`");
}
else
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to customers");
} else {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to customers');
$result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "` WHERE `adminid`='" . $userinfo['adminid'] . "'");
}
}
else
{
} else {
standard_error('noreceipientsgiven');
}
$subject = $_POST['subject'];
$message = wordwrap($_POST['message'], 70);
if(!empty($message))
{
if (!empty($message)) {
$mailcounter = 0;
$mail->Body = $message;
$mail->Subject = $subject;
while($row = $db->fetch_array($result))
{
while ($row = $db->fetch_array($result)) {
$mail->AddAddress($row['email'], (isset($row['firstname']) ? $row['firstname'] . ' ' : '') . $row['name']);
$mail->From = $userinfo['email'];
$mail->FromName = (isset($userinfo['firstname']) ? $userinfo['firstname'] . ' ' : '') . $userinfo['name'];
if(!$mail->Send())
{
if($mail->ErrorInfo != '')
{
if (!$mail->Send()) {
if ($mail->ErrorInfo != '') {
$mailerr_msg = $mail->ErrorInfo;
}
else
{
$mailerr_msg = $row["email"];
} else {
$mailerr_msg = $row['email'];
}
$log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $row["email"]);
$log->logAction(ADM_ACTION, LOG_ERR, 'Error sending mail: ' . $mailerr_msg);
standard_error('errorsendingmail', $row['email']);
}
$mailcounter++;
@@ -102,47 +83,34 @@ if($page == 'message')
}
redirectTo($filename, Array('page' => $page, 's' => $s, 'action' => 'showsuccess', 'sentitems' => $mailcounter));
}
else
{
} else {
standard_error('nomessagetosend');
}
}
}
if($action == 'showsuccess')
{
if ($action == 'showsuccess') {
$success = 1;
$sentitems = isset($_GET['sentitems']) ? (int)$_GET['sentitems'] : 0;
if($sentitems == 0)
{
if ($sentitems == 0) {
$successmessage = $lng['message']['noreceipients'];
}
else
{
} else {
$successmessage = str_replace('%s', $sentitems, $lng['message']['success']);
}
$action = '';
}
else
{
} else {
$success = 0;
$sentitems = 0;
$successmessage = '';
$action = '';
}
$action = '';
$receipients = '';
if($userinfo['customers_see_all'] == "1")
{
if ($userinfo['customers_see_all'] == '1') {
$receipients.= makeoption($lng['panel']['reseller'], 0);
}
$receipients.= makeoption($lng['panel']['customer'], 1);
eval("echo \"" . getTemplate("message/message") . "\";");
$receipients .= makeoption($lng['panel']['customer'], 1);
eval("echo \"" . getTemplate('message/message') . "\";");
}
?>

View File

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

View File

@@ -82,9 +82,9 @@ if(($page == 'settings' || $page == 'overview')
) {
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
inserttask('5');
inserttask('9');
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
}
}
@@ -123,10 +123,10 @@ elseif($page == 'rebuildconfigs'
{
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles");
inserttask('1');
inserttask('4');
inserttask('5');
inserttask('9');
inserttask('10');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
}
else

View File

@@ -48,17 +48,28 @@ elseif(isset($_GET['id']))
$available_templates = array(
'createcustomer',
'pop_success',
'trafficmaxpercent',
'diskmaxpercent',
'new_ticket_by_customer',
'new_ticket_for_customer',
'new_ticket_by_staff',
'new_reply_ticket_by_customer',
'new_reply_ticket_by_staff',
'new_database_by_customer',
'new_ftpaccount_by_customer',
'password_reset'
);
// only show templates of features that are enabled #1191
if ((int)$settings['system']['report_enable'] == 1) {
array_push($available_templates,
'trafficmaxpercent',
'diskmaxpercent'
);
}
if ((int)$settings['ticket']['enabled'] == 1) {
array_push($available_templates,
'new_ticket_by_customer',
'new_ticket_for_customer',
'new_ticket_by_staff',
'new_reply_ticket_by_customer',
'new_reply_ticket_by_staff'
);
}
$file_templates = array(
'index_html'
);

View File

@@ -32,6 +32,22 @@ if(isset($_POST['id']))
elseif(isset($_GET['id']))
{
$id = intval($_GET['id']);
// only check if this is not a category-id
if (!isset($_GET['page']) || (isset($_GET['page']) && $_GET['page'] != 'categories')) {
if (!$userinfo['customers_see_all']) {
/*
* Check if the current user is allowed to see the current ticket.
*/
$sql = "SELECT `id` FROM `panel_tickets` WHERE `id` = '".$id."' AND `adminid` = '".$userinfo['admindid']."'";
$result = $db->query_first($sql);
if ($result == null) {
// no rights to see the requested ticket
standard_error(array('ticketnotaccessible'));
}
}
}
}
if($page == 'tickets'
@@ -102,13 +118,17 @@ if($page == 'tickets'
if($_cid != $row['customerid'])
{
$cid = $row['customerid'];
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"');
if(isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
//$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
} else {
if(isset($usr['loginname']))
{
$customer = getCorrectFullUserDetails($usr);
$customerloginname = $usr['loginname'];
$customerid = $usr['customerid'];
}
else
{
$customer = $lng['ticket']['nonexistingcustomer'];
}
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
@@ -199,12 +219,16 @@ if($page == 'tickets'
else
{
$categories = '';
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
$where = '';
if ($userinfo['tickets_see_all'] != '1') {
$where = 'WHERE `adminid` = "' . $userinfo['adminid'] . '"';
}
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` '.$where.' ORDER BY `logicalorder`, `name` ASC');
if(isset($result['name'])
&& $result['name'] != '')
{
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` '.$where.' ORDER BY `logicalorder`, `name` ASC');
while($row = $db->fetch_array($result2))
{
@@ -302,13 +326,20 @@ if($page == 'tickets'
$isclosed = 1;
}
if($mainticket->Get('by') == '1')
if ($mainticket->Get('by') == '1')
{
$by = $lng['ticket']['staff'];
}
else
{
$by = $lng['ticket']['customer'];
$cid = $mainticket->Get('customer');
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"'
);
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>';
//$by = $lng['ticket']['customer'];
}
$subject = $mainticket->Get('subject');
@@ -330,7 +361,14 @@ if($page == 'tickets'
}
else
{
$by = $lng['ticket']['customer'];
$cid = $subticket->Get('customer');
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"'
);
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>';
//$by = $lng['ticket']['customer'];
}
$subject = $subticket->Get('subject');
@@ -437,11 +475,16 @@ elseif($page == 'categories'
'name' => $lng['ticket']['category'],
'logicalorder' => $lng['ticket']['logicalorder']
);
$where = '1'; // WHERE 1 is like no 'where-clause'
if ($userinfo['tickets_see_all'] != '1') {
$where = " `main`.`adminid` = '" . (int)$userinfo['adminid'] . "'";
}
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKET_CATS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `main`.`id`, `main`.`name`, `main`.`logicalorder`, (
SELECT COUNT(`sub`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub`
WHERE `sub`.`category` = `main`.`id`
AND `sub`.`answerto` = '0' AND `sub`.`adminid` = '" . $userinfo['adminid'] . "')
AND `sub`.`answerto` = '0' AND `sub`.`adminid` = '" . $userinfo['adminid'] . "')
as `ticketcount`, (
SELECT COUNT(`sub2`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub2`
WHERE `sub2`.`category` = `main`.`id`
@@ -449,7 +492,7 @@ elseif($page == 'categories'
AND (`sub2`.`status` = '0' OR `sub2`.`status` = '1' OR `sub2`.`status` = '2')
AND `sub2`.`adminid` = '" . $userinfo['adminid'] . "'
) as `ticketcountnotclosed`
FROM `" . TABLE_PANEL_TICKET_CATS . "` `main` WHERE `main`.`adminid` = '" . (int)$userinfo['adminid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
FROM `" . TABLE_PANEL_TICKET_CATS . "` `main` WHERE " . $where . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -486,7 +529,7 @@ elseif($page == 'categories'
if($order < 1 || $order >= 1000)
{
// use the latest available
$order = ticket::getHighestOrderNumber($db) + 1;
$order = ticket::getHighestOrderNumber($db, $userinfo['adminid']) + 1;
}
if($category == '')
@@ -502,7 +545,7 @@ elseif($page == 'categories'
}
else
{
$order = ticket::getHighestOrderNumber($db) + 1;
$order = ticket::getHighestOrderNumber($db, $userinfo['adminid']) + 1;
$category_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_new.php';
$category_new_form = htmlform::genHTMLForm($category_new_data);
@@ -660,12 +703,17 @@ elseif($page == 'archive'
if($_cid != $ticket['customerid'])
{
$cid = $ticket['customerid'];
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"');
if(isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
} else {
if(isset($usr['loginname']))
{
$customer = getCorrectFullUserDetails($usr);
$customerloginname = $usr['loginname'];
$customerid = $usr['customerid'];
}
else
{
$customer = $lng['ticket']['nonexistingcustomer'];
}
@@ -681,7 +729,7 @@ elseif($page == 'archive'
break;
case 3: $ticket['display'] = 'low';
break;
default: $ticket['display'] = 'unknown';
default: $ticket['display'] = 'unknown';
}
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
@@ -782,11 +830,18 @@ elseif($page == 'archive'
}
else
{
$by = $lng['ticket']['customer'];
$cid = $mainticket->Get('customer');
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"'
);
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>';
//$by = $lng['ticket']['customer'];
}
$subject = htmlentities($mainticket->Get('subject'));
$message = htmlentities($mainticket->Get('message'));
$subject = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
@@ -804,22 +859,28 @@ elseif($page == 'archive'
}
else
{
$by = $lng['ticket']['customer'];
$cid = $subticket->Get('customer');
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"'
);
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>';
//$by = $lng['ticket']['customer'];
}
$subject = htmlentities($subticket->Get('subject'));
$message = htmlentities($subticket->Get('message'));
$subject = $subticket->Get('subject');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', htmlentities($mainticket->Get('priority')), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', htmlentities($mainticket->Get('priority')), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', htmlentities($mainticket->Get('priority')), true, true);
$subject = htmlentities($mainticket->Get('subject'));
$subject = $mainticket->Get('subject');
$ticket_replies_count = $db->num_rows($andere) + 1;
// don't forget the main-ticket!
eval("echo \"" . getTemplate("tickets/tickets_view") . "\";");
}
elseif($action == 'delete'
@@ -839,6 +900,6 @@ elseif($page == 'archive'
ask_yesno('ticket_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
}
} else {
standard_error('nocustomerforticket');
}
?>

View File

@@ -128,7 +128,7 @@ if($page == 'overview' || $page == 'customers')
$traffic_list = $db->query("SELECT month, SUM(http+ftp_up+ftp_down+mail)*1024 AS traffic FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE year = " . (date("Y")-$years) . " AND `customerid` = '" . $customer_name['customerid'] . "' GROUP BY month ORDER BY month");
while($traffic_month = $db->fetch_array($traffic_list)) {
$virtual_host[$months[(int)$traffic_month['month']]] = size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.3f %s');
$virtual_host[$months[(int)$traffic_month['month']]] = size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.'.(int)$settings['panel']['decimal_places'].'f %s');
$totals[$months[(int)$traffic_month['month']]] += $traffic_month['traffic'];
}
eval("\$domain_list .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
@@ -138,7 +138,7 @@ if($page == 'overview' || $page == 'customers')
'name' => $lng['traffic']['months']['total'],
);
foreach($totals as $month => $bytes) {
$virtual_host[$month] = ($bytes == 0 ? '-' : size_readable($bytes, 'GiB', 'bi', '%01.3f %s'));
$virtual_host[$month] = ($bytes == 0 ? '-' : size_readable($bytes, 'GiB', 'bi', '%01.'.(int)$settings['panel']['decimal_places'].'f %s'));
}
$customerview = 0;
eval("\$total_list = sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");

View File

@@ -16,10 +16,9 @@
*/
define('AREA', 'admin');
require ("./lib/init.php");
require('./lib/init.php');
if($page == 'overview')
{
if ($page == 'overview') {
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
/**
@@ -29,13 +28,13 @@ if($page == 'overview')
*/
if (!isFroxlor()) {
if (!isset($settings['panel']['version'])
|| $settings['panel']['version'] == ''
|| $settings['panel']['version'] == ''
) {
$settings['panel']['version'] = '1.4.2.1';
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel','version','".$settings['panel']['version']."')");
}
if (!isset($settings['system']['dbversion'])
|| $settings['system']['dbversion'] == ''
|| $settings['system']['dbversion'] == ''
) {
/**
* for syscp-stable (1.4.2.1) this value has to be 0
@@ -43,11 +42,9 @@ if($page == 'overview')
* and the svn-version has its value in the database
* -> bug #54
*/
$result = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'");
if(isset($result['value']))
{
if (isset($result['value'])) {
$settings['system']['dbversion'] = (int)$result['value'];
} else {
$settings['system']['dbversion'] = 0;
@@ -55,40 +52,36 @@ if($page == 'overview')
}
}
if(hasUpdates($version))
{
if (hasUpdates($version)) {
$successful_update = false;
$message = '';
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if((isset($_POST['update_preconfig'])
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
if ((isset($_POST['update_preconfig'])
&& isset($_POST['update_changesagreed'])
&& intval($_POST['update_changesagreed']) != 0)
|| !isset($_POST['update_preconfig'])
) {
eval("echo \"" . getTemplate("update/update_start") . "\";");
eval("echo \"" . getTemplate('update/update_start') . "\";");
include_once './install/updatesql.php';
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate("update/update_end") . "\";");
eval("echo \"" . getTemplate('update/update_end') . "\";");
updateCounters();
inserttask('1');
@chmod('./lib/userdata.inc.php', 0440);
$successful_update = true;
}
else
{
$message = '<br /><strong style="color:#ff0000;">You have to agree that you have read the update notifications.</strong>';
} else {
$message = '<br /><strong style="color: red">You have to agree that you have read the update notifications.</strong>';
}
}
if(!$successful_update)
{
if (!$successful_update) {
$current_version = $settings['panel']['version'];
$new_version = $version;
@@ -96,29 +89,23 @@ if($page == 'overview')
$ui_text = str_replace('%curversion', $current_version, $ui_text);
$ui_text = str_replace('%newversion', $new_version, $ui_text);
$update_information = $ui_text;
include_once './install/updates/preconfig.php';
$preconfig = getPreConfig($current_version);
if($preconfig != '')
{
$update_information .= '<br />'.$preconfig.$message;
if ($preconfig != '') {
$update_information .= '<br />' . $preconfig . $message;
}
$update_information .= $lng['update']['update_information']['part_b'];
eval("echo \"" . getTemplate("update/index") . "\";");
eval("echo \"" . getTemplate('update/index') . "\";");
}
}
else
{
} else {
/*
* @TODO version-webcheck check here
*/
$success_message = $lng['update']['noupdatesavail'];
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate("update/noupdatesavail") . "\";");
eval("echo \"" . getTemplate('update/noupdatesavail') . "\";");
}
}
?>

563
css/jquery.jquery-ui.css Normal file
View File

@@ -0,0 +1,563 @@
/*
* jQuery UI CSS Framework 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
.ui-helper-clearfix:after { clear: both; }
.ui-helper-clearfix { zoom: 1; }
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/*
* jQuery UI Accordion 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Accordion#theming
*/
/* IE/Win - Fix animation bug - #4615 */
.ui-accordion { width: 100%; }
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }
/*
* jQuery UI Autocomplete 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Autocomplete#theming
*/
.ui-autocomplete { position: absolute; cursor: default; }
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/*
* jQuery UI Menu 1.8.17
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Menu#theming
*/
.ui-menu {
list-style:none;
padding: 2px;
margin: 0;
display:block;
float: left;
}
.ui-menu .ui-menu {
margin-top: -3px;
}
.ui-menu .ui-menu-item {
margin:0;
padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
}
.ui-menu .ui-menu-item a {
text-decoration:none;
display:block;
padding:.2em .4em;
line-height:1.5;
zoom:1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
}
/*
* jQuery UI Button 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Button#theming
*/
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
.ui-button-icons-only { width: 3.4em; }
button.ui-button-icons-only { width: 3.7em; }
/*button text element */
.ui-button .ui-button-text { display: block; line-height: 1.4; }
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
/* no icon support for input elements, provide padding by default */
input.ui-button { padding: .4em 1em; }
/*button icon element(s) */
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
/*button sets*/
.ui-buttonset { margin-right: 7px; }
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
/*
* jQuery UI Datepicker 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Datepicker#theming
*/
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
.ui-datepicker .ui-datepicker-prev { left:2px; }
.ui-datepicker .ui-datepicker-next { right:2px; }
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}/*
* jQuery UI Dialog 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/*
* jQuery UI Progressbar 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Progressbar#theming
*/
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/*
* jQuery UI Resizable 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizable#theming
*/
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
* jQuery UI Selectable 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Selectable#theming
*/
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
/*
* jQuery UI Slider 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Slider#theming
*/
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
.ui-slider-horizontal { height: .8em; }
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
.ui-slider-vertical { width: .8em; height: 100px; }
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
* jQuery UI Tabs 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Tabs#theming
*/
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }
/*
* jQuery UI CSS Framework 1.8.17
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/
*/
/* Component containers
----------------------------------*/
.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
.ui-widget-content a { color: #222222/*{fcContent}*/; }
.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }
.ui-widget-header a { color: #222222/*{fcHeader}*/; }
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; }
.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }
.ui-widget :active { outline: none; }
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
/* Overlays */
.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }
.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }

View File

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

View File

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

View File

@@ -50,7 +50,7 @@ elseif($page == 'domains')
'd.aliasdomain' => $lng['domains']['aliasdomain']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_DOMAINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`caneditdomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `ad`.`id` AS `aliasdomainid`, `ad`.`domain` AS `aliasdomain`, `da`.`id` AS `domainaliasid`, `da`.`domain` AS `domainalias` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id` LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `da` ON `da`.`aliasdomain`=`d`.`id` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`email_only`='0' AND `d`.`id` <> " . (int)$userinfo['standardsubdomain'] . " " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`caneditdomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_ipandport`, `ad`.`id` AS `aliasdomainid`, `ad`.`domain` AS `aliasdomain`, `da`.`id` AS `domainaliasid`, `da`.`domain` AS `domainalias` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id` LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `da` ON `da`.`aliasdomain`=`d`.`id` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`email_only`='0' AND `d`.`id` <> " . (int)$userinfo['standardsubdomain'] . " " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -151,6 +151,15 @@ elseif($page == 'domains')
$row['documentroot'] = makeCorrectDir(substr($row['documentroot'], strlen($userinfo['documentroot'])));
}
// get ssl-ips if activated
// FIXME for multi-ip later
$show_ssledit = false;
if ($settings['system']['use_ssl'] == '1'
&& $row['ssl_ipandport'] != 0
&& $row['caneditdomain'] == '1'
) {
$show_ssledit = true;
}
$row = htmlentities_array($row);
eval("\$domains.=\"" . getTemplate("domains/domains_domain") . "\";");
}
@@ -196,7 +205,10 @@ elseif($page == 'domains')
$result = $db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`-1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
@@ -249,8 +261,17 @@ elseif($page == 'domains')
if(!preg_match('/^https?\:\/\//', $path)
|| !validateUrl($idna_convert->encode($path)))
{
$path = $userinfo['documentroot'] . '/' . $path;
$path = makeCorrectDir($path);
// If path is empty or '/' and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
// set default path to subdomain or domain name
if((($path == '') || ($path == '/'))
&& $settings['system']['documentroot_use_default_value'] == 1)
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $completedomain);
}
else
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
}
if (strstr($path, ":") !== FALSE)
{
standard_error('pathmaynotcontaincolon');
@@ -329,8 +350,7 @@ elseif($page == 'domains')
`parentdomainid` = '" . (int)$domain_check['id'] . "',
`isemaildomain` = '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "',
`openbasedir` = '" . $db->escape($domain_check['openbasedir']) . "',
`openbasedir_path` = '" . $db->escape($openbasedir_path) . "',
`safemode` = '" . $db->escape($domain_check['safemode']) . "',
`openbasedir_path` = '" . $db->escape($openbasedir_path) . "',
`speciallogfile` = '" . $db->escape($domain_check['speciallogfile']) . "',
`specialsettings` = '" . $db->escape($domain_check['specialsettings']) . "',
`ssl_redirect` = '" . $ssl_redirect . "',
@@ -346,7 +366,10 @@ elseif($page == 'domains')
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
@@ -378,7 +401,13 @@ elseif($page == 'domains')
}
}
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
// check if we at least have one ssl-ip/port, #1179
$ssl_ipsandports = '';
$resultX = $db->query_first("SELECT COUNT(*) as countSSL FROM `panel_ipsandports` WHERE `ssl`='1'");
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
$ssl_ipsandports = 'notempty';
}
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
@@ -395,7 +424,7 @@ elseif($page == 'domains')
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir`, `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;
@@ -421,8 +450,17 @@ elseif($page == 'domains')
if(!preg_match('/^https?\:\/\//', $path)
|| !validateUrl($idna_convert->encode($path)))
{
$path = $userinfo['documentroot'] . '/' . $path;
$path = makeCorrectDir($path);
// If path is empty or '/' and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
// set default path to subdomain or domain name
if((($path == '') || ($path == '/'))
&& $settings['system']['documentroot_use_default_value'] == 1)
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $result['domain']);
}
else
{
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
}
if (strstr($path, ":") !== FALSE)
{
standard_error('pathmaynotcontaincolon');
@@ -521,7 +559,10 @@ elseif($page == 'domains')
$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');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
}
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -570,9 +611,13 @@ elseif($page == 'domains')
}
}
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
#$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
#$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
// check if we at least have one ssl-ip/port, #1179
$ssl_ipsandports = '';
$resultX = $db->query_first("SELECT COUNT(*) as countSSL FROM `panel_ipsandports` WHERE `ssl`='1'");
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
$ssl_ipsandports = 'notempty';
}
$openbasedir = makeoption($lng['domain']['docroot'], 0, $result['openbasedir_path'], true) . makeoption($lng['domain']['homedir'], 1, $result['openbasedir_path'], true);
$result_ipandport = $db->query_first("SELECT `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` WHERE `id`='".(int)$result['ipandport']."'");
@@ -598,5 +643,124 @@ elseif($page == 'domains')
}
}
}
elseif ($page == 'domainssleditor') {
if ($action == ''
|| $action == 'view'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$ssl_cert_file = isset($_POST['ssl_cert_file']) ? $_POST['ssl_cert_file'] : '';
$ssl_key_file = isset($_POST['ssl_key_file']) ? $_POST['ssl_key_file'] : '';
$ssl_ca_file = isset($_POST['ssl_ca_file']) ? $_POST['ssl_ca_file'] : '';
$ssl_cert_chainfile = isset($_POST['ssl_cert_chainfile']) ? $_POST['ssl_cert_chainfile'] : '';
$do_insert = isset($_POST['do_insert']) ? (($_POST['do_insert'] == 1) ? true : false) : false;
if ($ssl_cert_file != '' && $ssl_key_file == '') {
standard_error('sslcertificateismissingprivatekey');
}
$do_verify = true;
// no cert-file given -> forget everything
if ($ssl_cert_file == '') {
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
$do_verify = false;
}
// verify certificate content
if ($do_verify) {
// array openssl_x509_parse ( mixed $x509cert [, bool $shortnames = true ] )
// openssl_x509_parse() returns information about the supplied x509cert, including fields such as
// subject name, issuer name, purposes, valid from and valid to dates etc.
$cert_content = openssl_x509_parse($ssl_cert_file);
if (is_array($cert_content)
&& isset($cert_content['subject'])
&& isset($cert_content['subject']['CN'])
) {
// TODO self-signed certs might differ and don't need/want this
/*
$domain = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAINS."` WHERE `id`='".(int)$id."'");
if (strtolower($cert_content['subject']['CN']) != strtolower($idna_convert->decode($domain['domain']))) {
standard_error('sslcertificatewrongdomain');
}
*/
// bool openssl_x509_check_private_key ( mixed $cert , mixed $key )
// Checks whether the given key is the private key that corresponds to cert.
if (openssl_x509_check_private_key($ssl_cert_file, $ssl_key_file) === false) {
standard_error('sslcertificateinvalidcertkeypair');
}
// check optional stuff
if ($ssl_ca_file != '') {
$ca_content = openssl_x509_parse($ssl_ca_file);
if (!is_array($ca_content)) {
// invalid
standard_error('sslcertificateinvalidca');
}
}
if ($ssl_cert_chainfile != '') {
$chain_content = openssl_x509_parse($ssl_cert_chainfile);
if (!is_array($chain_content)) {
// invalid
standard_error('sslcertificateinvalidchain');
}
}
} else {
standard_error('sslcertificateinvalidcert');
}
}
// Add/Update database entry
$qrystart = "UPDATE ";
$qrywhere = "WHERE ";
if ($do_insert) {
$qrystart = "INSERT INTO ";
$qrywhere = ", ";
}
$db->query($qrystart." `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` SET
`ssl_cert_file` = '".$db->escape($ssl_cert_file)."',
`ssl_key_file` = '".$db->escape($ssl_key_file)."',
`ssl_ca_file` = '".$db->escape($ssl_ca_file)."',
`ssl_cert_chainfile` = '".$db->escape($ssl_cert_chainfile)."'
".$qrywhere." `domainid`='".(int)$id."';"
);
// back to domain overview
redirectTo($filename, array('page' => 'domains', 's' => $s));
}
$result = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."`
WHERE `domainid`='".(int)$id."';"
);
$do_insert = false;
// if no entry can be found, behave like we have empty values
if (!is_array($result) || !isset($result['ssl_cert_file'])) {
$result = array(
'ssl_cert_file' => '',
'ssl_key_file' => '',
'ssl_ca_file' => '',
'ssl_cert_chainfile' => ''
);
$do_insert = true;
}
$result = htmlentities_array($result);
$ssleditor_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domain_ssleditor.php';
$ssleditor_form = htmlform::genHTMLForm($ssleditor_data);
$title = $ssleditor_data['domain_ssleditor']['title'];
$image = $ssleditor_data['domain_ssleditor']['image'];
eval("echo \"" . getTemplate("domains/domain_ssleditor") . "\";");
}
}
?>

View File

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

View File

@@ -50,7 +50,6 @@ elseif($page == 'backup')
if(isset($_POST['send']) && $_POST['send'] == 'send'){
$backup_enabled = ($_POST['backup_enabled'] == '1' ? '1' : '0');
$backup_ftp_enabled = ($_POST['backup_ftp_enabled'] == '1' ? '1' : '0');
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `backup_enabled`='" . $backup_enabled . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -353,18 +352,28 @@ elseif($page == 'htaccess')
standard_error('invalidpath');
}
if(isset($_POST['options_cgi']))
{
$options_cgi = intval($_POST['options_cgi']);
if(isset($_POST['options_cgi'])
&& (int)$_POST['options_cgi'] != 0
) {
$options_cgi = '1';
}
else
{
$options_cgi = '0';
}
$error404path = correctErrorDocument($_POST['error404path']);
$error403path = correctErrorDocument($_POST['error403path']);
$error500path = correctErrorDocument($_POST['error500path']);
$error404path = '';
if (isset($_POST['error404path'])) {
$error404path = correctErrorDocument($_POST['error404path']);
}
$error403path = '';
if (isset($_POST['error403path'])) {
$error403path = correctErrorDocument($_POST['error403path']);
}
$error500path = '';
if (isset($_POST['error500path'])) {
$error500path = correctErrorDocument($_POST['error500path']);
}
if($path_dupe_check['path'] == $path)
{
@@ -393,9 +402,11 @@ elseif($page == 'htaccess')
else
{
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
#$options_indexes = makeyesno('options_indexes', '1', '0', '0');
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
#$options_cgi = makeyesno('options_cgi', '1', '0', '0');
/*
$options_indexes = makeyesno('options_indexes', '1', '0', '0');
$options_cgi = makeyesno('options_cgi', '1', '0', '0');
*/
$htaccess_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_add.php';
$htaccess_add_form = htmlform::genHTMLForm($htaccess_add_data);
@@ -460,9 +471,11 @@ elseif($page == 'htaccess')
$result['error404path'] = $result['error404path'];
$result['error403path'] = $result['error403path'];
$result['error500path'] = $result['error500path'];
#$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
#$options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
/*
$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
$options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
*/
$result = htmlentities_array($result);
$htaccess_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_edit.php';

View File

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

View File

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

View File

@@ -22,30 +22,22 @@ define('AREA', 'customer');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
$need_db_sql_data = true;
$need_root_db_sql_data = true;
require ("./lib/init.php");
require('./lib/init.php');
if(isset($_POST['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif(isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'overview')
{
if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql");
$lng['mysql']['description'] = str_replace('<SQL_HOST>', $sql['host'], $lng['mysql']['description']);
eval("echo \"" . getTemplate("mysql/mysql") . "\";");
}
elseif($page == 'mysqls')
{
if($action == '')
{
eval("echo \"" . getTemplate('mysql/mysql') . "\";");
} elseif($page == 'mysqls') {
if ($action == '') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql::mysqls");
$fields = array(
'databasename' => $lng['mysql']['databasename'],
@@ -64,130 +56,115 @@ elseif($page == '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))
{
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") . "\";");
eval("\$mysqls.=\"" . getTemplate('mysql/mysqls_database') . "\";");
$count++;
}
$i++;
}
$db_root->close();
// End root-session
$mysqls_count = $db->num_rows($result);
eval("echo \"" . getTemplate("mysql/mysqls") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
{
eval("echo \"" . getTemplate('mysql/mysqls') . "\";");
} elseif($action == 'delete' && $id != 0) {
$result = $db->query_first('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
if(isset($result['databasename'])
&& $result['databasename'] != '')
{
if(!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']]))
{
if (isset($result['databasename'])
&& $result['databasename'] != ''
) {
if (!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']])) {
$result['dbserver'] = 0;
}
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
// Begin root-session
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
unset($db_root->password);
foreach(array_map('trim', array_unique(explode(',', $settings['system']['mysql_access_host']))) as $mysql_access_host)
{
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($result['databasename'])) . '` . * FROM `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($result['databasename']) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"');
$log->logAction(USR_ACTION, LOG_INFO, "deleted database '" . $result['databasename'] . "'");
if (mysql_get_server_info() < '5.0.2') {
// Revoke privileges (only required for MySQL 4.1.2 - 5.0.1)
$db_root->query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM \'' . $db_root->escape($result['databasename']) .'\'',false,true);
}
$host_res = $db_root->query("SELECT `Host` FROM `mysql`.`user` WHERE `User`='" . $db_root->escape($result['databasename']) . "'");
while ($host = $db_root->fetch_array($host_res)) {
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
$db_root->query('DROP USER \'' . $db_root->escape($result['databasename']). '\'@\'' . $db_root->escape($host['Host']) . '\'', false, true);
}
$db_root->query('DROP DATABASE IF EXISTS `' . $db_root->escape($result['databasename']) . '`');
$db_root->query('FLUSH PRIVILEGES');
$db_root->close();
// End root-session
$db->query('DELETE FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
if($userinfo['mysqls_used'] == '1')
{
$resetaccnumber = " , `mysql_lastaccountnumber`='0' ";
}
else
{
$resetaccnumber = '';
}
$resetaccnumber = ($userinfo['mysqls_used'] == '1') ? " , `mysql_lastaccountnumber`='0' " : '';
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`-1 ' . $resetaccnumber . 'WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
} else {
$dbnamedesc = $result['databasename'];
if(isset($result['description']) && $result['description'] != '') {
$dbnamedesc.= ' ('.$result['description'].')';
if (isset($result['description']) && $result['description'] != '') {
$dbnamedesc .= ' ('.$result['description'].')';
}
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc);
}
}
}
elseif($action == 'add')
{
if($userinfo['mysqls_used'] < $userinfo['mysqls']
|| $userinfo['mysqls'] == '-1')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
} elseif ($action == 'add') {
if ($userinfo['mysqls_used'] < $userinfo['mysqls']
|| $userinfo['mysqls'] == '-1'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$password = validate($_POST['mysql_password'], 'password');
$password = validatePassword($password);
$sendinfomail = intval($_POST['sendinfomail']);
if($sendinfomail != 1)
{
$sendinfomail = isset($_POST['sendinfomail']) ? 1 : 0;
if ($sendinfomail != 1) {
$sendinfomail = 0;
}
if($password == '')
{
if ($password == '') {
standard_error(array('stringisempty', 'mypassword'));
}
else
{
$username = $userinfo['loginname'] . $settings['customer']['mysqlprefix'] . (intval($userinfo['mysql_lastaccountnumber']) + 1);
if(count($sql_root) > 1)
{
} else {
$dbserver = 0;
if (count($sql_root) > 1) {
$dbserver = validate($_POST['mysql_server'], html_entity_decode($lng['mysql']['mysql_server']), '', '', 0);
if(!isset($sql_root[$dbserver]) || !is_array($sql_root[$dbserver]))
{
if (!isset($sql_root[$dbserver]) || !is_array($sql_root[$dbserver])) {
$dbserver = 0;
}
}
else
{
$dbserver = 0;
}
// validate description before actual adding the database, #1052
$databasedescription = validate(trim($_POST['description']), 'description');
// Begin root-session
$db_root = new db($sql_root[$dbserver]['host'], $sql_root[$dbserver]['user'], $sql_root[$dbserver]['password'], '');
unset($db_root->password);
if (strtoupper($settings['customer']['mysqlprefix']) == 'RANDOM') {
$result = $db_root->query('SELECT `User` FROM mysql.user');
while ($row = $db_root->fetch_array($result)) {
$allsqlusers[] = $row[User];
}
$username = $userinfo['loginname'] . '-' . substr(md5(uniqid(microtime(), 1)), 20, 3);
while (in_array($username , $allsqlusers)) {
$username = $userinfo['loginname'] . '-' . substr(md5(uniqid(microtime(), 1)), 20, 3);
}
} else {
$username = $userinfo['loginname'] . $settings['customer']['mysqlprefix'] . (intval($userinfo['mysql_lastaccountnumber']) + 1);
}
$db_root->query('CREATE DATABASE `' . $db_root->escape($username) . '`');
$log->logAction(USR_ACTION, LOG_INFO, "created database '" . $username . "'");
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
{
foreach (array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host) {
$db_root->query('GRANT ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($username)) . '`.* TO `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '` IDENTIFIED BY \'password\'');
$db_root->query('SET PASSWORD FOR `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '` = PASSWORD(\'' . $db_root->escape($password) . '\')');
$log->logAction(USR_ACTION, LOG_NOTICE, "grant all privileges for '" . $username . "'@'" . $mysql_access_host . "'");
@@ -195,24 +172,21 @@ elseif($page == 'mysqls')
$db_root->query('FLUSH PRIVILEGES');
$db_root->close();
// End root-session
// Statement modifyed for Database description -- PH 2004-11-29
$databasedescription = validate($_POST['description'], 'description');
// Statement modified for Database description -- PH 2004-11-29
$result = $db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($username) . '", "' . $db->escape($databasedescription) . '", "' . $db->escape($dbserver) . '")');
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1, `mysql_lastaccountnumber`=`mysql_lastaccountnumber`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
if($sendinfomail == 1)
{
if ($sendinfomail == 1) {
$pma = $lng['admin']['notgiven'];
if($settings['panel']['phpmyadmin_url'] != '')
{
if ($settings['panel']['phpmyadmin_url'] != '') {
$pma = $settings['panel']['phpmyadmin_url'];
}
$replace_arr = array(
'CUST_NAME' => getCorrectUserSalutation($userinfo),
'SALUTATION' => getCorrectUserSalutation($userinfo),
'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility
'DB_NAME' => $username,
'DB_PASS' => $password,
'DB_DESC' => $databasedescription,
@@ -251,17 +225,14 @@ elseif($page == 'mysqls')
redirectTo($filename, Array('page' => $page, 's' => $s));
}
}
else
{
} else {
$mysql_servers = '';
foreach($sql_root as $mysql_server => $mysql_server_details)
{
foreach ($sql_root as $mysql_server => $mysql_server_details) {
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
}
#$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
//$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
$mysql_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_add.php';
$mysql_add_form = htmlform::genHTMLForm($mysql_add_data);
@@ -269,67 +240,53 @@ elseif($page == 'mysqls')
$title = $mysql_add_data['mysql_add']['title'];
$image = $mysql_add_data['mysql_add']['image'];
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
eval("echo \"" . getTemplate('mysql/mysqls_add') . "\";");
}
}
}
elseif($action == 'edit'
&& $id != 0)
{
} elseif ($action == 'edit' && $id != 0) {
$result = $db->query_first('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . $userinfo['customerid'] . '" AND `id`="' . $id . '"');
if(isset($result['databasename'])
&& $result['databasename'] != '')
{
if(!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']]))
{
if (isset($result['databasename'])
&& $result['databasename'] != ''
) {
if (!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']])) {
$result['dbserver'] = 0;
}
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
$password = validate($_POST['mysql_password'], 'password');
if($password != '')
{
if ($password != '') {
// validate password
$password = validatePassword($password);
// Begin root-session
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
unset($db_root->password);
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
{
foreach (array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host) {
$db_root->query('SET PASSWORD FOR `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '` = PASSWORD(\'' . $db_root->escape($password) . '\')');
}
$db_root->query('FLUSH PRIVILEGES');
$db_root->close();
// End root-session
}
// Update the Database description -- PH 2004-11-29
$log->logAction(USR_ACTION, LOG_INFO, "edited database '" . $result['databasename'] . "'");
$databasedescription = validate($_POST['description'], 'description');
$result = $db->query('UPDATE `' . TABLE_PANEL_DATABASES . '` SET `description`="' . $db->escape($databasedescription) . '" WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
} else {
$mysql_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_edit.php';
$mysql_edit_form = htmlform::genHTMLForm($mysql_edit_data);
$title = $mysql_edit_data['mysql_edit']['title'];
$image = $mysql_edit_data['mysql_edit']['image'];
eval("echo \"" . getTemplate("mysql/mysqls_edit") . "\";");
eval("echo \"" . getTemplate('mysql/mysqls_edit') . "\";");
}
}
}
}
?>

View File

@@ -28,6 +28,17 @@ require ("./lib/init.php");
if(isset($_POST['id']))
{
$id = intval($_POST['id']);
/*
* Check if the current user is allowed to see the current ticket.
*/
$sql = "SELECT `id` FROM `panel_tickets` WHERE `id` = '".$id."' AND `customerid` = '".$userinfo['customerid']."'";
$result = $db->query_first($sql);
if ($result == null) {
// no rights to see the requested ticket
standard_error(array('ticketnotaccessible'));
}
}
elseif(isset($_GET['id']))
{
@@ -55,7 +66,7 @@ elseif($page == 'tickets')
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'lastchange';
$paging->sortorder = 'desc';
$result = $db->query('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `customerid`="' . (int)$userinfo['customerid'] . '" AND `adminid`="' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `customerid`="' . (int)$userinfo['customerid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -210,12 +221,12 @@ elseif($page == 'tickets')
else
{
$categories = '';
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
if(isset($result['name'])
&& $result['name'] != '')
{
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
while($row = $db->fetch_array($result2))
{
@@ -329,7 +340,13 @@ elseif($page == 'tickets')
}
else
{
$by = $lng['ticket']['customer'];
$cid = $mainticket->Get('customer');
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = "' . (int)$cid . '"'
);
$by = getCorrectFullUserDetails($usr);
//$by = $lng['ticket']['customer'];
}
$subject = $mainticket->Get('subject');
@@ -351,7 +368,8 @@ elseif($page == 'tickets')
}
else
{
$by = $lng['ticket']['customer'];
$by = getCorrectFullUserDetails($usr);
//$by = $lng['ticket']['customer'];
}
$subject = $subticket->Get('subject');

View File

@@ -23,20 +23,19 @@ define('AREA', 'customer');
* Include our init.php, which manages Sessions, Language etc.
*/
$intrafficpage = 1;
require ("./lib/init.php");
require('./lib/init.php');
$traffic = '';
$month = null;
$year = null;
if(isset($_POST['month'])
&& isset($_POST['year']))
{
if (isset($_POST['month'])
&& isset($_POST['year'])
) {
$month = intval($_POST['month']);
$year = intval($_POST['year']);
}
elseif(isset($_GET['month'])
&& isset($_GET['year']))
{
} elseif (isset($_GET['month'])
&& isset($_GET['year'])
) {
$month = intval($_GET['month']);
$year = intval($_GET['year']);
}
@@ -44,31 +43,24 @@ elseif(isset($_GET['month'])
//BAM! $_GET???
elseif (isset($_GET['page'])
&& $_GET['page'] == "current")
{
if(date('d') != '01')
{
&& $_GET['page'] == 'current'
) {
if (date('d') != '01') {
$month = date('m');
$year = date('Y');
}
else
{
if(date('m') == '01')
{
} else {
if (date('m') == '01') {
$month = 12;
$year = date('Y') - 1;
}
else
{
} else {
$month = date('m') - 1;
$year = date('Y');
}
}
}
if(!is_null($month)
&& !is_null($year))
{
if (!is_null($month)
&& !is_null($year)) {
$traf['byte'] = 0;
$result = $db->query("SELECT
SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail',
@@ -82,19 +74,17 @@ if(!is_null($month)
$traffic_complete['mail'] = 0;
$show = '';
while($row = $db->fetch_array($result))
{
while ($row = $db->fetch_array($result)) {
$http = $row['http'];
$ftp = $row['ftp_up'] + $row['ftp_down'];
$mail = $row['mail'];
$traf['byte'] = $http + $ftp + $mail;
$traffic_complete['http']+= $http;
$traffic_complete['ftp']+= $ftp;
$traffic_complete['mail']+= $mail;
$traf['day'] = $row['day'] . ".";
$traffic_complete['http'] += $http;
$traffic_complete['ftp'] += $ftp;
$traffic_complete['mail'] += $mail;
$traf['day'] = $row['day'] . '.';
if(extension_loaded('bcmath'))
{
if (extension_loaded('bcmath')) {
$traf['ftptext'] = bcdiv($row['ftp_up'], 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($row['ftp_down'], 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
@@ -102,9 +92,7 @@ if(!is_null($month)
$traf['http'] = bcdiv($http, 1024, $settings['panel']['decimal_places']);
$traf['mail'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']);
$traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']);
}
else
{
} else {
$traf['ftptext'] = round($row['ftp_up'] / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($row['ftp_down'] / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
$traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
$traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
@@ -114,28 +102,22 @@ if(!is_null($month)
$traf['byte'] = round($traf['byte'] / 1024, $settings['panel']['decimal_places']);
}
eval("\$traffic.=\"" . getTemplate("traffic/traffic_month") . "\";");
$show = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year'];
eval("\$traffic.=\"" . getTemplate('traffic/traffic_month') . "\";");
$show = $lng['traffic']['months'][intval($row['month'])] . ' ' . $row['year'];
}
if(extension_loaded('bcmath'))
{
if (extension_loaded('bcmath')) {
$traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024, $settings['panel']['decimal_places']);
}
else
{
} else {
$traffic_complete['http'] = round($traffic_complete['http'] / 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = round($traffic_complete['mail'] / 1024, $settings['panel']['decimal_places']);
}
eval("echo \"" . getTemplate("traffic/traffic_details") . "\";");
}
else
{
eval("echo \"" . getTemplate('traffic/traffic_details') . "\";");
} else {
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
@@ -143,22 +125,20 @@ else
$traffic_complete['ftp'] = 0;
$traffic_complete['mail'] = 0;
while($row = $db->fetch_array($result))
{
while ($row = $db->fetch_array($result)) {
$http = $row['http'];
$ftp_up = $row['ftp_up'];
$ftp_down = $row['ftp_down'];
$mail = $row['mail'];
$traffic_complete['http']+= $http;
$traffic_complete['ftp']+= $ftp_up + $ftp_down;
$traffic_complete['mail']+= $mail;
$traffic_complete['http'] += $http;
$traffic_complete['ftp'] += $ftp_up + $ftp_down;
$traffic_complete['mail'] += $mail;
$traf['month'] = $row['month'];
$traf['year'] = $row['year'];
$traf['monthname'] = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year'];
$traf['byte'] = $http + $ftp_up + $ftp_down + $mail;
if(extension_loaded('bcmath'))
{
if (extension_loaded('bcmath')) {
$traf['ftptext'] = bcdiv($ftp_up, 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($ftp_down, 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
@@ -166,9 +146,7 @@ else
$traf['http'] = bcdiv($http, 1024, $settings['panel']['decimal_places']);
$traf['mail'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']);
$traf['byte'] = bcdiv($traf['byte'], 1024 * 1024, $settings['panel']['decimal_places']);
}
else
{
} else {
$traf['ftptext'] = round($ftp_up / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($ftp_down / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
$traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
$traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
@@ -178,23 +156,18 @@ else
$traf['byte'] = round($traf['byte'] / (1024 * 1024), $settings['panel']['decimal_places']);
}
eval("\$traffic.=\"" . getTemplate("traffic/traffic_traffic") . "\";");
eval("\$traffic.=\"" . getTemplate('traffic/traffic_traffic') . "\";");
}
if(extension_loaded('bcmath'))
{
if (extension_loaded('bcmath')) {
$traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024 * 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024 * 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024 * 1024, $settings['panel']['decimal_places']);
}
else
{
} else {
$traffic_complete['http'] = round($traffic_complete['http'] / (1024 * 1024), $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / (1024 * 1024), $settings['panel']['decimal_places']);
$traffic_complete['mail'] = round($traffic_complete['mail'] / (1024 * 1024), $settings['panel']['decimal_places']);
}
eval("echo \"" . getTemplate("traffic/traffic") . "\";");
eval("echo \"" . getTemplate('traffic/traffic') . "\";");
}
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 827 B

248
index.php
View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -100,23 +100,27 @@ function page_header() {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="iso-8859-1" />
<meta charset="utf-8" />
<meta http-equiv="Default-Style" content="text/css" />
<link rel="stylesheet" href="../templates/Froxlor/froxlor.css" />
<!--[if IE]><link rel="stylesheet" href="../templates/Froxlor/froxlor_ie.css" /><![endif]-->
<link rel="stylesheet" href="../templates/Froxlor/assets/css/main.css" />
<!--[if IE]><link rel="stylesheet" href="../templates/Froxlor/assets/css/main_ie.css" /><![endif]-->
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script type="text/javascript" src="../templates/Froxlor/js/jquery.min.js"></script>
<script type="text/javascript" src="../templates/Froxlor/js/froxlor.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../templates/Froxlor/assets/js/main.js"></script>
<link href="../templates/Froxlor/assets/img/favicon.ico" rel="icon" type="image/x-icon" />
<title>Froxlor Server Management Panel - Installation</title>
<style>
body {
font-family: Verdana, Geneva, sans-serif;
}
input {
background: #dae7ee url('../images/Froxlor/icons/text_align_left.png') no-repeat 5px 4px;
background: #dae7ee url('../templates/Froxlor/assets/img/icons/text_align_left.png') no-repeat 5px 4px;
}
input[type="password"] {
background: #dae7ee url('../images/Froxlor/icons/password.png') no-repeat 4px 4px;
background: #dae7ee url('../templates/Froxlor/assets/img/icons/password.png') no-repeat 4px 4px;
}
input[type="submit"] {
background: #ccc url('../images/Froxlor/icons/button_ok.png') no-repeat 4px 8px;
background: #ccc url('../templates/Froxlor/assets/img/icons/button_ok.png') no-repeat 4px 8px;
}
</style>
</head>
@@ -154,13 +158,13 @@ function status_message($case, $text)
function requirement_checks() {
global $lng;
global $lng, $theme;
page_header();
?>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
@@ -520,7 +524,7 @@ if(isset($_POST['installstep'])
?>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
@@ -673,8 +677,6 @@ if(isset($_POST['installstep'])
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($languages[$language]) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'standardlanguage'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($mysql_access_host) . "' WHERE `settinggroup` = 'system' AND `varname` = 'mysql_access_host'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpuser) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
@@ -692,23 +694,20 @@ if(isset($_POST['installstep'])
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/lighttpd reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/lighttpd.pem' WHERE `settinggroup` = 'system' AND `varname` = 'ssl_cert_file'");
$ssettings = '';
}
elseif($webserver == "nginx")
elseif($webserver == "nginx")
{
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/nginx/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/nginx/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/nginx/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/nginx reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
$ssettings = '';
}
// insert the lastcronrun to be the installation date
$query = 'UPDATE `%s` SET `value` = UNIX_TIMESTAMP() WHERE `settinggroup` = \'system\' AND `varname` = \'lastcronrun\'';
$query = sprintf($query, TABLE_PANEL_SETTINGS);
$db->query($query);
// set specific times for some crons (traffic only at night, etc.)
$ts = mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_traffic.php';");
@@ -717,7 +716,6 @@ if(isset($_POST['installstep'])
$db->query("UPDATE `".TABLE_PANEL_CRONRUNS."` SET `lastrun` = '".$ts."' WHERE `cronfile` ='cron_ticketarchive.php';");
// and lets insert the default ip and port
$query = "INSERT INTO `".TABLE_PANEL_IPSANDPORTS."`
SET `ip`= '".$db->escape($serverip)."',
`port` = '80',
@@ -728,14 +726,12 @@ if(isset($_POST['installstep'])
$defaultip = $db->insert_id();
// insert the defaultip
$query = 'UPDATE `%s` SET `value` = \'%s\' WHERE `settinggroup` = \'system\' AND `varname` = \'defaultip\'';
$query = sprintf($query, TABLE_PANEL_SETTINGS, $db->escape($defaultip));
$db->query($query);
status_message('green', 'OK');
//last but not least create the main admin
status_message('begin', $lng['install']['adding_admin_user']);
$db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET
`loginname` = '" . $db->escape($admin_user) . "',
@@ -767,6 +763,7 @@ if(isset($_POST['installstep'])
`ftps_used` = 0,
`tickets` = -1,
`tickets_used` = 0,
`tickets_see_all` = 1,
`subdomains` = -1,
`subdomains_used` = 0,
`traffic` = -1048576,
@@ -779,7 +776,6 @@ if(isset($_POST['installstep'])
status_message('green', 'OK');
//now we create the userdata.inc.php with the mysql-accounts
status_message('begin', $lng['install']['creating_configfile']);
$userdata = "<?php\n";
$userdata.= "//automatically generated userdata.inc.php for Froxlor\n";
@@ -794,7 +790,6 @@ if(isset($_POST['installstep'])
$userdata.= "?>";
//we test now if we can store the userdata.inc.php in ../lib
if($fp = @fopen('../lib/userdata.inc.php', 'w'))
{
$result = @fputs($fp, $userdata, strlen($userdata));
@@ -841,7 +836,7 @@ else
?>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2><?php echo $lng['install']['language']; ?></h2>

View File

@@ -73,6 +73,12 @@ $lng['install']['bcmathdescription'] = 'Traffic-calculation related functions wi
$lng['install']['openbasedir'] = 'Testing if open_basedir is enabled...';
$lng['install']['openbasedirenabled'] = 'enabled. Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor';
/**
* ADDED IN 1.2.19-svn7
*/
$lng['install']['servername_should_be_fqdn'] = 'The servername should be a FQDN and not an IP address';
/**
* Renamed in 1.2.19-svn40
*/

View File

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

View File

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

View File

@@ -21,7 +21,7 @@ if(isFroxlorVersion('0.9-r0'))
showUpdateStep("Performing database updates");
/*
* add missing database-updates if necessary (old: update/update_database.php)
*/
*/
if(isset($settings['system']['dbversion']) && (int)$settings['system']['dbversion'] < 1)
{
$db->query("ALTER TABLE `panel_databases` ADD `dbserver` INT( 11 ) UNSIGNED NOT NULL default '0';");
@@ -29,9 +29,9 @@ if(isFroxlorVersion('0.9-r0'))
if(isset($settings['system']['dbversion']) && (int)$settings['system']['dbversion'] < 2)
{
$db->query("ALTER TABLE `panel_ipsandports` CHANGE `ssl_cert` `ssl_cert_file` VARCHAR( 255 ) NOT NULL,
ADD `ssl_key_file` VARCHAR( 255 ) NOT NULL,
ADD `ssl_ca_file` VARCHAR( 255 ) NOT NULL,
ADD `default_vhostconf_domain` TEXT NOT NULL;");
ADD `ssl_key_file` VARCHAR( 255 ) NOT NULL,
ADD `ssl_ca_file` VARCHAR( 255 ) NOT NULL,
ADD `default_vhostconf_domain` TEXT NOT NULL;");
$db->query("INSERT INTO `panel_settings` SET `settinggroup` = 'system', `varname` = 'ssl_key_file', `value` = '';");
$db->query("INSERT INTO `panel_settings` SET `settinggroup` = 'system', `varname` = 'ssl_ca_file', `value` = '';");
@@ -40,7 +40,7 @@ if(isFroxlorVersion('0.9-r0'))
/*
* remove billing tables in database
*/
*/
define('TABLE_BILLING_INVOICES', 'billing_invoices');
define('TABLE_BILLING_INVOICES_ADMINS', 'billing_invoices_admins');
define('TABLE_BILLING_INVOICE_CHANGES', 'billing_invoice_changes');
@@ -53,130 +53,130 @@ if(isFroxlorVersion('0.9-r0'))
define('TABLE_BILLING_TAXCLASSES', 'billing_taxclasses');
define('TABLE_BILLING_TAXRATES', 'billing_taxrates');
$db->query("DROP TABLE `" . TABLE_BILLING_SERVICE_CATEGORIES . "`;");
$db->query("DROP TABLE `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "`;");
$db->query("DROP TABLE `" . TABLE_BILLING_SERVICE_DOMAINS_TEMPLATES . "`;");
$db->query("DROP TABLE `" . TABLE_BILLING_SERVICE_OTHER . "`;");
$db->query("DROP TABLE `" . TABLE_BILLING_SERVICE_OTHER_TEMPLATES . "`;");
$db->query("DROP TABLE `" . TABLE_BILLING_TAXCLASSES . "`;");
$db->query("DROP TABLE `" . TABLE_BILLING_TAXRATES . "`;");
$db->query("DROP TABLE `" . TABLE_BILLING_INVOICES . "`;");
$db->query("DROP TABLE `" . TABLE_BILLING_INVOICES_ADMINS . "`;");
$db->query("DROP TABLE `" . TABLE_BILLING_INVOICE_CHANGES . "`;");
$db->query("DROP TABLE `" . TABLE_BILLING_INVOICE_CHANGES_ADMINS . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_SERVICE_CATEGORIES . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_SERVICE_DOMAINS_TEMPLATES . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_SERVICE_OTHER . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_SERVICE_OTHER_TEMPLATES . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_TAXCLASSES . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_TAXRATES . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_INVOICES . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_INVOICES_ADMINS . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_INVOICE_CHANGES . "`;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_BILLING_INVOICE_CHANGES_ADMINS . "`;");
/*
* update panel_domains, panel_customers, panel_admins
*/
*/
$db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "`
DROP `firstname`,
DROP `title`,
DROP `company`,
DROP `street`,
DROP `zipcode`,
DROP `city`,
DROP `country`,
DROP `phone`,
DROP `fax`,
DROP `taxid`,
DROP `contract_date`,
DROP `contract_number`,
DROP `contract_details`,
DROP `included_domains_qty`,
DROP `included_domains_tld`,
DROP `additional_traffic_fee`,
DROP `additional_traffic_unit`,
DROP `additional_diskspace_fee`,
DROP `additional_diskspace_unit`,
DROP `taxclass`,
DROP `setup_fee`,
DROP `interval_fee`,
DROP `interval_length`,
DROP `interval_type`,
DROP `interval_payment`,
DROP `calc_tax`,
DROP `term_of_payment`,
DROP `payment_every`,
DROP `payment_method`,
DROP `bankaccount_holder`,
DROP `bankaccount_number`,
DROP `bankaccount_blz`,
DROP `bankaccount_bank`,
DROP `service_active`,
DROP `servicestart_date`,
DROP `serviceend_date`,
DROP `lastinvoiced_date`,
DROP `lastinvoiced_date_traffic`,
DROP `lastinvoiced_date_diskspace`,
DROP `customer_categories_once`,
DROP `customer_categories_period`,
DROP `invoice_fee`,
DROP `invoice_fee_hosting`,
DROP `invoice_fee_hosting_customers`,
DROP `invoice_fee_domains`,
DROP `invoice_fee_traffic`,
DROP `invoice_fee_diskspace`,
DROP `invoice_fee_other`,
DROP `edit_billingdata`;");
DROP `firstname`,
DROP `title`,
DROP `company`,
DROP `street`,
DROP `zipcode`,
DROP `city`,
DROP `country`,
DROP `phone`,
DROP `fax`,
DROP `taxid`,
DROP `contract_date`,
DROP `contract_number`,
DROP `contract_details`,
DROP `included_domains_qty`,
DROP `included_domains_tld`,
DROP `additional_traffic_fee`,
DROP `additional_traffic_unit`,
DROP `additional_diskspace_fee`,
DROP `additional_diskspace_unit`,
DROP `taxclass`,
DROP `setup_fee`,
DROP `interval_fee`,
DROP `interval_length`,
DROP `interval_type`,
DROP `interval_payment`,
DROP `calc_tax`,
DROP `term_of_payment`,
DROP `payment_every`,
DROP `payment_method`,
DROP `bankaccount_holder`,
DROP `bankaccount_number`,
DROP `bankaccount_blz`,
DROP `bankaccount_bank`,
DROP `service_active`,
DROP `servicestart_date`,
DROP `serviceend_date`,
DROP `lastinvoiced_date`,
DROP `lastinvoiced_date_traffic`,
DROP `lastinvoiced_date_diskspace`,
DROP `customer_categories_once`,
DROP `customer_categories_period`,
DROP `invoice_fee`,
DROP `invoice_fee_hosting`,
DROP `invoice_fee_hosting_customers`,
DROP `invoice_fee_domains`,
DROP `invoice_fee_traffic`,
DROP `invoice_fee_diskspace`,
DROP `invoice_fee_other`,
DROP `edit_billingdata`;");
$db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "`
DROP `taxid`,
DROP `title`,
DROP `country`,
DROP `additional_service_description`,
DROP `contract_date`,
DROP `contract_number`,
DROP `contract_details`,
DROP `included_domains_qty`,
DROP `included_domains_tld`,
DROP `additional_traffic_fee`,
DROP `additional_traffic_unit`,
DROP `additional_diskspace_fee`,
DROP `additional_diskspace_unit`,
DROP `taxclass`,
DROP `setup_fee`,
DROP `interval_fee`,
DROP `interval_length`,
DROP `interval_type`,
DROP `interval_payment`,
DROP `calc_tax`,
DROP `term_of_payment`,
DROP `payment_every`,
DROP `payment_method`,
DROP `bankaccount_holder`,
DROP `bankaccount_number`,
DROP `bankaccount_blz`,
DROP `bankaccount_bank`,
DROP `service_active`,
DROP `servicestart_date`,
DROP `serviceend_date`,
DROP `lastinvoiced_date`,
DROP `lastinvoiced_date_traffic`,
DROP `lastinvoiced_date_diskspace`,
DROP `invoice_fee`,
DROP `invoice_fee_hosting`,
DROP `invoice_fee_domains`,
DROP `invoice_fee_traffic`,
DROP `invoice_fee_diskspace`,
DROP `invoice_fee_other`;");
DROP `taxid`,
DROP `title`,
DROP `country`,
DROP `additional_service_description`,
DROP `contract_date`,
DROP `contract_number`,
DROP `contract_details`,
DROP `included_domains_qty`,
DROP `included_domains_tld`,
DROP `additional_traffic_fee`,
DROP `additional_traffic_unit`,
DROP `additional_diskspace_fee`,
DROP `additional_diskspace_unit`,
DROP `taxclass`,
DROP `setup_fee`,
DROP `interval_fee`,
DROP `interval_length`,
DROP `interval_type`,
DROP `interval_payment`,
DROP `calc_tax`,
DROP `term_of_payment`,
DROP `payment_every`,
DROP `payment_method`,
DROP `bankaccount_holder`,
DROP `bankaccount_number`,
DROP `bankaccount_blz`,
DROP `bankaccount_bank`,
DROP `service_active`,
DROP `servicestart_date`,
DROP `serviceend_date`,
DROP `lastinvoiced_date`,
DROP `lastinvoiced_date_traffic`,
DROP `lastinvoiced_date_diskspace`,
DROP `invoice_fee`,
DROP `invoice_fee_hosting`,
DROP `invoice_fee_domains`,
DROP `invoice_fee_traffic`,
DROP `invoice_fee_diskspace`,
DROP `invoice_fee_other`;");
$db->query("ALTER TABLE `panel_domains`
DROP `taxclass`,
DROP `setup_fee`,
DROP `interval_fee`,
DROP `interval_length`,
DROP `interval_type`,
DROP `interval_payment`,
DROP `service_active`,
DROP `servicestart_date`,
DROP `serviceend_date`,
DROP `lastinvoiced_date`;");
DROP `taxclass`,
DROP `setup_fee`,
DROP `interval_fee`,
DROP `interval_length`,
DROP `interval_type`,
DROP `interval_payment`,
DROP `service_active`,
DROP `servicestart_date`,
DROP `serviceend_date`,
DROP `lastinvoiced_date`;");
$db->query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "`
WHERE `settinggroup` = 'billing';");
WHERE `settinggroup` = 'billing';");
$db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "`
MODIFY `traffic` BIGINT(30),
MODIFY `traffic_used` BIGINT(30)");
MODIFY `traffic` BIGINT(30),
MODIFY `traffic_used` BIGINT(30)");
lastStepStatus(0);
@@ -192,7 +192,7 @@ if(isFroxlorVersion('0.9-r1'))
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('spf', 'spf_entry', '@ IN TXT \"v=spf1 a mx -all\"');");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'froxlor_graphic' WHERE `varname` = 'syscp_graphic'");
if(isset($settings['admin']['syscp_graphic'])
&& $settings['admin']['syscp_graphic'] != ''
&& $settings['admin']['syscp_graphic'] != ''
){
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
}
@@ -226,15 +226,15 @@ if(isFroxlorVersion('0.9-r3'))
showUpdateStep("Creating new table 'cronjobs_run'");
$db->query("CREATE TABLE IF NOT EXISTS `cronjobs_run` (
`id` bigint(20) NOT NULL auto_increment,
`module` varchar(250) NOT NULL,
`cronfile` varchar(250) NOT NULL,
`lastrun` int(15) NOT NULL DEFAULT '0',
`interval` varchar(100) NOT NULL DEFAULT '5 MINUTE',
`isactive` tinyint(1) DEFAULT '1',
`desc_lng_key` varchar(100) NOT NULL DEFAULT 'cron_unknown_desc',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;");
`id` bigint(20) NOT NULL auto_increment,
`module` varchar(250) NOT NULL,
`cronfile` varchar(250) NOT NULL,
`lastrun` int(15) NOT NULL DEFAULT '0',
`interval` varchar(100) NOT NULL DEFAULT '5 MINUTE',
`isactive` tinyint(1) DEFAULT '1',
`desc_lng_key` varchar(100) NOT NULL DEFAULT 'cron_unknown_desc',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;");
lastStepStatus(0);
showUpdateStep("Inserting new values into table");
@@ -305,8 +305,8 @@ if(isFroxlorVersion('0.9.1'))
$result = $db->query_first("SELECT MAX(`guid`) as `latestguid` FROM `".TABLE_PANEL_CUSTOMERS."`");
if (isset($result['latestguid'])
&& (int)$result['latestguid'] > 0
&& $result['latestguid'] != $settings['system']['lastguid']
&& (int)$result['latestguid'] > 0
&& $result['latestguid'] != $settings['system']['lastguid']
) {
checkLastGuid();
lastStepStatus(1, 'fixed');
@@ -409,9 +409,9 @@ if(isFroxlorVersion('0.9.4'))
* some users might still have the setting in their database
* because we already had this back in older versions.
* To not confuse Froxlor, we just update old settings.
*/
*/
if(isset($settings['system']['awstats_path'])
&& $settings['system']['awstats_path'] != ''
&& $settings['system']['awstats_path'] != ''
) {
showUpdateStep("Updating awstats path setting");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/usr/bin/' WHERE `settinggroup` = 'system' AND `varname` = 'awstats_path';");
@@ -425,7 +425,7 @@ if(isFroxlorVersion('0.9.4'))
}
if(isset($settings['system']['awstats_domain_file'])
&& $settings['system']['awstats_domain_file'] != ''
&& $settings['system']['awstats_domain_file'] != ''
) {
showUpdateStep("Updating awstats configuration path setting");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'awstats_conf' WHERE `varname` = 'awstats_domain_file';");
@@ -543,28 +543,28 @@ if(isFroxlorVersion('0.9.6-svn2'))
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'enabled', '1');");
if(isset($_POST['update_deferr_500'])
&& trim($_POST['update_deferr_500']) != ''
&& trim($_POST['update_deferr_500']) != ''
) {
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err500', '".$db->escape($_POST['update_deferr_500'])."');");
$err500 = true;
}
if(isset($_POST['update_deferr_401'])
&& trim($_POST['update_deferr_401']) != ''
&& trim($_POST['update_deferr_401']) != ''
) {
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err401', '".$db->escape($_POST['update_deferr_401'])."');");
$err401 = true;
}
if(isset($_POST['update_deferr_403'])
&& trim($_POST['update_deferr_403']) != ''
&& trim($_POST['update_deferr_403']) != ''
) {
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err403', '".$db->escape($_POST['update_deferr_403'])."');");
$err403 = true;
}
if(isset($_POST['update_deferr_404'])
&& trim($_POST['update_deferr_404']) != ''
&& trim($_POST['update_deferr_404']) != ''
) {
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('defaultwebsrverrhandler', 'err404', '".$db->escape($_POST['update_deferr_404'])."');");
$err404 = true;
@@ -672,17 +672,17 @@ if(isFroxlorVersion('0.9.6'))
showUpdateStep("Adding new tables to database");
$db->query("CREATE TABLE IF NOT EXISTS `redirect_codes` (
`id` int(5) NOT NULL auto_increment,
`code` varchar(3) NOT NULL,
`enabled` tinyint(1) DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;");
`id` int(5) NOT NULL auto_increment,
`code` varchar(3) NOT NULL,
`enabled` tinyint(1) DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;");
$db->query("CREATE TABLE IF NOT EXISTS `domain_redirect_codes` (
`rid` int(5) NOT NULL,
`did` int(11) unsigned NOT NULL,
UNIQUE KEY `rc` (`rid`, `did`)
) ENGINE=MyISAM;");
`rid` int(5) NOT NULL,
`did` int(11) unsigned NOT NULL,
UNIQUE KEY `rc` (`rid`, `did`)
) ENGINE=MyISAM;");
lastStepStatus(0);
showUpdateStep("Filling new tables with default data");
@@ -1202,8 +1202,8 @@ if(isFroxlorVersion('0.9.14-svn6'))
/*
* revert database changes we did for multiserver-support
* before branching - sorry guys :/
*/
* before branching - sorry guys :/
*/
if(isFroxlorVersion('0.9.14-svn9'))
{
showUpdateStep("Reverting multiserver-patches (svn)", false);
@@ -1396,17 +1396,17 @@ if(isFroxlorVersion('0.9.17-svn1'))
showUpdateStep("Adding new tables to database");
$db->query("CREATE TABLE IF NOT EXISTS `ipsandports_docrootsettings` (
`id` int(5) NOT NULL auto_increment,
`fid` int(11) NOT NULL,
`docrootsettings` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;");
`id` int(5) NOT NULL auto_increment,
`fid` int(11) NOT NULL,
`docrootsettings` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;");
$db->query("CREATE TABLE IF NOT EXISTS `domain_docrootsettings` (
`id` int(5) NOT NULL auto_increment,
`fid` int(11) NOT NULL,
`docrootsettings` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;");
`id` int(5) NOT NULL auto_increment,
`fid` int(11) NOT NULL,
`docrootsettings` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;");
lastStepStatus(0);
updateToVersion('0.9.17-svn2');
@@ -1553,7 +1553,7 @@ if(isFroxlorVersion('0.9.20.1'))
// The customer-table may miss the columns, if installed a fresh 0.9.20 or 0.9.20.1 - add them
$result = $db->query("DESCRIBE `" . TABLE_PANEL_CUSTOMERS . "`");
$columnfound = 0;
while($row = $db->fetch_array($result))
while($row = $db->fetch_array($result))
{
if($row['Field'] == 'backup_allowed')
{
@@ -1640,9 +1640,9 @@ if(isFroxlorVersion('0.9.22-svn1'))
showUpdateStep("Updating from 0.9.22-svn1 to 0.9.22-svn2");
lastStepStatus(0);
/* add new settings for diskspacequota - support */
/* fix backup_dir for #186 */
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/var/customers/backups/' WHERE `varname` = 'backup_dir';");
updateToVersion('0.9.22-svn2');
}
@@ -1650,7 +1650,7 @@ if(isFroxlorVersion('0.9.22-svn2'))
{
showUpdateStep("Updating from 0.9.22-svn2 to 0.9.22-rc1");
lastStepStatus(0);
updateToVersion('0.9.22-rc1');
}
@@ -1658,7 +1658,7 @@ if(isFroxlorVersion('0.9.22-rc1'))
{
showUpdateStep("Updating from 0.9.22-rc1 to 0.9.22");
lastStepStatus(0);
updateToVersion('0.9.22');
}
@@ -1725,3 +1725,427 @@ if(isFroxlorVersion('0.9.25-rc1'))
updateToVersion('0.9.25');
}
if(isFroxlorVersion('0.9.25'))
{
showUpdateStep("Updating from 0.9.25 to 0.9.26-svn1");
lastStepStatus(0);
// enable bind by default
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'bind_enable', '1')");
updateToVersion('0.9.26-svn1');
}
if(isFroxlorVersion('0.9.26-svn1'))
{
showUpdateStep("Updating from 0.9.26-svn1 to 0.9.26-rc1");
lastStepStatus(0);
updateToVersion('0.9.26-rc1');
}
if(isFroxlorVersion('0.9.26-rc1'))
{
showUpdateStep("Updating from 0.9.26-rc1 to 0.9.26");
lastStepStatus(0);
updateToVersion('0.9.26');
}
if(isFroxlorVersion('0.9.26'))
{
showUpdateStep("Updating from 0.9.26 to 0.9.27-svn1");
lastStepStatus(0);
// check for multiple backup_ftp_enabled entries
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `varname` = 'backup_ftp_enabled';");
// if there are more than one entry try to fix it
if ($db->num_rows($handle) > 1) {
$rows = $db->fetch_array($handle);
$state = false;
// iterate through all found entries
// and try to guess what value it should be
foreach ($rows as $row) {
$state = $state | $row['value'];
}
// now delete all entries
$db->query("DELETE FROM `panel_settings` WHERE `varname` = 'backup_ftp_enabled';");
// and re-add it
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'backup_ftp_enabled', '". $state ."');");
}
updateToVersion('0.9.27-svn1');
}
if(isFroxlorVersion('0.9.27-svn1'))
{
showUpdateStep("Updating from 0.9.27-svn1 to 0.9.27-svn2");
lastStepStatus(0);
// Get FastCGI timeout setting if available
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'system' AND `varname` = 'mod_fcgid_idle_timeout';");
// If timeout is set then skip
if ($db->num_rows($handle) < 1) {
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mod_fcgid_idle_timeout', '30');");
}
// Get FastCGI timeout setting if available
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'phpfpm' AND `varname` = 'idle_timeout';");
// If timeout is set then skip
if ($db->num_rows($handle) < 1) {
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('phpfpm', 'idle_timeout', '30');");
}
updateToVersion('0.9.27-svn2');
}
if(isFroxlorVersion('0.9.27-svn2'))
{
showUpdateStep("Updating from 0.9.27-svn2 to 0.9.27-rc1");
lastStepStatus(0);
updateToVersion('0.9.27-rc1');
}
if(isFroxlorVersion('0.9.27-rc1'))
{
showUpdateStep("Updating from 0.9.27-rc1 to 0.9.27");
lastStepStatus(0);
updateToVersion('0.9.27');
}
if(isFroxlorVersion('0.9.27')) {
showUpdateStep("Updating from 0.9.27 to 0.9.28-svn1");
lastStepStatus(0);
// Get AliasconfigDir setting if available
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'phpfpm' AND `varname` = 'aliasconfigdir';");
// If AliasconfigDir is set then skip
if ($db->num_rows($handle) < 1) {
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('phpfpm', 'aliasconfigdir', '/var/www/php-fpm/');");
}
updateToVersion('0.9.28-svn1');
}
if(isFroxlorVersion('0.9.28-svn1')) {
showUpdateStep("Updating from 0.9.28-svn1 to 0.9.28-svn2");
lastStepStatus(0);
// Insert ISO-Codes into database. Default value is foo, which is not a valid language code.
$db->query("ALTER TABLE `panel_languages` ADD `iso` CHAR( 3 ) NOT NULL DEFAULT 'foo' AFTER `language`");
$handle = $db->query("SELECT `language` FROM `panel_languages` WHERE `iso`='foo'");
$langauges = $db->fetch_array($handle);
foreach($languages as $language){
switch ($language) {
case "Deutsch":
$db->query("UPDATE `panel_languages` SET `iso`='de' WHERE `language` = 'Deutsch'");
break;
case "English":
$db->query("UPDATE `panel_languages` SET `iso`='en' WHERE `language` = 'English'");
break;
case "Fran&ccedil;ais":
$db->query("UPDATE `panel_languages` SET `iso`='fr' WHERE `language` = 'Fran&ccedil;ais'");
break;
case "Chinese":
$db->query("UPDATE `panel_languages` SET `iso`='zh' WHERE `language` = 'Chinese'");
break;
case "Catalan":
$db->query("UPDATE `panel_languages` SET `iso`='ca' WHERE `language` = 'Catalan'");
break;
case "Espa&ntilde;ol":
$db->query("UPDATE `panel_languages` SET `iso`='es' WHERE `language` = 'Espa&ntilde;ol'");
break;
case "Portugu&ecirc;s":
$db->query("UPDATE `panel_languages` SET `iso`='pt' WHERE `language` = 'Portugu&ecirc;s'");
break;
case "Danish":
$db->query("UPDATE `panel_languages` SET `iso`='da' WHERE `language` = 'Danish'");
break;
case "Italian":
$db->query("UPDATE `panel_languages` SET `iso`='it' WHERE `language` = 'Italian'");
break;
case "Bulgarian":
$db->query("UPDATE `panel_languages` SET `iso`='bg' WHERE `language` = 'Bulgarian'");
break;
case "Slovak":
$db->query("UPDATE `panel_languages` SET `iso`='sk' WHERE `language` = 'Slovak'");
break;
case "Dutch":
$db->query("UPDATE `panel_languages` SET `iso`='nl' WHERE `language` = 'Dutch'");
break;
case "Russian":
$db->query("UPDATE `panel_languages` SET `iso`='ru' WHERE `language` = 'Russian'");
break;
case "Hungarian":
$db->query("UPDATE `panel_languages` SET `iso`='hu' WHERE `language` = 'Hungarian'");
break;
case "Swedish":
$db->query("UPDATE `panel_languages` SET `iso`='sv' WHERE `language` = 'Swedish'");
break;
case "Czech":
$db->query("UPDATE `panel_languages` SET `iso`='cz' WHERE `language` = 'Czech'");
break;
case "Polski":
$db->query("UPDATE `panel_languages` SET `iso`='pl' WHERE `language` = 'Polski'");
break;
default:
showUpdateStep("Sorry, but I don't know the ISO-639 language code for ".$language.". Please update the entry in `panel_languages` manually.\n");
}
}
updateToVersion('0.9.28-svn2');
}
if(isFroxlorVersion('0.9.28-svn2')) {
showUpdateStep("Updating from 0.9.28-svn2 to 0.9.28-svn3");
lastStepStatus(0);
// change lenght of passwd column
$db->query("ALTER TABLE `" . TABLE_FTP_USERS . "` MODIFY `password` varchar(128) NOT NULL default ''");
// Add default setting for vmail_maildirname if not already in place
$handle = $db->query("SELECT `value` FROM `panel_settings` WHERE `settinggroup` = 'system' AND `varname` = 'vmail_maildirname';");
if ($db->num_rows($handle) < 1) {
showUpdateStep("Adding default Maildir value into Mailserver settings.");
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'vmail_maildirname', 'Maildir');");
}
updateToVersion('0.9.28-svn3');
}
if(isFroxlorVersion('0.9.28-svn3'))
{
showUpdateStep("Updating from 0.9.28-svn3 to 0.9.28-svn4", true);
lastStepStatus(0);
if (isset($_POST['classic_theme_replacement']) && $_POST['classic_theme_replacement'] != '')
{
$classic_theme_replacement = $_POST['classic_theme_replacement'];
}
else
{
$classic_theme_replacement = 'Froxlor';
}
showUpdateStep('Setting replacement for the discontinued and removed Classic theme (if active)', true);
// Updating default theme setting
if ($settings['panel']['default_theme'] == 'Classic')
{
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '".$db->escape($classic_theme_replacement)."' WHERE varname = 'default_theme';");
}
// Updating admin's theme setting
$db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `theme` = \'' . $db->escape($classic_theme_replacement) . '\' WHERE `theme` = \'Classic\'');
// Updating customer's theme setting
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `theme` = \'' . $db->escape($classic_theme_replacement) . '\' WHERE `theme` = \'Classic\'');
// Updating theme setting of active sessions
$db->query('UPDATE `' . TABLE_PANEL_SESSIONS . '` SET `theme` = \'' . $db->escape($classic_theme_replacement) . '\' WHERE `theme` = \'Classic\'');
lastStepStatus(0);
showUpdateStep('Altering Froxlor database and tables to use UTF-8. This may take a while..', true);
$db->query('ALTER DATABASE `' . $db->getDbName() . '` CHARACTER SET utf8 COLLATE utf8_general_ci');
$handle = $db->query('SHOW TABLES');
while ($row = $db->fetch_array($handle))
{
foreach ($row as $table)
{
$db->query('ALTER TABLE `' . $table . '` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;');
}
}
lastStepStatus(0);
updateToVersion('0.9.28-svn4');
}
if(isFroxlorVersion('0.9.28-svn4')) {
showUpdateStep("Updating from 0.9.28-svn4 to 0.9.28-svn5");
// Catchall functionality (enabled by default) see #1114
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('catchall', 'catchall_enabled', '1');");
lastStepStatus(0);
updateToVersion('0.9.28-svn5');
}
if(isFroxlorVersion('0.9.28-svn5')) {
showUpdateStep("Updating from 0.9.28-svn5 to 0.9.28-svn6", true);
lastStepStatus(0);
$update_system_apache24 = isset($_POST['update_system_apache24']) ? (int)$_POST['update_system_apache24'] : '0';
showUpdateStep('Setting value for apache-2.4 modification', true);
// support for Apache-2.4
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'apache24', '".$update_system_apache24."');");
lastStepStatus(0);
showUpdateStep("Inserting new tickets-see-all field to panel_admins", true);
$db->query("ALTER TABLE `panel_admins` ADD `tickets_see_all` tinyint(1) NOT NULL default '0' AFTER `tickets_used`");
lastStepStatus(0);
showUpdateStep("Updating main admin entry", true);
$db->query("UPDATE `panel_admins` SET `tickets_see_all` = '1' WHERE `adminid` = '".$userinfo['adminid']."';");
lastStepStatus(0);
showUpdateStep("Inserting new panel webfont-settings (default: off)", true);
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'use_webfonts', '0');");
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'webfont', 'Numans');");
lastStepStatus(0);
showUpdateStep("Inserting settings for nginx fastcgi-params file", true);
$fastcgiparams = '/etc/nginx/fastcgi_params';
if (isset($_POST['nginx_fastcgi_params']) && $_POST['nginx_fastcgi_params'] != '') {
$fastcgiparams = makeCorrectFile($_POST['nginx_fastcgi_params']);
}
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('nginx', 'fastcgiparams', '".$db->escape($fastcgiparams)."')");
lastStepStatus(0);
updateToVersion('0.9.28-svn6');
}
if (isFroxlorVersion('0.9.28-svn6')) {
showUpdateStep("Updating from 0.9.28-svn6 to 0.9.28 release candidate 1");
lastStepStatus(0);
updateToVersion('0.9.28-rc1');
}
if (isFroxlorVersion('0.9.28-rc1')) {
showUpdateStep("Updating from 0.9.28-rc1 to 0.9.28-rc2", true);
lastStepStatus(0);
$update_system_documentroot_use_default_value = isset($_POST['update_system_documentroot_use_default_value']) ? (int)$_POST['update_system_documentroot_use_default_value'] : '0';
showUpdateStep("Adding new settings for using domain name as default value for DocumentRoot path", true);
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'documentroot_use_default_value', '".$update_system_documentroot_use_default_value."');");
lastStepStatus(0);
updateToVersion('0.9.28-rc2');
}
if (isFroxlorVersion('0.9.28-rc2')) {
showUpdateStep("Updating from 0.9.28-rc2 to 0.9.28 final", true);
$db->query("DELETE FROM `panel_settings` WHERE `settinggroup`='system' AND `varname`='mod_log_sql'");
$db->query("DELETE FROM `panel_settings` WHERE `settinggroup`='system' AND `varname`='openssl_cnf'");
$db->query("ALTER TABLE `panel_domains` DROP `safemode`");
lastStepStatus(0);
updateToVersion('0.9.28');
}
if (isFroxlorVersion('0.9.28')) {
showUpdateStep("Updating from 0.9.28 final to 0.9.28.1");
lastStepStatus(0);
updateToVersion('0.9.28.1');
}
if (isFroxlorVersion('0.9.28.1')) {
showUpdateStep("Updating from 0.9.28.1 to 0.9.29-dev1", true);
lastStepStatus(0);
$hide_stdsubdomains = isset($_POST['hide_stdsubdomains']) ? (int)$_POST['hide_stdsubdomains'] : '0';
showUpdateStep('Setting value for "hide standard subdomains"', true);
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'phpconfigs_hidestdsubdomain', '".$hide_stdsubdomains."');");
lastStepStatus(0);
// don't advertise security questions - just set a default silently
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'passwordcryptfunc', '1');");
$fastcgiparams = $settings['nginx']['fastcgiparams'];
// check the faulty value explicitly
if ($fastcgiparams == '/etc/nginx/fastcgi_params/') {
$fastcgiparams = makeCorrectFile(substr(fastcgiparams,0,-1));
$db->query("UPDATE TABLE `panel_settings` SET `value`='".$db->escape($fastcgiparams)."' WHERE `varname`='fastcgiparams';");
}
updateToVersion('0.9.29-dev1');
}
if (isFroxlorVersion('0.9.29-dev1')) {
showUpdateStep("Updating from 0.9.29-dev1 to 0.9.29-dev2", true);
lastStepStatus(0);
$allow_themechange_c = isset($_POST['allow_themechange_c']) ? (int)$_POST['allow_themechange_c'] : '1';
$allow_themechange_a = isset($_POST['allow_themechange_a']) ? (int)$_POST['allow_themechange_a'] : '1';
showUpdateStep("Inserting new setting to allow/disallow theme changes (default: on)", true);
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'allow_theme_change_admin', '".$allow_themechange_a."');");
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'allow_theme_change_customer', '".$allow_themechange_c."');");
lastStepStatus(0);
updateToVersion('0.9.29-dev2');
}
if (isFroxlorVersion('0.9.29-dev2')) {
showUpdateStep("Updating from 0.9.29-dev2 to 0.9.29-dev3", true);
lastStepStatus(0);
$system_afxrservers = isset($_POST['system_afxrservers']) ? trim($_POST['system_afxrservers']) : '';
if ($system_afxrservers != '') {
$axfrservers = explode(',', $system_afxrservers);
$newaxfrserver = array();
foreach ($axfrservers as $index => $axfrserver) {
if (validate_ip($axfrserver, true) !== false) {
$newaxfrserver[] = $axfrserver;
}
}
$system_afxrservers = implode(", ", $newaxfrserver);
}
showUpdateStep("Inserting new setting for AFXR server", true);
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'axfrservers', '".$db->escape($system_afxrservers)."');");
lastStepStatus(0);
updateToVersion('0.9.29-dev3');
}
if (isFroxlorVersion('0.9.29-dev3')) {
showUpdateStep("Updating from 0.9.29-dev3 to 0.9.29-dev4", true);
lastStepStatus(0);
showUpdateStep("Adding new tables to database", true);
$db->query("CREATE TABLE IF NOT EXISTS `domain_ssl_settings` (
`id` int(5) NOT NULL auto_increment,
`domainid` int(11) NOT NULL,
`ssl_cert_file` text NOT NULL,
`ssl_key_file` text NOT NULL,
`ssl_ca_file` text NOT NULL,
`ssl_cert_chainfile` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;");
lastStepStatus(0);
$system_customersslpath = isset($_POST['system_customersslpath']) ? makeCorrectDir($_POST['system_customersslpath']) : '/etc/apache2/ssl/';
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'customer_ssl_path', '".$db->escape($system_customersslpath)."');");
updateToVersion('0.9.29-dev4');
}
if (isFroxlorVersion('0.9.29-dev4')) {
showUpdateStep("Updating from 0.9.29-dev4 to 0.9.29-rc1", true);
lastStepStatus(0);
// check for wrong vmail_maildirname database-field-name (bug #1242)
showUpdateStep("correcting Maildir setting database-field-name (if needed).", true);
$db->query("UPDATE `panel_settings` SET `varname` = 'vmail_maildirname' WHERE `settinggroup` = 'system' AND `varname` = 'vmail_maildir'");
lastStepStatus(0);
showUpdateStep("setting default php-configuration for php-fpm", true);
$dval = (isset($settings['system']['mod_fcgid_defaultini']) ? $settings['system']['mod_fcgid_defaultini'] : '1');
$db->query("INSERT INTO `panel_settings` SET `settinggroup` = 'phpfpm', `varname` = 'defaultini', `value` = '".(int)$dval."'");
$dval = (isset($settings['system']['mod_fcgid_ownvhost']) ? $settings['system']['mod_fcgid_ownvhost'] : '1');
$db->query("INSERT INTO `panel_settings` SET `settinggroup` = 'phpfpm', `varname` = 'vhost_defaultini', `value` = '".(int)$dval."'");
lastStepStatus(0);
updateToVersion('0.9.29-rc1');
}

View File

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

View File

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

View File

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

View File

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

407
js/jquery-ui-1.8.13.min.js vendored Normal file
View File

@@ -0,0 +1,407 @@
/*!
* jQuery UI 1.8.13
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI
*/
(function(a,d){function c(g,e){var i=g.nodeName.toLowerCase();if("area"===i){e=g.parentNode;i=e.name;if(!g.href||!i||e.nodeName.toLowerCase()!=="map")return false;g=a("img[usemap=#"+i+"]")[0];return!!g&&f(g)}return(/input|select|textarea|button|object/.test(i)?!g.disabled:"a"==i?g.href||e:e)&&f(g)}function f(g){return!a(g).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(!a.ui.version){a.extend(a.ui,{version:"1.8.13",
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({_focus:a.fn.focus,focus:function(g,e){return typeof g==="number"?this.each(function(){var i=this;setTimeout(function(){a(i).focus();
e&&e.call(i)},g)}):this._focus.apply(this,arguments)},scrollParent:function(){var g;g=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,
"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!g.length?a(document):g},zIndex:function(g){if(g!==d)return this.css("zIndex",g);if(this.length){g=a(this[0]);for(var e;g.length&&g[0]!==document;){e=g.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){e=parseInt(g.css("zIndex"),10);if(!isNaN(e)&&e!==0)return e}g=g.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",
function(g){g.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){function i(l,o,n,k){a.each(b,function(){o-=parseFloat(a.curCSS(l,"padding"+this,true))||0;if(n)o-=parseFloat(a.curCSS(l,"border"+this+"Width",true))||0;if(k)o-=parseFloat(a.curCSS(l,"margin"+this,true))||0});return o}var b=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),j={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,
outerHeight:a.fn.outerHeight};a.fn["inner"+e]=function(l){if(l===d)return j["inner"+e].call(this);return this.each(function(){a(this).css(h,i(this,l)+"px")})};a.fn["outer"+e]=function(l,o){if(typeof l!=="number")return j["outer"+e].call(this,l);return this.each(function(){a(this).css(h,i(this,l,true,o)+"px")})}});a.extend(a.expr[":"],{data:function(g,e,i){return!!a.data(g,i[3])},focusable:function(g){return c(g,!isNaN(a.attr(g,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),i=isNaN(e);
return(i||e>=0)&&c(g,!i)}});a(function(){var g=document.body,e=g.appendChild(e=document.createElement("div"));a.extend(e.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=e.offsetHeight===100;a.support.selectstart="onselectstart"in e;g.removeChild(e).style.display="none"});a.extend(a.ui,{plugin:{add:function(g,e,i){g=a.ui[g].prototype;for(var b in i){g.plugins[b]=g.plugins[b]||[];g.plugins[b].push([e,i[b]])}},call:function(g,e,i){if((e=g.plugins[e])&&g.element[0].parentNode)for(var b=
0;b<e.length;b++)g.options[e[b][0]]&&e[b][1].apply(g.element,i)}},contains:function(g,e){return document.compareDocumentPosition?g.compareDocumentPosition(e)&16:g!==e&&g.contains(e)},hasScroll:function(g,e){if(a(g).css("overflow")==="hidden")return false;e=e&&e==="left"?"scrollLeft":"scrollTop";var i=false;if(g[e]>0)return true;g[e]=1;i=g[e]>0;g[e]=0;return i},isOverAxis:function(g,e,i){return g>e&&g<e+i},isOver:function(g,e,i,b,h,j){return a.ui.isOverAxis(g,i,h)&&a.ui.isOverAxis(e,b,j)}})}})(jQuery);
(function(a,d){if(a.cleanData){var c=a.cleanData;a.cleanData=function(g){for(var e=0,i;(i=g[e])!=null;e++)a(i).triggerHandler("remove");c(g)}}else{var f=a.fn.remove;a.fn.remove=function(g,e){return this.each(function(){if(!e)if(!g||a.filter(g,[this]).length)a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return f.call(a(this),g,e)})}}a.widget=function(g,e,i){var b=g.split(".")[0],h;g=g.split(".")[1];h=b+"-"+g;if(!i){i=e;e=a.Widget}a.expr[":"][h]=function(j){return!!a.data(j,
g)};a[b]=a[b]||{};a[b][g]=function(j,l){arguments.length&&this._createWidget(j,l)};e=new e;e.options=a.extend(true,{},e.options);a[b][g].prototype=a.extend(true,e,{namespace:b,widgetName:g,widgetEventPrefix:a[b][g].prototype.widgetEventPrefix||g,widgetBaseClass:h},i);a.widget.bridge(g,a[b][g])};a.widget.bridge=function(g,e){a.fn[g]=function(i){var b=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!b&&h.length?a.extend.apply(null,[true,i].concat(h)):i;if(b&&i.charAt(0)==="_")return j;
b?this.each(function(){var l=a.data(this,g),o=l&&a.isFunction(l[i])?l[i].apply(l,h):l;if(o!==l&&o!==d){j=o;return false}}):this.each(function(){var l=a.data(this,g);l?l.option(i||{})._init():a.data(this,g,new e(i,this))});return j}};a.Widget=function(g,e){arguments.length&&this._createWidget(g,e)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(g,e){a.data(e,this.widgetName,this);this.element=a(e);this.options=a.extend(true,{},this.options,
this._getCreateOptions(),g);var i=this;this.element.bind("remove."+this.widgetName,function(){i.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
widget:function(){return this.element},option:function(g,e){var i=g;if(arguments.length===0)return a.extend({},this.options);if(typeof g==="string"){if(e===d)return this.options[g];i={};i[g]=e}this._setOptions(i);return this},_setOptions:function(g){var e=this;a.each(g,function(i,b){e._setOption(i,b)});return this},_setOption:function(g,e){this.options[g]=e;if(g==="disabled")this.widget()[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",e);return this},
enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(g,e,i){var b=this.options[g];e=a.Event(e);e.type=(g===this.widgetEventPrefix?g:this.widgetEventPrefix+g).toLowerCase();i=i||{};if(e.originalEvent){g=a.event.props.length;for(var h;g;){h=a.event.props[--g];e[h]=e.originalEvent[h]}}this.element.trigger(e,i);return!(a.isFunction(b)&&b.call(this.element[0],e,i)===false||e.isDefaultPrevented())}}})(jQuery);
(function(a){var d=false;a(document).mousedown(function(){d=false});a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var c=this;this.element.bind("mousedown."+this.widgetName,function(f){return c._mouseDown(f)}).bind("click."+this.widgetName,function(f){if(true===a.data(f.target,c.widgetName+".preventClickEvent")){a.removeData(f.target,c.widgetName+".preventClickEvent");f.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+
this.widgetName)},_mouseDown:function(c){if(!d){this._mouseStarted&&this._mouseUp(c);this._mouseDownEvent=c;var f=this,g=c.which==1,e=typeof this.options.cancel=="string"?a(c.target).parents().add(c.target).filter(this.options.cancel).length:false;if(!g||e||!this._mouseCapture(c))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){f.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=
this._mouseStart(c)!==false;if(!this._mouseStarted){c.preventDefault();return true}}true===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(i){return f._mouseMove(i)};this._mouseUpDelegate=function(i){return f._mouseUp(i)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.preventDefault();return d=true}},_mouseMove:function(c){if(a.browser.msie&&
!(document.documentMode>=9)&&!c.button)return this._mouseUp(c);if(this._mouseStarted){this._mouseDrag(c);return c.preventDefault()}if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,c)!==false)?this._mouseDrag(c):this._mouseUp(c);return!this._mouseStarted},_mouseUp:function(c){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=
false;c.target==this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",true);this._mouseStop(c)}return false},_mouseDistanceMet:function(c){return Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(d){var c=
this.options;if(this.helper||c.disabled||a(d.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(d);if(!this.handle)return false;a(c.iframeFix===true?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(a(this).offset()).appendTo("body")});return true},_mouseStart:function(d){var c=this.options;this.helper=
this._createHelper(d);this._cacheHelperProportions();if(a.ui.ddmanager)a.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:d.pageX-this.offset.left,top:d.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
this.originalPosition=this.position=this._generatePosition(d);this.originalPageX=d.pageX;this.originalPageY=d.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);c.containment&&this._setContainment();if(this._trigger("start",d)===false){this._clear();return false}this._cacheHelperProportions();a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,d);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(d,true);return true},_mouseDrag:function(d,c){this.position=this._generatePosition(d);
this.positionAbs=this._convertPositionTo("absolute");if(!c){c=this._uiHash();if(this._trigger("drag",d,c)===false){this._mouseUp({});return false}this.position=c.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,d);return false},_mouseStop:function(d){var c=false;if(a.ui.ddmanager&&!this.options.dropBehaviour)c=
a.ui.ddmanager.drop(this,d);if(this.dropped){c=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",d)!==false&&f._clear()})}else this._trigger("stop",
d)!==false&&this._clear();return false},_mouseUp:function(d){this.options.iframeFix===true&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});return a.ui.mouse.prototype._mouseUp.call(this,d)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(d){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
d.target)c=true});return c},_createHelper:function(d){var c=this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo);d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute");return d},_adjustOffsetFromHelper:function(d){if(typeof d=="string")d=d.split(" ");if(a.isArray(d))d=
{left:+d[0],top:+d[1]||0};if("left"in d)this.offset.click.left=d.left+this.margins.left;if("right"in d)this.offset.click.left=this.helperProportions.width-d.right+this.margins.left;if("top"in d)this.offset.click.top=d.top+this.margins.top;if("bottom"in d)this.offset.click.top=this.helperProportions.height-d.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var d=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&
a.ui.contains(this.scrollParent[0],this.offsetParent[0])){d.left+=this.scrollParent.scrollLeft();d.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)d={top:0,left:0};return{top:d.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:d.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var d=
this.element.position();return{top:d.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:d.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions=
{width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var d=this.options;if(d.containment=="parent")d.containment=this.helper[0].parentNode;if(d.containment=="document"||d.containment=="window")this.containment=[(d.containment=="document"?0:a(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(d.containment=="document"?0:a(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(d.containment=="document"?0:a(window).scrollLeft())+
a(d.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d.containment=="document"?0:a(window).scrollTop())+(a(d.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(d.containment)&&d.containment.constructor!=Array){d=a(d.containment);var c=d[0];if(c){d.offset();var f=a(c).css("overflow")!="hidden";this.containment=[(parseInt(a(c).css("borderLeftWidth"),
10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0),(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0),(f?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-
this.margins.top-this.margins.bottom];this.relative_container=d}}else if(d.containment.constructor==Array)this.containment=d.containment},_convertPositionTo:function(d,c){if(!c)c=this.position;d=d=="absolute"?1:-1;var f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&
a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(d){var c=this.options,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],
this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName),e=d.pageX,i=d.pageY;if(this.originalPosition){var b;if(this.containment){if(this.relative_container){b=this.relative_container.offset();b=[this.containment[0]+b.left,this.containment[1]+b.top,this.containment[2]+b.left,this.containment[3]+b.top]}else b=this.containment;if(d.pageX-this.offset.click.left<b[0])e=b[0]+this.offset.click.left;if(d.pageY-this.offset.click.top<b[1])i=b[1]+this.offset.click.top;
if(d.pageX-this.offset.click.left>b[2])e=b[2]+this.offset.click.left;if(d.pageY-this.offset.click.top>b[3])i=b[3]+this.offset.click.top}if(c.grid){i=this.originalPageY+Math.round((i-this.originalPageY)/c.grid[1])*c.grid[1];i=b?!(i-this.offset.click.top<b[1]||i-this.offset.click.top>b[3])?i:!(i-this.offset.click.top<b[1])?i-c.grid[1]:i+c.grid[1]:i;e=this.originalPageX+Math.round((e-this.originalPageX)/c.grid[0])*c.grid[0];e=b?!(e-this.offset.click.left<b[0]||e-this.offset.click.left>b[2])?e:!(e-this.offset.click.left<
b[0])?e-c.grid[0]:e+c.grid[0]:e}}return{top:i-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");
this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(d,c,f){f=f||this._uiHash();a.ui.plugin.call(this,d,[c,f]);if(d=="drag")this.positionAbs=this._convertPositionTo("absolute");return a.Widget.prototype._trigger.call(this,d,c,f)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.13"});
a.ui.plugin.add("draggable","connectToSortable",{start:function(d,c){var f=a(this).data("draggable"),g=f.options,e=a.extend({},c,{item:f.element});f.sortables=[];a(g.connectToSortable).each(function(){var i=a.data(this,"sortable");if(i&&!i.options.disabled){f.sortables.push({instance:i,shouldRevert:i.options.revert});i.refreshPositions();i._trigger("activate",d,e)}})},stop:function(d,c){var f=a(this).data("draggable"),g=a.extend({},c,{item:f.element});a.each(f.sortables,function(){if(this.instance.isOver){this.instance.isOver=
0;f.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(d);this.instance.options.helper=this.instance.options._helper;f.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",d,g)}})},drag:function(d,c){var f=a(this).data("draggable"),g=this;a.each(f.sortables,function(){this.instance.positionAbs=
f.positionAbs;this.instance.helperProportions=f.helperProportions;this.instance.offset.click=f.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(g).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return c.helper[0]};d.target=this.instance.currentItem[0];this.instance._mouseCapture(d,
true);this.instance._mouseStart(d,true,true);this.instance.offset.click.top=f.offset.click.top;this.instance.offset.click.left=f.offset.click.left;this.instance.offset.parent.left-=f.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=f.offset.parent.top-this.instance.offset.parent.top;f._trigger("toSortable",d);f.dropped=this.instance.element;f.currentItem=f.element;this.instance.fromOutside=f}this.instance.currentItem&&this.instance._mouseDrag(d)}else if(this.instance.isOver){this.instance.isOver=
0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",d,this.instance._uiHash(this.instance));this.instance._mouseStop(d,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();f._trigger("fromSortable",d);f.dropped=false}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var d=a("body"),c=a(this).data("draggable").options;if(d.css("cursor"))c._cursor=
d.css("cursor");d.css("cursor",c.cursor)},stop:function(){var d=a(this).data("draggable").options;d._cursor&&a("body").css("cursor",d._cursor)}});a.ui.plugin.add("draggable","opacity",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("opacity"))c._opacity=d.css("opacity");d.css("opacity",c.opacity)},stop:function(d,c){d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var d=a(this).data("draggable");
if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML")d.overflowOffset=d.scrollParent.offset()},drag:function(d){var c=a(this).data("draggable"),f=c.options,g=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x")if(c.overflowOffset.top+c.scrollParent[0].offsetHeight-d.pageY<f.scrollSensitivity)c.scrollParent[0].scrollTop=g=c.scrollParent[0].scrollTop+f.scrollSpeed;else if(d.pageY-c.overflowOffset.top<f.scrollSensitivity)c.scrollParent[0].scrollTop=
g=c.scrollParent[0].scrollTop-f.scrollSpeed;if(!f.axis||f.axis!="y")if(c.overflowOffset.left+c.scrollParent[0].offsetWidth-d.pageX<f.scrollSensitivity)c.scrollParent[0].scrollLeft=g=c.scrollParent[0].scrollLeft+f.scrollSpeed;else if(d.pageX-c.overflowOffset.left<f.scrollSensitivity)c.scrollParent[0].scrollLeft=g=c.scrollParent[0].scrollLeft-f.scrollSpeed}else{if(!f.axis||f.axis!="x")if(d.pageY-a(document).scrollTop()<f.scrollSensitivity)g=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed);
else if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity)g=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed);if(!f.axis||f.axis!="y")if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity)g=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed);else if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity)g=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}g!==false&&a.ui.ddmanager&&!f.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,
d)}});a.ui.plugin.add("draggable","snap",{start:function(){var d=a(this).data("draggable"),c=d.options;d.snapElements=[];a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var f=a(this),g=f.offset();this!=d.element[0]&&d.snapElements.push({item:this,width:f.outerWidth(),height:f.outerHeight(),top:g.top,left:g.left})})},drag:function(d,c){for(var f=a(this).data("draggable"),g=f.options,e=g.snapTolerance,i=c.offset.left,b=i+f.helperProportions.width,h=c.offset.top,
j=h+f.helperProportions.height,l=f.snapElements.length-1;l>=0;l--){var o=f.snapElements[l].left,n=o+f.snapElements[l].width,k=f.snapElements[l].top,m=k+f.snapElements[l].height;if(o-e<i&&i<n+e&&k-e<h&&h<m+e||o-e<i&&i<n+e&&k-e<j&&j<m+e||o-e<b&&b<n+e&&k-e<h&&h<m+e||o-e<b&&b<n+e&&k-e<j&&j<m+e){if(g.snapMode!="inner"){var p=Math.abs(k-j)<=e,q=Math.abs(m-h)<=e,s=Math.abs(o-b)<=e,r=Math.abs(n-i)<=e;if(p)c.position.top=f._convertPositionTo("relative",{top:k-f.helperProportions.height,left:0}).top-f.margins.top;
if(q)c.position.top=f._convertPositionTo("relative",{top:m,left:0}).top-f.margins.top;if(s)c.position.left=f._convertPositionTo("relative",{top:0,left:o-f.helperProportions.width}).left-f.margins.left;if(r)c.position.left=f._convertPositionTo("relative",{top:0,left:n}).left-f.margins.left}var u=p||q||s||r;if(g.snapMode!="outer"){p=Math.abs(k-h)<=e;q=Math.abs(m-j)<=e;s=Math.abs(o-i)<=e;r=Math.abs(n-b)<=e;if(p)c.position.top=f._convertPositionTo("relative",{top:k,left:0}).top-f.margins.top;if(q)c.position.top=
f._convertPositionTo("relative",{top:m-f.helperProportions.height,left:0}).top-f.margins.top;if(s)c.position.left=f._convertPositionTo("relative",{top:0,left:o}).left-f.margins.left;if(r)c.position.left=f._convertPositionTo("relative",{top:0,left:n-f.helperProportions.width}).left-f.margins.left}if(!f.snapElements[l].snapping&&(p||q||s||r||u))f.options.snap.snap&&f.options.snap.snap.call(f.element,d,a.extend(f._uiHash(),{snapItem:f.snapElements[l].item}));f.snapElements[l].snapping=p||q||s||r||u}else{f.snapElements[l].snapping&&
f.options.snap.release&&f.options.snap.release.call(f.element,d,a.extend(f._uiHash(),{snapItem:f.snapElements[l].item}));f.snapElements[l].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var d=a(this).data("draggable").options;d=a.makeArray(a(d.stack)).sort(function(f,g){return(parseInt(a(f).css("zIndex"),10)||0)-(parseInt(a(g).css("zIndex"),10)||0)});if(d.length){var c=parseInt(d[0].style.zIndex)||0;a(d).each(function(f){this.style.zIndex=c+f});this[0].style.zIndex=c+d.length}}});
a.ui.plugin.add("draggable","zIndex",{start:function(d,c){d=a(c.helper);c=a(this).data("draggable").options;if(d.css("zIndex"))c._zIndex=d.css("zIndex");d.css("zIndex",c.zIndex)},stop:function(d,c){d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);
(function(a){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var d=this.options,c=d.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(f){return f.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[d.scope]=a.ui.ddmanager.droppables[d.scope]||[];a.ui.ddmanager.droppables[d.scope].push(this);
d.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var d=a.ui.ddmanager.droppables[this.options.scope],c=0;c<d.length;c++)d[c]==this&&d.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(d,c){if(d=="accept")this.accept=a.isFunction(c)?c:function(f){return f.is(c)};a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&
this.element.addClass(this.options.activeClass);c&&this._trigger("activate",d,this.ui(c))},_deactivate:function(d){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);c&&this._trigger("deactivate",d,this.ui(c))},_over:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0]))if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
this._trigger("over",d,this.ui(c))}},_out:function(d){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0]))if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",d,this.ui(c))}},_drop:function(d,c){var f=c||a.ui.ddmanager.current;if(!f||(f.currentItem||f.element)[0]==this.element[0])return false;var g=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var e=
a.data(this,"droppable");if(e.options.greedy&&!e.options.disabled&&e.options.scope==f.options.scope&&e.accept.call(e.element[0],f.currentItem||f.element)&&a.ui.intersect(f,a.extend(e,{offset:e.element.offset()}),e.options.tolerance)){g=true;return false}});if(g)return false;if(this.accept.call(this.element[0],f.currentItem||f.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
d,this.ui(f));return this.element}return false},ui:function(d){return{draggable:d.currentItem||d.element,helper:d.helper,position:d.position,offset:d.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.13"});a.ui.intersect=function(d,c,f){if(!c.offset)return false;var g=(d.positionAbs||d.position.absolute).left,e=g+d.helperProportions.width,i=(d.positionAbs||d.position.absolute).top,b=i+d.helperProportions.height,h=c.offset.left,j=h+c.proportions.width,l=c.offset.top,o=l+c.proportions.height;
switch(f){case "fit":return h<=g&&e<=j&&l<=i&&b<=o;case "intersect":return h<g+d.helperProportions.width/2&&e-d.helperProportions.width/2<j&&l<i+d.helperProportions.height/2&&b-d.helperProportions.height/2<o;case "pointer":return a.ui.isOver((d.positionAbs||d.position.absolute).top+(d.clickOffset||d.offset.click).top,(d.positionAbs||d.position.absolute).left+(d.clickOffset||d.offset.click).left,l,h,c.proportions.height,c.proportions.width);case "touch":return(i>=l&&i<=o||b>=l&&b<=o||i<l&&b>o)&&(g>=
h&&g<=j||e>=h&&e<=j||g<h&&e>j);default:return false}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(d,c){var f=a.ui.ddmanager.droppables[d.options.scope]||[],g=c?c.type:null,e=(d.currentItem||d.element).find(":data(droppable)").andSelf(),i=0;a:for(;i<f.length;i++)if(!(f[i].options.disabled||d&&!f[i].accept.call(f[i].element[0],d.currentItem||d.element))){for(var b=0;b<e.length;b++)if(e[b]==f[i].element[0]){f[i].proportions.height=0;continue a}f[i].visible=f[i].element.css("display")!=
"none";if(f[i].visible){g=="mousedown"&&f[i]._activate.call(f[i],c);f[i].offset=f[i].element.offset();f[i].proportions={width:f[i].element[0].offsetWidth,height:f[i].element[0].offsetHeight}}}},drop:function(d,c){var f=false;a.each(a.ui.ddmanager.droppables[d.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&a.ui.intersect(d,this,this.options.tolerance))f=f||this._drop.call(this,c);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],d.currentItem||
d.element)){this.isout=1;this.isover=0;this._deactivate.call(this,c)}}});return f},drag:function(d,c){d.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(d,c);a.each(a.ui.ddmanager.droppables[d.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var f=a.ui.intersect(d,this,this.options.tolerance);if(f=!f&&this.isover==1?"isout":f&&this.isover==0?"isover":null){var g;if(this.options.greedy){var e=this.element.parents(":data(droppable):eq(0)");if(e.length){g=
a.data(e[0],"droppable");g.greedyChild=f=="isover"?1:0}}if(g&&f=="isover"){g.isover=0;g.isout=1;g._out.call(g,c)}this[f]=1;this[f=="isout"?"isover":"isout"]=0;this[f=="isover"?"_over":"_out"].call(this,c);if(g&&f=="isout"){g.isout=0;g.isover=1;g._over.call(g,c)}}}})}}})(jQuery);
(function(a){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var f=this,g=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!g.aspectRatio,aspectRatio:g.aspectRatio,originalElement:this.element,
_proportionallyResizeElements:[],_helper:g.helper||g.ghost||g.animate?g.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&a.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=g.handles||(!a(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var e=this.handles.split(",");this.handles={};for(var i=0;i<e.length;i++){var b=a.trim(e[i]),h=a('<div class="ui-resizable-handle '+("ui-resizable-"+b)+'"></div>');/sw|se|ne|nw/.test(b)&&h.css({zIndex:++g.zIndex});"se"==b&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[b]=".ui-resizable-"+b;this.element.append(h)}}this._renderAxis=function(j){j=j||this.element;for(var l in this.handles){if(this.handles[l].constructor==
String)this.handles[l]=a(this.handles[l],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=a(this.handles[l],this.element),n=0;n=/sw|ne|nw|se|n|s/.test(l)?o.outerHeight():o.outerWidth();o=["padding",/ne|nw|n/.test(l)?"Top":/se|sw|s/.test(l)?"Bottom":/^e$/.test(l)?"Right":"Left"].join("");j.css(o,n);this._proportionallyResize()}a(this.handles[l])}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!f.resizing){if(this.className)var j=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);f.axis=j&&j[1]?j[1]:"se"}});if(g.autoHide){this._handles.hide();a(this.element).addClass("ui-resizable-autohide").hover(function(){if(!g.disabled){a(this).removeClass("ui-resizable-autohide");f._handles.show()}},function(){if(!g.disabled)if(!f.resizing){a(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();
var f=function(e){a(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){f(this.element);var g=this.element;g.after(this.originalElement.css({position:g.css("position"),width:g.outerWidth(),height:g.outerHeight(),top:g.css("top"),left:g.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);f(this.originalElement);return this},_mouseCapture:function(f){var g=
false;for(var e in this.handles)if(a(this.handles[e])[0]==f.target)g=true;return!this.options.disabled&&g},_mouseStart:function(f){var g=this.options,e=this.element.position(),i=this.element;this.resizing=true;this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};if(i.is(".ui-draggable")||/absolute/.test(i.css("position")))i.css({position:"absolute",top:e.top,left:e.left});a.browser.opera&&/relative/.test(i.css("position"))&&i.css({position:"relative",top:"auto",left:"auto"});
this._renderProxy();e=d(this.helper.css("left"));var b=d(this.helper.css("top"));if(g.containment){e+=a(g.containment).scrollLeft()||0;b+=a(g.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:e,top:b};this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()};this.originalPosition={left:e,top:b};this.sizeDiff=
{width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=typeof g.aspectRatio=="number"?g.aspectRatio:this.originalSize.width/this.originalSize.height||1;g=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",g=="auto"?this.axis+"-resize":g);i.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(f){var g=this.helper,e=this.originalMousePosition,i=this._change[this.axis];
if(!i)return false;e=i.apply(this,[f,f.pageX-e.left||0,f.pageY-e.top||0]);if(this._aspectRatio||f.shiftKey)e=this._updateRatio(e,f);e=this._respectSize(e,f);this._propagate("resize",f);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(e);this._trigger("resize",f,this.ui());return false},_mouseStop:function(f){this.resizing=
false;var g=this.options,e=this;if(this._helper){var i=this._proportionallyResizeElements,b=i.length&&/textarea/i.test(i[0].nodeName);i=b&&a.ui.hasScroll(i[0],"left")?0:e.sizeDiff.height;b=b?0:e.sizeDiff.width;b={width:e.helper.width()-b,height:e.helper.height()-i};i=parseInt(e.element.css("left"),10)+(e.position.left-e.originalPosition.left)||null;var h=parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top)||null;g.animate||this.element.css(a.extend(b,{top:h,left:i}));e.helper.height(e.size.height);
e.helper.width(e.size.width);this._helper&&!g.animate&&this._proportionallyResize()}a("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",f);this._helper&&this.helper.remove();return false},_updateCache:function(f){this.offset=this.helper.offset();if(c(f.left))this.position.left=f.left;if(c(f.top))this.position.top=f.top;if(c(f.height))this.size.height=f.height;if(c(f.width))this.size.width=f.width},_updateRatio:function(f){var g=this.position,e=this.size,
i=this.axis;if(f.height)f.width=e.height*this.aspectRatio;else if(f.width)f.height=e.width/this.aspectRatio;if(i=="sw"){f.left=g.left+(e.width-f.width);f.top=null}if(i=="nw"){f.top=g.top+(e.height-f.height);f.left=g.left+(e.width-f.width)}return f},_respectSize:function(f){var g=this.options,e=this.axis,i=c(f.width)&&g.maxWidth&&g.maxWidth<f.width,b=c(f.height)&&g.maxHeight&&g.maxHeight<f.height,h=c(f.width)&&g.minWidth&&g.minWidth>f.width,j=c(f.height)&&g.minHeight&&g.minHeight>f.height;if(h)f.width=
g.minWidth;if(j)f.height=g.minHeight;if(i)f.width=g.maxWidth;if(b)f.height=g.maxHeight;var l=this.originalPosition.left+this.originalSize.width,o=this.position.top+this.size.height,n=/sw|nw|w/.test(e);e=/nw|ne|n/.test(e);if(h&&n)f.left=l-g.minWidth;if(i&&n)f.left=l-g.maxWidth;if(j&&e)f.top=o-g.minHeight;if(b&&e)f.top=o-g.maxHeight;if((g=!f.width&&!f.height)&&!f.left&&f.top)f.top=null;else if(g&&!f.top&&f.left)f.left=null;return f},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var f=
this.helper||this.element,g=0;g<this._proportionallyResizeElements.length;g++){var e=this._proportionallyResizeElements[g];if(!this.borderDif){var i=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],b=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=a.map(i,function(h,j){h=parseInt(h,10)||0;j=parseInt(b[j],10)||0;return h+j})}a.browser.msie&&(a(f).is(":hidden")||a(f).parents(":hidden").length)||
e.css({height:f.height()-this.borderDif[0]-this.borderDif[2]||0,width:f.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var f=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var g=a.browser.msie&&a.browser.version<7,e=g?1:0;g=g?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-
e+"px",top:this.elementOffset.top-e+"px",zIndex:++f.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(f,g){return{width:this.originalSize.width+g}},w:function(f,g){return{left:this.originalPosition.left+g,width:this.originalSize.width-g}},n:function(f,g,e){return{top:this.originalPosition.top+e,height:this.originalSize.height-e}},s:function(f,g,e){return{height:this.originalSize.height+e}},se:function(f,g,e){return a.extend(this._change.s.apply(this,
arguments),this._change.e.apply(this,[f,g,e]))},sw:function(f,g,e){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,g,e]))},ne:function(f,g,e){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,g,e]))},nw:function(f,g,e){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,g,e]))}},_propagate:function(f,g){a.ui.plugin.call(this,f,[g,this.ui()]);f!="resize"&&this._trigger(f,g,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,
element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.extend(a.ui.resizable,{version:"1.8.13"});a.ui.plugin.add("resizable","alsoResize",{start:function(){var f=a(this).data("resizable").options,g=function(e){a(e).each(function(){var i=a(this);i.data("resizable-alsoresize",{width:parseInt(i.width(),10),height:parseInt(i.height(),10),left:parseInt(i.css("left"),10),top:parseInt(i.css("top"),10),position:i.css("position")})})};
if(typeof f.alsoResize=="object"&&!f.alsoResize.parentNode)if(f.alsoResize.length){f.alsoResize=f.alsoResize[0];g(f.alsoResize)}else a.each(f.alsoResize,function(e){g(e)});else g(f.alsoResize)},resize:function(f,g){var e=a(this).data("resizable");f=e.options;var i=e.originalSize,b=e.originalPosition,h={height:e.size.height-i.height||0,width:e.size.width-i.width||0,top:e.position.top-b.top||0,left:e.position.left-b.left||0},j=function(l,o){a(l).each(function(){var n=a(this),k=a(this).data("resizable-alsoresize"),
m={},p=o&&o.length?o:n.parents(g.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(p,function(q,s){if((q=(k[s]||0)+(h[s]||0))&&q>=0)m[s]=q||null});if(a.browser.opera&&/relative/.test(n.css("position"))){e._revertToRelativePosition=true;n.css({position:"absolute",top:"auto",left:"auto"})}n.css(m)})};typeof f.alsoResize=="object"&&!f.alsoResize.nodeType?a.each(f.alsoResize,function(l,o){j(l,o)}):j(f.alsoResize)},stop:function(){var f=a(this).data("resizable"),g=f.options,
e=function(i){a(i).each(function(){var b=a(this);b.css({position:b.data("resizable-alsoresize").position})})};if(f._revertToRelativePosition){f._revertToRelativePosition=false;typeof g.alsoResize=="object"&&!g.alsoResize.nodeType?a.each(g.alsoResize,function(i){e(i)}):e(g.alsoResize)}a(this).removeData("resizable-alsoresize")}});a.ui.plugin.add("resizable","animate",{stop:function(f){var g=a(this).data("resizable"),e=g.options,i=g._proportionallyResizeElements,b=i.length&&/textarea/i.test(i[0].nodeName),
h=b&&a.ui.hasScroll(i[0],"left")?0:g.sizeDiff.height;b={width:g.size.width-(b?0:g.sizeDiff.width),height:g.size.height-h};h=parseInt(g.element.css("left"),10)+(g.position.left-g.originalPosition.left)||null;var j=parseInt(g.element.css("top"),10)+(g.position.top-g.originalPosition.top)||null;g.element.animate(a.extend(b,j&&h?{top:j,left:h}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var l={width:parseInt(g.element.css("width"),10),height:parseInt(g.element.css("height"),
10),top:parseInt(g.element.css("top"),10),left:parseInt(g.element.css("left"),10)};i&&i.length&&a(i[0]).css({width:l.width,height:l.height});g._updateCache(l);g._propagate("resize",f)}})}});a.ui.plugin.add("resizable","containment",{start:function(){var f=a(this).data("resizable"),g=f.element,e=f.options.containment;if(g=e instanceof a?e.get(0):/parent/.test(e)?g.parent().get(0):e){f.containerElement=a(g);if(/document/.test(e)||e==document){f.containerOffset={left:0,top:0};f.containerPosition={left:0,
top:0};f.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{var i=a(g),b=[];a(["Top","Right","Left","Bottom"]).each(function(l,o){b[l]=d(i.css("padding"+o))});f.containerOffset=i.offset();f.containerPosition=i.position();f.containerSize={height:i.innerHeight()-b[3],width:i.innerWidth()-b[1]};e=f.containerOffset;var h=f.containerSize.height,j=f.containerSize.width;j=a.ui.hasScroll(g,"left")?g.scrollWidth:j;
h=a.ui.hasScroll(g)?g.scrollHeight:h;f.parentData={element:g,left:e.left,top:e.top,width:j,height:h}}}},resize:function(f){var g=a(this).data("resizable"),e=g.options,i=g.containerOffset,b=g.position;f=g._aspectRatio||f.shiftKey;var h={top:0,left:0},j=g.containerElement;if(j[0]!=document&&/static/.test(j.css("position")))h=i;if(b.left<(g._helper?i.left:0)){g.size.width+=g._helper?g.position.left-i.left:g.position.left-h.left;if(f)g.size.height=g.size.width/e.aspectRatio;g.position.left=e.helper?i.left:
0}if(b.top<(g._helper?i.top:0)){g.size.height+=g._helper?g.position.top-i.top:g.position.top;if(f)g.size.width=g.size.height*e.aspectRatio;g.position.top=g._helper?i.top:0}g.offset.left=g.parentData.left+g.position.left;g.offset.top=g.parentData.top+g.position.top;e=Math.abs((g._helper?g.offset.left-h.left:g.offset.left-h.left)+g.sizeDiff.width);i=Math.abs((g._helper?g.offset.top-h.top:g.offset.top-i.top)+g.sizeDiff.height);b=g.containerElement.get(0)==g.element.parent().get(0);h=/relative|absolute/.test(g.containerElement.css("position"));
if(b&&h)e-=g.parentData.left;if(e+g.size.width>=g.parentData.width){g.size.width=g.parentData.width-e;if(f)g.size.height=g.size.width/g.aspectRatio}if(i+g.size.height>=g.parentData.height){g.size.height=g.parentData.height-i;if(f)g.size.width=g.size.height*g.aspectRatio}},stop:function(){var f=a(this).data("resizable"),g=f.options,e=f.containerOffset,i=f.containerPosition,b=f.containerElement,h=a(f.helper),j=h.offset(),l=h.outerWidth()-f.sizeDiff.width;h=h.outerHeight()-f.sizeDiff.height;f._helper&&
!g.animate&&/relative/.test(b.css("position"))&&a(this).css({left:j.left-i.left-e.left,width:l,height:h});f._helper&&!g.animate&&/static/.test(b.css("position"))&&a(this).css({left:j.left-i.left-e.left,width:l,height:h})}});a.ui.plugin.add("resizable","ghost",{start:function(){var f=a(this).data("resizable"),g=f.options,e=f.size;f.ghost=f.originalElement.clone();f.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof g.ghost==
"string"?g.ghost:"");f.ghost.appendTo(f.helper)},resize:function(){var f=a(this).data("resizable");f.ghost&&f.ghost.css({position:"relative",height:f.size.height,width:f.size.width})},stop:function(){var f=a(this).data("resizable");f.ghost&&f.helper&&f.helper.get(0).removeChild(f.ghost.get(0))}});a.ui.plugin.add("resizable","grid",{resize:function(){var f=a(this).data("resizable"),g=f.options,e=f.size,i=f.originalSize,b=f.originalPosition,h=f.axis;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;
var j=Math.round((e.width-i.width)/(g.grid[0]||1))*(g.grid[0]||1);g=Math.round((e.height-i.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(h)){f.size.width=i.width+j;f.size.height=i.height+g}else if(/^(ne)$/.test(h)){f.size.width=i.width+j;f.size.height=i.height+g;f.position.top=b.top-g}else{if(/^(sw)$/.test(h)){f.size.width=i.width+j;f.size.height=i.height+g}else{f.size.width=i.width+j;f.size.height=i.height+g;f.position.top=b.top-g}f.position.left=b.left-j}}});var d=function(f){return parseInt(f,
10)||0},c=function(f){return!isNaN(parseInt(f,10))}})(jQuery);
(function(a){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var d=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(d.options.filter,d.element[0]);c.each(function(){var f=a(this),g=f.offset();a.data(this,"selectable-item",{element:this,$element:f,left:g.left,top:g.top,right:g.left+f.outerWidth(),bottom:g.top+f.outerHeight(),startselected:false,selected:f.hasClass("ui-selected"),
selecting:f.hasClass("ui-selecting"),unselecting:f.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(d){var c=this;this.opos=[d.pageX,
d.pageY];if(!this.options.disabled){var f=this.options;this.selectees=a(f.filter,this.element[0]);this._trigger("start",d);a(f.appendTo).append(this.helper);this.helper.css({left:d.clientX,top:d.clientY,width:0,height:0});f.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var g=a.data(this,"selectable-item");g.startselected=true;if(!d.metaKey){g.$element.removeClass("ui-selected");g.selected=false;g.$element.addClass("ui-unselecting");g.unselecting=true;c._trigger("unselecting",
d,{unselecting:g.element})}});a(d.target).parents().andSelf().each(function(){var g=a.data(this,"selectable-item");if(g){var e=!d.metaKey||!g.$element.hasClass("ui-selected");g.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting");g.unselecting=!e;g.selecting=e;(g.selected=e)?c._trigger("selecting",d,{selecting:g.element}):c._trigger("unselecting",d,{unselecting:g.element});return false}})}},_mouseDrag:function(d){var c=this;this.dragged=true;if(!this.options.disabled){var f=
this.options,g=this.opos[0],e=this.opos[1],i=d.pageX,b=d.pageY;if(g>i){var h=i;i=g;g=h}if(e>b){h=b;b=e;e=h}this.helper.css({left:g,top:e,width:i-g,height:b-e});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!(!j||j.element==c.element[0])){var l=false;if(f.tolerance=="touch")l=!(j.left>i||j.right<g||j.top>b||j.bottom<e);else if(f.tolerance=="fit")l=j.left>g&&j.right<i&&j.top>e&&j.bottom<b;if(l){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");
j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;c._trigger("selecting",d,{selecting:j.element})}}else{if(j.selecting)if(d.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}c._trigger("unselecting",d,{unselecting:j.element})}if(j.selected)if(!d.metaKey&&
!j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;c._trigger("unselecting",d,{unselecting:j.element})}}}});return false}},_mouseStop:function(d){var c=this;this.dragged=false;a(".ui-unselecting",this.element[0]).each(function(){var f=a.data(this,"selectable-item");f.$element.removeClass("ui-unselecting");f.unselecting=false;f.startselected=false;c._trigger("unselected",d,{unselected:f.element})});a(".ui-selecting",this.element[0]).each(function(){var f=
a.data(this,"selectable-item");f.$element.removeClass("ui-selecting").addClass("ui-selected");f.selecting=false;f.selected=true;f.startselected=true;c._trigger("selected",d,{selected:f.element})});this._trigger("stop",d);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.13"})})(jQuery);
(function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var d=this.options;this.containerCache={};this.element.addClass("ui-sortable");
this.refresh();this.floating=this.items.length?d.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var d=this.items.length-1;d>=0;d--)this.items[d].item.removeData("sortable-item");return this},_setOption:function(d,c){if(d===
"disabled"){this.options[d]=c;this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")}else a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(d,c){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(d);var f=null,g=this;a(d.target).parents().each(function(){if(a.data(this,"sortable-item")==g){f=a(this);return false}});if(a.data(d.target,"sortable-item")==g)f=a(d.target);if(!f)return false;if(this.options.handle&&
!c){var e=false;a(this.options.handle,f).find("*").andSelf().each(function(){if(this==d.target)e=true});if(!e)return false}this.currentItem=f;this._removeCurrentsFromItems();return true},_mouseStart:function(d,c,f){c=this.options;var g=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(d);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,
left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:d.pageX-this.offset.left,top:d.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(d);this.originalPageX=d.pageX;this.originalPageY=d.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();c.containment&&this._setContainment();if(c.cursor){if(a("body").css("cursor"))this._storedCursor=a("body").css("cursor");a("body").css("cursor",c.cursor)}if(c.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",c.opacity)}if(c.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",c.zIndex)}if(this.scrollParent[0]!=
document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",d,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!f)for(f=this.containers.length-1;f>=0;f--)this.containers[f]._trigger("activate",d,g._uiHash(this));if(a.ui.ddmanager)a.ui.ddmanager.current=this;a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,d);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(d);
return true},_mouseDrag:function(d){this.position=this._generatePosition(d);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var c=this.options,f=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-d.pageY<c.scrollSensitivity)this.scrollParent[0].scrollTop=f=this.scrollParent[0].scrollTop+c.scrollSpeed;else if(d.pageY-this.overflowOffset.top<
c.scrollSensitivity)this.scrollParent[0].scrollTop=f=this.scrollParent[0].scrollTop-c.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-d.pageX<c.scrollSensitivity)this.scrollParent[0].scrollLeft=f=this.scrollParent[0].scrollLeft+c.scrollSpeed;else if(d.pageX-this.overflowOffset.left<c.scrollSensitivity)this.scrollParent[0].scrollLeft=f=this.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(d.pageY-a(document).scrollTop()<c.scrollSensitivity)f=a(document).scrollTop(a(document).scrollTop()-
c.scrollSpeed);else if(a(window).height()-(d.pageY-a(document).scrollTop())<c.scrollSensitivity)f=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed);if(d.pageX-a(document).scrollLeft()<c.scrollSensitivity)f=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed);else if(a(window).width()-(d.pageX-a(document).scrollLeft())<c.scrollSensitivity)f=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed)}f!==false&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,
d)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(c=this.items.length-1;c>=0;c--){f=this.items[c];var g=f.item[0],e=this._intersectsWithPointer(f);if(e)if(g!=this.currentItem[0]&&this.placeholder[e==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],
g):true)){this.direction=e==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(d,f);else break;this._trigger("change",d,this._uiHash());break}}this._contactContainers(d);a.ui.ddmanager&&a.ui.ddmanager.drag(this,d);this._trigger("sort",d,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(d,c){if(d){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,d);if(this.options.revert){var f=this;c=f.placeholder.offset();
f.reverting=true;a(this.helper).animate({left:c.left-this.offset.parent.left-f.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:c.top-this.offset.parent.top-f.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){f._clear(d)})}else this._clear(d,c);return false}},cancel:function(){var d=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):
this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,d._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,d._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();a.extend(this,{helper:null,
dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(d){var c=this._getItemsAsjQuery(d&&d.connected),f=[];d=d||{};a(c).each(function(){var g=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||/(.+)[-=_](.+)/);if(g)f.push((d.key||g[1]+"[]")+"="+(d.key&&d.expression?g[1]:g[2]))});!f.length&&d.key&&f.push(d.key+"=");return f.join("&")},
toArray:function(d){var c=this._getItemsAsjQuery(d&&d.connected),f=[];d=d||{};c.each(function(){f.push(a(d.item||this).attr(d.attribute||"id")||"")});return f},_intersectsWith:function(d){var c=this.positionAbs.left,f=c+this.helperProportions.width,g=this.positionAbs.top,e=g+this.helperProportions.height,i=d.left,b=i+d.width,h=d.top,j=h+d.height,l=this.offset.click.top,o=this.offset.click.left;l=g+l>h&&g+l<j&&c+o>i&&c+o<b;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||
this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>d[this.floating?"width":"height"]?l:i<c+this.helperProportions.width/2&&f-this.helperProportions.width/2<b&&h<g+this.helperProportions.height/2&&e-this.helperProportions.height/2<j},_intersectsWithPointer:function(d){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height);d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width);c=c&&d;d=this._getDragVerticalDirection();
var f=this._getDragHorizontalDirection();if(!c)return false;return this.floating?f&&f=="right"||d=="down"?2:1:d&&(d=="down"?2:1)},_intersectsWithSides:function(d){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top+d.height/2,d.height);d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left+d.width/2,d.width);var f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return this.floating&&g?g=="right"&&d||g=="left"&&!d:f&&(f=="down"&&c||f=="up"&&!c)},
_getDragVerticalDirection:function(){var d=this.positionAbs.top-this.lastPositionAbs.top;return d!=0&&(d>0?"down":"up")},_getDragHorizontalDirection:function(){var d=this.positionAbs.left-this.lastPositionAbs.left;return d!=0&&(d>0?"right":"left")},refresh:function(d){this._refreshItems(d);this.refreshPositions();return this},_connectWith:function(){var d=this.options;return d.connectWith.constructor==String?[d.connectWith]:d.connectWith},_getItemsAsjQuery:function(d){var c=[],f=[],g=this._connectWith();
if(g&&d)for(d=g.length-1;d>=0;d--)for(var e=a(g[d]),i=e.length-1;i>=0;i--){var b=a.data(e[i],"sortable");if(b&&b!=this&&!b.options.disabled)f.push([a.isFunction(b.options.items)?b.options.items.call(b.element):a(b.options.items,b.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),b])}f.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),
this]);for(d=f.length-1;d>=0;d--)f[d][0].each(function(){c.push(this)});return a(c)},_removeCurrentsFromItems:function(){for(var d=this.currentItem.find(":data(sortable-item)"),c=0;c<this.items.length;c++)for(var f=0;f<d.length;f++)d[f]==this.items[c].item[0]&&this.items.splice(c,1)},_refreshItems:function(d){this.items=[];this.containers=[this];var c=this.items,f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],d,{item:this.currentItem}):a(this.options.items,this.element),
this]],g=this._connectWith();if(g)for(var e=g.length-1;e>=0;e--)for(var i=a(g[e]),b=i.length-1;b>=0;b--){var h=a.data(i[b],"sortable");if(h&&h!=this&&!h.options.disabled){f.push([a.isFunction(h.options.items)?h.options.items.call(h.element[0],d,{item:this.currentItem}):a(h.options.items,h.element),h]);this.containers.push(h)}}for(e=f.length-1;e>=0;e--){d=f[e][1];g=f[e][0];b=0;for(i=g.length;b<i;b++){h=a(g[b]);h.data("sortable-item",d);c.push({item:h,instance:d,width:0,height:0,left:0,top:0})}}},refreshPositions:function(d){if(this.offsetParent&&
this.helper)this.offset.parent=this._getParentOffset();for(var c=this.items.length-1;c>=0;c--){var f=this.items[c];if(!(f.instance!=this.currentContainer&&this.currentContainer&&f.item[0]!=this.currentItem[0])){var g=this.options.toleranceElement?a(this.options.toleranceElement,f.item):f.item;if(!d){f.width=g.outerWidth();f.height=g.outerHeight()}g=g.offset();f.left=g.left;f.top=g.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=
this.containers.length-1;c>=0;c--){g=this.containers[c].element.offset();this.containers[c].containerCache.left=g.left;this.containers[c].containerCache.top=g.top;this.containers[c].containerCache.width=this.containers[c].element.outerWidth();this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(d){var c=d||this,f=c.options;if(!f.placeholder||f.placeholder.constructor==String){var g=f.placeholder;f.placeholder={element:function(){var e=
a(document.createElement(c.currentItem[0].nodeName)).addClass(g||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!g)e.style.visibility="hidden";return e},update:function(e,i){if(!(g&&!f.forcePlaceholderSize)){i.height()||i.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10));i.width()||i.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||
0,10))}}}}c.placeholder=a(f.placeholder.element.call(c.element,c.currentItem));c.currentItem.after(c.placeholder);f.placeholder.update(c,c.placeholder)},_contactContainers:function(d){for(var c=null,f=null,g=this.containers.length-1;g>=0;g--)if(!a.ui.contains(this.currentItem[0],this.containers[g].element[0]))if(this._intersectsWith(this.containers[g].containerCache)){if(!(c&&a.ui.contains(this.containers[g].element[0],c.element[0]))){c=this.containers[g];f=g}}else if(this.containers[g].containerCache.over){this.containers[g]._trigger("out",
d,this._uiHash(this));this.containers[g].containerCache.over=0}if(c)if(this.containers.length===1){this.containers[f]._trigger("over",d,this._uiHash(this));this.containers[f].containerCache.over=1}else if(this.currentContainer!=this.containers[f]){c=1E4;g=null;for(var e=this.positionAbs[this.containers[f].floating?"left":"top"],i=this.items.length-1;i>=0;i--)if(a.ui.contains(this.containers[f].element[0],this.items[i].item[0])){var b=this.items[i][this.containers[f].floating?"left":"top"];if(Math.abs(b-
e)<c){c=Math.abs(b-e);g=this.items[i]}}if(g||this.options.dropOnEmpty){this.currentContainer=this.containers[f];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[f].element,true);this._trigger("change",d,this._uiHash());this.containers[f]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[f]._trigger("over",d,this._uiHash(this));this.containers[f].containerCache.over=1}}},_createHelper:function(d){var c=
this.options;d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[d,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]);if(d[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(d[0].style.width==
""||c.forceHelperSize)d.width(this.currentItem.width());if(d[0].style.height==""||c.forceHelperSize)d.height(this.currentItem.height());return d},_adjustOffsetFromHelper:function(d){if(typeof d=="string")d=d.split(" ");if(a.isArray(d))d={left:+d[0],top:+d[1]||0};if("left"in d)this.offset.click.left=d.left+this.margins.left;if("right"in d)this.offset.click.left=this.helperProportions.width-d.right+this.margins.left;if("top"in d)this.offset.click.top=d.top+this.margins.top;if("bottom"in d)this.offset.click.top=
this.helperProportions.height-d.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var d=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){d.left+=this.scrollParent.scrollLeft();d.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)d=
{top:0,left:0};return{top:d.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:d.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var d=this.currentItem.position();return{top:d.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:d.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),
10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var d=this.options;if(d.containment=="parent")d.containment=this.helper[0].parentNode;if(d.containment=="document"||d.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(d.containment=="document"?
document:window).width()-this.helperProportions.width-this.margins.left,(a(d.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(d.containment)){var c=a(d.containment)[0];d=a(d.containment).offset();var f=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),
10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(f?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(f?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(d,c){if(!c)c=
this.position;d=d=="absolute"?1:-1;var f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&
this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(d){var c=this.options,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();
var e=d.pageX,i=d.pageY;if(this.originalPosition){if(this.containment){if(d.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(d.pageY-this.offset.click.top<this.containment[1])i=this.containment[1]+this.offset.click.top;if(d.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(d.pageY-this.offset.click.top>this.containment[3])i=this.containment[3]+this.offset.click.top}if(c.grid){i=this.originalPageY+Math.round((i-
this.originalPageY)/c.grid[1])*c.grid[1];i=this.containment?!(i-this.offset.click.top<this.containment[1]||i-this.offset.click.top>this.containment[3])?i:!(i-this.offset.click.top<this.containment[1])?i-c.grid[1]:i+c.grid[1]:i;e=this.originalPageX+Math.round((e-this.originalPageX)/c.grid[0])*c.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?e:!(e-this.offset.click.left<this.containment[0])?e-c.grid[0]:e+c.grid[0]:e}}return{top:i-
this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())}},_rearrange:function(d,c,f,g){f?f[0].appendChild(this.placeholder[0]):c.item[0].parentNode.insertBefore(this.placeholder[0],
this.direction=="down"?c.item[0]:c.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var e=this,i=this.counter;window.setTimeout(function(){i==e.counter&&e.refreshPositions(!g)},0)},_clear:function(d,c){this.reverting=false;var f=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var g in this._storedCSS)if(this._storedCSS[g]=="auto"||this._storedCSS[g]=="static")this._storedCSS[g]=
"";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&f.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c)f.push(function(e){this._trigger("update",e,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||f.push(function(e){this._trigger("remove",
e,this._uiHash())});for(g=this.containers.length-1;g>=0;g--)if(a.ui.contains(this.containers[g].element[0],this.currentItem[0])&&!c){f.push(function(e){return function(i){e._trigger("receive",i,this._uiHash(this))}}.call(this,this.containers[g]));f.push(function(e){return function(i){e._trigger("update",i,this._uiHash(this))}}.call(this,this.containers[g]))}}for(g=this.containers.length-1;g>=0;g--){c||f.push(function(e){return function(i){e._trigger("deactivate",i,this._uiHash(this))}}.call(this,
this.containers[g]));if(this.containers[g].containerCache.over){f.push(function(e){return function(i){e._trigger("out",i,this._uiHash(this))}}.call(this,this.containers[g]));this.containers[g].containerCache.over=0}}this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",
d,this._uiHash());for(g=0;g<f.length;g++)f[g].call(this,d);this._trigger("stop",d,this._uiHash())}return false}c||this._trigger("beforeStop",d,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!c){for(g=0;g<f.length;g++)f[g].call(this,d);this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},
_uiHash:function(d){var c=d||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:d?d.element:null}}});a.extend(a.ui.sortable,{version:"1.8.13"})})(jQuery);
jQuery.effects||function(a,d){function c(n){var k;if(n&&n.constructor==Array&&n.length==3)return n;if(k=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n))return[parseInt(k[1],10),parseInt(k[2],10),parseInt(k[3],10)];if(k=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n))return[parseFloat(k[1])*2.55,parseFloat(k[2])*2.55,parseFloat(k[3])*2.55];if(k=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n))return[parseInt(k[1],
16),parseInt(k[2],16),parseInt(k[3],16)];if(k=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n))return[parseInt(k[1]+k[1],16),parseInt(k[2]+k[2],16),parseInt(k[3]+k[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(n))return j.transparent;return j[a.trim(n).toLowerCase()]}function f(n,k){var m;do{m=a.curCSS(n,k);if(m!=""&&m!="transparent"||a.nodeName(n,"body"))break;k="backgroundColor"}while(n=n.parentNode);return c(m)}function g(){var n=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
k={},m,p;if(n&&n.length&&n[0]&&n[n[0]])for(var q=n.length;q--;){m=n[q];if(typeof n[m]=="string"){p=m.replace(/\-(\w)/g,function(s,r){return r.toUpperCase()});k[p]=n[m]}}else for(m in n)if(typeof n[m]==="string")k[m]=n[m];return k}function e(n){var k,m;for(k in n){m=n[k];if(m==null||a.isFunction(m)||k in o||/scrollbar/.test(k)||!/color/i.test(k)&&isNaN(parseFloat(m)))delete n[k]}return n}function i(n,k){var m={_:0},p;for(p in k)if(n[p]!=k[p])m[p]=k[p];return m}function b(n,k,m,p){if(typeof n=="object"){p=
k;m=null;k=n;n=k.effect}if(a.isFunction(k)){p=k;m=null;k={}}if(typeof k=="number"||a.fx.speeds[k]){p=m;m=k;k={}}if(a.isFunction(m)){p=m;m=null}k=k||{};m=m||k.duration;m=a.fx.off?0:typeof m=="number"?m:m in a.fx.speeds?a.fx.speeds[m]:a.fx.speeds._default;p=p||k.complete;return[n,k,m,p]}function h(n){if(!n||typeof n==="number"||a.fx.speeds[n])return true;if(typeof n==="string"&&!a.effects[n])return true;return false}a.effects={};a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
"borderTopColor","borderColor","color","outlineColor"],function(n,k){a.fx.step[k]=function(m){if(!m.colorInit){m.start=f(m.elem,k);m.end=c(m.end);m.colorInit=true}m.elem.style[k]="rgb("+Math.max(Math.min(parseInt(m.pos*(m.end[0]-m.start[0])+m.start[0],10),255),0)+","+Math.max(Math.min(parseInt(m.pos*(m.end[1]-m.start[1])+m.start[1],10),255),0)+","+Math.max(Math.min(parseInt(m.pos*(m.end[2]-m.start[2])+m.start[2],10),255),0)+")"}});var j={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},l=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(n,k,m,
p){if(a.isFunction(m)){p=m;m=null}return this.queue(function(){var q=a(this),s=q.attr("style")||" ",r=e(g.call(this)),u,v=q.attr("class");a.each(l,function(w,x){n[x]&&q[x+"Class"](n[x])});u=e(g.call(this));q.attr("class",v);q.animate(i(r,u),{queue:false,duration:k,easding:m,complete:function(){a.each(l,function(w,x){n[x]&&q[x+"Class"](n[x])});if(typeof q.attr("style")=="object"){q.attr("style").cssText="";q.attr("style").cssText=s}else q.attr("style",s);p&&p.apply(this,arguments);a.dequeue(this)}})})};
a.fn.extend({_addClass:a.fn.addClass,addClass:function(n,k,m,p){return k?a.effects.animateClass.apply(this,[{add:n},k,m,p]):this._addClass(n)},_removeClass:a.fn.removeClass,removeClass:function(n,k,m,p){return k?a.effects.animateClass.apply(this,[{remove:n},k,m,p]):this._removeClass(n)},_toggleClass:a.fn.toggleClass,toggleClass:function(n,k,m,p,q){return typeof k=="boolean"||k===d?m?a.effects.animateClass.apply(this,[k?{add:n}:{remove:n},m,p,q]):this._toggleClass(n,k):a.effects.animateClass.apply(this,
[{toggle:n},k,m,p])},switchClass:function(n,k,m,p,q){return a.effects.animateClass.apply(this,[{add:k,remove:n},m,p,q])}});a.extend(a.effects,{version:"1.8.13",save:function(n,k){for(var m=0;m<k.length;m++)k[m]!==null&&n.data("ec.storage."+k[m],n[0].style[k[m]])},restore:function(n,k){for(var m=0;m<k.length;m++)k[m]!==null&&n.css(k[m],n.data("ec.storage."+k[m]))},setMode:function(n,k){if(k=="toggle")k=n.is(":hidden")?"show":"hide";return k},getBaseline:function(n,k){var m;switch(n[0]){case "top":m=
0;break;case "middle":m=0.5;break;case "bottom":m=1;break;default:m=n[0]/k.height}switch(n[1]){case "left":n=0;break;case "center":n=0.5;break;case "right":n=1;break;default:n=n[1]/k.width}return{x:n,y:m}},createWrapper:function(n){if(n.parent().is(".ui-effects-wrapper"))return n.parent();var k={width:n.outerWidth(true),height:n.outerHeight(true),"float":n.css("float")},m=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});
n.wrap(m);m=n.parent();if(n.css("position")=="static"){m.css({position:"relative"});n.css({position:"relative"})}else{a.extend(k,{position:n.css("position"),zIndex:n.css("z-index")});a.each(["top","left","bottom","right"],function(p,q){k[q]=n.css(q);if(isNaN(parseInt(k[q],10)))k[q]="auto"});n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return m.css(k).show()},removeWrapper:function(n){if(n.parent().is(".ui-effects-wrapper"))return n.parent().replaceWith(n);return n},setTransition:function(n,
k,m,p){p=p||{};a.each(k,function(q,s){unit=n.cssUnit(s);if(unit[0]>0)p[s]=unit[0]*m+unit[1]});return p}});a.fn.extend({effect:function(n){var k=b.apply(this,arguments),m={options:k[1],duration:k[2],callback:k[3]};k=m.options.mode;var p=a.effects[n];if(a.fx.off||!p)return k?this[k](m.duration,m.callback):this.each(function(){m.callback&&m.callback.call(this)});return p.call(this,m)},_show:a.fn.show,show:function(n){if(h(n))return this._show.apply(this,arguments);else{var k=b.apply(this,arguments);
k[1].mode="show";return this.effect.apply(this,k)}},_hide:a.fn.hide,hide:function(n){if(h(n))return this._hide.apply(this,arguments);else{var k=b.apply(this,arguments);k[1].mode="hide";return this.effect.apply(this,k)}},__toggle:a.fn.toggle,toggle:function(n){if(h(n)||typeof n==="boolean"||a.isFunction(n))return this.__toggle.apply(this,arguments);else{var k=b.apply(this,arguments);k[1].mode="toggle";return this.effect.apply(this,k)}},cssUnit:function(n){var k=this.css(n),m=[];a.each(["em","px","%",
"pt"],function(p,q){if(k.indexOf(q)>0)m=[parseFloat(k),q]});return m}});a.easing.jswing=a.easing.swing;a.extend(a.easing,{def:"easeOutQuad",swing:function(n,k,m,p,q){return a.easing[a.easing.def](n,k,m,p,q)},easeInQuad:function(n,k,m,p,q){return p*(k/=q)*k+m},easeOutQuad:function(n,k,m,p,q){return-p*(k/=q)*(k-2)+m},easeInOutQuad:function(n,k,m,p,q){if((k/=q/2)<1)return p/2*k*k+m;return-p/2*(--k*(k-2)-1)+m},easeInCubic:function(n,k,m,p,q){return p*(k/=q)*k*k+m},easeOutCubic:function(n,k,m,p,q){return p*
((k=k/q-1)*k*k+1)+m},easeInOutCubic:function(n,k,m,p,q){if((k/=q/2)<1)return p/2*k*k*k+m;return p/2*((k-=2)*k*k+2)+m},easeInQuart:function(n,k,m,p,q){return p*(k/=q)*k*k*k+m},easeOutQuart:function(n,k,m,p,q){return-p*((k=k/q-1)*k*k*k-1)+m},easeInOutQuart:function(n,k,m,p,q){if((k/=q/2)<1)return p/2*k*k*k*k+m;return-p/2*((k-=2)*k*k*k-2)+m},easeInQuint:function(n,k,m,p,q){return p*(k/=q)*k*k*k*k+m},easeOutQuint:function(n,k,m,p,q){return p*((k=k/q-1)*k*k*k*k+1)+m},easeInOutQuint:function(n,k,m,p,q){if((k/=
q/2)<1)return p/2*k*k*k*k*k+m;return p/2*((k-=2)*k*k*k*k+2)+m},easeInSine:function(n,k,m,p,q){return-p*Math.cos(k/q*(Math.PI/2))+p+m},easeOutSine:function(n,k,m,p,q){return p*Math.sin(k/q*(Math.PI/2))+m},easeInOutSine:function(n,k,m,p,q){return-p/2*(Math.cos(Math.PI*k/q)-1)+m},easeInExpo:function(n,k,m,p,q){return k==0?m:p*Math.pow(2,10*(k/q-1))+m},easeOutExpo:function(n,k,m,p,q){return k==q?m+p:p*(-Math.pow(2,-10*k/q)+1)+m},easeInOutExpo:function(n,k,m,p,q){if(k==0)return m;if(k==q)return m+p;if((k/=
q/2)<1)return p/2*Math.pow(2,10*(k-1))+m;return p/2*(-Math.pow(2,-10*--k)+2)+m},easeInCirc:function(n,k,m,p,q){return-p*(Math.sqrt(1-(k/=q)*k)-1)+m},easeOutCirc:function(n,k,m,p,q){return p*Math.sqrt(1-(k=k/q-1)*k)+m},easeInOutCirc:function(n,k,m,p,q){if((k/=q/2)<1)return-p/2*(Math.sqrt(1-k*k)-1)+m;return p/2*(Math.sqrt(1-(k-=2)*k)+1)+m},easeInElastic:function(n,k,m,p,q){n=1.70158;var s=0,r=p;if(k==0)return m;if((k/=q)==1)return m+p;s||(s=q*0.3);if(r<Math.abs(p)){r=p;n=s/4}else n=s/(2*Math.PI)*Math.asin(p/
r);return-(r*Math.pow(2,10*(k-=1))*Math.sin((k*q-n)*2*Math.PI/s))+m},easeOutElastic:function(n,k,m,p,q){n=1.70158;var s=0,r=p;if(k==0)return m;if((k/=q)==1)return m+p;s||(s=q*0.3);if(r<Math.abs(p)){r=p;n=s/4}else n=s/(2*Math.PI)*Math.asin(p/r);return r*Math.pow(2,-10*k)*Math.sin((k*q-n)*2*Math.PI/s)+p+m},easeInOutElastic:function(n,k,m,p,q){n=1.70158;var s=0,r=p;if(k==0)return m;if((k/=q/2)==2)return m+p;s||(s=q*0.3*1.5);if(r<Math.abs(p)){r=p;n=s/4}else n=s/(2*Math.PI)*Math.asin(p/r);if(k<1)return-0.5*
r*Math.pow(2,10*(k-=1))*Math.sin((k*q-n)*2*Math.PI/s)+m;return r*Math.pow(2,-10*(k-=1))*Math.sin((k*q-n)*2*Math.PI/s)*0.5+p+m},easeInBack:function(n,k,m,p,q,s){if(s==d)s=1.70158;return p*(k/=q)*k*((s+1)*k-s)+m},easeOutBack:function(n,k,m,p,q,s){if(s==d)s=1.70158;return p*((k=k/q-1)*k*((s+1)*k+s)+1)+m},easeInOutBack:function(n,k,m,p,q,s){if(s==d)s=1.70158;if((k/=q/2)<1)return p/2*k*k*(((s*=1.525)+1)*k-s)+m;return p/2*((k-=2)*k*(((s*=1.525)+1)*k+s)+2)+m},easeInBounce:function(n,k,m,p,q){return p-a.easing.easeOutBounce(n,
q-k,0,p,q)+m},easeOutBounce:function(n,k,m,p,q){return(k/=q)<1/2.75?p*7.5625*k*k+m:k<2/2.75?p*(7.5625*(k-=1.5/2.75)*k+0.75)+m:k<2.5/2.75?p*(7.5625*(k-=2.25/2.75)*k+0.9375)+m:p*(7.5625*(k-=2.625/2.75)*k+0.984375)+m},easeInOutBounce:function(n,k,m,p,q){if(k<q/2)return a.easing.easeInBounce(n,k*2,0,p,q)*0.5+m;return a.easing.easeOutBounce(n,k*2-q,0,p,q)*0.5+p*0.5+m}})}(jQuery);
(function(a){a.effects.blind=function(d){return this.queue(function(){var c=a(this),f=["position","top","bottom","left","right"],g=a.effects.setMode(c,d.options.mode||"hide"),e=d.options.direction||"vertical";a.effects.save(c,f);c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),b=e=="vertical"?"height":"width";e=e=="vertical"?i.height():i.width();g=="show"&&i.css(b,0);var h={};h[b]=g=="show"?e:0;i.animate(h,d.duration,d.options.easing,function(){g=="hide"&&c.hide();a.effects.restore(c,
f);a.effects.removeWrapper(c);d.callback&&d.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);
(function(a){a.effects.bounce=function(d){return this.queue(function(){var c=a(this),f=["position","top","bottom","left","right"],g=a.effects.setMode(c,d.options.mode||"effect"),e=d.options.direction||"up",i=d.options.distance||20,b=d.options.times||5,h=d.duration||250;/show|hide/.test(g)&&f.push("opacity");a.effects.save(c,f);c.show();a.effects.createWrapper(c);var j=e=="up"||e=="down"?"top":"left";e=e=="up"||e=="left"?"pos":"neg";i=d.options.distance||(j=="top"?c.outerHeight({margin:true})/3:c.outerWidth({margin:true})/
3);if(g=="show")c.css("opacity",0).css(j,e=="pos"?-i:i);if(g=="hide")i/=b*2;g!="hide"&&b--;if(g=="show"){var l={opacity:1};l[j]=(e=="pos"?"+=":"-=")+i;c.animate(l,h/2,d.options.easing);i/=2;b--}for(l=0;l<b;l++){var o={},n={};o[j]=(e=="pos"?"-=":"+=")+i;n[j]=(e=="pos"?"+=":"-=")+i;c.animate(o,h/2,d.options.easing).animate(n,h/2,d.options.easing);i=g=="hide"?i*2:i/2}if(g=="hide"){l={opacity:0};l[j]=(e=="pos"?"-=":"+=")+i;c.animate(l,h/2,d.options.easing,function(){c.hide();a.effects.restore(c,f);a.effects.removeWrapper(c);
d.callback&&d.callback.apply(this,arguments)})}else{o={};n={};o[j]=(e=="pos"?"-=":"+=")+i;n[j]=(e=="pos"?"+=":"-=")+i;c.animate(o,h/2,d.options.easing).animate(n,h/2,d.options.easing,function(){a.effects.restore(c,f);a.effects.removeWrapper(c);d.callback&&d.callback.apply(this,arguments)})}c.queue("fx",function(){c.dequeue()});c.dequeue()})}})(jQuery);
(function(a){a.effects.clip=function(d){return this.queue(function(){var c=a(this),f=["position","top","bottom","left","right","height","width"],g=a.effects.setMode(c,d.options.mode||"hide"),e=d.options.direction||"vertical";a.effects.save(c,f);c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"});i=c[0].tagName=="IMG"?i:c;var b={size:e=="vertical"?"height":"width",position:e=="vertical"?"top":"left"};e=e=="vertical"?i.height():i.width();if(g=="show"){i.css(b.size,0);i.css(b.position,
e/2)}var h={};h[b.size]=g=="show"?e:0;h[b.position]=g=="show"?0:e/2;i.animate(h,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){g=="hide"&&c.hide();a.effects.restore(c,f);a.effects.removeWrapper(c);d.callback&&d.callback.apply(c[0],arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.drop=function(d){return this.queue(function(){var c=a(this),f=["position","top","bottom","left","right","opacity"],g=a.effects.setMode(c,d.options.mode||"hide"),e=d.options.direction||"left";a.effects.save(c,f);c.show();a.effects.createWrapper(c);var i=e=="up"||e=="down"?"top":"left";e=e=="up"||e=="left"?"pos":"neg";var b=d.options.distance||(i=="top"?c.outerHeight({margin:true})/2:c.outerWidth({margin:true})/2);if(g=="show")c.css("opacity",0).css(i,e=="pos"?-b:b);var h={opacity:g==
"show"?1:0};h[i]=(g=="show"?e=="pos"?"+=":"-=":e=="pos"?"-=":"+=")+b;c.animate(h,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){g=="hide"&&c.hide();a.effects.restore(c,f);a.effects.removeWrapper(c);d.callback&&d.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.explode=function(d){return this.queue(function(){var c=d.options.pieces?Math.round(Math.sqrt(d.options.pieces)):3,f=d.options.pieces?Math.round(Math.sqrt(d.options.pieces)):3;d.options.mode=d.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":d.options.mode;var g=a(this).show().css("visibility","hidden"),e=g.offset();e.top-=parseInt(g.css("marginTop"),10)||0;e.left-=parseInt(g.css("marginLeft"),10)||0;for(var i=g.outerWidth(true),b=g.outerHeight(true),h=0;h<c;h++)for(var j=
0;j<f;j++)g.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(i/f),top:-h*(b/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:i/f,height:b/c,left:e.left+j*(i/f)+(d.options.mode=="show"?(j-Math.floor(f/2))*(i/f):0),top:e.top+h*(b/c)+(d.options.mode=="show"?(h-Math.floor(c/2))*(b/c):0),opacity:d.options.mode=="show"?0:1}).animate({left:e.left+j*(i/f)+(d.options.mode=="show"?0:(j-Math.floor(f/2))*(i/f)),top:e.top+
h*(b/c)+(d.options.mode=="show"?0:(h-Math.floor(c/2))*(b/c)),opacity:d.options.mode=="show"?1:0},d.duration||500);setTimeout(function(){d.options.mode=="show"?g.css({visibility:"visible"}):g.css({visibility:"visible"}).hide();d.callback&&d.callback.apply(g[0]);g.dequeue();a("div.ui-effects-explode").remove()},d.duration||500)})}})(jQuery);
(function(a){a.effects.fade=function(d){return this.queue(function(){var c=a(this),f=a.effects.setMode(c,d.options.mode||"hide");c.animate({opacity:f},{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){d.callback&&d.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.fold=function(d){return this.queue(function(){var c=a(this),f=["position","top","bottom","left","right"],g=a.effects.setMode(c,d.options.mode||"hide"),e=d.options.size||15,i=!!d.options.horizFirst,b=d.duration?d.duration/2:a.fx.speeds._default/2;a.effects.save(c,f);c.show();var h=a.effects.createWrapper(c).css({overflow:"hidden"}),j=g=="show"!=i,l=j?["width","height"]:["height","width"];j=j?[h.width(),h.height()]:[h.height(),h.width()];var o=/([0-9]+)%/.exec(e);if(o)e=parseInt(o[1],
10)/100*j[g=="hide"?0:1];if(g=="show")h.css(i?{height:0,width:e}:{height:e,width:0});i={};o={};i[l[0]]=g=="show"?j[0]:e;o[l[1]]=g=="show"?j[1]:0;h.animate(i,b,d.options.easing).animate(o,b,d.options.easing,function(){g=="hide"&&c.hide();a.effects.restore(c,f);a.effects.removeWrapper(c);d.callback&&d.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);
(function(a){a.effects.highlight=function(d){return this.queue(function(){var c=a(this),f=["backgroundImage","backgroundColor","opacity"],g=a.effects.setMode(c,d.options.mode||"show"),e={backgroundColor:c.css("backgroundColor")};if(g=="hide")e.opacity=0;a.effects.save(c,f);c.show().css({backgroundImage:"none",backgroundColor:d.options.color||"#ffff99"}).animate(e,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){g=="hide"&&c.hide();a.effects.restore(c,f);g=="show"&&!a.support.opacity&&
this.style.removeAttribute("filter");d.callback&&d.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.pulsate=function(d){return this.queue(function(){var c=a(this),f=a.effects.setMode(c,d.options.mode||"show");times=(d.options.times||5)*2-1;duration=d.duration?d.duration/2:a.fx.speeds._default/2;isVisible=c.is(":visible");animateTo=0;if(!isVisible){c.css("opacity",0).show();animateTo=1}if(f=="hide"&&isVisible||f=="show"&&!isVisible)times--;for(f=0;f<times;f++){c.animate({opacity:animateTo},duration,d.options.easing);animateTo=(animateTo+1)%2}c.animate({opacity:animateTo},duration,
d.options.easing,function(){animateTo==0&&c.hide();d.callback&&d.callback.apply(this,arguments)});c.queue("fx",function(){c.dequeue()}).dequeue()})}})(jQuery);
(function(a){a.effects.puff=function(d){return this.queue(function(){var c=a(this),f=a.effects.setMode(c,d.options.mode||"hide"),g=parseInt(d.options.percent,10)||150,e=g/100,i={height:c.height(),width:c.width()};a.extend(d.options,{fade:true,mode:f,percent:f=="hide"?g:100,from:f=="hide"?i:{height:i.height*e,width:i.width*e}});c.effect("scale",d.options,d.duration,d.callback);c.dequeue()})};a.effects.scale=function(d){return this.queue(function(){var c=a(this),f=a.extend(true,{},d.options),g=a.effects.setMode(c,
d.options.mode||"effect"),e=parseInt(d.options.percent,10)||(parseInt(d.options.percent,10)==0?0:g=="hide"?0:100),i=d.options.direction||"both",b=d.options.origin;if(g!="effect"){f.origin=b||["middle","center"];f.restore=true}b={height:c.height(),width:c.width()};c.from=d.options.from||(g=="show"?{height:0,width:0}:b);e={y:i!="horizontal"?e/100:1,x:i!="vertical"?e/100:1};c.to={height:b.height*e.y,width:b.width*e.x};if(d.options.fade){if(g=="show"){c.from.opacity=0;c.to.opacity=1}if(g=="hide"){c.from.opacity=
1;c.to.opacity=0}}f.from=c.from;f.to=c.to;f.mode=g;c.effect("size",f,d.duration,d.callback);c.dequeue()})};a.effects.size=function(d){return this.queue(function(){var c=a(this),f=["position","top","bottom","left","right","width","height","overflow","opacity"],g=["position","top","bottom","left","right","overflow","opacity"],e=["width","height","overflow"],i=["fontSize"],b=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
j=a.effects.setMode(c,d.options.mode||"effect"),l=d.options.restore||false,o=d.options.scale||"both",n=d.options.origin,k={height:c.height(),width:c.width()};c.from=d.options.from||k;c.to=d.options.to||k;if(n){n=a.effects.getBaseline(n,k);c.from.top=(k.height-c.from.height)*n.y;c.from.left=(k.width-c.from.width)*n.x;c.to.top=(k.height-c.to.height)*n.y;c.to.left=(k.width-c.to.width)*n.x}var m={from:{y:c.from.height/k.height,x:c.from.width/k.width},to:{y:c.to.height/k.height,x:c.to.width/k.width}};
if(o=="box"||o=="both"){if(m.from.y!=m.to.y){f=f.concat(b);c.from=a.effects.setTransition(c,b,m.from.y,c.from);c.to=a.effects.setTransition(c,b,m.to.y,c.to)}if(m.from.x!=m.to.x){f=f.concat(h);c.from=a.effects.setTransition(c,h,m.from.x,c.from);c.to=a.effects.setTransition(c,h,m.to.x,c.to)}}if(o=="content"||o=="both")if(m.from.y!=m.to.y){f=f.concat(i);c.from=a.effects.setTransition(c,i,m.from.y,c.from);c.to=a.effects.setTransition(c,i,m.to.y,c.to)}a.effects.save(c,l?f:g);c.show();a.effects.createWrapper(c);
c.css("overflow","hidden").css(c.from);if(o=="content"||o=="both"){b=b.concat(["marginTop","marginBottom"]).concat(i);h=h.concat(["marginLeft","marginRight"]);e=f.concat(b).concat(h);c.find("*[width]").each(function(){child=a(this);l&&a.effects.save(child,e);var p={height:child.height(),width:child.width()};child.from={height:p.height*m.from.y,width:p.width*m.from.x};child.to={height:p.height*m.to.y,width:p.width*m.to.x};if(m.from.y!=m.to.y){child.from=a.effects.setTransition(child,b,m.from.y,child.from);
child.to=a.effects.setTransition(child,b,m.to.y,child.to)}if(m.from.x!=m.to.x){child.from=a.effects.setTransition(child,h,m.from.x,child.from);child.to=a.effects.setTransition(child,h,m.to.x,child.to)}child.css(child.from);child.animate(child.to,d.duration,d.options.easing,function(){l&&a.effects.restore(child,e)})})}c.animate(c.to,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){c.to.opacity===0&&c.css("opacity",c.from.opacity);j=="hide"&&c.hide();a.effects.restore(c,
l?f:g);a.effects.removeWrapper(c);d.callback&&d.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.shake=function(d){return this.queue(function(){var c=a(this),f=["position","top","bottom","left","right"];a.effects.setMode(c,d.options.mode||"effect");var g=d.options.direction||"left",e=d.options.distance||20,i=d.options.times||3,b=d.duration||d.options.duration||140;a.effects.save(c,f);c.show();a.effects.createWrapper(c);var h=g=="up"||g=="down"?"top":"left",j=g=="up"||g=="left"?"pos":"neg";g={};var l={},o={};g[h]=(j=="pos"?"-=":"+=")+e;l[h]=(j=="pos"?"+=":"-=")+e*2;o[h]=
(j=="pos"?"-=":"+=")+e*2;c.animate(g,b,d.options.easing);for(e=1;e<i;e++)c.animate(l,b,d.options.easing).animate(o,b,d.options.easing);c.animate(l,b,d.options.easing).animate(g,b/2,d.options.easing,function(){a.effects.restore(c,f);a.effects.removeWrapper(c);d.callback&&d.callback.apply(this,arguments)});c.queue("fx",function(){c.dequeue()});c.dequeue()})}})(jQuery);
(function(a){a.effects.slide=function(d){return this.queue(function(){var c=a(this),f=["position","top","bottom","left","right"],g=a.effects.setMode(c,d.options.mode||"show"),e=d.options.direction||"left";a.effects.save(c,f);c.show();a.effects.createWrapper(c).css({overflow:"hidden"});var i=e=="up"||e=="down"?"top":"left";e=e=="up"||e=="left"?"pos":"neg";var b=d.options.distance||(i=="top"?c.outerHeight({margin:true}):c.outerWidth({margin:true}));if(g=="show")c.css(i,e=="pos"?isNaN(b)?"-"+b:-b:b);
var h={};h[i]=(g=="show"?e=="pos"?"+=":"-=":e=="pos"?"-=":"+=")+b;c.animate(h,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){g=="hide"&&c.hide();a.effects.restore(c,f);a.effects.removeWrapper(c);d.callback&&d.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
(function(a){a.effects.transfer=function(d){return this.queue(function(){var c=a(this),f=a(d.options.to),g=f.offset();f={top:g.top,left:g.left,height:f.innerHeight(),width:f.innerWidth()};g=c.offset();var e=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(d.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,d.duration,d.options.easing,function(){e.remove();d.callback&&d.callback.apply(c[0],arguments);
c.dequeue()})})}})(jQuery);
(function(a){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var d=this,c=d.options;d.running=0;d.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");d.headers=
d.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){c.disabled||a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){c.disabled||a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){c.disabled||a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){c.disabled||a(this).removeClass("ui-state-focus")});d.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
if(c.navigation){var f=d.element.find("a").filter(c.navigationFilter).eq(0);if(f.length){var g=f.closest(".ui-accordion-header");d.active=g.length?g:f.closest(".ui-accordion-content").prev()}}d.active=d._findActive(d.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");d.active.next().addClass("ui-accordion-content-active");d._createIcons();d.resize();d.element.attr("role","tablist");d.headers.attr("role","tab").bind("keydown.accordion",
function(e){return d._keydown(e)}).next().attr("role","tabpanel");d.headers.not(d.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();d.active.length?d.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):d.headers.eq(0).attr("tabIndex",0);a.browser.safari||d.headers.find("a").attr("tabIndex",-1);c.event&&d.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(e){d._clickHandler.call(d,e,this);e.preventDefault()})},_createIcons:function(){var d=
this.options;if(d.icons){a("<span></span>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var d=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");
this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(d.autoHeight||d.fillHeight)c.css("height","");return a.Widget.prototype.destroy.call(this)},_setOption:function(d,c){a.Widget.prototype._setOption.apply(this,arguments);d=="active"&&this.activate(c);if(d=="icons"){this._destroyIcons();
c&&this._createIcons()}if(d=="disabled")this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(d){if(!(this.options.disabled||d.altKey||d.ctrlKey)){var c=a.ui.keyCode,f=this.headers.length,g=this.headers.index(d.target),e=false;switch(d.keyCode){case c.RIGHT:case c.DOWN:e=this.headers[(g+1)%f];break;case c.LEFT:case c.UP:e=this.headers[(g-1+f)%f];break;case c.SPACE:case c.ENTER:this._clickHandler({target:d.target},d.target);
d.preventDefault()}if(e){a(d.target).attr("tabIndex",-1);a(e).attr("tabIndex",0);e.focus();return false}return true}},resize:function(){var d=this.options,c;if(d.fillSpace){if(a.browser.msie){var f=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height();a.browser.msie&&this.element.parent().css("overflow",f);this.headers.each(function(){c-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+
a(this).height()))}).css("overflow","auto")}else if(d.autoHeight){c=0;this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c)}return this},activate:function(d){this.options.active=d;d=this._findActive(d)[0];this._clickHandler({target:d},d);return this},_findActive:function(d){return d?typeof d==="number"?this.headers.filter(":eq("+d+")"):this.headers.not(this.headers.not(d)):d===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(d,c){var f=this.options;
if(!f.disabled)if(d.target){d=a(d.currentTarget||c);c=d[0]===this.active[0];f.active=f.collapsible&&c?false:this.headers.index(d);if(!(this.running||!f.collapsible&&c)){var g=this.active;h=d.next();i=this.active.next();b={options:f,newHeader:c&&f.collapsible?a([]):d,oldHeader:this.active,newContent:c&&f.collapsible?a([]):h,oldContent:i};var e=this.headers.index(this.active[0])>this.headers.index(d[0]);this.active=c?a([]):d;this._toggle(h,i,b,c,e);g.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(f.icons.headerSelected).addClass(f.icons.header);
if(!c){d.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(f.icons.header).addClass(f.icons.headerSelected);d.next().addClass("ui-accordion-content-active")}}}else if(f.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(f.icons.headerSelected).addClass(f.icons.header);this.active.next().addClass("ui-accordion-content-active");var i=this.active.next(),
b={options:f,newHeader:a([]),oldHeader:f.active,newContent:a([]),oldContent:i},h=this.active=a([]);this._toggle(h,i,b)}},_toggle:function(d,c,f,g,e){var i=this,b=i.options;i.toShow=d;i.toHide=c;i.data=f;var h=function(){if(i)return i._completed.apply(i,arguments)};i._trigger("changestart",null,i.data);i.running=c.size()===0?d.size():c.size();if(b.animated){f={};f=b.collapsible&&g?{toShow:a([]),toHide:c,complete:h,down:e,autoHeight:b.autoHeight||b.fillSpace}:{toShow:d,toHide:c,complete:h,down:e,autoHeight:b.autoHeight||
b.fillSpace};if(!b.proxied)b.proxied=b.animated;if(!b.proxiedDuration)b.proxiedDuration=b.duration;b.animated=a.isFunction(b.proxied)?b.proxied(f):b.proxied;b.duration=a.isFunction(b.proxiedDuration)?b.proxiedDuration(f):b.proxiedDuration;g=a.ui.accordion.animations;var j=b.duration,l=b.animated;if(l&&!g[l]&&!a.easing[l])l="slide";g[l]||(g[l]=function(o){this.slide(o,{easing:l,duration:j||700})});g[l](f)}else{if(b.collapsible&&g)d.toggle();else{c.hide();d.show()}h(true)}c.prev().attr({"aria-expanded":"false",
"aria-selected":"false",tabIndex:-1}).blur();d.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(d){this.running=d?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});a.extend(a.ui.accordion,{version:"1.8.13",
animations:{slide:function(d,c){d=a.extend({easing:"swing",duration:300},d,c);if(d.toHide.size())if(d.toShow.size()){var f=d.toShow.css("overflow"),g=0,e={},i={},b;c=d.toShow;b=c[0].style.width;c.width(parseInt(c.parent().width(),10)-parseInt(c.css("paddingLeft"),10)-parseInt(c.css("paddingRight"),10)-(parseInt(c.css("borderLeftWidth"),10)||0)-(parseInt(c.css("borderRightWidth"),10)||0));a.each(["height","paddingTop","paddingBottom"],function(h,j){i[j]="hide";h=(""+a.css(d.toShow[0],j)).match(/^([\d+-.]+)(.*)$/);
e[j]={value:h[1],unit:h[2]||"px"}});d.toShow.css({height:0,overflow:"hidden"}).show();d.toHide.filter(":hidden").each(d.complete).end().filter(":visible").animate(i,{step:function(h,j){if(j.prop=="height")g=j.end-j.start===0?0:(j.now-j.start)/(j.end-j.start);d.toShow[0].style[j.prop]=g*e[j.prop].value+e[j.prop].unit},duration:d.duration,easing:d.easing,complete:function(){d.autoHeight||d.toShow.css("height","");d.toShow.css({width:b,overflow:f});d.complete()}})}else d.toHide.animate({height:"hide",
paddingTop:"hide",paddingBottom:"hide"},d);else d.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},d)},bounceslide:function(d){this.slide(d,{easing:d.down?"easeOutBounce":"swing",duration:d.down?1E3:200})}}})})(jQuery);
(function(a){var d=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var c=this,f=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!(c.options.disabled||c.element.attr("readonly"))){g=
false;var i=a.ui.keyCode;switch(e.keyCode){case i.PAGE_UP:c._move("previousPage",e);break;case i.PAGE_DOWN:c._move("nextPage",e);break;case i.UP:c._move("previous",e);e.preventDefault();break;case i.DOWN:c._move("next",e);e.preventDefault();break;case i.ENTER:case i.NUMPAD_ENTER:if(c.menu.active){g=true;e.preventDefault()}case i.TAB:if(!c.menu.active)return;c.menu.select(e);break;case i.ESCAPE:c.element.val(c.term);c.close(e);break;default:clearTimeout(c.searching);c.searching=setTimeout(function(){if(c.term!=
c.element.val()){c.selectedItem=null;c.search(null,e)}},c.options.delay);break}}}).bind("keypress.autocomplete",function(e){if(g){g=false;e.preventDefault()}}).bind("focus.autocomplete",function(){if(!c.options.disabled){c.selectedItem=null;c.previous=c.element.val()}}).bind("blur.autocomplete",function(e){if(!c.options.disabled){clearTimeout(c.searching);c.closing=setTimeout(function(){c.close(e);c._change(e)},150)}});this._initSource();this.response=function(){return c._response.apply(c,arguments)};
this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",f)[0]).mousedown(function(e){var i=c.menu.element[0];a(e.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(b){b.target!==c.element[0]&&b.target!==i&&!a.ui.contains(i,b.target)&&c.close()})},1);setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(e,i){i=i.item.data("item.autocomplete");false!==c._trigger("focus",e,{item:i})&&/^key/.test(e.originalEvent.type)&&
c.element.val(i.value)},selected:function(e,i){var b=i.item.data("item.autocomplete"),h=c.previous;if(c.element[0]!==f.activeElement){c.element.focus();c.previous=h;setTimeout(function(){c.previous=h;c.selectedItem=b},1)}false!==c._trigger("select",e,{item:b})&&c.element.val(b.value);c.term=c.element.val();c.close(e);c.selectedItem=b},blur:function(){c.menu.element.is(":visible")&&c.element.val()!==c.term&&c.element.val(c.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");
a.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();a.Widget.prototype.destroy.call(this)},_setOption:function(c,f){a.Widget.prototype._setOption.apply(this,arguments);c==="source"&&this._initSource();if(c==="appendTo")this.menu.element.appendTo(a(f||"body",this.element[0].ownerDocument)[0]);c==="disabled"&&
f&&this.xhr&&this.xhr.abort()},_initSource:function(){var c=this,f,g;if(a.isArray(this.options.source)){f=this.options.source;this.source=function(e,i){i(a.ui.autocomplete.filter(f,e.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(e,i){c.xhr&&c.xhr.abort();c.xhr=a.ajax({url:g,data:e,dataType:"json",autocompleteRequest:++d,success:function(b){this.autocompleteRequest===d&&i(b)},error:function(){this.autocompleteRequest===d&&i([])}})}}else this.source=
this.options.source},search:function(c,f){c=c!=null?c:this.element.val();this.term=this.element.val();if(c.length<this.options.minLength)return this.close(f);clearTimeout(this.closing);if(this._trigger("search",f)!==false)return this._search(c)},_search:function(c){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:c},this.response)},_response:function(c){if(!this.options.disabled&&c&&c.length){c=this._normalize(c);this._suggest(c);this._trigger("open")}else this.close();
this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(c){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",c)}},_change:function(c){this.previous!==this.element.val()&&this._trigger("change",c,{item:this.selectedItem})},_normalize:function(c){if(c.length&&c[0].label&&c[0].value)return c;return a.map(c,function(f){if(typeof f==="string")return{label:f,value:f};return a.extend({label:f.label||
f.value,value:f.value||f.label},f)})},_suggest:function(c){var f=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(f,c);this.menu.deactivate();this.menu.refresh();f.show();this._resizeMenu();f.position(a.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var c=this.menu.element;c.outerWidth(Math.max(c.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(c,f){var g=this;
a.each(f,function(e,i){g._renderItem(c,i)})},_renderItem:function(c,f){return a("<li></li>").data("item.autocomplete",f).append(a("<a></a>").text(f.label)).appendTo(c)},_move:function(c,f){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(c)||this.menu.last()&&/^next/.test(c)){this.element.val(this.term);this.menu.deactivate()}else this.menu[c](f);else this.search(null,f)},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(c){return c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
"\\$&")},filter:function(c,f){var g=new RegExp(a.ui.autocomplete.escapeRegex(f),"i");return a.grep(c,function(e){return g.test(e.label||e.value||e)})}})})(jQuery);
(function(a){a.widget("ui.menu",{_create:function(){var d=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(a(c.target).closest(".ui-menu-item a").length){c.preventDefault();d.select(c)}});this.refresh()},refresh:function(){var d=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
-1).mouseenter(function(c){d.activate(c,a(this).parent())}).mouseleave(function(){d.deactivate()})},activate:function(d,c){this.deactivate();if(this.hasScroll()){var f=c.offset().top-this.element.offset().top,g=this.element.scrollTop(),e=this.element.height();if(f<0)this.element.scrollTop(g+f);else f>=e&&this.element.scrollTop(g+f-e+c.height())}this.active=c.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",d,{item:c})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
this._trigger("blur");this.active=null}},next:function(d){this.move("next",".ui-menu-item:first",d)},previous:function(d){this.move("prev",".ui-menu-item:last",d)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(d,c,f){if(this.active){d=this.active[d+"All"](".ui-menu-item").eq(0);d.length?this.activate(f,d):this.activate(f,this.element.children(c))}else this.activate(f,
this.element.children(c))},nextPage:function(d){if(this.hasScroll())if(!this.active||this.last())this.activate(d,this.element.children(".ui-menu-item:first"));else{var c=this.active.offset().top,f=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var e=a(this).offset().top-c-f+a(this).height();return e<10&&e>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(d,g)}else this.activate(d,this.element.children(".ui-menu-item").filter(!this.active||
this.last()?":first":":last"))},previousPage:function(d){if(this.hasScroll())if(!this.active||this.first())this.activate(d,this.element.children(".ui-menu-item:last"));else{var c=this.active.offset().top,f=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=a(this).offset().top-c+f-a(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(d,result)}else this.activate(d,this.element.children(".ui-menu-item").filter(!this.active||
this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(d){this._trigger("selected",d,{item:this.active})}})})(jQuery);
(function(a){var d,c=function(g){a(":ui-button",g.target.form).each(function(){var e=a(this).data("button");setTimeout(function(){e.refresh()},1)})},f=function(g){var e=g.name,i=g.form,b=a([]);if(e)b=i?a(i).find("[name='"+e+"']"):a("[name='"+e+"']",g.ownerDocument).filter(function(){return!this.form});return b};a.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",
c);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var g=this,e=this.options,i=this.type==="checkbox"||this.type==="radio",b="ui-state-hover"+(!i?" ui-state-active":"");if(e.label===null)e.label=this.buttonElement.html();if(this.element.is(":disabled"))e.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
function(){if(!e.disabled){a(this).addClass("ui-state-hover");this===d&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){e.disabled||a(this).removeClass(b)}).bind("focus.button",function(){a(this).addClass("ui-state-focus")}).bind("blur.button",function(){a(this).removeClass("ui-state-focus")}).bind("click.button",function(h){e.disabled&&h.stopImmediatePropagation()});i&&this.element.bind("change.button",function(){g.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",
function(){if(e.disabled)return false;a(this).toggleClass("ui-state-active");g.buttonElement.attr("aria-pressed",g.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(e.disabled)return false;a(this).addClass("ui-state-active");g.buttonElement.attr("aria-pressed",true);var h=g.element[0];f(h).not(h).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",
function(){if(e.disabled)return false;a(this).addClass("ui-state-active");d=this;a(document).one("mouseup",function(){d=null})}).bind("mouseup.button",function(){if(e.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(h){if(e.disabled)return false;if(h.keyCode==a.ui.keyCode.SPACE||h.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(h){h.keyCode===
a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled",e.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){var g=this.element.parents().filter(":last"),e="label[for="+this.element.attr("id")+"]";this.buttonElement=g.find(e);if(!this.buttonElement.length){g=g.length?g.siblings():this.element.siblings();this.buttonElement=g.filter(e);
if(!this.buttonElement.length)this.buttonElement=g.find(e)}this.element.addClass("ui-helper-hidden-accessible");(g=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",g)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
this.hasTitle||this.buttonElement.removeAttr("title");a.Widget.prototype.destroy.call(this)},_setOption:function(g,e){a.Widget.prototype._setOption.apply(this,arguments);if(g==="disabled")e?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var g=this.element.is(":disabled");g!==this.options.disabled&&this._setOption("disabled",g);if(this.type==="radio")f(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
true):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var g=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
e=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(g.empty()).text(),i=this.options.icons,b=i.primary&&i.secondary,h=[];if(i.primary||i.secondary){if(this.options.text)h.push("ui-button-text-icon"+(b?"s":i.primary?"-primary":"-secondary"));i.primary&&g.prepend("<span class='ui-button-icon-primary ui-icon "+i.primary+"'></span>");i.secondary&&g.append("<span class='ui-button-icon-secondary ui-icon "+i.secondary+"'></span>");if(!this.options.text){h.push(b?"ui-button-icons-only":
"ui-button-icon-only");this.hasTitle||g.attr("title",e)}}else h.push("ui-button-text-only");g.addClass(h.join(" "))}}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(g,e){g==="disabled"&&this.buttons.button("option",g,e);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery);
(function(a,d){function c(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};a.extend(this._defaults,this.regional[""]);this.dpDiv=f(a('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function f(b){return b.delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a",
"mouseout",function(){a(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&a(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&a(this).removeClass("ui-datepicker-next-hover")}).delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseover",function(){if(!a.datepicker._isDisabledDatepicker(i.inline?b.parent()[0]:i.input[0])){a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
a(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&a(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&a(this).addClass("ui-datepicker-next-hover")}})}function g(b,h){a.extend(b,h);for(var j in h)if(h[j]==null||h[j]==d)b[j]=h[j];return b}a.extend(a.ui,{datepicker:{version:"1.8.13"}});var e=(new Date).getTime(),i;a.extend(c.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},
_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(b){g(this._defaults,b||{});return this},_attachDatepicker:function(b,h){var j=null;for(var l in this._defaults){var o=b.getAttribute("date:"+l);if(o){j=j||{};try{j[l]=eval(o)}catch(n){j[l]=o}}}l=b.nodeName.toLowerCase();o=l=="div"||l=="span";if(!b.id){this.uuid+=1;b.id="dp"+this.uuid}var k=this._newInst(a(b),o);k.settings=a.extend({},h||{},j||{});if(l=="input")this._connectDatepicker(b,k);else o&&this._inlineDatepicker(b,k)},_newInst:function(b,
h){return{id:b[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:h,dpDiv:!h?this.dpDiv:f(a('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(b,h){var j=a(b);h.append=a([]);h.trigger=a([]);if(!j.hasClass(this.markerClassName)){this._attachments(j,h);j.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
function(l,o,n){h.settings[o]=n}).bind("getData.datepicker",function(l,o){return this._get(h,o)});this._autoSize(h);a.data(b,"datepicker",h)}},_attachments:function(b,h){var j=this._get(h,"appendText"),l=this._get(h,"isRTL");h.append&&h.append.remove();if(j){h.append=a('<span class="'+this._appendClass+'">'+j+"</span>");b[l?"before":"after"](h.append)}b.unbind("focus",this._showDatepicker);h.trigger&&h.trigger.remove();j=this._get(h,"showOn");if(j=="focus"||j=="both")b.focus(this._showDatepicker);
if(j=="button"||j=="both"){j=this._get(h,"buttonText");var o=this._get(h,"buttonImage");h.trigger=a(this._get(h,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:o,alt:j,title:j}):a('<button type="button"></button>').addClass(this._triggerClass).html(o==""?j:a("<img/>").attr({src:o,alt:j,title:j})));b[l?"before":"after"](h.trigger);h.trigger.click(function(){a.datepicker._datepickerShowing&&a.datepicker._lastInput==b[0]?a.datepicker._hideDatepicker():a.datepicker._showDatepicker(b[0]);
return false})}},_autoSize:function(b){if(this._get(b,"autoSize")&&!b.inline){var h=new Date(2009,11,20),j=this._get(b,"dateFormat");if(j.match(/[DM]/)){var l=function(o){for(var n=0,k=0,m=0;m<o.length;m++)if(o[m].length>n){n=o[m].length;k=m}return k};h.setMonth(l(this._get(b,j.match(/MM/)?"monthNames":"monthNamesShort")));h.setDate(l(this._get(b,j.match(/DD/)?"dayNames":"dayNamesShort"))+20-h.getDay())}b.input.attr("size",this._formatDate(b,h).length)}},_inlineDatepicker:function(b,h){var j=a(b);
if(!j.hasClass(this.markerClassName)){j.addClass(this.markerClassName).append(h.dpDiv).bind("setData.datepicker",function(l,o,n){h.settings[o]=n}).bind("getData.datepicker",function(l,o){return this._get(h,o)});a.data(b,"datepicker",h);this._setDate(h,this._getDefaultDate(h),true);this._updateDatepicker(h);this._updateAlternate(h);h.dpDiv.show()}},_dialogDatepicker:function(b,h,j,l,o){b=this._dialogInst;if(!b){this.uuid+=1;this._dialogInput=a('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
this._dialogInput.keydown(this._doKeyDown);a("body").append(this._dialogInput);b=this._dialogInst=this._newInst(this._dialogInput,false);b.settings={};a.data(this._dialogInput[0],"datepicker",b)}g(b.settings,l||{});h=h&&h.constructor==Date?this._formatDate(b,h):h;this._dialogInput.val(h);this._pos=o?o.length?o:[o.pageX,o.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/
2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");b.settings.onSelect=j;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);a.blockUI&&a.blockUI(this.dpDiv);a.data(this._dialogInput[0],"datepicker",b);return this},_destroyDatepicker:function(b){var h=a(b),j=a.data(b,"datepicker");if(h.hasClass(this.markerClassName)){var l=b.nodeName.toLowerCase();a.removeData(b,
"datepicker");if(l=="input"){j.append.remove();j.trigger.remove();h.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(l=="div"||l=="span")h.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(b){var h=a(b),j=a.data(b,"datepicker");if(h.hasClass(this.markerClassName)){var l=b.nodeName.toLowerCase();if(l=="input"){b.disabled=false;j.trigger.filter("button").each(function(){this.disabled=
false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(l=="div"||l=="span"){h=h.children("."+this._inlineClass);h.children().removeClass("ui-state-disabled");h.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=a.map(this._disabledInputs,function(o){return o==b?null:o})}},_disableDatepicker:function(b){var h=a(b),j=a.data(b,"datepicker");if(h.hasClass(this.markerClassName)){var l=b.nodeName.toLowerCase();if(l=="input"){b.disabled=
true;j.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(l=="div"||l=="span"){h=h.children("."+this._inlineClass);h.children().addClass("ui-state-disabled");h.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=a.map(this._disabledInputs,function(o){return o==b?null:o});this._disabledInputs[this._disabledInputs.length]=b}},_isDisabledDatepicker:function(b){if(!b)return false;
for(var h=0;h<this._disabledInputs.length;h++)if(this._disabledInputs[h]==b)return true;return false},_getInst:function(b){try{return a.data(b,"datepicker")}catch(h){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(b,h,j){var l=this._getInst(b);if(arguments.length==2&&typeof h=="string")return h=="defaults"?a.extend({},a.datepicker._defaults):l?h=="all"?a.extend({},l.settings):this._get(l,h):null;var o=h||{};if(typeof h=="string"){o={};o[h]=j}if(l){this._curInst==l&&
this._hideDatepicker();var n=this._getDateDatepicker(b,true),k=this._getMinMaxDate(l,"min"),m=this._getMinMaxDate(l,"max");g(l.settings,o);if(k!==null&&o.dateFormat!==d&&o.minDate===d)l.settings.minDate=this._formatDate(l,k);if(m!==null&&o.dateFormat!==d&&o.maxDate===d)l.settings.maxDate=this._formatDate(l,m);this._attachments(a(b),l);this._autoSize(l);this._setDate(l,n);this._updateAlternate(l);this._updateDatepicker(l)}},_changeDatepicker:function(b,h,j){this._optionDatepicker(b,h,j)},_refreshDatepicker:function(b){(b=
this._getInst(b))&&this._updateDatepicker(b)},_setDateDatepicker:function(b,h){if(b=this._getInst(b)){this._setDate(b,h);this._updateDatepicker(b);this._updateAlternate(b)}},_getDateDatepicker:function(b,h){(b=this._getInst(b))&&!b.inline&&this._setDateFromField(b,h);return b?this._getDate(b):null},_doKeyDown:function(b){var h=a.datepicker._getInst(b.target),j=true,l=h.dpDiv.is(".ui-datepicker-rtl");h._keyEvent=true;if(a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker();
j=false;break;case 13:j=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",h.dpDiv);j[0]?a.datepicker._selectDay(b.target,h.selectedMonth,h.selectedYear,j[0]):a.datepicker._hideDatepicker();return false;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(h,"stepBigMonths"):-a.datepicker._get(h,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(h,"stepBigMonths"):+a.datepicker._get(h,
"stepMonths"),"M");break;case 35:if(b.ctrlKey||b.metaKey)a.datepicker._clearDate(b.target);j=b.ctrlKey||b.metaKey;break;case 36:if(b.ctrlKey||b.metaKey)a.datepicker._gotoToday(b.target);j=b.ctrlKey||b.metaKey;break;case 37:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,l?+1:-1,"D");j=b.ctrlKey||b.metaKey;if(b.originalEvent.altKey)a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(h,"stepBigMonths"):-a.datepicker._get(h,"stepMonths"),"M");break;case 38:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,
-7,"D");j=b.ctrlKey||b.metaKey;break;case 39:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,l?-1:+1,"D");j=b.ctrlKey||b.metaKey;if(b.originalEvent.altKey)a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(h,"stepBigMonths"):+a.datepicker._get(h,"stepMonths"),"M");break;case 40:if(b.ctrlKey||b.metaKey)a.datepicker._adjustDate(b.target,+7,"D");j=b.ctrlKey||b.metaKey;break;default:j=false}else if(b.keyCode==36&&b.ctrlKey)a.datepicker._showDatepicker(this);else j=false;if(j){b.preventDefault();
b.stopPropagation()}},_doKeyPress:function(b){var h=a.datepicker._getInst(b.target);if(a.datepicker._get(h,"constrainInput")){h=a.datepicker._possibleChars(a.datepicker._get(h,"dateFormat"));var j=String.fromCharCode(b.charCode==d?b.keyCode:b.charCode);return b.ctrlKey||b.metaKey||j<" "||!h||h.indexOf(j)>-1}},_doKeyUp:function(b){b=a.datepicker._getInst(b.target);if(b.input.val()!=b.lastVal)try{if(a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,a.datepicker._getFormatConfig(b))){a.datepicker._setDateFromField(b);
a.datepicker._updateAlternate(b);a.datepicker._updateDatepicker(b)}}catch(h){a.datepicker.log(h)}return true},_showDatepicker:function(b){b=b.target||b;if(b.nodeName.toLowerCase()!="input")b=a("input",b.parentNode)[0];if(!(a.datepicker._isDisabledDatepicker(b)||a.datepicker._lastInput==b)){var h=a.datepicker._getInst(b);a.datepicker._curInst&&a.datepicker._curInst!=h&&a.datepicker._curInst.dpDiv.stop(true,true);var j=a.datepicker._get(h,"beforeShow");g(h.settings,j?j.apply(b,[b,h]):{});h.lastVal=
null;a.datepicker._lastInput=b;a.datepicker._setDateFromField(h);if(a.datepicker._inDialog)b.value="";if(!a.datepicker._pos){a.datepicker._pos=a.datepicker._findPos(b);a.datepicker._pos[1]+=b.offsetHeight}var l=false;a(b).parents().each(function(){l|=a(this).css("position")=="fixed";return!l});if(l&&a.browser.opera){a.datepicker._pos[0]-=document.documentElement.scrollLeft;a.datepicker._pos[1]-=document.documentElement.scrollTop}j={left:a.datepicker._pos[0],top:a.datepicker._pos[1]};a.datepicker._pos=
null;h.dpDiv.empty();h.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});a.datepicker._updateDatepicker(h);j=a.datepicker._checkOffset(h,j,l);h.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":l?"fixed":"absolute",display:"none",left:j.left+"px",top:j.top+"px"});if(!h.inline){j=a.datepicker._get(h,"showAnim");var o=a.datepicker._get(h,"duration"),n=function(){var k=h.dpDiv.find("iframe.ui-datepicker-cover");if(k.length){var m=a.datepicker._getBorders(h.dpDiv);k.css({left:-m[0],
top:-m[1],width:h.dpDiv.outerWidth(),height:h.dpDiv.outerHeight()})}};h.dpDiv.zIndex(a(b).zIndex()+1);a.datepicker._datepickerShowing=true;a.effects&&a.effects[j]?h.dpDiv.show(j,a.datepicker._get(h,"showOptions"),o,n):h.dpDiv[j||"show"](j?o:null,n);if(!j||!o)n();h.input.is(":visible")&&!h.input.is(":disabled")&&h.input.focus();a.datepicker._curInst=h}}},_updateDatepicker:function(b){var h=a.datepicker._getBorders(b.dpDiv);i=b;b.dpDiv.empty().append(this._generateHTML(b));var j=b.dpDiv.find("iframe.ui-datepicker-cover");
j.length&&j.css({left:-h[0],top:-h[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()});b.dpDiv.find("."+this._dayOverClass+" a").mouseover();h=this._getNumberOfMonths(b);j=h[1];b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");j>1&&b.dpDiv.addClass("ui-datepicker-multi-"+j).css("width",17*j+"em");b.dpDiv[(h[0]!=1||h[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");
b==a.datepicker._curInst&&a.datepicker._datepickerShowing&&b.input&&b.input.is(":visible")&&!b.input.is(":disabled")&&b.input[0]!=document.activeElement&&b.input.focus();if(b.yearshtml){var l=b.yearshtml;setTimeout(function(){l===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml);l=b.yearshtml=null},0)}},_getBorders:function(b){var h=function(j){return{thin:1,medium:2,thick:3}[j]||j};return[parseFloat(h(b.css("border-left-width"))),parseFloat(h(b.css("border-top-width")))]},
_checkOffset:function(b,h,j){var l=b.dpDiv.outerWidth(),o=b.dpDiv.outerHeight(),n=b.input?b.input.outerWidth():0,k=b.input?b.input.outerHeight():0,m=document.documentElement.clientWidth+a(document).scrollLeft(),p=document.documentElement.clientHeight+a(document).scrollTop();h.left-=this._get(b,"isRTL")?l-n:0;h.left-=j&&h.left==b.input.offset().left?a(document).scrollLeft():0;h.top-=j&&h.top==b.input.offset().top+k?a(document).scrollTop():0;h.left-=Math.min(h.left,h.left+l>m&&m>l?Math.abs(h.left+l-
m):0);h.top-=Math.min(h.top,h.top+o>p&&p>o?Math.abs(o+k):0);return h},_findPos:function(b){for(var h=this._get(this._getInst(b),"isRTL");b&&(b.type=="hidden"||b.nodeType!=1||a.expr.filters.hidden(b));)b=b[h?"previousSibling":"nextSibling"];b=a(b).offset();return[b.left,b.top]},_hideDatepicker:function(b){var h=this._curInst;if(!(!h||b&&h!=a.data(b,"datepicker")))if(this._datepickerShowing){b=this._get(h,"showAnim");var j=this._get(h,"duration"),l=function(){a.datepicker._tidyDialog(h);this._curInst=
null};a.effects&&a.effects[b]?h.dpDiv.hide(b,a.datepicker._get(h,"showOptions"),j,l):h.dpDiv[b=="slideDown"?"slideUp":b=="fadeIn"?"fadeOut":"hide"](b?j:null,l);b||l();if(b=this._get(h,"onClose"))b.apply(h.input?h.input[0]:null,[h.input?h.input.val():"",h]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(a.blockUI){a.unblockUI();a("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(b){b.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},
_checkExternalClick:function(b){if(a.datepicker._curInst){b=a(b.target);b[0].id!=a.datepicker._mainDivId&&b.parents("#"+a.datepicker._mainDivId).length==0&&!b.hasClass(a.datepicker.markerClassName)&&!b.hasClass(a.datepicker._triggerClass)&&a.datepicker._datepickerShowing&&!(a.datepicker._inDialog&&a.blockUI)&&a.datepicker._hideDatepicker()}},_adjustDate:function(b,h,j){b=a(b);var l=this._getInst(b[0]);if(!this._isDisabledDatepicker(b[0])){this._adjustInstDate(l,h+(j=="M"?this._get(l,"showCurrentAtPos"):
0),j);this._updateDatepicker(l)}},_gotoToday:function(b){b=a(b);var h=this._getInst(b[0]);if(this._get(h,"gotoCurrent")&&h.currentDay){h.selectedDay=h.currentDay;h.drawMonth=h.selectedMonth=h.currentMonth;h.drawYear=h.selectedYear=h.currentYear}else{var j=new Date;h.selectedDay=j.getDate();h.drawMonth=h.selectedMonth=j.getMonth();h.drawYear=h.selectedYear=j.getFullYear()}this._notifyChange(h);this._adjustDate(b)},_selectMonthYear:function(b,h,j){b=a(b);var l=this._getInst(b[0]);l._selectingMonthYear=
false;l["selected"+(j=="M"?"Month":"Year")]=l["draw"+(j=="M"?"Month":"Year")]=parseInt(h.options[h.selectedIndex].value,10);this._notifyChange(l);this._adjustDate(b)},_clickMonthYear:function(b){var h=this._getInst(a(b)[0]);h.input&&h._selectingMonthYear&&setTimeout(function(){h.input.focus()},0);h._selectingMonthYear=!h._selectingMonthYear},_selectDay:function(b,h,j,l){var o=a(b);if(!(a(l).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0]))){o=this._getInst(o[0]);o.selectedDay=o.currentDay=
a("a",l).html();o.selectedMonth=o.currentMonth=h;o.selectedYear=o.currentYear=j;this._selectDate(b,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear))}},_clearDate:function(b){b=a(b);this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(b,h){b=this._getInst(a(b)[0]);h=h!=null?h:this._formatDate(b);b.input&&b.input.val(h);this._updateAlternate(b);var j=this._get(b,"onSelect");if(j)j.apply(b.input?b.input[0]:null,[h,b]);else b.input&&b.input.trigger("change");if(b.inline)this._updateDatepicker(b);
else{this._hideDatepicker();this._lastInput=b.input[0];typeof b.input[0]!="object"&&b.input.focus();this._lastInput=null}},_updateAlternate:function(b){var h=this._get(b,"altField");if(h){var j=this._get(b,"altFormat")||this._get(b,"dateFormat"),l=this._getDate(b),o=this.formatDate(j,l,this._getFormatConfig(b));a(h).each(function(){a(this).val(o)})}},noWeekends:function(b){b=b.getDay();return[b>0&&b<6,""]},iso8601Week:function(b){b=new Date(b.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var h=
b.getTime();b.setMonth(0);b.setDate(1);return Math.floor(Math.round((h-b)/864E5)/7)+1},parseDate:function(b,h,j){if(b==null||h==null)throw"Invalid arguments";h=typeof h=="object"?h.toString():h+"";if(h=="")return null;var l=(j?j.shortYearCutoff:null)||this._defaults.shortYearCutoff;l=typeof l!="string"?l:(new Date).getFullYear()%100+parseInt(l,10);for(var o=(j?j.dayNamesShort:null)||this._defaults.dayNamesShort,n=(j?j.dayNames:null)||this._defaults.dayNames,k=(j?j.monthNamesShort:null)||this._defaults.monthNamesShort,
m=(j?j.monthNames:null)||this._defaults.monthNames,p=j=-1,q=-1,s=-1,r=false,u=function(y){(y=G+1<b.length&&b.charAt(G+1)==y)&&G++;return y},v=function(y){var H=u(y);y=new RegExp("^\\d{1,"+(y=="@"?14:y=="!"?20:y=="y"&&H?4:y=="o"?3:2)+"}");y=h.substring(z).match(y);if(!y)throw"Missing number at position "+z;z+=y[0].length;return parseInt(y[0],10)},w=function(y,H,N){y=a.map(u(y)?N:H,function(D,E){return[[E,D]]}).sort(function(D,E){return-(D[1].length-E[1].length)});var J=-1;a.each(y,function(D,E){D=
E[1];if(h.substr(z,D.length).toLowerCase()==D.toLowerCase()){J=E[0];z+=D.length;return false}});if(J!=-1)return J+1;else throw"Unknown name at position "+z;},x=function(){if(h.charAt(z)!=b.charAt(G))throw"Unexpected literal at position "+z;z++},z=0,G=0;G<b.length;G++)if(r)if(b.charAt(G)=="'"&&!u("'"))r=false;else x();else switch(b.charAt(G)){case "d":q=v("d");break;case "D":w("D",o,n);break;case "o":s=v("o");break;case "m":p=v("m");break;case "M":p=w("M",k,m);break;case "y":j=v("y");break;case "@":var C=
new Date(v("@"));j=C.getFullYear();p=C.getMonth()+1;q=C.getDate();break;case "!":C=new Date((v("!")-this._ticksTo1970)/1E4);j=C.getFullYear();p=C.getMonth()+1;q=C.getDate();break;case "'":if(u("'"))x();else r=true;break;default:x()}if(j==-1)j=(new Date).getFullYear();else if(j<100)j+=(new Date).getFullYear()-(new Date).getFullYear()%100+(j<=l?0:-100);if(s>-1){p=1;q=s;do{l=this._getDaysInMonth(j,p-1);if(q<=l)break;p++;q-=l}while(1)}C=this._daylightSavingAdjust(new Date(j,p-1,q));if(C.getFullYear()!=
j||C.getMonth()+1!=p||C.getDate()!=q)throw"Invalid date";return C},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(b,h,j){if(!h)return"";var l=(j?j.dayNamesShort:null)||this._defaults.dayNamesShort,o=(j?j.dayNames:null)||this._defaults.dayNames,
n=(j?j.monthNamesShort:null)||this._defaults.monthNamesShort;j=(j?j.monthNames:null)||this._defaults.monthNames;var k=function(u){(u=r+1<b.length&&b.charAt(r+1)==u)&&r++;return u},m=function(u,v,w){v=""+v;if(k(u))for(;v.length<w;)v="0"+v;return v},p=function(u,v,w,x){return k(u)?x[v]:w[v]},q="",s=false;if(h)for(var r=0;r<b.length;r++)if(s)if(b.charAt(r)=="'"&&!k("'"))s=false;else q+=b.charAt(r);else switch(b.charAt(r)){case "d":q+=m("d",h.getDate(),2);break;case "D":q+=p("D",h.getDay(),l,o);break;
case "o":q+=m("o",(h.getTime()-(new Date(h.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":q+=m("m",h.getMonth()+1,2);break;case "M":q+=p("M",h.getMonth(),n,j);break;case "y":q+=k("y")?h.getFullYear():(h.getYear()%100<10?"0":"")+h.getYear()%100;break;case "@":q+=h.getTime();break;case "!":q+=h.getTime()*1E4+this._ticksTo1970;break;case "'":if(k("'"))q+="'";else s=true;break;default:q+=b.charAt(r)}return q},_possibleChars:function(b){for(var h="",j=false,l=function(n){(n=o+1<b.length&&b.charAt(o+
1)==n)&&o++;return n},o=0;o<b.length;o++)if(j)if(b.charAt(o)=="'"&&!l("'"))j=false;else h+=b.charAt(o);else switch(b.charAt(o)){case "d":case "m":case "y":case "@":h+="0123456789";break;case "D":case "M":return null;case "'":if(l("'"))h+="'";else j=true;break;default:h+=b.charAt(o)}return h},_get:function(b,h){return b.settings[h]!==d?b.settings[h]:this._defaults[h]},_setDateFromField:function(b,h){if(b.input.val()!=b.lastVal){var j=this._get(b,"dateFormat"),l=b.lastVal=b.input?b.input.val():null,
o,n;o=n=this._getDefaultDate(b);var k=this._getFormatConfig(b);try{o=this.parseDate(j,l,k)||n}catch(m){this.log(m);l=h?"":l}b.selectedDay=o.getDate();b.drawMonth=b.selectedMonth=o.getMonth();b.drawYear=b.selectedYear=o.getFullYear();b.currentDay=l?o.getDate():0;b.currentMonth=l?o.getMonth():0;b.currentYear=l?o.getFullYear():0;this._adjustInstDate(b)}},_getDefaultDate:function(b){return this._restrictMinMax(b,this._determineDate(b,this._get(b,"defaultDate"),new Date))},_determineDate:function(b,h,
j){var l=function(n){var k=new Date;k.setDate(k.getDate()+n);return k},o=function(n){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),n,a.datepicker._getFormatConfig(b))}catch(k){}var m=(n.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,p=m.getFullYear(),q=m.getMonth();m=m.getDate();for(var s=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,r=s.exec(n);r;){switch(r[2]||"d"){case "d":case "D":m+=parseInt(r[1],10);break;case "w":case "W":m+=parseInt(r[1],10)*7;break;case "m":case "M":q+=
parseInt(r[1],10);m=Math.min(m,a.datepicker._getDaysInMonth(p,q));break;case "y":case "Y":p+=parseInt(r[1],10);m=Math.min(m,a.datepicker._getDaysInMonth(p,q));break}r=s.exec(n)}return new Date(p,q,m)};if(h=(h=h==null||h===""?j:typeof h=="string"?o(h):typeof h=="number"?isNaN(h)?j:l(h):new Date(h.getTime()))&&h.toString()=="Invalid Date"?j:h){h.setHours(0);h.setMinutes(0);h.setSeconds(0);h.setMilliseconds(0)}return this._daylightSavingAdjust(h)},_daylightSavingAdjust:function(b){if(!b)return null;
b.setHours(b.getHours()>12?b.getHours()+2:0);return b},_setDate:function(b,h,j){var l=!h,o=b.selectedMonth,n=b.selectedYear;h=this._restrictMinMax(b,this._determineDate(b,h,new Date));b.selectedDay=b.currentDay=h.getDate();b.drawMonth=b.selectedMonth=b.currentMonth=h.getMonth();b.drawYear=b.selectedYear=b.currentYear=h.getFullYear();if((o!=b.selectedMonth||n!=b.selectedYear)&&!j)this._notifyChange(b);this._adjustInstDate(b);if(b.input)b.input.val(l?"":this._formatDate(b))},_getDate:function(b){return!b.currentYear||
b.input&&b.input.val()==""?null:this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay))},_generateHTML:function(b){var h=new Date;h=this._daylightSavingAdjust(new Date(h.getFullYear(),h.getMonth(),h.getDate()));var j=this._get(b,"isRTL"),l=this._get(b,"showButtonPanel"),o=this._get(b,"hideIfNoPrevNext"),n=this._get(b,"navigationAsDateFormat"),k=this._getNumberOfMonths(b),m=this._get(b,"showCurrentAtPos"),p=this._get(b,"stepMonths"),q=k[0]!=1||k[1]!=1,s=this._daylightSavingAdjust(!b.currentDay?
new Date(9999,9,9):new Date(b.currentYear,b.currentMonth,b.currentDay)),r=this._getMinMaxDate(b,"min"),u=this._getMinMaxDate(b,"max");m=b.drawMonth-m;var v=b.drawYear;if(m<0){m+=12;v--}if(u){var w=this._daylightSavingAdjust(new Date(u.getFullYear(),u.getMonth()-k[0]*k[1]+1,u.getDate()));for(w=r&&w<r?r:w;this._daylightSavingAdjust(new Date(v,m,1))>w;){m--;if(m<0){m=11;v--}}}b.drawMonth=m;b.drawYear=v;w=this._get(b,"prevText");w=!n?w:this.formatDate(w,this._daylightSavingAdjust(new Date(v,m-p,1)),this._getFormatConfig(b));
w=this._canAdjustMonth(b,-1,v,m)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+e+".datepicker._adjustDate('#"+b.id+"', -"+p+", 'M');\" title=\""+w+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"e":"w")+'">'+w+"</span></a>":o?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+w+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"e":"w")+'">'+w+"</span></a>";var x=this._get(b,"nextText");x=!n?x:this.formatDate(x,this._daylightSavingAdjust(new Date(v,
m+p,1)),this._getFormatConfig(b));o=this._canAdjustMonth(b,+1,v,m)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+e+".datepicker._adjustDate('#"+b.id+"', +"+p+", 'M');\" title=\""+x+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"w":"e")+'">'+x+"</span></a>":o?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+x+'"><span class="ui-icon ui-icon-circle-triangle-'+(j?"w":"e")+'">'+x+"</span></a>";p=this._get(b,"currentText");x=this._get(b,"gotoCurrent")&&
b.currentDay?s:h;p=!n?p:this.formatDate(p,x,this._getFormatConfig(b));n=!b.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+e+'.datepicker._hideDatepicker();">'+this._get(b,"closeText")+"</button>":"";l=l?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(j?n:"")+(this._isInRange(b,x)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
e+".datepicker._gotoToday('#"+b.id+"');\">"+p+"</button>":"")+(j?"":n)+"</div>":"";n=parseInt(this._get(b,"firstDay"),10);n=isNaN(n)?0:n;p=this._get(b,"showWeek");x=this._get(b,"dayNames");this._get(b,"dayNamesShort");var z=this._get(b,"dayNamesMin"),G=this._get(b,"monthNames"),C=this._get(b,"monthNamesShort"),y=this._get(b,"beforeShowDay"),H=this._get(b,"showOtherMonths"),N=this._get(b,"selectOtherMonths");this._get(b,"calculateWeek");for(var J=this._getDefaultDate(b),D="",E=0;E<k[0];E++){for(var P=
"",L=0;L<k[1];L++){var Q=this._daylightSavingAdjust(new Date(v,m,b.selectedDay)),B=" ui-corner-all",F="";if(q){F+='<div class="ui-datepicker-group';if(k[1]>1)switch(L){case 0:F+=" ui-datepicker-group-first";B=" ui-corner-"+(j?"right":"left");break;case k[1]-1:F+=" ui-datepicker-group-last";B=" ui-corner-"+(j?"left":"right");break;default:F+=" ui-datepicker-group-middle";B="";break}F+='">'}F+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+B+'">'+(/all|left/.test(B)&&E==0?j?
o:w:"")+(/all|right/.test(B)&&E==0?j?w:o:"")+this._generateMonthYearHeader(b,m,v,r,u,E>0||L>0,G,C)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var I=p?'<th class="ui-datepicker-week-col">'+this._get(b,"weekHeader")+"</th>":"";for(B=0;B<7;B++){var A=(B+n)%7;I+="<th"+((B+n+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+x[A]+'">'+z[A]+"</span></th>"}F+=I+"</tr></thead><tbody>";I=this._getDaysInMonth(v,m);if(v==b.selectedYear&&m==b.selectedMonth)b.selectedDay=Math.min(b.selectedDay,
I);B=(this._getFirstDayOfMonth(v,m)-n+7)%7;I=q?6:Math.ceil((B+I)/7);A=this._daylightSavingAdjust(new Date(v,m,1-B));for(var R=0;R<I;R++){F+="<tr>";var S=!p?"":'<td class="ui-datepicker-week-col">'+this._get(b,"calculateWeek")(A)+"</td>";for(B=0;B<7;B++){var M=y?y.apply(b.input?b.input[0]:null,[A]):[true,""],K=A.getMonth()!=m,O=K&&!N||!M[0]||r&&A<r||u&&A>u;S+='<td class="'+((B+n+6)%7>=5?" ui-datepicker-week-end":"")+(K?" ui-datepicker-other-month":"")+(A.getTime()==Q.getTime()&&m==b.selectedMonth&&
b._keyEvent||J.getTime()==A.getTime()&&J.getTime()==Q.getTime()?" "+this._dayOverClass:"")+(O?" "+this._unselectableClass+" ui-state-disabled":"")+(K&&!H?"":" "+M[1]+(A.getTime()==s.getTime()?" "+this._currentClass:"")+(A.getTime()==h.getTime()?" ui-datepicker-today":""))+'"'+((!K||H)&&M[2]?' title="'+M[2]+'"':"")+(O?"":' onclick="DP_jQuery_'+e+".datepicker._selectDay('#"+b.id+"',"+A.getMonth()+","+A.getFullYear()+', this);return false;"')+">"+(K&&!H?"&#xa0;":O?'<span class="ui-state-default">'+A.getDate()+
"</span>":'<a class="ui-state-default'+(A.getTime()==h.getTime()?" ui-state-highlight":"")+(A.getTime()==s.getTime()?" ui-state-active":"")+(K?" ui-priority-secondary":"")+'" href="#">'+A.getDate()+"</a>")+"</td>";A.setDate(A.getDate()+1);A=this._daylightSavingAdjust(A)}F+=S+"</tr>"}m++;if(m>11){m=0;v++}F+="</tbody></table>"+(q?"</div>"+(k[0]>0&&L==k[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");P+=F}D+=P}D+=l+(a.browser.msie&&parseInt(a.browser.version,10)<7&&!b.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':
"");b._keyEvent=false;return D},_generateMonthYearHeader:function(b,h,j,l,o,n,k,m){var p=this._get(b,"changeMonth"),q=this._get(b,"changeYear"),s=this._get(b,"showMonthAfterYear"),r='<div class="ui-datepicker-title">',u="";if(n||!p)u+='<span class="ui-datepicker-month">'+k[h]+"</span>";else{k=l&&l.getFullYear()==j;var v=o&&o.getFullYear()==j;u+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+e+".datepicker._selectMonthYear('#"+b.id+"', this, 'M');\" onclick=\"DP_jQuery_"+e+".datepicker._clickMonthYear('#"+
b.id+"');\">";for(var w=0;w<12;w++)if((!k||w>=l.getMonth())&&(!v||w<=o.getMonth()))u+='<option value="'+w+'"'+(w==h?' selected="selected"':"")+">"+m[w]+"</option>";u+="</select>"}s||(r+=u+(n||!(p&&q)?"&#xa0;":""));if(!b.yearshtml){b.yearshtml="";if(n||!q)r+='<span class="ui-datepicker-year">'+j+"</span>";else{m=this._get(b,"yearRange").split(":");var x=(new Date).getFullYear();k=function(z){z=z.match(/c[+-].*/)?j+parseInt(z.substring(1),10):z.match(/[+-].*/)?x+parseInt(z,10):parseInt(z,10);return isNaN(z)?
x:z};h=k(m[0]);m=Math.max(h,k(m[1]||""));h=l?Math.max(h,l.getFullYear()):h;m=o?Math.min(m,o.getFullYear()):m;for(b.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+e+".datepicker._selectMonthYear('#"+b.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+e+".datepicker._clickMonthYear('#"+b.id+"');\">";h<=m;h++)b.yearshtml+='<option value="'+h+'"'+(h==j?' selected="selected"':"")+">"+h+"</option>";b.yearshtml+="</select>";r+=b.yearshtml;b.yearshtml=null}}r+=this._get(b,"yearSuffix");if(s)r+=
(n||!(p&&q)?"&#xa0;":"")+u;r+="</div>";return r},_adjustInstDate:function(b,h,j){var l=b.drawYear+(j=="Y"?h:0),o=b.drawMonth+(j=="M"?h:0);h=Math.min(b.selectedDay,this._getDaysInMonth(l,o))+(j=="D"?h:0);l=this._restrictMinMax(b,this._daylightSavingAdjust(new Date(l,o,h)));b.selectedDay=l.getDate();b.drawMonth=b.selectedMonth=l.getMonth();b.drawYear=b.selectedYear=l.getFullYear();if(j=="M"||j=="Y")this._notifyChange(b)},_restrictMinMax:function(b,h){var j=this._getMinMaxDate(b,"min");b=this._getMinMaxDate(b,
"max");h=j&&h<j?j:h;return h=b&&h>b?b:h},_notifyChange:function(b){var h=this._get(b,"onChangeMonthYear");if(h)h.apply(b.input?b.input[0]:null,[b.selectedYear,b.selectedMonth+1,b])},_getNumberOfMonths:function(b){b=this._get(b,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(b,h){return this._determineDate(b,this._get(b,h+"Date"),null)},_getDaysInMonth:function(b,h){return 32-this._daylightSavingAdjust(new Date(b,h,32)).getDate()},_getFirstDayOfMonth:function(b,
h){return(new Date(b,h,1)).getDay()},_canAdjustMonth:function(b,h,j,l){var o=this._getNumberOfMonths(b);j=this._daylightSavingAdjust(new Date(j,l+(h<0?h:o[0]*o[1]),1));h<0&&j.setDate(this._getDaysInMonth(j.getFullYear(),j.getMonth()));return this._isInRange(b,j)},_isInRange:function(b,h){var j=this._getMinMaxDate(b,"min");b=this._getMinMaxDate(b,"max");return(!j||h.getTime()>=j.getTime())&&(!b||h.getTime()<=b.getTime())},_getFormatConfig:function(b){var h=this._get(b,"shortYearCutoff");h=typeof h!=
"string"?h:(new Date).getFullYear()%100+parseInt(h,10);return{shortYearCutoff:h,dayNamesShort:this._get(b,"dayNamesShort"),dayNames:this._get(b,"dayNames"),monthNamesShort:this._get(b,"monthNamesShort"),monthNames:this._get(b,"monthNames")}},_formatDate:function(b,h,j,l){if(!h){b.currentDay=b.selectedDay;b.currentMonth=b.selectedMonth;b.currentYear=b.selectedYear}h=h?typeof h=="object"?h:this._daylightSavingAdjust(new Date(l,j,h)):this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay));
return this.formatDate(this._get(b,"dateFormat"),h,this._getFormatConfig(b))}});a.fn.datepicker=function(b){if(!this.length)return this;if(!a.datepicker.initialized){a(document).mousedown(a.datepicker._checkExternalClick).find("body").append(a.datepicker.dpDiv);a.datepicker.initialized=true}var h=Array.prototype.slice.call(arguments,1);if(typeof b=="string"&&(b=="isDisabled"||b=="getDate"||b=="widget"))return a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(h));if(b=="option"&&
arguments.length==2&&typeof arguments[1]=="string")return a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(h));return this.each(function(){typeof b=="string"?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(h)):a.datepicker._attachDatepicker(this,b)})};a.datepicker=new c;a.datepicker.initialized=false;a.datepicker.uuid=(new Date).getTime();a.datepicker.version="1.8.13";window["DP_jQuery_"+e]=a})(jQuery);
(function(a,d){var c={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},f={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},g=a.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};a.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,
position:{my:"center",at:"center",collision:"fit",using:function(e){var i=a(this).css(e).offset().top;i<0&&a(this).css("top",e.top-i)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var e=this,i=e.options,b=i.title||"&#160;",h=a.ui.dialog.getTitleId(e.element),j=(e.uiDialog=a("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
i.dialogClass).css({zIndex:i.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){if(i.closeOnEscape&&n.keyCode&&n.keyCode===a.ui.keyCode.ESCAPE){e.close(n);n.preventDefault()}}).attr({role:"dialog","aria-labelledby":h}).mousedown(function(n){e.moveToTop(false,n)});e.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(j);var l=(e.uiDialogTitlebar=a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(j),
o=a('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){o.addClass("ui-state-hover")},function(){o.removeClass("ui-state-hover")}).focus(function(){o.addClass("ui-state-focus")}).blur(function(){o.removeClass("ui-state-focus")}).click(function(n){e.close(n);return false}).appendTo(l);(e.uiDialogTitlebarCloseText=a("<span></span>")).addClass("ui-icon ui-icon-closethick").text(i.closeText).appendTo(o);a("<span></span>").addClass("ui-dialog-title").attr("id",
h).html(b).prependTo(l);if(a.isFunction(i.beforeclose)&&!a.isFunction(i.beforeClose))i.beforeClose=i.beforeclose;l.find("*").add(l).disableSelection();i.draggable&&a.fn.draggable&&e._makeDraggable();i.resizable&&a.fn.resizable&&e._makeResizable();e._createButtons(i.buttons);e._isOpen=false;a.fn.bgiframe&&j.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var e=this;e.overlay&&e.overlay.destroy();e.uiDialog.hide();e.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
e.uiDialog.remove();e.originalTitle&&e.element.attr("title",e.originalTitle);return e},widget:function(){return this.uiDialog},close:function(e){var i=this,b,h;if(false!==i._trigger("beforeClose",e)){i.overlay&&i.overlay.destroy();i.uiDialog.unbind("keypress.ui-dialog");i._isOpen=false;if(i.options.hide)i.uiDialog.hide(i.options.hide,function(){i._trigger("close",e)});else{i.uiDialog.hide();i._trigger("close",e)}a.ui.dialog.overlay.resize();if(i.options.modal){b=0;a(".ui-dialog").each(function(){if(this!==
i.uiDialog[0]){h=a(this).css("z-index");isNaN(h)||(b=Math.max(b,h))}});a.ui.dialog.maxZ=b}return i}},isOpen:function(){return this._isOpen},moveToTop:function(e,i){var b=this,h=b.options;if(h.modal&&!e||!h.stack&&!h.modal)return b._trigger("focus",i);if(h.zIndex>a.ui.dialog.maxZ)a.ui.dialog.maxZ=h.zIndex;if(b.overlay){a.ui.dialog.maxZ+=1;b.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)}e={scrollTop:b.element.attr("scrollTop"),scrollLeft:b.element.attr("scrollLeft")};a.ui.dialog.maxZ+=
1;b.uiDialog.css("z-index",a.ui.dialog.maxZ);b.element.attr(e);b._trigger("focus",i);return b},open:function(){if(!this._isOpen){var e=this,i=e.options,b=e.uiDialog;e.overlay=i.modal?new a.ui.dialog.overlay(e):null;e._size();e._position(i.position);b.show(i.show);e.moveToTop(true);i.modal&&b.bind("keypress.ui-dialog",function(h){if(h.keyCode===a.ui.keyCode.TAB){var j=a(":tabbable",this),l=j.filter(":first");j=j.filter(":last");if(h.target===j[0]&&!h.shiftKey){l.focus(1);return false}else if(h.target===
l[0]&&h.shiftKey){j.focus(1);return false}}});a(e.element.find(":tabbable").get().concat(b.find(".ui-dialog-buttonpane :tabbable").get().concat(b.get()))).eq(0).focus();e._isOpen=true;e._trigger("open");return e}},_createButtons:function(e){var i=this,b=false,h=a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),j=a("<div></div>").addClass("ui-dialog-buttonset").appendTo(h);i.uiDialog.find(".ui-dialog-buttonpane").remove();typeof e==="object"&&e!==null&&a.each(e,
function(){return!(b=true)});if(b){a.each(e,function(l,o){o=a.isFunction(o)?{click:o,text:l}:o;var n=a('<button type="button"></button>').click(function(){o.click.apply(i.element[0],arguments)}).appendTo(j);a.each(o,function(k,m){if(k!=="click")k in g?n[k](m):n.attr(k,m)});a.fn.button&&n.button()});h.appendTo(i.uiDialog)}},_makeDraggable:function(){function e(l){return{position:l.position,offset:l.offset}}var i=this,b=i.options,h=a(document),j;i.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
handle:".ui-dialog-titlebar",containment:"document",start:function(l,o){j=b.height==="auto"?"auto":a(this).height();a(this).height(a(this).height()).addClass("ui-dialog-dragging");i._trigger("dragStart",l,e(o))},drag:function(l,o){i._trigger("drag",l,e(o))},stop:function(l,o){b.position=[o.position.left-h.scrollLeft(),o.position.top-h.scrollTop()];a(this).removeClass("ui-dialog-dragging").height(j);i._trigger("dragStop",l,e(o));a.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function i(l){return{originalPosition:l.originalPosition,
originalSize:l.originalSize,position:l.position,size:l.size}}e=e===d?this.options.resizable:e;var b=this,h=b.options,j=b.uiDialog.css("position");e=typeof e==="string"?e:"n,e,s,w,se,sw,ne,nw";b.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:b.element,maxWidth:h.maxWidth,maxHeight:h.maxHeight,minWidth:h.minWidth,minHeight:b._minHeight(),handles:e,start:function(l,o){a(this).addClass("ui-dialog-resizing");b._trigger("resizeStart",l,i(o))},resize:function(l,o){b._trigger("resize",
l,i(o))},stop:function(l,o){a(this).removeClass("ui-dialog-resizing");h.height=a(this).height();h.width=a(this).width();b._trigger("resizeStop",l,i(o));a.ui.dialog.overlay.resize()}}).css("position",j).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(e){var i=[],b=[0,0],h;if(e){if(typeof e==="string"||typeof e==="object"&&"0"in e){i=e.split?e.split(" "):
[e[0],e[1]];if(i.length===1)i[1]=i[0];a.each(["left","top"],function(j,l){if(+i[j]===i[j]){b[j]=i[j];i[j]=l}});e={my:i.join(" "),at:i.join(" "),offset:b.join(" ")}}e=a.extend({},a.ui.dialog.prototype.options.position,e)}else e=a.ui.dialog.prototype.options.position;(h=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},e));h||this.uiDialog.hide()},_setOptions:function(e){var i=this,b={},h=false;a.each(e,function(j,l){i._setOption(j,l);
if(j in c)h=true;if(j in f)b[j]=l});h&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",b)},_setOption:function(e,i){var b=this,h=b.uiDialog;switch(e){case "beforeclose":e="beforeClose";break;case "buttons":b._createButtons(i);break;case "closeText":b.uiDialogTitlebarCloseText.text(""+i);break;case "dialogClass":h.removeClass(b.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+i);break;case "disabled":i?h.addClass("ui-dialog-disabled"):
h.removeClass("ui-dialog-disabled");break;case "draggable":var j=h.is(":data(draggable)");j&&!i&&h.draggable("destroy");!j&&i&&b._makeDraggable();break;case "position":b._position(i);break;case "resizable":(j=h.is(":data(resizable)"))&&!i&&h.resizable("destroy");j&&typeof i==="string"&&h.resizable("option","handles",i);!j&&i!==false&&b._makeResizable(i);break;case "title":a(".ui-dialog-title",b.uiDialogTitlebar).html(""+(i||"&#160;"));break}a.Widget.prototype._setOption.apply(b,arguments)},_size:function(){var e=
this.options,i,b,h=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(e.minWidth>e.width)e.width=e.minWidth;i=this.uiDialog.css({height:"auto",width:e.width}).height();b=Math.max(0,e.minHeight-i);if(e.height==="auto")if(a.support.minHeight)this.element.css({minHeight:b,height:"auto"});else{this.uiDialog.show();e=this.element.css("height","auto").height();h||this.uiDialog.hide();this.element.height(Math.max(e,b))}else this.element.height(Math.max(e.height-
i,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});a.extend(a.ui.dialog,{version:"1.8.13",uuid:0,maxZ:0,getTitleId:function(e){e=e.attr("id");if(!e){this.uuid+=1;e=this.uuid}return"ui-dialog-title-"+e},overlay:function(e){this.$el=a.ui.dialog.overlay.create(e)}});a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),
create:function(e){if(this.instances.length===0){setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()<a.ui.dialog.overlay.maxZ)return false})},1);a(document).bind("keydown.dialog-overlay",function(b){if(e.options.closeOnEscape&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE){e.close(b);b.preventDefault()}});a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize)}var i=(this.oldInstances.pop()||a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
height:this.height()});a.fn.bgiframe&&i.bgiframe();this.instances.push(i);return i},destroy:function(e){var i=a.inArray(e,this.instances);i!=-1&&this.oldInstances.push(this.instances.splice(i,1)[0]);this.instances.length===0&&a([document,window]).unbind(".dialog-overlay");e.remove();var b=0;a.each(this.instances,function(){b=Math.max(b,this.css("z-index"))});this.maxZ=b},height:function(){var e,i;if(a.browser.msie&&a.browser.version<7){e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
i=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return e<i?a(window).height()+"px":e+"px"}else return a(document).height()+"px"},width:function(){var e,i;if(a.browser.msie&&a.browser.version<7){e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);i=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return e<i?a(window).width()+"px":e+"px"}else return a(document).width()+"px"},resize:function(){var e=a([]);a.each(a.ui.dialog.overlay.instances,
function(){e=e.add(this)});e.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}});a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(a){a.ui=a.ui||{};var d=/left|center|right/,c=/top|center|bottom/,f=a.fn.position,g=a.fn.offset;a.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=a.extend({},e);var i=a(e.of),b=i[0],h=(e.collision||"flip").split(" "),j=e.offset?e.offset.split(" "):[0,0],l,o,n;if(b.nodeType===9){l=i.width();o=i.height();n={top:0,left:0}}else if(b.setTimeout){l=i.width();o=i.height();n={top:i.scrollTop(),left:i.scrollLeft()}}else if(b.preventDefault){e.at="left top";l=o=0;n={top:e.of.pageY,
left:e.of.pageX}}else{l=i.outerWidth();o=i.outerHeight();n=i.offset()}a.each(["my","at"],function(){var k=(e[this]||"").split(" ");if(k.length===1)k=d.test(k[0])?k.concat(["center"]):c.test(k[0])?["center"].concat(k):["center","center"];k[0]=d.test(k[0])?k[0]:"center";k[1]=c.test(k[1])?k[1]:"center";e[this]=k});if(h.length===1)h[1]=h[0];j[0]=parseInt(j[0],10)||0;if(j.length===1)j[1]=j[0];j[1]=parseInt(j[1],10)||0;if(e.at[0]==="right")n.left+=l;else if(e.at[0]==="center")n.left+=l/2;if(e.at[1]==="bottom")n.top+=
o;else if(e.at[1]==="center")n.top+=o/2;n.left+=j[0];n.top+=j[1];return this.each(function(){var k=a(this),m=k.outerWidth(),p=k.outerHeight(),q=parseInt(a.curCSS(this,"marginLeft",true))||0,s=parseInt(a.curCSS(this,"marginTop",true))||0,r=m+q+(parseInt(a.curCSS(this,"marginRight",true))||0),u=p+s+(parseInt(a.curCSS(this,"marginBottom",true))||0),v=a.extend({},n),w;if(e.my[0]==="right")v.left-=m;else if(e.my[0]==="center")v.left-=m/2;if(e.my[1]==="bottom")v.top-=p;else if(e.my[1]==="center")v.top-=
p/2;v.left=Math.round(v.left);v.top=Math.round(v.top);w={left:v.left-q,top:v.top-s};a.each(["left","top"],function(x,z){a.ui.position[h[x]]&&a.ui.position[h[x]][z](v,{targetWidth:l,targetHeight:o,elemWidth:m,elemHeight:p,collisionPosition:w,collisionWidth:r,collisionHeight:u,offset:j,my:e.my,at:e.at})});a.fn.bgiframe&&k.bgiframe();k.offset(a.extend(v,{using:e.using}))})};a.ui.position={fit:{left:function(e,i){var b=a(window);b=i.collisionPosition.left+i.collisionWidth-b.width()-b.scrollLeft();e.left=
b>0?e.left-b:Math.max(e.left-i.collisionPosition.left,e.left)},top:function(e,i){var b=a(window);b=i.collisionPosition.top+i.collisionHeight-b.height()-b.scrollTop();e.top=b>0?e.top-b:Math.max(e.top-i.collisionPosition.top,e.top)}},flip:{left:function(e,i){if(i.at[0]!=="center"){var b=a(window);b=i.collisionPosition.left+i.collisionWidth-b.width()-b.scrollLeft();var h=i.my[0]==="left"?-i.elemWidth:i.my[0]==="right"?i.elemWidth:0,j=i.at[0]==="left"?i.targetWidth:-i.targetWidth,l=-2*i.offset[0];e.left+=
i.collisionPosition.left<0?h+j+l:b>0?h+j+l:0}},top:function(e,i){if(i.at[1]!=="center"){var b=a(window);b=i.collisionPosition.top+i.collisionHeight-b.height()-b.scrollTop();var h=i.my[1]==="top"?-i.elemHeight:i.my[1]==="bottom"?i.elemHeight:0,j=i.at[1]==="top"?i.targetHeight:-i.targetHeight,l=-2*i.offset[1];e.top+=i.collisionPosition.top<0?h+j+l:b>0?h+j+l:0}}}};if(!a.offset.setOffset){a.offset.setOffset=function(e,i){if(/static/.test(a.curCSS(e,"position")))e.style.position="relative";var b=a(e),
h=b.offset(),j=parseInt(a.curCSS(e,"top",true),10)||0,l=parseInt(a.curCSS(e,"left",true),10)||0;h={top:i.top-h.top+j,left:i.left-h.left+l};"using"in i?i.using.call(e,h):b.css(h)};a.fn.offset=function(e){var i=this[0];if(!i||!i.ownerDocument)return null;if(e)return this.each(function(){a.offset.setOffset(this,e)});return g.call(this)}}})(jQuery);
(function(a,d){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(c){if(c===d)return this._value();this._setOption("value",c);return this},_setOption:function(c,f){if(c==="value"){this.options.value=f;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var c=this.options.value;if(typeof c!=="number")c=0;return Math.min(this.options.max,Math.max(this.min,c))},_percentage:function(){return 100*
this._value()/this.options.max},_refreshValue:function(){var c=this.value(),f=this._percentage();if(this.oldValue!==c){this.oldValue=c;this._trigger("change")}this.valueDiv.toggle(c>this.min).toggleClass("ui-corner-right",c===this.options.max).width(f.toFixed(0)+"%");this.element.attr("aria-valuenow",c)}});a.extend(a.ui.progressbar,{version:"1.8.13"})})(jQuery);
(function(a){a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var d=this,c=this.options,f=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),g=c.values&&c.values.length||1,e=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
this.orientation+" ui-widget ui-widget-content ui-corner-all"+(c.disabled?" ui-slider-disabled ui-disabled":""));this.range=a([]);if(c.range){if(c.range===true){if(!c.values)c.values=[this._valueMin(),this._valueMin()];if(c.values.length&&c.values.length!==2)c.values=[c.values[0],c.values[0]]}this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(c.range==="min"||c.range==="max"?" ui-slider-range-"+c.range:""))}for(var i=f.length;i<g;i+=1)e.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
this.handles=f.add(a(e.join("")).appendTo(d.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(b){b.preventDefault()}).hover(function(){c.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(c.disabled)a(this).blur();else{a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(b){a(this).data("index.ui-slider-handle",
b)});this.handles.keydown(function(b){var h=true,j=a(this).data("index.ui-slider-handle"),l,o,n;if(!d.options.disabled){switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:h=false;if(!d._keySliding){d._keySliding=true;a(this).addClass("ui-state-active");l=d._start(b,j);if(l===false)return}break}n=d.options.step;l=d.options.values&&d.options.values.length?
(o=d.values(j)):(o=d.value());switch(b.keyCode){case a.ui.keyCode.HOME:o=d._valueMin();break;case a.ui.keyCode.END:o=d._valueMax();break;case a.ui.keyCode.PAGE_UP:o=d._trimAlignValue(l+(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:o=d._trimAlignValue(l-(d._valueMax()-d._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(l===d._valueMax())return;o=d._trimAlignValue(l+n);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(l===d._valueMin())return;o=d._trimAlignValue(l-
n);break}d._slide(b,j,o);return h}}).keyup(function(b){var h=a(this).data("index.ui-slider-handle");if(d._keySliding){d._keySliding=false;d._stop(b,h);d._change(b,h);a(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();
return this},_mouseCapture:function(d){var c=this.options,f,g,e,i,b;if(c.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();f=this._normValueFromMouse({x:d.pageX,y:d.pageY});g=this._valueMax()-this._valueMin()+1;i=this;this.handles.each(function(h){var j=Math.abs(f-i.values(h));if(g>j){g=j;e=a(this);b=h}});if(c.range===true&&this.values(1)===c.min){b+=1;e=a(this.handles[b])}if(this._start(d,b)===false)return false;
this._mouseSliding=true;i._handleIndex=b;e.addClass("ui-state-active").focus();c=e.offset();this._clickOffset=!a(d.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:d.pageX-c.left-e.width()/2,top:d.pageY-c.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(d,b,f);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(d){var c=
this._normValueFromMouse({x:d.pageX,y:d.pageY});this._slide(d,this._handleIndex,c);return false},_mouseStop:function(d){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(d,this._handleIndex);this._change(d,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c;if(this.orientation==="horizontal"){c=
this.elementSize.width;d=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;d=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}c=d/c;if(c>1)c=1;if(c<0)c=0;if(this.orientation==="vertical")c=1-c;d=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+c*d)},_start:function(d,c){var f={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(c);
f.values=this.values()}return this._trigger("start",d,f)},_slide:function(d,c,f){var g;if(this.options.values&&this.options.values.length){g=this.values(c?0:1);if(this.options.values.length===2&&this.options.range===true&&(c===0&&f>g||c===1&&f<g))f=g;if(f!==this.values(c)){g=this.values();g[c]=f;d=this._trigger("slide",d,{handle:this.handles[c],value:f,values:g});this.values(c?0:1);d!==false&&this.values(c,f,true)}}else if(f!==this.value()){d=this._trigger("slide",d,{handle:this.handles[c],value:f});
d!==false&&this.value(f)}},_stop:function(d,c){var f={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(c);f.values=this.values()}this._trigger("stop",d,f)},_change:function(d,c){if(!this._keySliding&&!this._mouseSliding){var f={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){f.value=this.values(c);f.values=this.values()}this._trigger("change",d,f)}},value:function(d){if(arguments.length){this.options.value=
this._trimAlignValue(d);this._refreshValue();this._change(null,0)}else return this._value()},values:function(d,c){var f,g,e;if(arguments.length>1){this.options.values[d]=this._trimAlignValue(c);this._refreshValue();this._change(null,d)}else if(arguments.length)if(a.isArray(arguments[0])){f=this.options.values;g=arguments[0];for(e=0;e<f.length;e+=1){f[e]=this._trimAlignValue(g[e]);this._change(null,e)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(d):
this.value();else return this._values()},_setOption:function(d,c){var f,g=0;if(a.isArray(this.options.values))g=this.options.values.length;a.Widget.prototype._setOption.apply(this,arguments);switch(d){case "disabled":if(c){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(f=0;f<g;f+=1)this._change(null,f);this._animateOff=false;break}},_value:function(){var d=this.options.value;return d=this._trimAlignValue(d)},_values:function(d){var c,f;if(arguments.length){c=this.options.values[d];
return c=this._trimAlignValue(c)}else{c=this.options.values.slice();for(f=0;f<c.length;f+=1)c[f]=this._trimAlignValue(c[f]);return c}},_trimAlignValue:function(d){if(d<=this._valueMin())return this._valueMin();if(d>=this._valueMax())return this._valueMax();var c=this.options.step>0?this.options.step:1,f=(d-this._valueMin())%c;alignValue=d-f;if(Math.abs(f)*2>=c)alignValue+=f>0?c:-c;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
_refreshValue:function(){var d=this.options.range,c=this.options,f=this,g=!this._animateOff?c.animate:false,e,i={},b,h,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(o){e=(f.values(o)-f._valueMin())/(f._valueMax()-f._valueMin())*100;i[f.orientation==="horizontal"?"left":"bottom"]=e+"%";a(this).stop(1,1)[g?"animate":"css"](i,c.animate);if(f.options.range===true)if(f.orientation==="horizontal"){if(o===0)f.range.stop(1,1)[g?"animate":"css"]({left:e+"%"},c.animate);
if(o===1)f.range[g?"animate":"css"]({width:e-b+"%"},{queue:false,duration:c.animate})}else{if(o===0)f.range.stop(1,1)[g?"animate":"css"]({bottom:e+"%"},c.animate);if(o===1)f.range[g?"animate":"css"]({height:e-b+"%"},{queue:false,duration:c.animate})}b=e});else{h=this.value();j=this._valueMin();l=this._valueMax();e=l!==j?(h-j)/(l-j)*100:0;i[f.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[g?"animate":"css"](i,c.animate);if(d==="min"&&this.orientation==="horizontal")this.range.stop(1,
1)[g?"animate":"css"]({width:e+"%"},c.animate);if(d==="max"&&this.orientation==="horizontal")this.range[g?"animate":"css"]({width:100-e+"%"},{queue:false,duration:c.animate});if(d==="min"&&this.orientation==="vertical")this.range.stop(1,1)[g?"animate":"css"]({height:e+"%"},c.animate);if(d==="max"&&this.orientation==="vertical")this.range[g?"animate":"css"]({height:100-e+"%"},{queue:false,duration:c.animate})}}});a.extend(a.ui.slider,{version:"1.8.13"})})(jQuery);
(function(a,d){function c(){return++g}function f(){return++e}var g=0,e=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(i,b){if(i=="selected")this.options.collapsible&&
b==this.options.selected||this.select(b);else{this.options[i]=b;this._tabify()}},_tabId:function(i){return i.title&&i.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+c()},_sanitizeSelector:function(i){return i.replace(/:/g,"\\:")},_cookie:function(){var i=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[i].concat(a.makeArray(arguments)))},_ui:function(i,b){return{tab:i,panel:b,index:this.anchors.index(i)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var i=
a(this);i.html(i.data("label.tabs")).removeData("label.tabs")})},_tabify:function(i){function b(r,u){r.css("display","");!a.support.opacity&&u.opacity&&r[0].style.removeAttribute("filter")}var h=this,j=this.options,l=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=a(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);this.anchors.each(function(r,u){var v=a(u).attr("href"),w=v.split("#")[0],x;if(w&&(w===location.toString().split("#")[0]||
(x=a("base")[0])&&w===x.href)){v=u.hash;u.href=v}if(l.test(v))h.panels=h.panels.add(h.element.find(h._sanitizeSelector(v)));else if(v&&v!=="#"){a.data(u,"href.tabs",v);a.data(u,"load.tabs",v.replace(/#.*$/,""));v=h._tabId(u);u.href="#"+v;u=h.element.find("#"+v);if(!u.length){u=a(j.panelTemplate).attr("id",v).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(h.panels[r-1]||h.list);u.data("destroy.tabs",true)}h.panels=h.panels.add(u)}else j.disabled.push(r)});if(i){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(j.selected===d){location.hash&&this.anchors.each(function(r,u){if(u.hash==location.hash){j.selected=r;return false}});if(typeof j.selected!=="number"&&j.cookie)j.selected=parseInt(h._cookie(),10);if(typeof j.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)j.selected=
this.lis.index(this.lis.filter(".ui-tabs-selected"));j.selected=j.selected||(this.lis.length?0:-1)}else if(j.selected===null)j.selected=-1;j.selected=j.selected>=0&&this.anchors[j.selected]||j.selected<0?j.selected:0;j.disabled=a.unique(j.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(r){return h.lis.index(r)}))).sort();a.inArray(j.selected,j.disabled)!=-1&&j.disabled.splice(a.inArray(j.selected,j.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
if(j.selected>=0&&this.anchors.length){h.element.find(h._sanitizeSelector(h.anchors[j.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");h.element.queue("tabs",function(){h._trigger("show",null,h._ui(h.anchors[j.selected],h.element.find(h._sanitizeSelector(h.anchors[j.selected].hash))[0]))});this.load(j.selected)}a(window).bind("unload",function(){h.lis.add(h.anchors).unbind(".tabs");h.lis=h.anchors=h.panels=null})}else j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
this.element[j.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");j.cookie&&this._cookie(j.selected,j.cookie);i=0;for(var o;o=this.lis[i];i++)a(o)[a.inArray(i,j.disabled)!=-1&&!a(o).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");j.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(j.event!=="mouseover"){var n=function(r,u){u.is(":not(.ui-state-disabled)")&&u.addClass("ui-state-"+r)},k=function(r,u){u.removeClass("ui-state-"+
r)};this.lis.bind("mouseover.tabs",function(){n("hover",a(this))});this.lis.bind("mouseout.tabs",function(){k("hover",a(this))});this.anchors.bind("focus.tabs",function(){n("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){k("focus",a(this).closest("li"))})}var m,p;if(j.fx)if(a.isArray(j.fx)){m=j.fx[0];p=j.fx[1]}else m=p=j.fx;var q=p?function(r,u){a(r).closest("li").addClass("ui-tabs-selected ui-state-active");u.hide().removeClass("ui-tabs-hide").animate(p,p.duration||"normal",
function(){b(u,p);h._trigger("show",null,h._ui(r,u[0]))})}:function(r,u){a(r).closest("li").addClass("ui-tabs-selected ui-state-active");u.removeClass("ui-tabs-hide");h._trigger("show",null,h._ui(r,u[0]))},s=m?function(r,u){u.animate(m,m.duration||"normal",function(){h.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");b(u,m);h.element.dequeue("tabs")})}:function(r,u){h.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");h.element.dequeue("tabs")};
this.anchors.bind(j.event+".tabs",function(){var r=this,u=a(r).closest("li"),v=h.panels.filter(":not(.ui-tabs-hide)"),w=h.element.find(h._sanitizeSelector(r.hash));if(u.hasClass("ui-tabs-selected")&&!j.collapsible||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||h.panels.filter(":animated").length||h._trigger("select",null,h._ui(this,w[0]))===false){this.blur();return false}j.selected=h.anchors.index(this);h.abort();if(j.collapsible)if(u.hasClass("ui-tabs-selected")){j.selected=
-1;j.cookie&&h._cookie(j.selected,j.cookie);h.element.queue("tabs",function(){s(r,v)}).dequeue("tabs");this.blur();return false}else if(!v.length){j.cookie&&h._cookie(j.selected,j.cookie);h.element.queue("tabs",function(){q(r,w)});h.load(h.anchors.index(this));this.blur();return false}j.cookie&&h._cookie(j.selected,j.cookie);if(w.length){v.length&&h.element.queue("tabs",function(){s(r,v)});h.element.queue("tabs",function(){q(r,w)});h.load(h.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
a.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(i){if(typeof i=="string")i=this.anchors.index(this.anchors.filter("[href$="+i+"]"));return i},destroy:function(){var i=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var b=
a.data(this,"href.tabs");if(b)this.href=b;var h=a(this).unbind(".tabs");a.each(["href","load","cache"],function(j,l){h.removeData(l+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});i.cookie&&this._cookie(null,i.cookie);return this},add:function(i,
b,h){if(h===d)h=this.anchors.length;var j=this,l=this.options;b=a(l.tabTemplate.replace(/#\{href\}/g,i).replace(/#\{label\}/g,b));i=!i.indexOf("#")?i.replace("#",""):this._tabId(a("a",b)[0]);b.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var o=j.element.find("#"+i);o.length||(o=a(l.panelTemplate).attr("id",i).data("destroy.tabs",true));o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(h>=this.lis.length){b.appendTo(this.list);o.appendTo(this.list[0].parentNode)}else{b.insertBefore(this.lis[h]);
o.insertBefore(this.panels[h])}l.disabled=a.map(l.disabled,function(n){return n>=h?++n:n});this._tabify();if(this.anchors.length==1){l.selected=0;b.addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){j._trigger("show",null,j._ui(j.anchors[0],j.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[h],this.panels[h]));return this},remove:function(i){i=this._getIndex(i);var b=this.options,h=this.lis.eq(i).remove(),j=this.panels.eq(i).remove();
if(h.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(i+(i+1<this.anchors.length?1:-1));b.disabled=a.map(a.grep(b.disabled,function(l){return l!=i}),function(l){return l>=i?--l:l});this._tabify();this._trigger("remove",null,this._ui(h.find("a")[0],j[0]));return this},enable:function(i){i=this._getIndex(i);var b=this.options;if(a.inArray(i,b.disabled)!=-1){this.lis.eq(i).removeClass("ui-state-disabled");b.disabled=a.grep(b.disabled,function(h){return h!=i});this._trigger("enable",null,
this._ui(this.anchors[i],this.panels[i]));return this}},disable:function(i){i=this._getIndex(i);var b=this.options;if(i!=b.selected){this.lis.eq(i).addClass("ui-state-disabled");b.disabled.push(i);b.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[i],this.panels[i]))}return this},select:function(i){i=this._getIndex(i);if(i==-1)if(this.options.collapsible&&this.options.selected!=-1)i=this.options.selected;else return this;this.anchors.eq(i).trigger(this.options.event+".tabs");return this},
load:function(i){i=this._getIndex(i);var b=this,h=this.options,j=this.anchors.eq(i)[0],l=a.data(j,"load.tabs");this.abort();if(!l||this.element.queue("tabs").length!==0&&a.data(j,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(i).addClass("ui-state-processing");if(h.spinner){var o=a("span",j);o.data("label.tabs",o.html()).html(h.spinner)}this.xhr=a.ajax(a.extend({},h.ajaxOptions,{url:l,success:function(n,k){b.element.find(b._sanitizeSelector(j.hash)).html(n);b._cleanup();h.cache&&a.data(j,
"cache.tabs",true);b._trigger("load",null,b._ui(b.anchors[i],b.panels[i]));try{h.ajaxOptions.success(n,k)}catch(m){}},error:function(n,k){b._cleanup();b._trigger("load",null,b._ui(b.anchors[i],b.panels[i]));try{h.ajaxOptions.error(n,k,i,j)}catch(m){}}}));b.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
url:function(i,b){this.anchors.eq(i).removeData("cache.tabs").data("load.tabs",b);return this},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.8.13"});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(i,b){var h=this,j=this.options,l=h._rotate||(h._rotate=function(o){clearTimeout(h.rotation);h.rotation=setTimeout(function(){var n=j.selected;h.select(++n<h.anchors.length?n:0)},i);o&&o.stopPropagation()});b=h._unrotate||(h._unrotate=!b?function(o){o.clientX&&
h.rotate(null)}:function(){t=j.selected;l()});if(i){this.element.bind("tabsshow",l);this.anchors.bind(j.event+".tabs",b);l()}else{clearTimeout(h.rotation);this.element.unbind("tabsshow",l);this.anchors.unbind(j.event+".tabs",b);delete this._rotate;delete this._unrotate}return this}})})(jQuery);

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

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

View File

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

View File

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

View File

@@ -29,56 +29,56 @@ class db
* @var int
*/
var $link_id = 0;
public $link_id = 0;
/**
* Query ID for every query
* @var int
*/
var $query_id = 0;
private $query_id = 0;
/**
* Errordescription, if an error occures
* @var string
*/
var $errdesc = '';
public $errdesc = '';
/**
* Errornumber, if an error occures
* @var int
*/
var $errno = 0;
public $errno = 0;
/**
* Servername
* @var string
*/
var $server = '';
private $server = '';
/**
* Username
* @var string
*/
var $user = '';
private $user = '';
/**
* Password
* @var string
*/
var $password = '';
private $password = '';
/**
* Database
* @var string
*/
var $database = '';
private $database = '';
/**
* Class constructor. Connects to Databaseserver and selects Database
@@ -102,15 +102,15 @@ class db
$this->user = $user;
$this->password = $password;
$this->database = $database;
$this->link_id = @mysql_connect($this->server, $this->user, $this->password);
$this->link_id = @mysql_connect($this->server, $this->user, $this->password, 1);
if(!$this->link_id)
{
//try to connect with no password an change it afterwards. only for root user
//try to connect with no password and change it afterwards. only for root user
if($this->user == 'root')
{
$this->link_id = @mysql_connect($this->server, $this->user, '');
$this->link_id = @mysql_connect($this->server, $this->user, '', 1);
if($this->link_id)
{
@@ -134,11 +134,8 @@ class db
$this->showerror('Trying to use database ' . $this->database . ' failed, exiting');
}
}
/*
* this is not for 0.9.x
*/
//mysql_query("SET NAMES utf8", $this->link_id);
//mysql_query("SET CHARACTER SET utf8", $this->link_id);
mysql_set_charset('utf8', $this->link_id);
}
/**
@@ -188,7 +185,18 @@ class db
function query($query_str, $unbuffered = false, $suppress_error = false)
{
global $numbqueries;
global $numbqueries, $theme;
if (!mysql_ping($this->link_id))
{
$this->link_id = mysql_connect($this->server,$this->user,$this->password);
if(!$this->database)
{
return false;
}
mysql_select_db($this->database);
}
if(!$unbuffered)
{
@@ -338,7 +346,7 @@ class db
function showerror($errormsg, $mysqlActive = true)
{
global $filename;
global $filename, $theme;
$text = 'MySQL - Error: ' . str_replace("\n", "\t", $errormsg);
if($mysqlActive)

View File

@@ -23,6 +23,8 @@
// }}}
// Source for updates: http://phlymail.com/en/downloads/idna-convert.html
/**
* Encode/decode Internationalized Domain Names.
*
@@ -47,8 +49,8 @@
* ACE input and output is always expected to be ASCII.
*
* @author Matthias Sommerfeld <mso@phlylabs.de>
* @copyright 2004-2010 phlyLabs Berlin, http://phlylabs.de
* @version 0.7.0 2010-11-20
* @copyright 2004-2011 phlyLabs Berlin, http://phlylabs.de
* @version 0.8.0 2011-03-11
*/
class idna_convert
{
@@ -76,11 +78,14 @@ class idna_convert
protected $_scount = 11172; // _lcount * _tcount * _vcount
protected $_error = false;
protected static $_mb_string_overload = null;
// See {@link set_paramter()} for details of how to change the following
// settings from within your script / application
protected $_api_encoding = 'utf8'; // Default input charset is UTF-8
protected $_allow_overlong = false; // Overlong UTF-8 encodings are forbidden
protected $_strict_mode = false; // Behave strict or not
protected $_idn_version = 2003; // Can be either 2003 (old, default) or 2008
/**
* the constructor
@@ -93,7 +98,15 @@ class idna_convert
{
$this->slast = $this->_sbase + $this->_lcount * $this->_vcount * $this->_tcount;
// If parameters are given, pass these to the respective method
if (is_array($options)) return $this->set_parameter($options);
if (is_array($options)) {
$this->set_parameter($options);
}
// populate mbstring overloading cache if not set
if (self::$_mb_string_overload === null) {
self::$_mb_string_overload = (extension_loaded('mbstring')
&& (ini_get('mbstring.func_overload') & 0x02) === 0x02);
}
}
/**
@@ -136,11 +149,18 @@ class idna_convert
case 'strict':
$this->_strict_mode = ($v) ? true : false;
break;
case 'encode_german_sz':
if (!$v) {
$this->NP['replacemaps'][0xDF] = array(0x73, 0x73);
case 'idn_version':
if (in_array($v, array('2003', '2008'))) {
$this->_idn_version = $v;
} else {
unset($this->NP['replacemaps'][0xDF]);
$this->_error('Set Parameter: Unknown parameter '.$v.' for option '.$k);
}
break;
case 'encode_german_sz': // Deprecated
if (!$v) {
self::$NP['replacemaps'][0xDF] = array(0x73, 0x73);
} else {
unset(self::$NP['replacemaps'][0xDF]);
}
break;
default:
@@ -398,13 +418,13 @@ class idna_convert
}
// Find last occurence of the delimiter
$delim_pos = strrpos($encoded, '-');
if ($delim_pos > strlen($this->_punycode_prefix)) {
for ($k = strlen($this->_punycode_prefix); $k < $delim_pos; ++$k) {
if ($delim_pos > self::byteLength($this->_punycode_prefix)) {
for ($k = self::byteLength($this->_punycode_prefix); $k < $delim_pos; ++$k) {
$decoded[] = ord($encoded{$k});
}
}
$deco_len = count($decoded);
$enco_len = strlen($encoded);
$enco_len = self::byteLength($encoded);
// Wandering through the strings; init
$is_first = true;
@@ -442,7 +462,7 @@ class idna_convert
protected function _encode($decoded)
{
// We cannot encode a domain name containing the Punycode prefix
$extract = strlen($this->_punycode_prefix);
$extract = self::byteLength($this->_punycode_prefix);
$check_pref = $this->_utf8_to_ucs4($this->_punycode_prefix);
$check_deco = array_slice($decoded, 0, $extract);
@@ -589,24 +609,28 @@ class idna_convert
// While mapping required chars we apply the cannonical ordering
foreach ($input as $v) {
// Map to nothing == skip that code point
if (in_array($v, $this->NP['map_nothing'])) continue;
if (in_array($v, self::$NP['map_nothing'])) continue;
// Try to find prohibited input
if (in_array($v, $this->NP['prohibit']) || in_array($v, $this->NP['general_prohibited'])) {
if (in_array($v, self::$NP['prohibit']) || in_array($v, self::$NP['general_prohibited'])) {
$this->_error('NAMEPREP: Prohibited input U+'.sprintf('%08X', $v));
return false;
}
foreach ($this->NP['prohibit_ranges'] as $range) {
foreach (self::$NP['prohibit_ranges'] as $range) {
if ($range[0] <= $v && $v <= $range[1]) {
$this->_error('NAMEPREP: Prohibited input U+'.sprintf('%08X', $v));
return false;
}
}
// Hangul syllable decomposition
if (0xAC00 <= $v && $v <= 0xD7AF) {
foreach ($this->_hangul_decompose($v) as $out) $output[] = (int) $out;
// There's a decomposition mapping for that code point
} elseif (isset($this->NP['replacemaps'][$v])) {
foreach ($this->_apply_cannonical_ordering($this->NP['replacemaps'][$v]) as $out) {
// Hangul syllable decomposition
foreach ($this->_hangul_decompose($v) as $out) {
$output[] = (int) $out;
}
} elseif (($this->_idn_version == '2003') && isset(self::$NP['replacemaps'][$v])) {
// There's a decomposition mapping for that code point
// Decompositions only in version 2003 (original) of IDNA
foreach ($this->_apply_cannonical_ordering(self::$NP['replacemaps'][$v]) as $out) {
$output[] = (int) $out;
}
} else {
@@ -715,11 +739,11 @@ class idna_convert
*/
protected function _get_combining_class($char)
{
return isset($this->NP['norm_combcls'][$char]) ? $this->NP['norm_combcls'][$char] : 0;
return isset(self::$NP['norm_combcls'][$char]) ? self::$NP['norm_combcls'][$char] : 0;
}
/**
* Apllies the cannonical ordering of a decomposed UCS4 sequence
* Applies the cannonical ordering of a decomposed UCS4 sequence
* @param array Decomposed UCS4 sequence
* @return array Ordered USC4 sequence
*/
@@ -758,7 +782,7 @@ class idna_convert
protected function _combine($input)
{
$inp_len = count($input);
foreach ($this->NP['replacemaps'] as $np_src => $np_target) {
foreach (self::$NP['replacemaps'] as $np_src => $np_target) {
if ($np_target[0] != $input[0]) continue;
if (count($np_target) != $inp_len) continue;
$hit = false;
@@ -797,12 +821,7 @@ class idna_convert
{
$output = array();
$out_len = 0;
// Patch by Daniel Hahler; work around prolbem with mbstring.func_overload
if (function_exists('mb_strlen')) {
$inp_len = mb_strlen($input, '8bit');
} else {
$inp_len = strlen($input);
}
$inp_len = self::byteLength($input);
$mode = 'next';
$test = 'none';
for ($k = 0; $k < $inp_len; ++$k) {
@@ -923,7 +942,7 @@ class idna_convert
protected function _ucs4_string_to_ucs4($input)
{
$output = array();
$inp_len = strlen($input);
$inp_len = self::byteLength($input);
// Input length must be dividable by 4
if ($inp_len % 4) {
$this->_error('Input UCS4 string is broken');
@@ -942,6 +961,56 @@ class idna_convert
return $output;
}
/**
* Gets the length of a string in bytes even if mbstring function
* overloading is turned on
*
* @param string $string the string for which to get the length.
* @return integer the length of the string in bytes.
*/
protected static function byteLength($string)
{
if (self::$_mb_string_overload) {
return mb_strlen($string, '8bit');
}
return strlen((binary) $string);
}
/**
* Attempts to return a concrete IDNA instance.
*
* @param array $params Set of paramaters
* @return idna_convert
* @access public
*/
public function getInstance($params = array())
{
return new idna_convert($params);
}
/**
* Attempts to return a concrete IDNA instance for either php4 or php5,
* only creating a new instance if no IDNA instance with the same
* parameters currently exists.
*
* @param array $params Set of paramaters
*
* @return object idna_convert
* @access public
*/
public function singleton($params = array())
{
static $instances;
if (!isset($instances)) {
$instances = array();
}
$signature = serialize($params);
if (!isset($instances[$signature])) {
$instances[$signature] = idna_convert::getInstance($params);
}
return $instances[$signature];
}
/**
* Holds all relevant mapping tables
* See RFC3454 for details
@@ -949,7 +1018,7 @@ class idna_convert
* @private array
* @since 0.5.2
*/
protected $NP = array
protected static $NP = array
('map_nothing' => array(0xAD, 0x34F, 0x1806, 0x180B, 0x180C, 0x180D, 0x200B, 0x200C
,0x200D, 0x2060, 0xFE00, 0xFE01, 0xFE02, 0xFE03, 0xFE04, 0xFE05, 0xFE06, 0xFE07
,0xFE08, 0xFE09, 0xFE0A, 0xFE0B, 0xFE0C, 0xFE0D, 0xFE0E, 0xFE0F, 0xFEFF
@@ -984,7 +1053,7 @@ class idna_convert
,0xD0 => array(0xF0), 0xD1 => array(0xF1), 0xD2 => array(0xF2), 0xD3 => array(0xF3)
,0xD4 => array(0xF4), 0xD5 => array(0xF5), 0xD6 => array(0xF6), 0xD8 => array(0xF8)
,0xD9 => array(0xF9), 0xDA => array(0xFA), 0xDB => array(0xFB), 0xDC => array(0xFC)
,0xDD => array(0xFD), 0xDE => array(0xFE) /* Here was German "ß" -> "ss", is now configurable */
,0xDD => array(0xFD), 0xDE => array(0xFE), 0xDF => array(0x73, 0x73)
,0x100 => array(0x101), 0x102 => array(0x103), 0x104 => array(0x105)
,0x106 => array(0x107), 0x108 => array(0x109), 0x10A => array(0x10B)
,0x10C => array(0x10D), 0x10E => array(0x10F), 0x110 => array(0x111)

View File

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

View File

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

View File

@@ -2,7 +2,7 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2011 the Froxlor Team (see authors).
* Copyright (c) 2011- the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the

View File

@@ -2,7 +2,7 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010-2011 the Froxlor 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

View File

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

View File

@@ -175,7 +175,7 @@ class phpinterface_fcgid
$admin = $this->_getAdminData($this->_domain['adminid']);
$php_ini_variables = array(
'SAFE_MODE' => ($this->_domain['safemode'] == '0' ? 'Off' : 'On'),
'SAFE_MODE' => 'Off', // keep this for compatibility, just in case
'PEAR_DIR' => $this->_settings['system']['mod_fcgid_peardir'],
'OPEN_BASEDIR' => $openbasedir,
'OPEN_BASEDIR_C' => $openbasedirc,

View File

@@ -39,6 +39,62 @@ class phpinterface_fpm
*/
private $_domain = array();
/**
* Admin-Date cache array
* @var array
*/
private $_admin_cache = array();
/**
* defines what can be used for pool-config from php.ini
* @var array
*/
private $_ini = array(
'php_value' => array(
'error_reporting',
'max_execution_time',
'include_path',
'upload_max_filesize',
'log_errors_max_len'
),
'php_flag' => array(
'short_open_tag',
'asp_tags',
'display_errors',
'display_startup_errors',
'log_errors',
'track_errors',
'html_errors',
'magic_quotes_gpc',
'magic_quotes_runtime',
'magic_quotes_sybase'
),
'php_admin_value' => array(
'precision',
'output_buffering',
'disable_functions',
'max_input_time',
'memory_limit',
'post_max_size',
'variables_order',
'gpc_order',
'date.timezone'
),
'php_admin_flag' => array(
'allow_call_time_pass_reference',
'allow_url_fopen',
'cgi.force_redirect',
'enable_dl',
'expose_php',
'ignore_repeated_errors',
'ignore_repeated_source',
'report_memleaks',
'register_argc_argv',
'file_uploads',
'allow_url_fopen'
)
);
/**
* main constructor
*/
@@ -93,7 +149,14 @@ class phpinterface_fpm
$fpm_config.= 'pm = '.$fpm_pm."\n";
$fpm_config.= 'pm.max_children = '.$fpm_children."\n";
if($fpm_pm == 'dynamic') {
if($fpm_pm == 'dynamic' || $fpm_pm == 'ondemand') {
// failsafe, refs #955
if ($fpm_start_servers < $fpm_min_spare_servers) {
$fpm_start_servers = $fpm_min_spare_servers;
}
if ($fpm_start_servers > $fpm_max_spare_servers) {
$fpm_start_servers = $fpm_start_servers - (($fpm_start_servers - $fpm_max_spare_servers) + 1);
}
$fpm_config.= 'pm.start_servers = '.$fpm_start_servers."\n";
$fpm_config.= 'pm.min_spare_servers = '.$fpm_min_spare_servers."\n";
$fpm_config.= 'pm.max_spare_servers = '.$fpm_max_spare_servers."\n";
@@ -125,13 +188,13 @@ class phpinterface_fpm
{
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
}
$_custom_openbasedir = explode(':', $this->_settings['system']['phpappendopenbasedir']);
foreach($_custom_openbasedir as $cobd)
{
$_phpappendopenbasedir .= appendOpenBasedirPath($cobd);
}
if($this->_domain['openbasedir_path'] == '0' && strstr($this->_domain['documentroot'], ":") === false)
{
$openbasedir = appendOpenBasedirPath($this->_domain['documentroot'], true);
@@ -140,10 +203,10 @@ class phpinterface_fpm
{
$openbasedir = appendOpenBasedirPath($this->_domain['customerroot'], true);
}
$openbasedir .= appendOpenBasedirPath($this->getTempDir());
$openbasedir .= $_phpappendopenbasedir;
$openbasedir = explode(':', $openbasedir);
$clean_openbasedir = array();
foreach($openbasedir as $number => $path)
@@ -161,11 +224,42 @@ class phpinterface_fpm
$fpm_config.= 'php_admin_value[session.save_path] = ' . makeCorrectDir($this->_settings['phpfpm']['tmpdir'] . '/' . $this->_domain['loginname'] . '/') . "\n";
$fpm_config.= 'php_admin_value[upload_tmp_dir] = ' . makeCorrectDir($this->_settings['phpfpm']['tmpdir'] . '/' . $this->_domain['loginname'] . '/') . "\n";
$admin = $this->_getAdminData($this->_domain['adminid']);
$php_ini_variables = array(
'SAFE_MODE' => 'Off', // keep this for compatibility, just in case
'PEAR_DIR' => $this->_settings['system']['mod_fcgid_peardir'],
'TMP_DIR' => $this->getTempDir(),
'CUSTOMER_EMAIL' => $this->_domain['email'],
'ADMIN_EMAIL' => $admin['email'],
'DOMAIN' => $this->_domain['domain'],
'CUSTOMER' => $this->_domain['loginname'],
'ADMIN' => $admin['loginname']
);
$phpini = replace_variables($phpconfig['phpsettings'], $php_ini_variables);
$phpini_array = explode("\n", $phpini);
$fpm_config.= "\n\n";
foreach ($phpini_array as $inisection) {
$is = explode("=", $inisection);
foreach ($this->_ini as $sec => $possibles) {
if (in_array(trim($is[0]), $possibles)) {
$fpm_config.= $sec.'['.trim($is[0]).'] = ' . trim($is[1]) . "\n";
}
}
}
fwrite($fh, $fpm_config, strlen($fpm_config));
fclose($fh);
}
}
/**
* this is done via createConfig as php-fpm defines
* the ini-values/flags in its pool-config
*
* @param string $phpconfig
*/
public function createIniFile($phpconfig)
{
return;
@@ -229,7 +323,51 @@ class phpinterface_fpm
safe_exec('chown -R ' . $this->_domain['guid'] . ':' . $this->_domain['guid'] . ' ' . escapeshellarg($tmpdir));
safe_exec('chmod 0750 ' . escapeshellarg($tmpdir));
}
return $tmpdir;
}
/**
* fastcgi-fakedirectory directory
*
* @param boolean $createifnotexists create the directory if it does not exist
*
* @return string the directory
*/
public function getAliasConfigDir($createifnotexists = true)
{
// ensure default...
if (!isset($this->_settings['phpfpm']['aliasconfigdir'])) {
$this->_settings['phpfpm']['aliasconfigdir'] = '/var/www/php-fpm';
}
$configdir = makeCorrectDir($this->_settings['phpfpm']['aliasconfigdir'] . '/' . $this->_domain['loginname'] . '/' . $this->_domain['domain'] . '/');
if(!is_dir($configdir) && $createifnotexists)
{
safe_exec('mkdir -p ' . escapeshellarg($configdir));
safe_exec('chown ' . $this->_domain['guid'] . ':' . $this->_domain['guid'] . ' ' . escapeshellarg($configdir));
}
return $configdir;
}
/**
* return the admin-data of a specific admin
*
* @param int $adminid id of the admin-user
*
* @return array
*/
private function _getAdminData($adminid) {
$adminid = intval($adminid);
if (!isset($this->_admin_cache[$adminid])) {
$this->_admin_cache[$adminid] = $this->_db->query_first(
"SELECT `email`, `loginname` FROM `" . TABLE_PANEL_ADMINS . "`
WHERE `adminid` = " . (int)$adminid
);
}
return $this->_admin_cache[$adminid];
}
}

View File

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

View File

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

View File

@@ -0,0 +1,283 @@
<?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 Michael Kaufmann <mkaufmann@nutime.de>
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Cron
*
* @since 0.9.29
*
*/
class ConfigIO {
/**
* internal settings array
*
* @var array
*/
private $_settings = null;
/**
* constructor gets the froxlor settings
* as array
*/
public function __construct(array $settings = null) {
$this->_settings = $settings;
}
/**
* clean up former created configs, including (if enabled)
* awstats, fcgid, php-fpm and of course automatically created
* webserver vhost and diroption files
*
* @return null
*/
public function cleanUp() {
// awstats files
$this->_cleanAwstatsFiles();
// fcgid files
$this->_cleanFcgidFiles();
// php-fpm files
$this->_cleanFpmFiles();
// clean webserver-configs
$this->_cleanWebserverConfigs();
// old htpasswd files
$this->_cleanHtpasswdFiles();
// customer-specified ssl-certificates
$this->_cleanCustomerSslCerts();
}
/**
* remove customer-specified auto-generated ssl-certificates
* (they are being regenerated)
*
* @return null
*/
private function _cleanCustomerSslCerts() {
// get correct directory
$configdir = $this->_getFile('system', 'customer_ssl_path');
if ($configdir !== false) {
$configdir = makeCorrectDir($configdir);
if (@is_dir($configdir)) {
// now get rid of old stuff
//(but append /* so we don't delete the directory)
$configdir.='/*';
safe_exec('rm -rf '. makeCorrectFile($configdir));
}
}
}
/**
* remove webserver related configuration files before regeneration
*
* @return null
*/
private function _cleanWebserverConfigs() {
// get directories
$configdirs = array();
$configdirs[] = makeCorrectDir($this->_getFile('system', 'apacheconf_vhost'));
$configdirs[] = makeCorrectDir($this->_getFile('system', 'apacheconf_diroptions'));
// file pattern
$pattern = "/^([0-9]){2}_(froxlor|syscp)_(.+)\.conf$/";
// check ALL the folders
foreach ($configdirs as $config_dir) {
// check directory
if (@is_dir($config_dir)) {
// create directory iterator
$its = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($config_dir)
);
// iterate through all subdirs,
// look for vhost/diroption files
// and delete them
foreach ($its as $fullFileName => $it ) {
if ($it->isFile() && preg_match($pattern, $it->getFilename())) {
// remove file
safe_exec('rm -f '. escapeshellarg(makeCorrectFile($its->getPathname())));
}
}
}
}
}
/**
* remove htpasswd files before regeneration
*
* @return null
*/
private function _cleanHtpasswdFiles() {
// get correct directory
$configdir = $this->_getFile('system', 'apacheconf_htpasswddir');
if ($configdir !== false) {
$configdir = makeCorrectDir($configdir);
if (@is_dir($configdir)) {
// now get rid of old stuff
//(but append /* so we don't delete the directory)
$configdir.='/*';
safe_exec('rm -rf '. makeCorrectFile($configdir));
}
}
}
/**
* remove awstats related configuration files before regeneration
*
* @return null
*/
private function _cleanAwstatsFiles() {
if ($this->_settings['system']['awstats_enabled'] == '0') {
return;
}
//dhr: cleanout froxlor-generated awstats configs prior to re-creation
$awstatsclean['header'] = "## GENERATED BY FROXLOR\n";
$awstatsclean['headerold'] = "## GENERATED BY SYSCP\n";
$awstatsclean['path'] = $this->_getFile('system', 'awstats_conf');
/**
* dont do anyting if the directory not exists
* (e.g. awstats not installed yet or whatever)
* fixes #45
*/
if ($awstatsclean['path'] !== false && is_dir($awstatsclean['path'])) {
$awstatsclean['dir'] = dir($awstatsclean['path']);
while ($awstatsclean['entry'] = $awstatsclean['dir']->read()) {
$awstatsclean['fullentry'] = makeCorrectFile($awstatsclean['path'].'/'.$awstatsclean['entry']);
/**
* dont do anything if the file does not exist
*/
if (@file_exists($awstatsclean['fullentry'])) {
$awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r');
$awstatsclean['headerRead'] = fgets($awstatsclean['fh'], strlen($awstatsclean['header'])+1);
fclose($awstatsclean['fh']);
if ($awstatsclean['headerRead'] == $awstatsclean['header']
|| $awstatsclean['headerRead'] == $awstatsclean['headerold']
) {
$awstats_conf_file = makeCorrectFile($awstatsclean['fullentry']);
@unlink($awstats_conf_file);
}
}
}
}
unset($awstatsclean);
//end dhr
}
/**
* remove fcgid related configuration files before regeneration
*
* @return null
*/
private function _cleanFcgidFiles() {
if ($this->_settings['system']['mod_fcgid'] == '0') {
return;
}
// get correct directory
$configdir = $this->_getFile('system', 'mod_fcgid_configdir');
if ($configdir !== false) {
$configdir = makeCorrectDir($configdir);
if (@is_dir($configdir)) {
// create directory iterator
$its = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($configdir)
);
// iterate through all subdirs,
// look for php-fcgi-starter files
// and take immutable-flag away from them
// so we can delete them :)
foreach ($its as $fullFileName => $it ) {
if ($it->isFile() && $it->getFilename() == 'php-fcgi-starter') {
// set chattr -i
removeImmutable($its->getPathname());
}
}
// now get rid of old stuff
//(but append /* so we don't delete the directory)
$configdir.='/*';
safe_exec('rm -rf '. makeCorrectFile($configdir));
}
}
}
/**
* remove php-fpm related configuration files before regeneration
*
* @return null
*/
private function _cleanFpmFiles() {
if ($this->_settings['phpfpm']['enabled'] == '0') {
return;
}
// get correct directory
$configdir = $this->_getFile('phpfpm', 'configdir');
if ($configdir !== false) {
$configdir = makeCorrectDir($configdir);
if (@is_dir($configdir)) {
// now get rid of old stuff
//(but append /* so we don't delete the directory)
$configdir.='/*';
safe_exec('rm -rf '. makeCorrectFile($configdir));
}
}
}
/**
* returns a file/direcotry from the settings array and checks whether it exists
*
* @param string $group settings-group
* @param string $varname var-name
* @param boolean $check_exists check if the file exists
*
* @return string|boolean complete path including filename if any or false on error
*/
private function _getFile($group, $varname, $check_exists = true) {
// read from settings
$file = $this->_settings[$group][$varname];
// check whether it exists
if ($check_exists && @file_exists($file) == false) {
return false;
}
return $file;
}
}

View File

@@ -0,0 +1,113 @@
<?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 Michael Kaufmann <mkaufmann@nutime.de>
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Cron
*
* @since 0.9.29
*
*/
class DomainSSL {
/**
* internal settings array
*
* @var array
*/
private $_settings = null;
/**
* internal database object
*
* @var db
*/
private $_db = null;
/**
* constructor gets the froxlor settings as array
* and the initialized database object
*/
public function __construct(array $settings = null, $db = null) {
$this->_settings = $settings;
$this->_db = $db;
}
/**
* read domain-related (or if empty, parentdomain-related) ssl-certificates from the database
* and (if not empty) set the corresponding array-indices (ssl_cert_file, ssl_key_file,
* ssl_ca_file and ssl_cert_chainfile). Hence the parameter as reference.
*
* @param array $domain domain-array as reference so we can set the corresponding array-indices
*
* @return null
*/
public function setDomainSSLFilesArray(array &$domain = null) {
// check if the domain itself has a certificate defined
$dom_certs = $this->_db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` WHERE `domainid` ='".$domain['id']."'");
if (!is_array($dom_certs)
|| !isset($dom_certs['ssl_cert_file'])
|| $dom_certs['ssl_cert_file'] == ''
) {
// maybe its parent?
if ($domain['parentdomainid'] != 0) {
$dom_certs = $this->_db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` WHERE `domainid` ='".$domain['parentdomainid']."'");
}
}
// check if it's an array and if the most important field is set
if (is_array($dom_certs)
&& isset($dom_certs['ssl_cert_file'])
&& $dom_certs['ssl_cert_file'] != ''
) {
// get destination path
$sslcertpath = makeCorrectDir($this->_settings['system']['customer_ssl_path']);
// create path if it does not exist
if (!file_exists($sslcertpath)) {
safe_exec('mkdir -p '.escapeshellarg($sslcertpath));
}
// make correct files for the certificates
$ssl_files = array(
'ssl_cert_file' => makeCorrectFile($sslcertpath.'/'.$domain['domain'].'.crt'),
'ssl_key_file' => makeCorrectFile($sslcertpath.'/'.$domain['domain'].'.key')
);
// initialize optional files
$ssl_files['ssl_ca_file'] = '';
$ssl_files['ssl_cert_chainfile'] = '';
// set them if they are != empty
if ($dom_certs['ssl_ca_file'] != '') {
$ssl_files['ssl_ca_file'] = makeCorrectFile($sslcertpath.'/'.$domain['domain'].'_CA.pem');
}
if ($dom_certs['ssl_cert_chainfile'] != '') {
$ssl_files['ssl_cert_chainfile'] = makeCorrectFile($sslcertpath.'/'.$domain['domain'].'_chain.pem');
}
// create them on the filesystem
foreach ($ssl_files as $type => $filename) {
if ($filename != '') {
touch($filename);
$_fh = fopen($filename, 'w');
fwrite($_fh, $dom_certs[$type]);
fclose($_fh);
chmod($filename, 0600);
}
}
// override corresponding array values
$domain['ssl_cert_file'] = $ssl_files['ssl_cert_file'];
$domain['ssl_key_file'] = $ssl_files['ssl_key_file'];
$domain['ssl_ca_file'] = $ssl_files['ssl_ca_file'];
$domain['ssl_cert_chainfile'] = $ssl_files['ssl_cert_chainfile'];
}
return;
}
}

View File

@@ -15,6 +15,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'freebsd' => Array(
'label' => 'FreeBSD',
@@ -22,6 +39,40 @@ return Array(
'http' => Array(
'label' => $lng['admin']['configfiles']['http'],
'daemons' => Array(
// Begin: Nginx Config
'nginx' => array(
'label' => 'Nginx Webserver',
'commands_1' => array(
'cd /usr/ports/www/nginx',
'make config',
'set [x] IPv6 protocol (default)',
'set [x] Enable HTTP module (default)',
'set [x] Enable http_cache module (default)',
'set [x] Enable http_gzip_static module',
'set [x] Enable http_rewrite module (default)',
'set [x] Enable http_ssl module (default)',
'set [x] Enable http_stub_status module (default)',
'make install clean; rehash',
),
'commands_2' => array(
$configcommand['vhost'],
$configcommand['diroptions'],
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p '. $settings['system']['deactivateddocroot'] : null,
'mkdir -p '. $settings['system']['documentroot_prefix'],
'mkdir -p '. $settings['system']['mod_fcgid_tmpdir'],
'mkdir -p '. $settings['system']['logfiles_directory'],
'echo "nginx_enable=\"YES\"" >> /etc/rc.conf'
),
'files' => array(
'usr_local_etc_nginx_nginx.conf' => '/usr/local/etc/nginx/nginx.conf',
),
'restart' => array(
'/usr/local/etc/rc.d/nginx restart'
)
),
// End: Nginx Config
'apache2' => Array(
'label' => 'Apache2 Webserver',
'commands' => Array(
@@ -52,6 +103,42 @@ return Array(
'dns' => Array(
'label' => $lng['admin']['configfiles']['dns'],
'daemons' => Array(
// Begin: Bind 9.x Config
'bind9' => array(
'label' => 'Bind9 Nameserver',
'commands_1' => array(
'cd /usr/ports/dns/bind99',
'make config',
'set [x] International Domain Names',
'set [x] IPv6 protocol (default)',
'set [x] 64-bit file support',
'set [x] Replace base BIND with this version',
'set [x] Enable RPZ NSDNAME policy records',
'set [x] Enable RPZ NSIP trigger rules',
'set [x] dig/host/nslookup will do DNSSEC validation',
'set [x] Build with OpenSSL (Required for DNSSEC) (default)',
'set [x] Threading support (default)',
'make install clean; rehash',
),
'commands_2' => array(
'echo "named_enable=\"YES\"" >> /etc/rc.conf',
PHP_EOL,
(strpos($settings['system']['bindconf_directory'], '/etc/namedb') === false) ? '(TIP: Be sure the path below is "/etc/namedb", if not you have configured the bind-directory in a false way in PANEL->SETTINGS->NAMESERVER SETTINGS!)' : null,
'echo "include \"'. $settings['system']['bindconf_directory'] .'froxlor_bind.conf\";" >> '. $settings['system']['bindconf_directory'] .'named.conf',
'echo "include \"'. $settings['system']['bindconf_directory'] .'default-zone\";" >> '. $settings['system']['bindconf_directory'] .'named.conf',
),
'files' => array(
'etc_namedb_named.conf' => $settings['system']['bindconf_directory'] .'named.conf',
'etc_namedb_master_default.zone' => $settings['system']['bindconf_directory'] .'master/default.zone',
'etc_namedb_default-zone' => $settings['system']['bindconf_directory'] .'default-zone',
),
'restart' => array(
'/etc/rc.d/named restart'
)
),
// End: Bind 9.x Config
'powerdns' => Array(
'label' => 'PowerDNS',
'commands_1' => Array(
@@ -89,10 +176,10 @@ return Array(
'make install'
),
'commands_2' => Array(
'pw groupadd vmail -g '.$settings['system']['vmail_gid'],
'pw useradd vmail -u '.$settings['system']['vmail_uid'].' -g '.$settings['system']['vmail_gid'].' -s/sbin/nologin -d/dev/null',
($vmail_group === false) ? 'pw groupadd ' . $vmail_groupname . ' -g '.$settings['system']['vmail_gid'] : '',
($vmail_user === false) ? 'pw useradd ' . $vmail_username . ' -u '.$settings['system']['vmail_uid'].' -g '.$settings['system']['vmail_gid'].' -s/sbin/nologin -d/dev/null' : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'chmod 0750 ' . $settings['system']['vmail_homedir']
),
'commands_3' => Array(
@@ -111,6 +198,9 @@ return Array(
'usr_local_etc_postfix_mysql-virtual_sender_permissions.cf' => '/usr/local/etc/postfix/mysql-virtual_sender_permissions.cf'
),
'restart' => Array(
'newaliases',
'mkdir /var/spool/postfix/etc',
'cp /etc/resolv.conf /var/spool/postfix/etc',
'sh /usr/local/etc/rc.d/postfix restart'
)
),
@@ -180,13 +270,45 @@ return Array(
),
'commands_2' => Array(
'echo "dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf',
flags=DRhu user='.$vmail_username.':'.$vmail_groupname.' argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf',
'chmod 0640 /usr/local/etc/dovecot-sql.conf'
),
'restart' => Array(
'sh /usr/local/etc/rc.d/dovecot restart'
)
),
// Begin: Dovecot 2.x Config
'dovecot2' => array(
'label' => 'Dovecot 2.x',
'commands_1' => array(
'cd /usr/ports/mail/dovecot2',
'make config',
'set [x] kqueue(2) support (default)',
'set [x] MySQL database',
'set [x] SSL protocol (default)',
'make install clean; rehash',
),
'commands_2' => array(
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf',
PHP_EOL,
'pw adduser '. $vmail_username .' -g '. $vmail_groupname .' -u '. $settings['system']['vmail_gid'] .' -d /nonexistent -s /usr/sbin/nologin -c "User for virtual mailtransport used by Postfix and Dovecot"',
PHP_EOL,
'chmod 0640 /usr/local/etc/dovecot-sql.conf'
),
'files' => array(
'usr_local_etc_dovecot_dovecot.conf' => '/usr/local/etc/dovecot/dovecot.conf',
'usr_local_etc_dovecot_dovecot-sql.conf' => '/usr/local/etc/dovecot/dovecot-sql.conf'
),
'commands_3' => array(
'echo "dovecot unix - n n - - pipe'. PHP_EOL .'flags=DRhu user='. $vmail_username .':'. $vmail_groupname .' argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} -a ${recipient}" >> /usr/local/etc/postfix/master.cf',
),
'restart' => array(
'/usr/local/etc/rc.d/dovecot restart'
)
)
// End: Dovecot 2.x Config
)
),
'ftp' => Array(
@@ -222,7 +344,7 @@ return Array(
'cron' => Array(
'label' => 'Crond (cronscript)',
'commands' => Array(
'echo "*/5 * * * * root /usr/local/bin/php -q '.makeCorrectDir(dirname(dirname(dirname(__FILE__)))).'scripts/froxlor_master_cronjob.php" >> /etc/crontab'
'echo "*/5 * * * * root nice -n 5 /usr/local/bin/php -q '.makeCorrectDir(dirname(dirname(dirname(__FILE__)))).'scripts/froxlor_master_cronjob.php" >> /etc/crontab'
),
'restart' => Array(
'/etc/rc.d/cron restart'
@@ -240,7 +362,8 @@ return Array(
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirIcons=\"\/awstatsicons\"/DirIcons=\"\/awstats-icon\"/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
'sed -i.bak \'s/^DirIcons=\"\/awstatsicons\"/DirIcons=\"\/awstats-icon\"/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
)
),
'libnss' => Array(

View File

@@ -17,6 +17,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'gentoo' => Array(
'label' => 'Gentoo',
@@ -123,30 +140,25 @@ return Array(
'postfix_courier' => Array(
'label' => 'Postfix/Courier',
'commands_1' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'echo "mail-mta/postfix -dovecot-sasl sasl" >> /etc/portage/package.use',
'emerge -av postfix',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'chmod 0750 ' . $settings['system']['vmail_homedir'],
'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo',
'touch /etc/postfix/main.cf',
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
'touch /etc/sasl2/smtpd.conf',
'chown root:root /etc/postfix/main.cf',
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
'chown root:root /etc/sasl2/smtpd.conf',
'chmod 0644 /etc/postfix/main.cf',
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
'chmod 0600 /etc/sasl2/smtpd.conf',
'for suffix in {alias,mailbox,uid,gid}_maps mailbox_domains sender_permissions; do',
' touch /etc/postfix/mysql-virtual_${suffix}.cf',
' chown root:postfix /etc/postfix/mysql-virtual_${suffix}.cf',
' chmod 0640 /etc/postfix/mysql-virtual_${suffix}.cf',
'done'
),
'files' => Array(
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
@@ -154,6 +166,8 @@ return Array(
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
'etc_postfix_mysql-virtual_uid_maps.cf' => '/etc/postfix/mysql-virtual_uid_maps.cf',
'etc_postfix_mysql-virtual_gid_maps.cf' => '/etc/postfix/mysql-virtual_gid_maps.cf',
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
),
'commands_2' => Array(
@@ -166,30 +180,22 @@ return Array(
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands_1' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use',
'emerge -av postfix',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_user['name'].':'.$vmail_group['name'].' ' . $settings['system']['vmail_homedir'],
'chmod 0750 ' . $settings['system']['vmail_homedir'],
'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo',
'touch /etc/postfix/main.cf',
'touch /etc/postfix/master.cf',
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
'chown root:root /etc/postfix/main.cf',
'chown root:root /etc/postfix/master.cf',
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
'chmod 0644 /etc/postfix/main.cf',
'chmod 0644 /etc/postfix/master.cf',
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
'touch /etc/postfix/{main,master}.cf',
'chown root:root /etc/postfix/{main,master}.cf',
'chmod 0644 /etc/postfix/{main,master}.cf',
'for suffix in {alias,mailbox,uid,gid}_maps mailbox_domains sender_permissions; do',
' touch /etc/postfix/mysql-virtual_${suffix}.cf',
' chown root:postfix /etc/postfix/mysql-virtual_${suffix}.cf',
' chmod 0640 /etc/postfix/mysql-virtual_${suffix}.cf',
'done'
),
'files' => Array(
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
@@ -197,7 +203,9 @@ return Array(
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
'etc_postfix_mysql-virtual_uid_maps.cf' => '/etc/postfix/mysql-virtual_uid_maps.cf',
'etc_postfix_mysql-virtual_gid_maps.cf' => '/etc/postfix/mysql-virtual_gid_maps.cf'
),
'commands_2' => Array(
'rc-update add postfix default'
@@ -234,7 +242,7 @@ return Array(
'echo "smtpd_milters = inet:localhost:8891
milter_macro_daemon_name = SIGNING
milter_default_action = accept" >> /etc/postfix/main.cf',
'rc-update add dovecot default'
'rc-update add dkim-filter default'
),
'restart' => Array(
'/etc/init.d/postfix restart'
@@ -293,34 +301,14 @@ milter_default_action = accept" >> /etc/postfix/main.cf',
)
),
'dovecot' => Array(
'label' => 'Dovecot 1',
'label' => 'Dovecot',
'commands_1' => Array(
'echo "net-mail/dovecot mysql" >> /etc/portage/package.use',
'emerge -av dovecot',
'mv dovecot.conf dovecot.conf.gentoo',
'mv dovecot-sql.conf dovecot-sql.conf.gentoo',
'touch dovecot.conf',
'touch dovecot-sql.conf',
),
'files' => Array(
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
),
'commands_2' => Array(
'chmod 0640 /etc/dovecot/dovecot-sql.conf',
'rc-update add dovecot default'
),
'restart' => Array(
'/etc/init.d/dovecot restart'
)
),
'dovecot2' => Array(
'label' => 'Dovecot 2',
'commands_1' => Array(
'emerge -av dovecot',
'mv dovecot.conf dovecot.conf.gentoo',
'mv dovecot-sql.conf dovecot-sql.conf.gentoo',
'touch dovecot.conf',
'touch dovecot-sql.conf',
'mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.gentoo',
'mv /etc/dovecot/dovecot-sql.conf /etc/dovecot/dovecot-sql.conf.gentoo',
'touch /etc/dovecot/dovecot.conf',
'touch /etc/dovecot/dovecot-sql.conf',
),
'files' => Array(
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
@@ -342,13 +330,14 @@ milter_default_action = accept" >> /etc/postfix/main.cf',
'proftpd' => Array(
'label' => 'ProFTPd',
'commands_1' => Array(
'emerge -av proftpd'
'echo "net-ftp/proftpd mysql" >> /etc/portage/package.use',
'emerge -av proftpd',
'touch /etc/proftpd/proftpd.conf'
),
'files' => Array(
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
),
'commands_2' => Array(
'touch /etc/proftpd/proftpd.conf',
'chown root:0 /etc/proftpd/proftpd.conf',
'chmod 0600 /etc/proftpd/proftpd.conf',
'rc-update add proftpd default'
@@ -404,8 +393,10 @@ milter_default_action = accept" >> /etc/postfix/main.cf',
'label' => 'Awstats',
'commands' => Array(
'emerge awstats',
'awstats_configure.pl',
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
'rm /etc/cron.d/awstats'
),
),
'libnss' => Array(

View File

@@ -17,6 +17,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'ubuntu_lucid' => Array(
'label' => 'Ubuntu 10.04 (Lucid)',
@@ -128,13 +145,13 @@ return Array(
'postfix_courier' => Array(
'label' => 'Postfix/Courier',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -189,13 +206,13 @@ return Array(
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -359,7 +376,9 @@ return Array(
'apt-get install awstats',
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
'rm /etc/cron.d/awstats'
),
),
'libnss' => Array(

View File

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

View File

@@ -17,9 +17,26 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'suse_linux_10_0' => Array(
'label' => 'SUSE Linux 10.0',
'sle_10' => Array(
'label' => 'SUSE Linux Enterprise 10',
'services' => Array(
'http' => Array(
'label' => $lng['admin']['configfiles']['http'],
@@ -71,11 +88,11 @@ return Array(
'usr_lib_sasl2_smtpd.conf' => '/usr/lib/sasl2/smtpd.conf'
),
'commands' => Array(
'mkdir -p /var/spool/postfix/etc/pam.d',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'mkdir -p /var/spool/postfix/etc/pam.d',
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -158,9 +175,9 @@ return Array(
'awstats' => Array(
'label' => 'Awstats',
'commands' => Array(
'awstats_configure.pl',
makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
)
)
)

View File

@@ -17,6 +17,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'debian_squeeze' => Array(
'label' => 'Debian 6.0 (Squeeze)',
@@ -128,13 +145,13 @@ return Array(
'postfix_courier' => Array(
'label' => 'Postfix/Courier',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' '.$vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -189,13 +206,13 @@ return Array(
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -358,7 +375,9 @@ return Array(
'apt-get install awstats',
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
'rm /etc/cron.d/awstats'
),
),
'libnss' => Array(

View File

@@ -2,7 +2,7 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2011 the Froxlor Team (see authors).
* Copyright (c) 2011- the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
@@ -17,6 +17,23 @@
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'opensuse_11_x' => Array(
'label' => 'openSUSE 11.x',
@@ -68,11 +85,11 @@ return Array(
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
),
'commands' => Array(
'mkdir -p /var/spool/postfix/etc/pam.d',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . $settings['system']['vmail_homedir'],
'mkdir -p /var/spool/postfix/etc/pam.d',
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -106,13 +123,13 @@ return Array(
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'zypper install postfix postfix-mysql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -238,14 +255,8 @@ return Array(
'label' => 'Awstats',
'commands' => Array(
'cp /usr/share/doc/packages/awstats/awstats.model.conf /etc/awstats/',
/**makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),*/
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'cp awstats.model.conf awstats.yourdomain.xx.conf #e.g one.example.com or example.com',
'edit awstats.yourdomain.xx.conf',
'change SiteDomain="yourdomain.xx #e.g SiteDomain="example.com" ',
'change HostAliases="yourdomain.xx www.yourdomain.de 127.0.0.1 localhost" ',
'Set DirIcons="/awstatsicons" ',
'run awstats in your favorite browser by http://yourdomain.xx/cgi-bin/awstats.pl'
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
)
)
)

View File

@@ -2,7 +2,6 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
@@ -10,16 +9,32 @@
* 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 Configfiles
*
*/
// Try to guess user/group from settings' email UID/GID
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
$vmail_group=posix_getgrgid($settings['system']['vmail_gid']);
/* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */
if ($vmail_user === false) {
$vmail_username="vmail";
} else {
$vmail_username=$vmail_user['name'];
}
if ($vmail_group === false) {
$vmail_groupname="vmail";
} else {
$vmail_groupname=$vmail_group['name'];
}
return Array(
'ubuntu_hardy' => Array(
'label' => 'Ubuntu 8.04 (Hardy)',
'debian_wheezy' => Array(
'label' => 'Debian 7.0 (Wheezy)',
'services' => Array(
'http' => Array(
'label' => $lng['admin']['configfiles']['http'],
@@ -42,7 +57,7 @@ return Array(
null,
'restart' => Array(
'/etc/init.d/apache2 restart'
)
),
),
'lighttpd' => Array(
'label' => 'Lighttpd Webserver',
@@ -100,7 +115,8 @@ return Array(
'bind' => Array(
'label' => 'Bind9',
'commands' => Array(
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
'apt-get install bind9',
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf.local',
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
@@ -113,7 +129,7 @@ return Array(
'label' => 'PowerDNS',
'files' => Array(
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
'etc_powerdns_bindbackend.conf' => '/etc/powerdns/bindbackend.conf',
),
'restart' => Array(
'/etc/init.d/pdns restart'
@@ -127,13 +143,13 @@ return Array(
'postfix_courier' => Array(
'label' => 'Postfix/Courier',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' '.$vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -158,7 +174,8 @@ return Array(
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf'
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf',
'etc_aliases' => '/etc/aliases'
),
'restart' => Array(
'newaliases',
@@ -168,33 +185,33 @@ return Array(
'dkim' => Array(
'label' => 'DomainKey filter',
'commands_1' => Array(
'apt-get install dkim-filter',
'apt-get install opendkim',
'mkdir -p /etc/postfix/dkim'
),
'files' => Array(
'dkim-filter.conf' => '/etc/dkim-filter.conf'
'opendkim.conf' => '/etc/opendkim.conf'
),
'commands_2' => Array(
'echo "milter_default_action = accept" >> /etc/postfix/main.cf',
'echo "milter_protocol = 2" >> /etc/postfix/main.cf',
'echo "milter_protocol = 6" >> /etc/postfix/main.cf',
'echo "smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf',
'echo "non_smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf'
),
'restart' => Array(
'/etc/init.d/dkim-filter restart',
'/etc/init.d/opendkim restart',
'/etc/init.d/postfix restart'
)
),
'postfix_dovecot' => Array(
'label' => 'Postfix/Dovecot',
'commands' => Array(
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . $settings['system']['vmail_homedir'],
'apt-get install postfix postfix-mysql',
'mkdir -p /var/spool/postfix/etc/pam.d',
'mkdir -p /var/spool/postfix/var/run/mysqld',
'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail',
'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail',
'mkdir -p ' . $settings['system']['vmail_homedir'],
'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'],
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
@@ -218,11 +235,12 @@ return Array(
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
'etc_aliases' => '/etc/aliases'
),
'restart' => Array(
'/etc/init.d/postfix restart',
'newaliases'
'newaliases',
'/etc/init.d/postfix restart'
)
),
'postfix_mxaccess' => Array(
@@ -245,7 +263,7 @@ return Array(
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
),
'files' => Array(
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt',
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
@@ -266,6 +284,9 @@ return Array(
'daemons' => Array(
'courier' => Array(
'label' => 'Courier',
'commands' => Array(
'apt-get install courier-pop courier-imap courier-authlib-mysql'
),
'files' => Array(
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
@@ -278,14 +299,17 @@ return Array(
'dovecot' => Array(
'label' => 'Dovecot',
'commands_1' => Array(
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix',
'apt-get install dovecot-imapd dovecot-pop3d dovecot-mysql'
),
'files' => Array(
'etc_dovecot_conf.d_10-auth.conf' => '/etc/dovecot/conf.d/10-auth.conf',
'etc_dovecot_conf.d_10-mail.conf' => '/etc/dovecot/conf.d/10-mail.conf',
'etc_dovecot_conf.d_10-master.conf' => '/etc/dovecot/conf.d/10-master.conf',
'etc_dovecot_conf.d_15-lda.conf' => '/etc/dovecot/conf.d/15-lda.conf',
'etc_dovecot_conf.d_20-imap.conf' => '/etc/dovecot/conf.d/20-imap.conf',
'etc_dovecot_conf.d_20-pop3.conf' => '/etc/dovecot/conf.d/20-pop3.conf',
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
),
'commands_2' => Array(
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
'etc_dovecot_dovecot-sql.conf.ext' => '/etc/dovecot/dovecot-sql.conf.ext'
),
'restart' => Array(
'/etc/init.d/dovecot restart'
@@ -302,6 +326,7 @@ return Array(
'apt-get install proftpd-basic proftpd-mod-mysql'
),
'files' => Array(
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
),
@@ -351,30 +376,62 @@ return Array(
'label' => 'Awstats',
'commands' => Array(
'apt-get install awstats',
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
'rm /etc/cron.d/awstats'
),
),
'libnss' => Array(
'label' => 'libnss (system login with mysql)',
'commands' => Array(
'apt-get install libnss-mysql nscd',
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
'apt-get install libnss-mysql-bg nscd',
'chmod 600 /etc/libnss-mysql.cfg /etc/libnss-mysql-root.cfg'
),
'files' => Array(
'etc_nss-mysql.conf' => '/etc/nss-mysql.conf',
'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf',
'etc_libnss-mysql.cfg' => '/etc/libnss-mysql.cfg',
'etc_libnss-mysql-root.cfg' => '/etc/libnss-mysql-root.cfg',
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
),
'restart' => Array(
'/etc/init.d/nscd restart'
)
),
'fcgid' => array(
'label' => 'FCGID',
'commands' => array(
'apt-get install apache2-suexec libapache2-mod-fcgid php5-cgi',
'a2enmod suexec fcgid',
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'groupadd -f '.$settings['system']['mod_fcgid_httpgroup'] : null,
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'useradd -s /bin/false -g '.$settings['system']['mod_fcgid_httpgroup'].' '.$settings['system']['mod_fcgid_httpuser'] : null,
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'chown -R '.$settings['system']['mod_fcgid_httpuser'].':'.$settings['system']['mod_fcgid_httpgroup'].' '.$pathtophpfiles : null,
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'mkdir -p '.makeCorrectDir($settings['system']['mod_fcgid_configdir']) : null,
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'mkdir -p '.makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : null,
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'a2dismod php5' : null
),
'restart' => Array(
'/etc/init.d/apache2 restart'
)
),
'php-fpm' => array(
'label' => 'PHP-FPM',
'commands' => array(
'# add "non-free" after all occurances of "main" in /etc/apt/sources.list',
'# this is needed for libapache2-mod-fastcgi to install',
'apt-get install apache2-suexec libapache2-mod-fastcgi php5-fpm',
'# change fpm-configuration directory to "/etc/php5/fpm/pool.d/" in froxlor',
'sed -i.bak \'s/^;include=\/etc\/php5\/fpm/*.conf/include=include=\/etc\/php5\/fpm\/pool.d\/*.conf/\' /etc/php5/fpm/php-fpm.conf',
'rm /etc/php5/fpm/pool.d/www.conf',
'a2enmod suexec fastcgi actions',
($settings['phpfpm']['enabled_ownvhost'] == '1') ? 'groupadd -f '.$settings['phpfpm']['vhost_httpgroup'] : null,
($settings['phpfpm']['enabled_ownvhost'] == '1') ? 'useradd -s /bin/false -g '.$settings['phpfpm']['vhost_httpgroup'].' '.$settings['phpfpm']['vhost_httpuser'] : null,
($settings['phpfpm']['enabled_ownvhost'] == '1') ? 'chown -R '.$settings['phpfpm']['vhost_httpuser'].':'.$settings['phpfpm']['vhost_httpgroup'].' '.$pathtophpfiles : null,
($settings['phpfpm']['enabled_ownvhost'] == '1') ? 'a2dismod php5' : null
)
)
)
)
)
)
);
?>

View File

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

View File

@@ -155,7 +155,6 @@ if($db->link_id == 0)
fwrite($debugHandler, 'Database-connection established' . "\n");
unset($sql);
unset($db->password);
$result = $db->query("SELECT `settingid`, `settinggroup`, `varname`, `value` FROM `" . TABLE_PANEL_SETTINGS . "`");
while($row = $db->fetch_array($result))

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