Compare commits

..

1003 Commits

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

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

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

Signed-off-by: Robert Förster (Dessa) <Dessa@froxlor.org>
2013-07-01 15:07:28 +02:00
Dessa
d4e79911cb Merge pull request #100 from evgeni/allow_sieve
allow sieve usage for all mail users
2013-07-01 03:55:30 -07:00
Evgeni Golov
44cfa99c5c allow sieve usage for all mail users 2013-06-30 21:45:58 +02:00
Michael Kaufmann (d00p)
9b60dc09ea add possibility to specify enabled Zend Guard for APS, fixes #1235
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-06-21 10:22:46 +02:00
Michael Kaufmann
04e1ade0d2 Merge pull request #99 from 5nafu/master
Added smtpd_relay_restrictions to all postfix configurations, fixes #1220
2013-06-21 00:06:43 -07:00
Michael Kaufmann
05399ce53e Merge pull request #98 from wb7/master
Updated german grammer
2013-06-21 00:05:46 -07:00
5nafu
3ef481763c Bug #1220: Added smtpd_relay_restrictions to all postfix configurations 2013-06-21 08:57:57 +02:00
Lucas
f842e69d81 Changed sentence @d00p 2013-06-20 13:54:09 +03:00
Lucas
de09d3dd5f Removed tag at the end 2013-06-19 19:48:55 +03:00
Lucas
1793873bbb Updated german grammer #2 2013-06-19 19:46:58 +03:00
Michael Kaufmann
fb04e99dcb Merge pull request #97 from wb7/master
Changed some german sentences
2013-06-19 08:56:03 -07:00
Lucas
817966f4ea Changed some German sentences - grammer 2013-06-19 18:15:56 +03:00
Michael Kaufmann (d00p)
d9e7cd349b fix in display of error for path-field when dropdown is chosen (customer/domains); update change in speciallogfile also for subdomains of that domain, fixes #1223
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-06-09 15:18:38 +02:00
Dessa
95061ecf77 Merge pull request #96 from powerfolder/master
Changed executable dir for Postfix on Gentoo
2013-06-07 04:41:27 -07:00
Florian Lahr
188f189d74 fixes #1152 2013-06-07 12:54:12 +02:00
Michael Kaufmann (d00p)
15ff558d5f don't call a cronjob function from within the panel (safe_exec not allowed), fixes #1227
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-06-07 08:10:45 +02:00
Michael Kaufmann (d00p)
6bde0820c6 update IDNA-class to latest version 0.8.0 2013-06-06 15:07:43 +02:00
Michael Kaufmann
21aabb154d Merge pull request #95 from powerfolder/master
Fixes related to the Awstats/Nginx and Awstats/Gentoo
2013-06-06 07:05:24 -07:00
Florian Lahr
a3ee1430ac Changes related to missing awstats icon location block in Nginx vhosts and Awstats configuration on Gentoo
fixes #1228
fixed #1229
2013-06-06 14:49:21 +02:00
Michael Kaufmann
fc4a93ff6e Merge pull request #94 from yaplik/master
czech translation update
2013-06-06 04:05:22 -07:00
Jiří Zapletal
d595aea7a6 corrections in czech language file 2013-06-06 00:01:09 +02:00
Jiří Zapletal
9ec659be5b fixing encoding of characters in czech language file 2013-06-06 00:00:40 +02:00
Michael Kaufmann (d00p)
cf515ef8be use correct user/group setting for froxlor-fpm-vhost-config, fixes #1225
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-30 17:03:52 +02:00
Michael Kaufmann (d00p)
7d49a76c32 don't show openbasedir-textfield for customers if open-basedir is disabled for this domain (only edit), fixes #1224
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-29 16:25:07 +02:00
Michael Kaufmann (d00p)
8e20d5214b correct sentence's grammar, fixes #1221
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-27 09:38:40 +02:00
Michael Kaufmann (d00p)
537bad3926 improve description of apache-2.4 modification settings as people still activate it even without having >=apache-2.4 installed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-26 11:42:17 +02:00
Michael Kaufmann (d00p)
dee238d6bd allow empty value for Maildir-directory-suffix, fixes #1219
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-24 15:42:19 +02:00
Michael Kaufmann (d00p)
fedb513c29 fix unknown fields as it wasn't selected from the table, fixes #1218
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-24 13:34:05 +02:00
Michael Kaufmann (d00p)
435f4a189a Remove mod_log_sql model for awstats as there's no mod_log_sql anymore
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-24 13:26:52 +02:00
Michael Kaufmann (d00p)
ff218168b9 more work on wheezy configs, added fcgid- and phpfpm-commands for setup; fixed non-working call to mysqldump in backup-cronjob
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-24 10:31:26 +02:00
Michael Kaufmann (d00p)
043422b101 show customer name with su-link on ticket view for admins, and just as plaintext for customers, fixes #1045
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-17 09:50:22 +02:00
Michael Kaufmann (d00p)
a1ff131fd6 use correct sender for usage-email, fixes #1212
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-17 09:28:36 +02:00
Michael Kaufmann (d00p)
fb9ed8b7da implement per-domain-ssl-certificates in the cronjobs, refs #365
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-15 11:55:26 +02:00
Michael Kaufmann (d00p)
42b201c54d prepare ssl-per-domain (customer setable), no cronjob-functionality yet (intended), refs #365
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-14 17:26:30 +02:00
Michael Kaufmann (d00p)
14e9b81995 preparation for wheezy config-templates (just copied for now); fixed missing courier-templates for precise
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-05-13 18:40:30 +02:00
Michael Kaufmann (d00p)
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
Florian Aders (EleRas)
6e4121d9bb Tagging 0.9.25
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-14 15:47:27 +01:00
Florian Aders (EleRas)
bb7874e68f Fixing undefined index in bind zonefile - generation
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-12 15:26:05 +01:00
Florian Aders (EleRas)
c10320ff9c Don't display empty reload - command, fixes #940
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-12 10:03:39 +01:00
Florian Aders (EleRas)
6c4ecad7f8 Check password validity if customer changes password, fixes #974, thx philnate
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-12 09:55:26 +01:00
Florian Aders (EleRas)
0deb4404d2 Fixing php-notice in cron while setting awstats - permissions, fixes #960, fixes #970, thx d4f
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-12 09:19:50 +01:00
Florian Aders (EleRas)
2b0cfea888 Fixing regex for backup_path, fixes #967
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-11-12 09:13:25 +01:00
Florian Aders (EleRas)
65a5df507c Tagging 0.9.25-rc1
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-31 12:20:17 +01:00
Florian Aders (EleRas)
af6a80ab76 Revert "fixing mysql-virtual_mailbox_maps.cf regarding postfix-policy in Froxlor, refs #879"
This reverts commit f0d9db420a.
2011-10-31 10:09:36 +01:00
Florian Aders (EleRas)
3d0b0cdbdd Revert "fixing mysql-virtual_sender_permissions.cf regarding postfix-policy in Froxlor, fixes #879"
This reverts commit f49ac9e193.
2011-10-31 10:09:31 +01:00
Florian Aders (EleRas)
6408251c14 Revert "fixing mysql-virtual_alias_maps.cf and mysql-virtual_mailbox_domains.cf regarding postfix-policy in Froxlor, refs #879"
This reverts commit 526dbbd68e.
2011-10-31 10:06:17 +01:00
Christoph Burchert (Chb)
f90b83cb34 Disabled backup per default, fixes #948 @5m
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-30 21:20:57 +01:00
Christoph Burchert (Chb)
491dfccc8e Added my_destination to FreeBSD postfix config, fixes #924 @5m
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-30 21:10:11 +01:00
Florian Aders (EleRas)
89d04a83a0 Fixed calculations in display if customer-traffic, fixes #696 @1h
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-30 16:31:15 +01:00
Florian Aders (EleRas)
3d2ac9af17 Fixed unimplemented lng - strings, refs #696
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-30 15:50:45 +01:00
Florian Aders (EleRas)
0e9044b7ba mysqlnd is sufficient
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-30 13:18:20 +01:00
Florian Aders (EleRas)
64ddddd3d5 Fixing broken changing of hostname, thx philnate, fixes #928 @5m, fixes #946
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-10-30 12:11:10 +01:00
Christoph Burchert (Chb)
bfd1b6bbef Fixed typo (thanks to arnoldB)
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-19 15:30:43 +02:00
Christoph Burchert (Chb)
ddb179f340 Mini-fix the minor fix
Signed-off-by: Christoph Burchert (Chb) <derchb@froxlor.org>
2011-10-19 15:22:53 +02:00
Andreas Burchert (scarya)
893274c89c Created missing config files for ubuntu and nginx, fixes #932
Thanks to arnoldB

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

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

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

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

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

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

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

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

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

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-18 07:34:26 +01:00
Michael Kaufmann (d00p)
d2e86e936b Merge branch 'master' of git.froxlor.org:froxlor 2011-02-16 14:02:48 +01:00
Michael Kaufmann (d00p)
d2fe9be860 do not generate any unnecessary webserver configuration-lines for deactivated users, fixes #599
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-16 14:01:37 +01:00
Michael Kaufmann (d00p)
357614992e add missing image in 'change theme' on admin-side
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-15 21:49:18 +01:00
Florian Aders (EleRas)
134250d1c1 Added icon for changetheme made by scarya
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-15 21:14:02 +01:00
Florian Aders (EleRas)
8a8d485c39 Merge branch 'master' into redesign 2011-02-13 22:29:42 +01:00
Florian Aders (EleRas)
d06b08f020 Added configuration for gentoo / dovecot2
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 22:28:45 +01:00
Florian Aders (EleRas)
7a70257b95 Forgot one file in the last commit
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 18:40:34 +01:00
Florian Aders (EleRas)
4400125c7e Fixed icon naming
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 18:36:56 +01:00
Florian Aders (EleRas)
88d0fe5752 Fixing customer ticket reply - view
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 18:01:41 +01:00
Florian Aders (EleRas)
cc1b45ac6e Readded files which were deleted during broken merge 7b01cb47de
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 13:10:11 +01:00
Florian Aders (EleRas)
61d5d4a150 Fixed naming of icon in MySQL edit
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 12:52:12 +01:00
Florian Aders (EleRas)
107c84fdbc Fixed typo in customer -> add ticket form
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 12:48:21 +01:00
Florian Aders (EleRas)
f85d983c84 Fixed naming of icon in FTP edit
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 12:45:19 +01:00
Florian Aders (EleRas)
a0406c9749 Fixed naming of icon in add domain
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-13 12:41:50 +01:00
Michael Kaufmann (d00p)
840d9f5915 fix unmerged templates to use actual $lng-values 2011-02-13 12:33:10 +01:00
Michael Kaufmann (d00p)
59f8002a5d fix undefined index in templates_edit template 2011-02-13 12:30:56 +01:00
Florian Aders (EleRas)
0b38e192d4 Now with the auto-date-setter
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 20:03:08 +01:00
Florian Aders (EleRas)
014e350a9e It's 2011 :P
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 19:54:31 +01:00
Florian Aders (EleRas)
382cf45e08 Changing customer -> ticket to new formfield - stuff
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 18:54:44 +01:00
Florian Aders (EleRas)
abe8446736 Merge branch 'redesign' of git.froxlor.org:froxlor into redesign 2011-02-12 18:38:09 +01:00
Florian Aders (EleRas)
ed4acb0118 Fixing forms in customer -> mysql classic template
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 18:37:11 +01:00
Andreas Burchert (scarya)
8032addc0a Finished template for Classic: extras 2011-02-12 18:36:00 +01:00
Florian Aders (EleRas)
0cfc75976f Fixing customer -> ftp in classic layout
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 18:33:59 +01:00
Michael Kaufmann (d00p)
8e83c5f788 bugfix domain-formfields (again) 2011-02-12 18:27:32 +01:00
Andreas Burchert (scarya)
7b01cb47de Merge branch 'redesign' of git.froxlor.org:froxlor into redesign
Conflicts:
	templates/Froxlor/customer/email/emails_add.tpl
	templates/Froxlor/customer/email/emails_edit.tpl
	templates/Froxlor/customer/email/forwarder_add.tpl
2011-02-12 18:25:19 +01:00
Andreas Burchert (scarya)
b13d20d44c Fixed email templates in design: Classic, Froxlor 2011-02-12 18:20:22 +01:00
Michael Kaufmann (d00p)
b8ab1edc56 fix domain-formfields 2011-02-12 18:16:54 +01:00
Michael Kaufmann (d00p)
cc96aef50f fix integration of formfields in customer-domains 2011-02-12 17:48:54 +01:00
Michael Kaufmann (d00p)
9ddd3a2a58 fix typo 2011-02-12 17:42:02 +01:00
Michael Kaufmann (d00p)
fea75e2c2f fix even more templates 2011-02-12 17:34:20 +01:00
Michael Kaufmann (d00p)
87b15ce57d fix more templates for fieldform usage 2011-02-12 17:32:36 +01:00
Michael Kaufmann (d00p)
a807ffd918 fix more customer_email formfiled usage 2011-02-12 17:24:07 +01:00
Michael Kaufmann (d00p)
f3d505170a bugfix customer_email formfield integration 2011-02-12 17:17:13 +01:00
Michael Kaufmann (d00p)
13904cfd7b Merge branch 'redesign' of git.froxlor.org:froxlor into redesign 2011-02-12 16:48:27 +01:00
Michael Kaufmann (d00p)
3e83ae8a6e use htpasswd-formfields 2011-02-12 16:47:07 +01:00
Michael Kaufmann (d00p)
44febee357 use htaccess-formfields 2011-02-12 16:42:25 +01:00
unknown
0b20a154f5 Finished email stuff. 2011-02-12 16:18:24 +01:00
Michael Kaufmann (d00p)
b9101b2041 Merge branch 'redesign' of git.froxlor.org:froxlor into redesign 2011-02-12 16:14:33 +01:00
Michael Kaufmann (d00p)
9e798c6362 add formfields for customer_extras 2011-02-12 16:13:57 +01:00
Florian Aders (EleRas)
9e1bd811a5 Merge branch 'redesign' of git.froxlor.org:froxlor into redesign 2011-02-12 16:08:10 +01:00
Florian Aders (EleRas)
26aed64bf8 Converted customer -> ftp to new formbuilder
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2011-02-12 16:08:05 +01:00
Michael Kaufmann (d00p)
3f93044121 add formields for email stuff 2011-02-12 15:47:37 +01:00
Florian Aders (EleRas)
8cb615df5f Converted customer -> mysql to new formbuilder 2011-02-12 15:15:55 +01:00
Andreas Burchert
885bf7e88c Added customer/domain formfields. 2011-02-11 22:08:22 +01:00
Florian Aders (EleRas)
efabfd7183 Merge branch 'master' into redesign 2011-02-11 13:39:07 +01:00
Florian Aders (EleRas)
d8b43f60b8 Added missing smtpd_sasl_type = dovecot for gentoo-postfix-config 2011-02-11 13:32:22 +01:00
Michael Kaufmann (d00p)
0a2fed06cb test
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-09 10:56:12 +01:00
Michael Kaufmann (d00p)
e13d588c07 Merge branch 'master' into redesign 2011-02-09 10:54:31 +01:00
Michael Kaufmann (d00p)
460e153c6f FreeBSD's dovecot uses ssl=yes as default value (even if commented out), so we have to set it to 'no' if no ssl is used, fixes #572
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-09 09:55:33 +01:00
Michael Kaufmann (d00p)
cb36615228 check database-connection after each customer in traffic-cron (sometimes analyzing big access-logs takes too long), fixes #544
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-09 09:53:05 +01:00
Michael Kaufmann (d00p)
6dca567827 added parameter '-k' to the 'du' command in traffic-cron, -k displays block counts in 1024-byte (1-Kbyte) blocks (lead to wrong filesize-calculations on FreeBSD), fixes #578
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-09 09:47:44 +01:00
Florian Aders (EleRas)
80379232a9 Remove IDs from settings, makes merging easier 2011-02-08 15:35:08 +01:00
Michael Kaufmann (d00p)
3a3aa73d2d update idna_converter-class, thx to mathias, fixes #579 2011-02-08 14:31:21 +01:00
Michael Kaufmann (d00p)
c949c153ed fix undefined index in classic-theme
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 14:03:18 +01:00
Michael Kaufmann (d00p)
a4dba36f82 beautify message if there are no customers to add a new ticket for
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 14:00:22 +01:00
Michael Kaufmann (d00p)
bee19fabfa merged more of the re-design files to current state
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 13:17:24 +01:00
Michael Kaufmann (d00p)
43770d37e1 manually merged re-design changes to 80% of the files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 12:53:24 +01:00
Michael Kaufmann (d00p)
7b6b145229 add more new files for re-design
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 10:38:47 +01:00
Michael Kaufmann (d00p)
57d52bd59e merge/add new formfield-files for re-design
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 10:34:14 +01:00
Michael Kaufmann (d00p)
d6b4bd8d36 add new images and templates for re-design
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2011-02-08 10:30:03 +01:00
Michael Kaufmann (d00p)
c28f70d885 fixed endless redirection with lighty when accessing webalizer, thx to vmp32k 2011-02-08 07:58:14 +01:00
Michael Kaufmann (d00p)
fad2ae873d show message when trying to delete a domain which is used as alias-domain instead of blank page, fixes #571 2011-02-06 09:57:31 +00:00
Michael Kaufmann (d00p)
30c025202c set base-path dynamically in crond-config for freebsd, fixes #575 2011-02-02 06:26:21 +00:00
Michael Kaufmann (d00p)
9cb64e34dc fix path in powerdns-configs (bind-path is a setting), fixes #574 2011-02-01 21:24:47 +00:00
Michael Kaufmann (d00p)
72af7c600f correct postfix mx-access commands for FreeBSD, fixes #573 2011-01-31 17:14:32 +00:00
Michael Kaufmann (d00p)
903a91b9ea - replace placeholder with actual email address, fixes #566 2011-01-27 12:35:27 +00:00
Michael Kaufmann (d00p)
2b699849ca fix install-sql 2011-01-26 21:13:18 +00:00
Michael Kaufmann (d00p)
a7ae6e54de - set correct version for svn1
- correct default-php.ini for open_basedir
- fix upgrading from SysCP (getPhpConfigs() fails cause the table is being added after it's being used in the update-process)
2011-01-26 15:01:19 +00:00
Michael Kaufmann (d00p)
1396aca657 - fix missing language-entries for usage-mail template (no fallback to english in e-mail templates, we're looking for translaters btw :P), refs #564
- fix possible missing setting in database (httgroup), fixes #564
2011-01-26 11:41:35 +00:00
Michael Kaufmann (d00p)
b19cabef79 round values in usage-cron, fixes #563 2011-01-26 11:20:19 +00:00
Michael Kaufmann (d00p)
c3f5e6c4db fix inserting of deletion-task for ftp-accounts, fixes #553, refs #293 2011-01-26 10:58:59 +00:00
Michael Kaufmann (d00p)
f4b6d9930f - respect domain openbasedir settings when using php-fpm, fixes #562
- various improvements/cleanings in the gentoo configfiles array
2011-01-26 09:44:09 +00:00
Michael Kaufmann (d00p)
f77ddac4ed set version to 0.9.17 for upcoming release 2011-01-25 06:23:31 +00:00
Michael Kaufmann (d00p)
932e1f95c5 fix maxlength of textbox in admin:edit, fixes #559 2011-01-19 06:28:48 +00:00
Michael Kaufmann (d00p)
a8b52d50af - prework for docroot-settings-extension, refs #533 2011-01-18 07:18:28 +00:00
Michael Kaufmann (d00p)
f10f63b6be add missing language-string for database_edit, fixes #554 2011-01-16 11:58:24 +00:00
Michael Kaufmann (d00p)
c5cdd9f567 - fix minor issues diskspace-usage-report, refs #466
- show current year for copyright in footer
2011-01-14 07:31:01 +00:00
Michael Kaufmann (d00p)
e5b2fd90c0 Add "Notification mail for customers when 90% percent of disk space is exhausted", fixes #466 2011-01-14 07:09:53 +00:00
Michael Kaufmann (d00p)
f7b43f470f remove double $$, fixes #552 2011-01-13 11:43:40 +00:00
Michael Kaufmann (d00p)
515e542179 - localize path setting (dropdown/manual), thx to arnoldB, fixes #547
- include diskusage- (todo) and traffic-report cron, refs #466, fixes #153
- allow customzing of warning-level in percent for diskusage- and traffic-report cron, refs #466
2011-01-11 08:40:59 +00:00
Michael Kaufmann (d00p)
cc4637095d respect ssl_redirect setting for domains, fixes #542 2011-01-09 16:25:32 +00:00
Michael Kaufmann (d00p)
bffa8817d9 ftp user cannot be edited, fixes #337 2011-01-09 13:44:10 +00:00
Michael Kaufmann (d00p)
98b82ed0c6 improve behavior of ssl-redirect, fixes #541 2011-01-08 11:58:14 +00:00
Michael Kaufmann (d00p)
4f52982a7e more fixes for freebsd (more to follow) 2011-01-07 19:22:24 +00:00
Michael Kaufmann (d00p)
1edba0c368 +mailbox_size_limit = 0 for FreeBSD-postfix 2011-01-07 18:33:14 +00:00
Michael Kaufmann (d00p)
06983ca382 some freebsd-config enhancements, fixes #537 2011-01-06 09:37:49 +00:00
Michael Kaufmann (d00p)
c53ef5b96e fix libnss-nsswitch.conf for FreeBSD, fixes 538 2011-01-06 09:17:25 +00:00
Michael Kaufmann (d00p)
a2b7f98332 add missing 'description' field to sql-query to avoid undefined index in resultset, thx to adlerweb 2011-01-04 21:27:09 +00:00
Michael Kaufmann (d00p)
c25ad76200 remove unnecessary variable $entry in error-message in autoresponder, thx to monotek for finding thi 2011-01-04 20:16:25 +00:00
Florian Aders (EleRas)
7057984534 remove now unneeded inserttasks, refs #535 2011-01-04 11:41:44 +00:00
Florian Aders (EleRas)
02a4fd4e1d Rebuild configurations after a setting is changed, fixes #535 2011-01-04 11:39:04 +00:00
Michael Kaufmann (d00p)
57ec429776 settings version for upcoming release 2010-12-28 11:07:40 +00:00
Andreas Burchert (scarya)
c52d3819af - forgot some update queries from early installations (regarding #529) 2010-12-25 23:36:26 +00:00
Andreas Burchert (scarya)
85f35abe2d - changed sql query to work with version <= 5.5 (fixes #529)
- added php-xml extension check ti installation (fixes #530)
-> thanks to lando
2010-12-25 22:43:42 +00:00
Michael Kaufmann (d00p)
58674a2f8f - fix possible undefined variable 2010-12-22 13:10:12 +00:00
Michael Kaufmann (d00p)
968137a967 - use php symlink to binary, fixes #526 2010-12-22 12:47:31 +00:00
Michael Kaufmann (d00p)
66b274c1bf - fine-tune php-fpm-config, create tmp-folder if not exists, refs #524 2010-12-21 13:15:26 +00:00
Michael Kaufmann (d00p)
b9d68a17fa fix deletion of htpasswd/diroption files if no more htpasswds/diroptions are in the database 2010-12-21 10:55:08 +00:00
Michael Kaufmann (d00p)
ced64138e8 fix order of variables in configuration-path, fixes #521 2010-12-17 22:28:28 +00:00
Michael Kaufmann (d00p)
4fdaed5cc4 fix 'new' fcgid path for froxlor's own vhost php-fcgi-starter 2010-12-14 21:19:52 +00:00
Michael Kaufmann (d00p)
0fd11afdcb use makeCorrectDir() to output sane path 2010-12-10 12:16:03 +00:00
Michael Kaufmann (d00p)
8202cc96e7 - fixed double-declaration of variable causing nginx-cron to fail on mysql_fetch_array() for htpasswd-entries, fixes #516 2010-12-09 11:49:07 +00:00
Michael Kaufmann (d00p)
59bf7ba22f - restore still used settings in 120.system.php
- check for $createifnotexists in phpinterface_* classes
2010-12-07 11:08:41 +00:00
Michael Kaufmann (d00p)
9c075c05f5 - don't create standard-openbasedir config for froxlor-panel vhost 2010-12-06 09:17:48 +00:00
Michael Kaufmann (d00p)
6815501c1d - use local-username for froxlor in fpm-config, because froxlor.panel is only the directory/loginname 2010-12-06 09:00:53 +00:00
Michael Kaufmann (d00p)
f11aa9a1c4 - forgot to save lighttpd_fcgid-class with own-vhost settings for php-fpm 2010-12-06 08:56:39 +00:00
Michael Kaufmann (d00p)
3b33dde9ac add language-strings for php-fpm settings 2010-12-06 08:49:24 +00:00
Michael Kaufmann (d00p)
7fb0e88313 - implement php-fpm for Froxlor-vhost, fixes #505 2010-12-06 07:38:55 +00:00
Michael Kaufmann (d00p)
9615aaa83a update dutch language file, thx to Frits Letteboer, fixes #506 2010-12-05 17:18:24 +00:00
Michael Kaufmann (d00p)
16cc53146c replace correct line-break when sending forgotten password, fixes #507 2010-12-05 17:15:24 +00:00
Michael Kaufmann (d00p)
56e9f748f4 beautify update (forgot one status-output) 2010-12-03 11:15:58 +00:00
Michael Kaufmann (d00p)
80e338610f don't allow activation of FCGID and PHP-FPM at the same time 2010-12-03 10:41:12 +00:00
Michael Kaufmann (d00p)
93abbf4a10 - hide php-reload and php-backend-server setting if nginx is used with php-fpm (useless settings) 2010-12-03 10:20:49 +00:00
Michael Kaufmann (d00p)
0271ccfc28 - outsource fcgid/php-fpm configurations/file-creations/etc 2010-12-03 09:23:40 +00:00
Michael Kaufmann (d00p)
dae3e416a2 - include nginx_phpfpm cron in cron_tasks.php
- show parts of fcgid also when lighttpd is used
2010-12-03 08:58:44 +00:00
Michael Kaufmann (d00p)
759213f8b9 add extra configuration for Apache + PHP-FPM, fixes #482 2010-12-02 12:51:14 +00:00
Michael Kaufmann (d00p)
01b313a3ce merged php-fpm branch 2010-12-02 12:15:58 +00:00
Michael Kaufmann (d00p)
4567f7c781 only call validatePassword() when creating a customer if the password is not empty, cause otherwise no random password can be generated if field is left empty 2010-12-02 09:52:56 +00:00
Michael Kaufmann (d00p)
ef76635508 added missing language-definitions for integer-validation 2010-12-02 08:25:01 +00:00
Michael Kaufmann (d00p)
30235ff3eb don't show settings which are not needed for used webserver, fixes #502 2010-12-02 08:18:46 +00:00
Michael Kaufmann (d00p)
ebb390a1fd fix false initialization of variable (wrong variable name) 2010-11-30 10:45:51 +00:00
Michael Kaufmann (d00p)
0c1a4f692a fix password_query for dovecot when sending e-mail, fixes #500 2010-11-30 07:50:49 +00:00
Michael Kaufmann (d00p)
0c25611d26 - set version to 0.9.15 for upcoming release 2010-11-29 08:56:27 +00:00
Michael Kaufmann (d00p)
cd79670438 fix for awstats aliases if the customerdocroot is equal to the domaindocroot 2010-11-29 07:44:24 +00:00
Michael Kaufmann (d00p)
6b46b31818 reintegrated nginx-branch changes, refs #103 2010-11-29 07:37:00 +00:00
Michael Kaufmann (d00p)
713cb1b3ac use correct id in libnss-query, fixes #495 2010-11-29 06:46:21 +00:00
Michael Kaufmann (d00p)
e492c4aca6 - show database description on delete database confirmation-page, fixes #494 2010-11-29 06:40:35 +00:00
Michael Kaufmann (d00p)
5496915e19 fix hardcoded awstats-configuration path, fixes #493 2010-11-29 06:37:46 +00:00
Robert Foerster (Dessa)
f77d084a53 remove hardcoded stuff 2010-11-27 10:46:24 +00:00
Robert Foerster (Dessa)
060b3f8782 recorded merge of revisions 1486-1491 via svnmerge from http://Dessa@svn.froxlor.org/branches/philderbeast 2010-11-27 10:37:44 +00:00
Robert Foerster (Dessa)
e4b7bf799d gentoo is not debian, at least not since i last checked :) 2010-11-26 12:32:47 +00:00
Robert Foerster (Dessa)
6066601568 - recorded merge of revisions 737-1483 via svnmerge from http://Dessa@svn.froxlor.org/branches/philderbeast
- fixes #103
2010-11-26 12:30:54 +00:00
Michael Kaufmann (d00p)
01404187cc %Ls for dovecot is only being replaced by 'imap' or 'pop3' for the password_query, not the user_query, refs #486 2010-11-23 10:11:15 +00:00
Michael Kaufmann (d00p)
a9da673a31 added --force parameter to froxlor_master_cronjob.php so webserver- and bind-configurations can be rebuild everytime 2010-11-23 06:40:58 +00:00
Michael Kaufmann (d00p)
d1a9460117 - validate if used mail-service (imap, pop3) is allowed for user, fixes #475 2010-11-22 07:13:56 +00:00
Michael Kaufmann (d00p)
bde278430e fix link for adding ticket-categories 2010-11-16 12:01:17 +00:00
Michael Kaufmann (d00p)
9c36b31ad2 - show vmail-uid/gid from settings in freebsd-configtemplate, fixes #483 2010-11-16 06:22:02 +00:00
Michael Kaufmann (d00p)
b528b93178 - fix sender-address of responder-mail (only 'common'-setups!!!), fixes #476 2010-11-11 09:23:53 +00:00
Michael Kaufmann (d00p)
7ca00d56be - added possibility to unlock customers who got locked because of too many login-fails, fixes #473 2010-11-09 09:32:52 +00:00
Michael Kaufmann (d00p)
39f17b1a9e - check for correct variable value for store_defaultindex, fixes #459
- fix possible undefined variable in init-script
2010-11-09 09:16:08 +00:00
Michael Kaufmann (d00p)
08e17f7d16 - put customer standard-subdomains to the 20_* vhost configs (subdomains) so they are parsed before the main-domain, fixes #465 2010-11-08 07:41:51 +00:00
Michael Kaufmann (d00p)
a638dddec9 - actually show the latest logical order number (yeah, forgot to save the file again :P), refs #464 2010-11-08 07:11:52 +00:00
Michael Kaufmann (d00p)
59bbfcef4f - show next logical order number when creating new ticket category, fixes #464 2010-11-08 07:11:00 +00:00
Michael Kaufmann (d00p)
5cd1c1284a - remove multiserver-stuff from trunk/
- allow admins with customer_see_all-flag to see their support-tickets too
- sanitize date-stuff in install.php
- fixed wrong usage of standard_error() in ticket::sendMail()
- fix issue with lighttpd server.bind when IP is IPv6
2010-11-03 06:36:22 +00:00
Michael Kaufmann (d00p)
f81826fd9b - display determined Froxlor path in cron.d-configurationtemplates, fixes #455 2010-11-01 11:26:36 +00:00
Michael Kaufmann (d00p)
2e59e2bfdf - correct variable name to avoid undefined variable error, fixes #454 2010-11-01 10:36:15 +00:00
Michael Kaufmann (d00p)
03a8a9c8c9 - remove some more realtime-leftovers 2010-10-31 08:29:39 +00:00
Michael Kaufmann (d00p)
689cb40bcc - fix possible undefined variables 2010-10-29 17:53:49 +00:00
Michael Kaufmann (d00p)
1c2a1b8c69 - no multiserver stuff in trunk/ at this time 2010-10-28 12:42:14 +00:00
Michael Kaufmann (d00p)
3d187fd0a0 - fix undefined indexes in ips and ports if ssl is not enabled
- fix getSwap() and getMemory() in FroxlorHostInfo-class
2010-10-28 06:33:58 +00:00
Robert Foerster (Dessa)
2fc057d670 murder etch templates 2010-10-25 11:51:02 +00:00
Michael Kaufmann (d00p)
e7b030fa30 setting version to 0.9.14 for release 2010-10-25 11:22:29 +00:00
Robert Foerster (Dessa)
e74262c81e some spelling fixage 2010-10-25 08:48:03 +00:00
Michael Kaufmann (d00p)
d1a52ca85c - various language corrections, fixes #439 2010-10-25 07:02:36 +00:00
Michael Kaufmann (d00p)
44b53ffd2c - fixed regex for domains to allow a port and/or subfolders/files, fixes #431 2010-10-25 06:45:15 +00:00
Michael Kaufmann (d00p)
ffe49e8acd outsource makeChownWithNewStats function to lib/functions/ because it is now also used outside the cron-area, refs #258 2010-10-24 20:59:52 +00:00
Michael Kaufmann (d00p)
58b3a19ae7 - remove multiserver-stuff from current-trunk
- fix FroxlorSshTransport
2010-10-24 19:16:26 +00:00
Andreas Burchert (scarya)
0be29498b0 - fix in FroxlorSshTransport::close() 2010-10-24 18:58:23 +00:00
Michael Kaufmann (d00p)
1b4069f01e - remove realtime-feature-stuff 2010-10-24 16:57:17 +00:00
Michael Kaufmann (d00p)
5f284c31ab - remove realtime configurations and install-instructions from the panel 2010-10-24 08:59:00 +00:00
Florian Aders (EleRas)
1c892a0f9c Removing duplicate function, fixes #447 2010-10-23 15:20:23 +00:00
Robert Foerster (Dessa)
8fb5a3ae7c deprecate etch config templates, which will be removed with 0.9.15 2010-10-23 12:33:55 +00:00
Michael Kaufmann (d00p)
3c731661a0 actually update to new version :P 2010-10-23 10:44:35 +00:00
Michael Kaufmann (d00p)
ed5e2ba39d fixing update-process, reverting multiserver-support-changes (now in branch) 2010-10-23 10:37:43 +00:00
Michael Kaufmann (d00p)
22eb0e19cc remove deprecated realtime-functionality 2010-10-23 10:24:03 +00:00
Florian Aders (EleRas)
ad31b07a04 Reverting the multiserver-stuff, we'll do this inside the branch 2010-10-23 10:20:23 +00:00
Michael Kaufmann (d00p)
99696ff6cb - allow 4-character tld's (like .info or .mobi) 2010-10-23 07:50:26 +00:00
Michael Kaufmann (d00p)
8b3c634652 minor work on multiserver-client-deployment 2010-10-22 21:29:47 +00:00
Andreas Burchert (scarya)
26084a19fa - replaced die() with throw new Exception() 2010-10-21 08:59:46 +00:00
Andreas Burchert (scarya)
84637d82d4 - updated demousage
- updated FroxlorPkgCreator (fix for manual added files)
- first cron version for remote server data deploying
2010-10-20 21:33:39 +00:00
Andreas Burchert (scarya)
7a83a01095 - added function to FroxlorPkgCreator::addFile($name, $data) 2010-10-20 21:09:52 +00:00
Andreas Burchert (scarya)
71d3410b4f - added exlude dir variable to DfC
- updated demousage
2010-10-20 20:54:57 +00:00
Andreas Burchert (scarya)
b58a9d3b88 - add support for multiple directories 2010-10-20 20:29:47 +00:00
Andreas Burchert (scarya)
05897c3e01 - fix in FroxlorPkgCreator::pack() (better file name, path fix)
- added FroxlorDeployfileCreator
2010-10-20 19:47:31 +00:00
Andreas Burchert (scarya)
a06211b497 - description fix in FroxlorSshTransport
- added FroxlorPkgCreator
2010-10-20 19:07:51 +00:00
Michael Kaufmann (d00p)
db2cca8e86 - add a few images to beautify multiserver-client overview 2010-10-20 13:00:30 +00:00
Michael Kaufmann (d00p)
aa5e574d5d - more work on multiserver-client settings 2010-10-20 11:41:43 +00:00
Michael Kaufmann (d00p)
09c5bbcb63 - more work in multiserver-client-settings (save-methods) 2010-10-20 10:05:54 +00:00
Michael Kaufmann (d00p)
cadab96bae - set server-id parameter for inserttask in customer_ftp.php
- call inserttask in admin_clients::deploy
2010-10-20 09:12:21 +00:00
Michael Kaufmann (d00p)
0c9ab91373 - added multiserver-client-deploy-cron
- outsourcing Deploy() function from froxlorclient to client_deployer
2010-10-20 09:01:34 +00:00
Michael Kaufmann (d00p)
836b7fb056 - correct links on client-settings page
- added new server_id parameter to buildFormEx, so getFormGroupOutput will use the correct template (with correct links)
2010-10-20 07:40:34 +00:00
Michael Kaufmann (d00p)
d3fd4ee2f4 - more work on froxlor-client settings (multiserver mode) 2010-10-19 20:42:55 +00:00
Michael Kaufmann (d00p)
58499a068f - added "deploy" menu to Froxlor-client (multiserver-support) 2010-10-19 19:50:20 +00:00
Michael Kaufmann (d00p)
ce83e8f92b - chown newly created awstats-directory when new domain has been created, fixes #258 2010-10-19 19:32:53 +00:00
Michael Kaufmann (d00p)
fc5aea1c33 - implement multiserver-client edit
- fix various undefined variables
2010-10-19 16:07:48 +00:00
Michael Kaufmann (d00p)
89bf0aa128 - finish adding of multiserver-clients 2010-10-19 15:05:19 +00:00
Michael Kaufmann (d00p)
b2ea0cb666 - added form to add new froxlor-clients (no deploy etc.)
- implemented function to return all active client-id's for inserttask-function (task for all clients+master)
2010-10-19 14:35:33 +00:00
Andreas Burchert (scarya)
c0b19fa2b2 - small fix in if condition for scp/sftp switch 2010-10-19 09:20:32 +00:00
Michael Kaufmann (d00p)
9e028ef0f7 - use correct heading for mysql-editing-form, fixes #444 2010-10-19 08:29:24 +00:00
Michael Kaufmann (d00p)
a8460b7570 - fix loading of settings in case of older Froxlor versions which do not support multiserver-mode 2010-10-19 08:10:22 +00:00
Michael Kaufmann (d00p)
f42fa0ee7b few minor changes for multiserver-support 2010-10-18 11:34:19 +00:00
Michael Kaufmann (d00p)
8d27f71cee admin_ipsandports.php does not need a server_id (multiserver-support) yet 2010-10-18 10:44:14 +00:00
Michael Kaufmann (d00p)
3a9813c1b5 - removing deprecated legacy_cron entry from database
- minor changes for multiserver-support
2010-10-18 09:48:26 +00:00
Michael Kaufmann (d00p)
699f451234 - more work on settings for FroxlorClients (upcoming multiserver-mode) 2010-10-18 09:20:17 +00:00
Michael Kaufmann (d00p)
cad3c02f08 forgot to save the file :) 2010-10-18 07:55:47 +00:00
Michael Kaufmann (d00p)
7484ab1bc9 - added functions to get/set client settings
- added function for deployment of FroxlorClients
2010-10-18 07:48:54 +00:00
Michael Kaufmann (d00p)
8f87aa6636 - added class for FroxlorClients
- added admin_clients.php file for managing FroxlorClients 
- added Multiserver-Menu 
(unfinished, just base-layout for further developing, disabled by hardcoded setting)
2010-10-18 06:49:06 +00:00
Andreas Burchert (scarya)
15486ed764 - added destructor for FroxlorSshTransport
- added a fix for close() operation to prevent missing file writing on remote disk
- added a switch for scp/sftp to sendFile
2010-10-17 20:46:39 +00:00
Michael Kaufmann (d00p)
118693471c - correct sql-query in update to drop table, fixes #440
- use correct language-variable for ips-and-ports docroot-setting, fixes #441
2010-10-17 02:01:18 +00:00
Michael Kaufmann (d00p)
382bd88344 - prepare inserttask()-function for multiserver-support 2010-10-17 01:44:58 +00:00
Andreas Burchert (scarya)
2a4d618bcc - fixed eol-style 2010-10-17 00:32:41 +00:00
Andreas Burchert (scarya)
14b56d9287 - fixed eol-style from FroxlorSshTransport
- added a demo usage script for FroxlorSshTransport
2010-10-17 00:29:04 +00:00
Florian Aders (EleRas)
ba35677cf6 Hint for removed stuff 2010-10-16 23:59:36 +00:00
Andreas Burchert (scarya)
c4723fc3f2 - added FroxlorSshTransport for upcoming multiserver-support 2010-10-16 23:31:38 +00:00
Michael Kaufmann (d00p)
3aff47d983 - first commit for upcoming multiserver-support :) 2010-10-16 20:00:24 +00:00
Michael Kaufmann (d00p)
9fe6db8cd9 - forgot to add setting for SSLCertificateChainFile to the settings-array, refs #418 2010-10-15 11:55:28 +00:00
Michael Kaufmann (d00p)
15a03f63a9 - only use makeCorrectFile() on SSLCertificateChainFile if not empty 2010-10-15 11:51:15 +00:00
Michael Kaufmann (d00p)
d7b5c4bc71 - added possibility to allow customer to login with their domain-name, fixes #374 2010-10-15 11:48:05 +00:00
Michael Kaufmann (d00p)
db05ea5f32 - added possibility to set a custom docroot for any ip/port combination, fixes #417
- sort vhosts-file by type (subdomain, sub-of-main, main-domain), fixes #437
2010-10-15 10:41:58 +00:00
Michael Kaufmann (d00p)
ceedab3a6e - put enable/disable ssl in the settings overview
- added SSLCertificateChainFile to IPs and ports and webserver-cron, fixes #418
- added domain-specific ssl-settings for lighttpd
2010-10-15 08:32:35 +00:00
Michael Kaufmann (d00p)
0b6bb64600 - fix loop-in-loop effect when calculating traffic with awstats, fixes #246 2010-10-15 07:32:16 +00:00
Michael Kaufmann (d00p)
2985a08a8d - add awstats-icon alias to vhost-content, fixes #257
- removing unnecessary (and partly wrong) language-file entries
2010-10-15 06:50:25 +00:00
Michael Kaufmann (d00p)
a1b26c91d2 small dkim-filter.conf-fixes; refs #384
OMG OMG OMG this commit is LEET :) - wohoooo
2010-10-14 06:52:35 +00:00
Michael Kaufmann (d00p)
7d54744e9a - add DKIM-milter install/configuration instructions for Debian/Ubuntu, fixes #384 2010-10-14 06:49:05 +00:00
Michael Kaufmann (d00p)
7afc7e2797 - show correct values on update-counters overview (subdomains had the used-tickets value) 2010-10-12 06:50:28 +00:00
Michael Kaufmann (d00p)
8d1f894622 - set used-ticket-cycle on update too
- setting version to 0.9.14-svn2
2010-10-12 06:32:29 +00:00
Michael Kaufmann (d00p)
3f0a491f8c - set used-ticket-cycle directly as INTERVAL for the cronjob 2010-10-12 06:21:08 +00:00
Michael Kaufmann (d00p)
9787089615 . remove customers htaccess/diroptions after deleting the customer, refs #424 2010-10-11 08:44:24 +00:00
Michael Kaufmann (d00p)
076c07b4be add aps-packages to the updateCounters() function and recalculate resources overview, fixes #425 2010-10-10 11:37:49 +00:00
Michael Kaufmann (d00p)
6887dad1a9 - fixed misspelling in german language-file, fixes #434 2010-10-10 10:50:56 +00:00
Michael Kaufmann (d00p)
5fee795b5c - set correct config for special-characters (umlauts) in HTMLPurifier, refs #129 2010-10-10 08:20:32 +00:00
Michael Kaufmann (d00p)
146c205f6c - updated italian language file, thx to Emilien 2010-10-08 10:13:23 +00:00
Michael Kaufmann (d00p)
5c87e2210c - be sure customer-docroot-prefix is never the same or within the fcgid-configurations-folder 2010-10-05 20:25:52 +00:00
Michael Kaufmann (d00p)
db6bdfd931 - always check that HTMLPurifier's cache folder is writable 2010-10-05 20:24:08 +00:00
Michael Kaufmann (d00p)
b796f02a3d - add note to fcgid-config-dir setting that this folders gets cleaned on every cronrun 2010-10-04 12:20:10 +00:00
1340 changed files with 78132 additions and 19973 deletions

10
.gitignore vendored Normal file
View File

@@ -0,0 +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

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

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* @version $Id$
*
*/
return array(
@@ -32,6 +32,32 @@ return array(
'option_options_method' => 'getLanguages',
'save_method' => 'storeSettingField',
),
'panel_default_theme' => array(
'label' => array('title' => $lng['panel']['theme'], 'description' => $lng['serversettings']['default_theme']),
'settinggroup' => 'panel',
'varname' => 'default_theme',
'type' => 'option',
'default' => 'Froxlor',
'option_mode' => 'one',
'option_options_method' => 'getThemes',
'save_method' => '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',
@@ -64,7 +90,24 @@ return array(
'type' => 'option',
'default' => 'Manual',
'option_mode' => 'one',
'option_options' => array('Manual' => 'Manual', 'Dropdown' => 'Dropdown'),
'option_options' => array('Manual' => $lng['serversettings']['manual'], 'Dropdown' => $lng['serversettings']['dropdown']),
'save_method' => 'storeSettingField',
),
'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(
@@ -151,14 +194,6 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
),
'admin_froxlor_graphic' => array(
'label' => $lng['admin']['froxlor_graphic'],
'settinggroup' => 'admin',
'varname' => 'froxlor_graphic',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'panel_allow_domain_change_admin' => array(
'label' => $lng['serversettings']['panel_allow_domain_change_admin'],
'settinggroup' => 'panel',
@@ -175,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

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -38,6 +38,14 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
),
'login_domain_login' => array(
'label' => $lng['serversettings']['login_domain_login'],
'settinggroup' => 'login',
'varname' => 'domain_login',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'login_maxloginattempts' => array(
'label' => $lng['serversettings']['maxloginattempts'],
'settinggroup' => 'login',

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -27,8 +27,18 @@ return array(
'settinggroup' => 'system',
'varname' => 'documentroot_prefix',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/customers/webs/',
'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'],
@@ -57,6 +67,7 @@ return array(
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingHostname',
'plausibility_check_method' => 'checkHostname',
),
'system_froxlordirectlyviahostname' => array(
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
@@ -66,6 +77,14 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
),
'system_validatedomain' => array(
'label' => $lng['serversettings']['validate_domain'],
'settinggroup' => 'system',
'varname' => 'validate_domain',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'system_stdsubdomain' => array(
'label' => $lng['serversettings']['stdsubdomainhost'],
'settinggroup' => 'system',
@@ -83,15 +102,6 @@ return array(
'plausibility_check_method' => 'checkMysqlAccessHost',
'save_method' => 'storeSettingMysqlAccessHost',
),
'system_realtime_port' => array(
'label' => $lng['serversettings']['system_realtime_port'],
'settinggroup' => 'system',
'varname' => 'realtime_port',
'type' => (function_exists('socket_create') ? 'int' : 'hidden'),
'int_max' => 65535,
'default' => 0,
'save_method' => 'storeSettingField',
),
'system_index_file_extension' => array(
'label' => $lng['serversettings']['index_file_extension'],
'settinggroup' => 'system',
@@ -109,6 +119,47 @@ return array(
'default' => true,
'save_method' => 'storeSettingField',
),
'system_httpuser' => array(
'settinggroup' => 'system',
'varname' => 'httpuser',
'type' => 'hidden',
'default' => 'www-data',
),
'system_httpgroup' => array(
'settinggroup' => 'system',
'varname' => 'httpgroup',
'type' => 'hidden',
'default' => 'www-data',
),
'system_report_enable' => array(
'label' => $lng['serversettings']['report']['report'],
'settinggroup' => 'system',
'varname' => 'report_enable',
'type' => 'bool',
'default' => true,
'cronmodule' => 'froxlor/reports',
'save_method' => 'storeSettingField',
),
'system_report_webmax' => array(
'label' => $lng['serversettings']['report']['webmax'],
'settinggroup' => 'system',
'varname' => 'report_webmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 150,
'default' => 90,
'save_method' => 'storeSettingField',
),
'system_report_trafficmax' => array(
'label' => $lng['serversettings']['report']['trafficmax'],
'settinggroup' => 'system',
'varname' => 'report_trafficmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 150,
'default' => 90,
'save_method' => 'storeSettingField',
),
'system_debug_cron' => array(
'label' => $lng['serversettings']['cron']['debug'],
'settinggroup' => 'system',
@@ -116,10 +167,10 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
),
),
),
),
);
?>
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -27,12 +27,21 @@ return array(
'settinggroup' => 'system',
'varname' => 'webserver',
'type' => 'option',
'default' => 'Apache2',
'default' => 'apache2',
'option_mode' => 'one',
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd'),
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd', 'nginx' => 'Nginx'),
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_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',
@@ -76,22 +85,6 @@ return array(
'default' => '/etc/apache2/htpasswd/',
'save_method' => 'storeSettingField',
),
'system_apachereload_command' => array(
'label' => $lng['serversettings']['apachereload_command'],
'settinggroup' => 'system',
'varname' => 'apachereload_command',
'type' => 'string',
'default' => '/etc/init.d/apache2 reload',
'save_method' => 'storeSettingField',
),
'system_mod_log_sql' => array(
'label' => $lng['serversettings']['mod_log_sql'],
'settinggroup' => 'system',
'varname' => 'mod_log_sql',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_logfiles_directory' => array(
'label' => $lng['serversettings']['logfiles_directory'],
'settinggroup' => 'system',
@@ -101,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',
@@ -128,6 +130,42 @@ return array(
'default' => '',
'save_method' => 'storeSettingField',
),
'system_apachereload_command' => array(
'label' => $lng['serversettings']['apachereload_command'],
'settinggroup' => 'system',
'varname' => 'apachereload_command',
'type' => 'string',
'default' => '/etc/init.d/apache2 reload',
'save_method' => 'storeSettingField',
),
'system_phpreload_command' => array(
'label' => $lng['serversettings']['phpreload_command'],
'settinggroup' => 'system',
'varname' => 'phpreload_command',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'system_nginx_php_backend' => array(
'label' => $lng['serversettings']['nginx_php_backend'],
'settinggroup' => 'system',
'varname' => 'nginx_php_backend',
'type' => 'string',
'default' => '127.0.0.1:8888',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'nginx_fastcgiparams' => array(
'label' => $lng['serversettings']['nginx_fastcgiparams'],
'settinggroup' => 'nginx',
'varname' => 'fastcgiparams',
'type' => 'string',
'string_type' => 'file',
'default' => '/etc/nginx/fastcgi_params',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'defaultwebsrverrhandler_enabled' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
'settinggroup' => 'defaultwebsrverrhandler',
@@ -143,6 +181,7 @@ return array(
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'defaultwebsrverrhandler_err403' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
@@ -151,6 +190,7 @@ return array(
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'defaultwebsrverrhandler_err404' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
@@ -167,6 +207,7 @@ return array(
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'customredirect_enabled' => array(
'label' => $lng['serversettings']['customredirect_enabled'],
@@ -175,6 +216,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'lighttpd')
),
'customredirect_default' => array(
'label' => $lng['serversettings']['customredirect_default'],
@@ -185,61 +227,9 @@ return array(
'option_mode' => 'one',
'option_options_method' => 'getRedirectCodes',
'save_method' => 'storeSettingField',
),
),
),
'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',
),
'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_openssl_cnf' => array(
'label' => $lng['serversettings']['ssl']['openssl_cnf'],
'settinggroup' => 'system',
'varname' => 'openssl_cnf',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
),
),
),
),
'websrv_avail' => array('apache2', 'lighttpd')
)
)
)
)
);
?>

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

@@ -12,13 +12,14 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
'groups' => array(
'fcgid' => array(
'title' => $lng['admin']['fcgid_settings'],
'websrv_avail' => array('apache2', 'lighttpd'),
'fields' => array(
'system_mod_fcgid_enabled' => array(
'label' => $lng['serversettings']['mod_fcgid'],
@@ -27,8 +28,9 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkFcgidPhpFpm',
'overview_option' => true
),
),
'system_mod_fcgid_configdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
'settinggroup' => 'system',
@@ -36,6 +38,7 @@ return array(
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/www/php-fcgi-scripts/',
'plausibility_check_method' => 'checkPathConflicts',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_tmpdir' => array(
@@ -63,9 +66,10 @@ 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')
),
'system_mod_fcgid_starter' => array(
'label' => $lng['serversettings']['mod_fcgid']['starter'],
@@ -100,6 +104,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_httpuser' => array(
'label' => $lng['admin']['mod_fcgid_user'],
@@ -108,6 +113,7 @@ return array(
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_httpgroup' => array(
'label' => $lng['admin']['mod_fcgid_group'],
@@ -116,6 +122,7 @@ return array(
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
@@ -126,6 +133,15 @@ return array(
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'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

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

@@ -12,7 +12,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -27,6 +27,7 @@ return array(
'type' => 'string',
'default' => '/usr/bin/perl',
'save_method' => 'storeSettingField',
'websrv_avail' => array('lighttpd')
),
'system_perl_suexecworkaround' => array(
'label' => $lng['serversettings']['perl']['suexecworkaround'],
@@ -35,14 +36,26 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_perl_suexeccgipath' => array(
'label' => $lng['serversettings']['perl']['suexeccgipath'],
'settinggroup' => 'perl',
'varname' => 'suexecpath',
'type' => 'string',
'string_type' => 'dir',
'default' => '/var/www/cgi-bin/',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'perl_server' => array(
'label' => $lng['serversettings']['perl_server'],
'settinggroup' => 'serversettings',
'varname' => 'perl_server',
'type' => 'string',
'default' => 'unix:/var/run/nginx/cgiwrap-dispatch.sock',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
),
),

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -66,6 +66,15 @@ return array(
'string_type' => 'dir',
'default' => '/etc/awstats/',
'save_method' => 'storeSettingField',
),
'system_awstats_icons' => array(
'label' => $lng['serversettings']['awstats_icons'],
'settinggroup' => 'system',
'varname' => 'awstats_icons',
'type' => 'string',
'string_type' => 'dir',
'default' => '/usr/share/awstats/icon/',
'save_method' => 'storeSettingField',
)
)
)

View File

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

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id: 220.ftpserver.php 1 2010-04-07 10:00:00Z monotek $
*
*/
return array(

View File

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

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

View File

@@ -14,9 +14,11 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
global $settings;
return array(
'groups' => array(
'dkim' => array(
@@ -36,6 +38,7 @@ return array(
'settinggroup' => 'dkim',
'varname' => 'dkim_prefix',
'type' => 'string',
'string_type' => 'dir',
'default' => '/etc/postfix/dkim/',
'save_method' => 'storeSettingField',
),
@@ -78,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

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

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @version $Id$
*
*/
return array(
@@ -58,6 +58,7 @@ return array(
'option_mode' => 'one',
'option_options' => array(0 => html_entity_decode($lng['admin']['tickets']['daily']), 1 => html_entity_decode($lng['admin']['tickets']['weekly']), 2 => html_entity_decode($lng['admin']['tickets']['monthly']), 3 => html_entity_decode($lng['admin']['tickets']['yearly'])),
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'setCycleOfCronjob',
),
'ticket_concurrently_open' => array(
'label' => $lng['serversettings']['ticket']['concurrentlyopen'],
@@ -132,7 +133,7 @@ return array(
'type' => 'option',
'default' => 2,
'option_mode' => 'one',
'option_options' => array(1 => $lng['ticket']['unf_high'], 2 => $lng['ticket']['unf_normal'], 3 => $lng['ticket']['unf_low']),
'option_options' => array(1 => $lng['ticket']['high'], 2 => $lng['ticket']['normal'], 3 => $lng['ticket']['low']),
'save_method' => 'storeSettingField',
),
),
@@ -140,4 +141,4 @@ return array(
)
);
?>
?>

View File

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

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

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

View File

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

View File

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

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -47,24 +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']);
@@ -86,6 +68,29 @@ if($page == 'admins'
$row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
$row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
/**
* percent-values for progressbar
*/
//For Disk usage
if ($row['diskspace'] > 0) {
$disk_percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
$disk_doublepercent = round($disk_percent*2, 2);
} else {
$disk_percent = 0;
$disk_doublepercent = 0;
}
//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');
$row = htmlentities_array($row);
eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";");
@@ -266,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
{
@@ -274,10 +279,21 @@ if($page == 'admins'
$can_manage_aps_packages = 0;
}
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = intval($_POST['change_serversettings']);
$customers_see_all = 0;
if(isset($_POST['customers_see_all']))
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = 0;
if(isset($_POST['domains_see_all']))
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = 0;
if(isset($_POST['caneditphpsettings']))
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = 0;
if(isset($_POST['change_serversettings']))
$change_serversettings = intval($_POST['change_serversettings']);
$diskspace = intval_ressource($_POST['diskspace']);
@@ -293,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']);
@@ -360,8 +380,43 @@ if($page == 'admins'
$change_serversettings = '0';
}
$result = $db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` (`loginname`, `password`, `name`, `email`, `def_language`, `change_serversettings`, `customers`, `customers_see_all`, `domains`, `domains_see_all`, `caneditphpsettings`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `ip`, `can_manage_aps_packages`, `aps_packages`, `email_autoresponder`)
VALUES ('" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($email) . "','" . $db->escape($def_language) . "', '" . $db->escape($change_serversettings) . "', '" . $db->escape($customers) . "', '" . $db->escape($customers_see_all) . "', '" . $db->escape($domains) . "', '" . $db->escape($domains_see_all) . "', '" . (int)$caneditphpsettings . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '" . (int)$ipaddress . "', " . (int)$can_manage_aps_packages . ", " . (int)$number_of_aps_packages . ", " . $db->escape($email_autoresponder) . ")");
if ($tickets_see_all != '1') {
$tickets_see_all = '0';
}
$_theme = $settings['panel']['default_theme'];
$result = $db->query("INSERT INTO
`" . TABLE_PANEL_ADMINS . "`
SET
`loginname` = '" . $db->escape($loginname) . "',
`password` = '" . md5($password) . "',
`name` = '" . $db->escape($name) . "',
`email` = '" . $db->escape($email) . "',
`def_language` = '" . $db->escape($def_language) . "',
`change_serversettings` = '" . $db->escape($change_serversettings) . "',
`customers` = '" . $db->escape($customers) . "',
`customers_see_all` = '" . $db->escape($customers_see_all) . "',
`domains` = '" . $db->escape($domains) . "',
`domains_see_all` = '" . $db->escape($domains_see_all) . "',
`caneditphpsettings` = '" . (int)$caneditphpsettings . "',
`diskspace` = '" . $db->escape($diskspace) . "',
`traffic` = '" . $db->escape($traffic) . "',
`subdomains` = '" . $db->escape($subdomains) . "',
`emails` = '" . $db->escape($emails) . "',
`email_accounts` = '" . $db->escape($email_accounts) . "',
`email_forwarders` = '" . $db->escape($email_forwarders) . "',
`email_quota` = '" . $db->escape($email_quota) . "',
`ftps` = '" . $db->escape($ftps) . "',
`tickets` = '" . $db->escape($tickets) . "',
`tickets_see_all` = '" . $db->escape($tickets_see_all) . "',
`mysqls` = '" . $db->escape($mysqls) . "',
`ip` = '" . (int)$ipaddress . "',
`can_manage_aps_packages` = '" . (int)$can_manage_aps_packages . "',
`aps_packages` = '" . (int)$number_of_aps_packages . "',
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
`theme` = '".$db->escape($_theme)."';
");
$adminid = $db->insert_id();
$log->logAction(ADM_ACTION, LOG_INFO, "added admin '" . $loginname . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -407,13 +462,21 @@ 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');
*/
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$admin_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_add.php';
$admin_add_form = htmlform::genHTMLForm($admin_add_data);
$title = $admin_add_data['admin_add']['title'];
$image = $admin_add_data['admin_add']['image'];
eval("echo \"" . getTemplate("admins/admins_add") . "\";");
}
}
@@ -446,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'];
@@ -460,130 +524,113 @@ 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;
}
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = intval($_POST['change_serversettings']);
$can_manage_aps_packages = intval($_POST['can_manage_aps_packages']);
$customers_see_all = 0;
if(isset($_POST['customers_see_all']))
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = 0;
if(isset($_POST['domains_see_all']))
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = 0;
if(isset($_POST['caneditphpsettings']))
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = 0;
if(isset($_POST['change_serversettings']))
$change_serversettings = isset($_POST['change_serversettings']) ? 1 : 0;
$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;
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;
@@ -640,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,
@@ -778,14 +906,22 @@ 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']);
*/
$result = htmlentities_array($result);
$admin_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_edit.php';
$admin_edit_form = htmlform::genHTMLForm($admin_edit_data);
$title = $admin_edit_data['admin_edit']['title'];
$image = $admin_edit_data['admin_edit']['image'];
eval("echo \"" . getTemplate("admins/admins_edit") . "\";");
}
}

View File

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

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -96,8 +96,9 @@ if($userinfo['change_serversettings'] == '1')
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
'<REALTIME_PORT>' => $settings['system']['realtime_port'],
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : '/tmp/'
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : '/tmp/',
'<BASE_PATH>' => makeCorrectDir(dirname(__FILE__)),
'<BIND_CONFIG_PATH>' => makeCorrectDir($settings['system']['bindconf_directory'])
);
$files = '';
$configpage = '';

View File

@@ -12,28 +12,21 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
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,102 +49,81 @@ 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;
}
eval("echo \"" . getTemplate("cronjobs/cronjob_edit") . "\";");
$cronjobs_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php';
$cronjobs_edit_form = htmlform::genHTMLForm($cronjobs_edit_data);
$title = $cronjobs_edit_data['cronjobs_edit']['title'];
$image = $cronjobs_edit_data['cronjobs_edit']['image'];
eval("echo \"" . getTemplate('cronjobs/cronjob_edit') . "\";");
}
}
}
elseif($action == 'delete'
&& $id != 0)
{
elseif ($action == 'delete' && $id != 0) {
/*
* @TODO later
*/
}
}
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -40,52 +40,30 @@ if($page == 'customers'
{
if($action == '')
{
// clear request data
unset($_SESSION['requestData']);
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_customers");
$fields = array(
'c.loginname' => $lng['login']['username'],
'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.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['autoresponder']['autoresponder_active'] == 1)
{
$fields['c.email_autoresponder'] = $lng['customer']['autoresponder'];
$fields['c.email_autoresponder_used'] = $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')';
if ($settings['system']['backup_enabled'] == '1') {
$field['c.backup_allowed'] = $lng['backup_allowed'];
}
$paging = new paging($userinfo, $db, TABLE_PANEL_CUSTOMERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$customers = '';
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy($settings['panel']['natsorting']) . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng, true);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -106,11 +84,33 @@ if($page == 'customers'
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
$last_login = ((int)$row['lastlogin_succ'] == 0) ? $lng['panel']['neverloggedin'] : date('d.m.Y', $row['lastlogin_succ']);
/**
* percent-values for progressbar
*/
//For Disk usage
if ($row['diskspace'] > 0) {
$disk_percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
$disk_doublepercent = round($disk_percent*2, 2);
} else {
$disk_percent = 0;
$disk_doublepercent = 0;
}
if ($row['traffic'] > 0) {
$traffic_percent = round(($row['traffic_used']*100)/$row['traffic'], 2);
$traffic_doublepercent = round($traffic_percent*2, 2);
} else {
$traffic_percent = 0;
$traffic_doublepercent = 0;
}
$column_style = '';
$unlock_link = '';
if($row['loginfail_count'] >= $settings['login']['maxloginattempts']
&& $row['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
) {
$column_style = ' style="background-color: #f99122;"';
$unlock_link = '<a href="'.$filename.'?s='.$s.'&amp;page='.$page.'&amp;action=unlock&amp;id='.$row['customerid'].'">'.$lng['panel']['unlock'].'</a><br />';
}
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains email_autoresponder');
@@ -133,17 +133,45 @@ 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
{
redirectTo('index.php', Array('action' => 'login'));
}
}
elseif($action == 'unlock'
&& $id != 0)
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$id . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . $db->escape($userinfo['adminid']) . "' "));
if($result['loginname'] != '')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
$result = $db->query("UPDATE
`" . TABLE_PANEL_CUSTOMERS . "`
SET
`loginfail_count` = '0'
WHERE
`customerid`= '" . (int)$id . "'"
);
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
{
ask_yesno('customer_reallyunlock', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['loginname']);
}
}
}
elseif($action == 'delete'
&& $id != 0)
{
@@ -156,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))
@@ -166,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) . '`');
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($row_database['databasename']) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"');
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
$db_root->query('DROP USER \'' . $db_root->escape($row_database['databasename']). '\'@\'' . $db_root->escape($host['Host']) . '\'', false, true);
}
$db_root->query('DROP DATABASE IF EXISTS `' . $db_root->escape($row_database['databasename']) . '`');
@@ -188,6 +219,7 @@ if($page == 'customers'
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$id . "'");
$domains_deleted = $db->affected_rows();
$db->query("DELETE FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$id . "' AND `adminsession` = '0'");
$db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int)$id . "'");
@@ -212,7 +244,7 @@ if($page == 'customers'
// remove all package related settings
$db->query("DELETE FROM `".TABLE_APS_SETTINGS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
// maybe some leftovers in the tasks
$db->query("DELETE FROM `".TABLE_APS_TASKS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
$db->query("DELETE FROM `".TABLE_APS_TASKS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
}
// now remove all user instances
$db->query("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
@@ -250,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')
@@ -270,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')
@@ -282,14 +314,19 @@ 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
inserttask('10');
/*
* move old tickets to archive
*/
@@ -307,8 +344,8 @@ if($page == 'customers'
$mainticket->Archive();
$log->logAction(ADM_ACTION, LOG_NOTICE, "archived ticket '" . $mainticket->Get('subject') . "'");
}
}
}
redirectTo($filename, Array('page' => $page, 's' => $s));
}
else
@@ -337,6 +374,7 @@ if($page == 'customers'
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
$def_language = validate($_POST['def_language'], 'default language');
$diskspace = intval_ressource($_POST['diskspace']);
$gender = intval_ressource($_POST['gender']);
if(isset($_POST['diskspace_ul']))
{
@@ -391,7 +429,7 @@ if($page == 'customers'
{
$email_quota = - 1;
}
if($settings['autoresponder']['autoresponder_active'] == '1')
{
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
@@ -406,9 +444,17 @@ if($page == 'customers'
$email_autoresponder = 0;
}
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = intval_ressource($_POST['ftps']);
$email_imap = 0;
if(isset($_POST['email_imap']))
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = 0;
if(isset($_POST['email_pop3']))
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = 0;
if(isset($_POST['ftps']))
$ftps = intval_ressource($_POST['ftps']);
if(isset($_POST['ftps_ul']))
{
@@ -444,13 +490,47 @@ if($page == 'customers'
$number_of_aps_packages = 0;
}
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$createstdsubdomain = 0;
if(isset($_POST['createstdsubdomain']))
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$password = validate($_POST['new_customer_password'], 'password');
$password = validatePassword($password);
$sendpassword = intval($_POST['sendpassword']);
$phpenabled = intval($_POST['phpenabled']);
$perlenabled = intval($_POST['perlenabled']);
$store_defaultindex = intval($_POST['store_defaultindex']);
// only check if not empty,
// cause empty == generate password automatically
if($password != '')
{
$password = validatePassword($password);
}
$backup_allowed = 0;
if(isset($_POST['backup_allowed']))
$backup_allowed = intval($_POST['backup_allowed']);
if ($backup_allowed != 0)
{
$backup_allowed = 1;
}
// gender out of range? [0,2]
if ($gender < 0 || $gender > 2) {
$gender = 0;
}
$sendpassword = 0;
if(isset($_POST['sendpassword']))
$sendpassword = intval($_POST['sendpassword']);
$phpenabled = 0;
if(isset($_POST['phpenabled']))
$phpenabled = intval($_POST['phpenabled']);
$perlenabled = 0;
if(isset($_POST['perlenabled']))
$perlenabled = intval($_POST['perlenabled']);
$store_defaultindex = 0;
if(isset($_POST['store_defaultindex']))
$store_defaultindex = intval($_POST['store_defaultindex']);
$diskspace = $diskspace * 1024;
$traffic = $traffic * 1024 * 1024;
@@ -515,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
{
@@ -565,7 +650,47 @@ if($page == 'customers'
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
}
$result = $db->query("INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` (`adminid`, `loginname`, `password`, `name`, `firstname`, `company`, `street`, `zipcode`, `city`, `phone`, `fax`, `email`, `customernumber`, `def_language`, `documentroot`, `guid`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `standardsubdomain`, `phpenabled`, `imap`, `pop3`, `aps_packages`, `perlenabled`, `email_autoresponder`) VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($firstname) . "', '" . $db->escape($company) . "', '" . $db->escape($street) . "', '" . $db->escape($zipcode) . "', '" . $db->escape($city) . "', '" . $db->escape($phone) . "', '" . $db->escape($fax) . "', '" . $db->escape($email) . "', '" . $db->escape($customernumber) . "','" . $db->escape($def_language) . "', '" . $db->escape($documentroot) . "', '" . $db->escape($guid) . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '0', '" . $db->escape($phpenabled) . "', '" . $db->escape($email_imap) . "', '" . $db->escape($email_pop3) . "', '" . (int)$number_of_aps_packages . "', '" . $db->escape($perlenabled) . "', '" . $db->escape($email_autoresponder) . "')");
$_theme = $settings['panel']['default_theme'];
$result = $db->query(
"INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` SET
`adminid` = '" . (int)$userinfo['adminid'] . "',
`loginname` = '" . $db->escape($loginname) . "',
`password` = '" . md5($password) . "',
`name` = '" . $db->escape($name) . "',
`firstname` = '" . $db->escape($firstname) . "',
`gender` = '" . (int)$gender . "',
`company` = '" . $db->escape($company) . "',
`street` = '" . $db->escape($street) . "',
`zipcode` = '" . $db->escape($zipcode) . "',
`city` = '" . $db->escape($city) . "',
`phone` = '" . $db->escape($phone) . "',
`fax` = '" . $db->escape($fax) . "',
`email` = '" . $db->escape($email) . "',
`customernumber` = '" . $db->escape($customernumber) . "',
`def_language` = '" . $db->escape($def_language) . "',
`documentroot` = '" . $db->escape($documentroot) . "',
`guid` = '" . $db->escape($guid) . "',
`diskspace` = '" . $db->escape($diskspace) . "',
`traffic` = '" . $db->escape($traffic) . "',
`subdomains` = '" . $db->escape($subdomains) . "',
`emails` = '" . $db->escape($emails) . "',
`email_accounts` = '" . $db->escape($email_accounts) . "',
`email_forwarders` = '" . $db->escape($email_forwarders) . "',
`email_quota` = '" . $db->escape($email_quota) . "',
`ftps` = '" . $db->escape($ftps) . "',
`tickets` = '" . $db->escape($tickets) . "',
`mysqls` = '" . $db->escape($mysqls) . "',
`standardsubdomain` = '0',
`phpenabled` = '" . $db->escape($phpenabled) . "',
`imap` = '" . $db->escape($email_imap) . "',
`pop3` = '" . $db->escape($email_pop3) . "',
`aps_packages` = '" . (int)$number_of_aps_packages . "',
`perlenabled` = '" . $db->escape($perlenabled) . "',
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
`backup_allowed` = '" . $db->escape($backup_allowed) . "',
`theme` = '" . $db->escape($_theme) . "'"
);
$customerid = $db->insert_id();
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` + 1";
@@ -638,8 +763,10 @@ if($page == 'customers'
$log->logAction(ADM_ACTION, LOG_INFO, "added user '" . $loginname . "'");
inserttask('2', $loginname, $guid, $guid, $store_defaultindex);
// 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);
@@ -662,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 . "'");
@@ -679,18 +807,17 @@ if($page == 'customers'
$_stdsubdomain = $loginname . '.' . $settings['system']['hostname'];
}
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
"`domain` = '". $db->escape($_stdsubdomain) . "', " .
"`customerid` = '" . (int)$customerid . "', " .
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
"`parentdomainid` = '-1', " .
"`ipandport` = '" . $db->escape($settings['system']['defaultip']) . "', " .
"`documentroot` = '" . $db->escape($documentroot) . "', " .
"`ipandport` = '" . $db->escape($settings['system']['defaultip']) . "', " .
"`documentroot` = '" . $db->escape($documentroot) . "', " .
"`zonefile` = '', " .
"`isemaildomain` = '0', " .
"`caneditdomain` = '0', " .
"`caneditdomain` = '0', " .
"`openbasedir` = '1', " .
"`safemode` = '1', " .
"`speciallogfile` = '0', " .
"`specialsettings` = '', " .
"`add_date` = '".date('Y-m-d')."'");
@@ -766,13 +893,17 @@ 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');
$gender_options = makeoption($lng['gender']['undef'], 0, true, true, true);
$gender_options .= makeoption($lng['gender']['male'], 1, null, true, true);
$gender_options .= makeoption($lng['gender']['female'], 2, null, true, true);
$customer_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_add.php';
$customer_add_form = htmlform::genHTMLForm($customer_add_data);
$title = $customer_add_data['customer_add']['title'];
$image = $customer_add_data['customer_add']['image'];
eval("echo \"" . getTemplate("customers/customers_add") . "\";");
}
}
@@ -800,6 +931,7 @@ if($page == 'customers'
$def_language = validate($_POST['def_language'], 'default language');
$password = validate($_POST['new_customer_password'], 'new password');
$diskspace = intval_ressource($_POST['diskspace']);
$gender = intval_ressource($_POST['gender']);
if(isset($_POST['diskspace_ul']))
{
@@ -867,11 +999,19 @@ if($page == 'customers'
else
{
$email_autoresponder = 0;
}
}
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = intval_ressource($_POST['ftps']);
$email_imap = 0;
if(isset($_POST['email_imap']))
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = 0;
if(isset($_POST['email_pop3']))
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = 0;
if(isset($_POST['ftps']))
$ftps = intval_ressource($_POST['ftps']);
if(isset($_POST['ftps_ul']))
{
@@ -886,7 +1026,22 @@ if($page == 'customers'
$tickets = - 1;
}
$mysqls = intval_ressource($_POST['mysqls']);
$backup_allowed = 0;
if (isset($_POST['backup_allowed']))
$backup_allowed = intval($_POST['backup_allowed']);
if($backup_allowed != '0'){
$backup_allowed = 1;
}
// gender out of range? [0,2]
if ($gender < 0 || $gender > 2) {
$gender = 0;
}
$mysqls = 0;
if(isset($_POST['mysqls']))
$mysqls = intval_ressource($_POST['mysqls']);
if(isset($_POST['mysqls_ul']))
{
@@ -894,7 +1049,7 @@ if($page == 'customers'
}
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']))
@@ -907,10 +1062,21 @@ if($page == 'customers'
$number_of_aps_packages = 0;
}
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$deactivated = intval($_POST['deactivated']);
$phpenabled = intval($_POST['phpenabled']);
$perlenabled = intval($_POST['perlenabled']);
$createstdsubdomain = 0;
if(isset($_POST['createstdsubdomain']))
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$deactivated = 0;
if(isset($_POST['deactivated']))
$deactivated = intval($_POST['deactivated']);
$phpenabled = 0;
if(isset($_POST['phpenabled']))
$phpenabled = intval($_POST['phpenabled']);
$perlenabled = 0;
if(isset($_POST['perlenabled']))
$perlenabled = intval($_POST['perlenabled']);
$diskspace = $diskspace * 1024;
$traffic = $traffic * 1024 * 1024;
@@ -991,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'] . "'");
@@ -1030,9 +1196,48 @@ 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'], '');
$last_dbserver = 0;
/* For each of them */
while($row_database = $db->fetch_array($databases))
{
if($last_dbserver != $row_database['dbserver'])
{
$db_root->query('FLUSH PRIVILEGES;');
$db_root->close();
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
$last_dbserver = $row_database['dbserver'];
}
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
{
$mysql_access_host = trim($mysql_access_host);
/* Prevent access, if deactivated */
if($deactivated)
{
// 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 */
{
$db_root->query('GRANT ALL PRIVILEGES ON `' . $db_root->escape($row_database['databasename']) .'`.* TO `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
$db_root->query('GRANT ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * TO `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
}
}
}
/* At last flush the new privileges */
$db_root->query('FLUSH PRIVILEGES;');
$db_root->close();
$log->logAction(ADM_ACTION, LOG_INFO, "deactivated user '" . $result['loginname'] . "'");
inserttask('1');
}
@@ -1051,9 +1256,13 @@ if($page == 'customers'
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `imap`='" . (int)$email_imap . "' WHERE `customerid`='" . (int)$id . "'");
}
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "' WHERE `customerid`='" . (int)$id . "'");
// $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "' WHERE `customerid`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `gender`='" . $db->escape($gender) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "', `backup_allowed`='" . $db->escape($backup_allowed) . "' WHERE `customerid`='" . (int)$id . "'");
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
// Using filesystem - quota, insert a task which cleans the filesystem - quota
inserttask('10');
if($mysqls != '-1'
|| $result['mysqls'] != '-1')
{
@@ -1337,14 +1546,18 @@ 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']);
$result = htmlentities_array($result);
$gender_options = makeoption($lng['gender']['undef'], 0, ($result['gender'] == '0' ? true : false), true, true);
$gender_options .= makeoption($lng['gender']['male'], 1, ($result['gender'] == '1' ? true : false), true, true);
$gender_options .= makeoption($lng['gender']['female'], 2, ($result['gender'] == '2' ? true : false), true, true);
$customer_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_edit.php';
$customer_edit_form = htmlform::genHTMLForm($customer_edit_data);
$title = $customer_edit_data['customer_edit']['title'];
$image = $customer_edit_data['customer_edit']['image'];
eval("echo \"" . getTemplate("customers/customers_edit") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -144,8 +144,8 @@ if($page == 'domains'
$alias_check = $db->query_first('SELECT COUNT(`id`) AS `count` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$id . '\'');
if($result['domain'] != ''
&& $alias_check['count'] == 0)
{
&& $alias_check['count'] == 0
) {
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
@@ -194,9 +194,15 @@ 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) {
standard_error('domains_cantdeletedomainwithaliases');
}
else
{
$showcheck = false;
@@ -224,10 +230,23 @@ if($page == 'domains'
$domain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['domain'], 'domain')));
$subcanemaildomain = intval($_POST['subcanemaildomain']);
$isemaildomain = 0;
if(isset($_POST['isemaildomain']))
$isemaildomain = intval($_POST['isemaildomain']);
$email_only = intval($_POST['email_only']);
$wwwserveralias = intval($_POST['wwwserveralias']);
$speciallogfile = intval($_POST['speciallogfile']);
$email_only = 0;
if(isset($_POST['email_only']))
$email_only = intval($_POST['email_only']);
$wwwserveralias = 0;
if(isset($_POST['wwwserveralias']))
$wwwserveralias = intval($_POST['wwwserveralias']);
$speciallogfile = 0;
if(isset($_POST['speciallogfile']))
$speciallogfile = intval($_POST['speciallogfile']);
$aliasdomain = intval($_POST['alias']);
$issubof = intval($_POST['issubof']);
$customerid = intval($_POST['customerid']);
@@ -257,13 +276,21 @@ if($page == 'domains'
}
$documentroot = $customer['documentroot'];
$registration_date = validate($_POST['registration_date'], 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));
$registration_date = trim($_POST['registration_date']);
$registration_date = validate($registration_date, 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));
if($userinfo['change_serversettings'] == '1')
{
$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']))
{
@@ -277,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'];
}
@@ -290,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';
@@ -303,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);
@@ -318,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';
}
@@ -331,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';
}
@@ -359,12 +408,15 @@ if($page == 'domains'
if($settings['system']['use_ssl'] == "1"
&& isset($_POST['ssl'])
&& isset($_POST['ssl_redirect'])
/*&& isset($_POST['ssl_redirect'])*/
&& isset($_POST['ssl_ipandport'])
&& $_POST['ssl'] != '0')
{
$ssl = (int)$_POST['ssl'];
$ssl_redirect = (int)$_POST['ssl_redirect'];
$ssl = 1; // if ssl is set and != 0 it can only be 1
$ssl_redirect = 0;
if (isset($_POST['ssl_redirect'])) {
$ssl_redirect = (int)$_POST['ssl_redirect'];
}
$ssl_ipandport = (int)$_POST['ssl_ipandport'];
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition);
@@ -410,11 +462,6 @@ if($page == 'domains'
$openbasedir = '0';
}
if($safemode != '1')
{
$safemode = '0';
}
if($speciallogfile != '1')
{
$speciallogfile = '0';
@@ -460,7 +507,7 @@ if($page == 'domains'
{
$caneditdomain = '0';
}
if($issubof <= '0')
{
$issubof = '0';
@@ -470,7 +517,8 @@ if($page == 'domains'
{
standard_error(array('stringisempty', 'mydomain'));
}
elseif(!validateDomain($domain))
/* Check whether domain validation is enabled and if, validate the domain */
elseif($settings['system']['validate_domain'] && !validateDomain($domain))
{
standard_error(array('stringiswrong', 'mydomain'));
}
@@ -514,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,
@@ -524,7 +571,7 @@ if($page == 'domains'
);
$security_questions = array(
'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'),
'reallydisablesecuritysetting' => ($openbasedir == '0' && $userinfo['change_serversettings'] == '1'),
'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot))
);
$question_nr = 1;
@@ -544,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));
}
}
@@ -635,7 +685,7 @@ if($page == 'domains'
{
$domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
}
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, true);
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain`, `c`.`loginname` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`ismainbutsubto`=0 " . $standardsubdomains . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "'") . " AND `d`.`customerid`=`c`.`customerid` ORDER BY `loginname`, `domain` ASC");
@@ -649,23 +699,22 @@ 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';
$domain_add_form = htmlform::genHTMLForm($domain_add_data);
$title = $domain_add_data['domain_add']['title'];
$image = $domain_add_data['domain_add']['image'];
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
}
}
@@ -673,10 +722,10 @@ if($page == 'domains'
elseif($action == 'edit'
&& $id != 0)
{
$result = $db->query_first("SELECT `d`.*, `c`.`customerid` FROM `" . TABLE_PANEL_DOMAINS . "` `d`
LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`)
WHERE `d`.`parentdomainid`='0'
AND `d`.`id`='" . (int)$id . "'"
$result = $db->query_first("SELECT `d`.*, `c`.`customerid` FROM `" . TABLE_PANEL_DOMAINS . "` `d`
LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`)
WHERE `d`.`parentdomainid`='0'
AND `d`.`id`='" . (int)$id . "'"
. ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' "));
if($result['domain'] != '')
@@ -755,21 +804,42 @@ if($page == 'domains'
$aliasdomain = intval($_POST['alias']);
$issubof = intval($_POST['issubof']);
$isemaildomain = intval($_POST['isemaildomain']);
$email_only = intval($_POST['email_only']);
$subcanemaildomain = intval($_POST['subcanemaildomain']);
$caneditdomain = intval($_POST['caneditdomain']);
$wwwserveralias = intval($_POST['wwwserveralias']);
$registration_date = validate($_POST['registration_date'], 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));
$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', ''));
$isemaildomain = 0;
if(isset($_POST['isemaildomain']))
$isemaildomain = intval($_POST['isemaildomain']);
$email_only = 0;
if(isset($_POST['email_only']))
$email_only = intval($_POST['email_only']);
$wwwserveralias = 0;
if(isset($_POST['wwwserveralias']))
$wwwserveralias = intval($_POST['wwwserveralias']);
$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
{
@@ -781,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)
@@ -802,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);
@@ -817,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
{
@@ -830,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'];
@@ -858,12 +940,15 @@ if($page == 'domains'
if($settings['system']['use_ssl'] == "1"
&& isset($_POST['ssl'])
&& isset($_POST['ssl_redirect'])
/*&& isset($_POST['ssl_redirect'])*/
&& isset($_POST['ssl_ipandport'])
&& $_POST['ssl'] != '0')
{
$ssl = (int)$_POST['ssl'];
$ssl_redirect = (int)$_POST['ssl_redirect'];
$ssl = 1; // if ssl is set and != 0, it can only be 1
$ssl_redirect = 0;
if (isset($_POST['ssl_redirect'])) {
$ssl_redirect = (int)$_POST['ssl_redirect'];
}
$ssl_ipandport = (int)$_POST['ssl_ipandport'];
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition);
@@ -891,11 +976,6 @@ if($page == 'domains'
$openbasedir = '0';
}
if($safemode != '1')
{
$safemode = '0';
}
if($isbinddomain != '1')
{
$isbinddomain = '0';
@@ -946,7 +1026,7 @@ if($page == 'domains'
{
standard_error('domainisaliasorothercustomer');
}
if($issubof <= '0')
{
$issubof = '0';
@@ -973,17 +1053,17 @@ 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(
'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'),
'reallydisablesecuritysetting' => ($openbasedir == '0' && $userinfo['change_serversettings'] == '1'),
'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot))
);
foreach($security_questions as $question_name => $question_launch)
@@ -1008,17 +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'])
|| $issubof != $result['ismainbutsubto']
|| $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']
@@ -1064,20 +1147,20 @@ 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) . "' ";
}
else
}
else
{
$upd_specialsettings = '';
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `specialsettings`='' WHERE `parentdomainid`='" . (int)$id . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
}
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "', `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,
@@ -1177,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']);
@@ -1202,9 +1276,16 @@ 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';
$domain_edit_form = htmlform::genHTMLForm($domain_edit_data);
$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

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -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;
@@ -283,7 +285,7 @@ elseif($page == 'change_language')
$language_options = '';
$default_lang = $settings['panel']['standardlanguage'];
if($userinfo['def_language'] != '') {
if($userinfo['def_language'] != '') {
$default_lang = $userinfo['def_language'];
}
@@ -295,5 +297,34 @@ elseif($page == 'change_language')
eval("echo \"" . getTemplate("index/change_language") . "\";");
}
}
elseif($page == 'change_theme')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$theme = validate($_POST['theme'], 'theme');
?>
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
$log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her theme to '" . $theme . "'");
redirectTo($filename, Array('s' => $s));
}
else
{
$theme_options = '';
$default_theme = $settings['panel']['default_theme'];
if($userinfo['theme'] != '') {
$default_theme = $userinfo['theme'];
}
$themes_avail = getThemes();
foreach($themes_avail as $t)
{
$theme_options.= makeoption($t, $t, $default_theme, true);
}
eval("echo \"" . getTemplate("index/change_theme") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -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,16 +139,27 @@ 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']);
$ssl = intval($_POST['ssl']);
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$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']);
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
} else {
$ssl = 0;
$ssl_cert_file = '';
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
}
if($listen_statement != '1')
{
@@ -187,6 +201,20 @@ if($page == 'ipsandports'
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
}
if($ssl_cert_chainfile != '')
{
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
}
if(strlen(trim($docroot)) > 0)
{
$docroot = makeCorrectDir($docroot);
}
else
{
$docroot = '';
}
$result_checkfordouble = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($ip) . "' AND `port`='" . (int)$port . "'");
if($result_checkfordouble['id'] != '')
@@ -195,7 +223,23 @@ if($page == 'ipsandports'
}
else
{
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "` (`ip`, `port`, `listen_statement`, `namevirtualhost_statement`, `vhostcontainer`, `vhostcontainer_servername_statement`, `specialsettings`, `ssl`, `ssl_cert_file`, `ssl_key_file`, `ssl_ca_file`, `default_vhostconf_domain`) VALUES ('" . $db->escape($ip) . "', '" . (int)$port . "', '" . (int)$listen_statement . "', '" . (int)$namevirtualhost_statement . "', '" . (int)$vhostcontainer . "', '" . (int)$vhostcontainer_servername_statement . "', '" . $db->escape($specialsettings) . "', '" . (int)$ssl . "', '" . $db->escape($ssl_cert_file) . "', '" . $db->escape($ssl_key_file) . "', '" . $db->escape($ssl_ca_file) . "', '" . $db->escape($default_vhostconf_domain) . "')");
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "`
SET
`ip` = '" . $db->escape($ip) . "',
`port` = '" . (int)$port . "',
`listen_statement` = '" . (int)$listen_statement . "',
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
`vhostcontainer` = '" . (int)$vhostcontainer . "',
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
`specialsettings` = '" . $db->escape($specialsettings) . "',
`ssl` = '" . (int)$ssl . "',
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
`docroot` = '" . $db->escape($docroot) . "';
");
if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
{
@@ -204,17 +248,29 @@ 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');
*/
$ipsandports_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
$ipsandports_add_form = htmlform::genHTMLForm($ipsandports_add_data);
$title = $ipsandports_add_data['ipsandports_add']['title'];
$image = $ipsandports_add_data['ipsandports_add']['image'];
eval("echo \"" . getTemplate("ipsandports/ipsandports_add") . "\";");
}
}
@@ -232,16 +288,34 @@ 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']);
$ssl = intval($_POST['ssl']);
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$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
/*
* 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');
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
} else {
$ssl = 0;
$ssl_cert_file = '';
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
}
if($listen_statement != '1')
{
@@ -283,6 +357,20 @@ if($page == 'ipsandports'
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
}
if($ssl_cert_chainfile != '')
{
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
}
if(strlen(trim($docroot)) > 0)
{
$docroot = makeCorrectDir($docroot);
}
else
{
$docroot = '';
}
if($result['ip'] != $ip
&& $result['ip'] == $settings['system']['ipaddress']
&& $result_sameipotherport['id'] == '')
@@ -296,21 +384,52 @@ if($page == 'ipsandports'
}
else
{
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "` SET `ip`='" . $db->escape($ip) . "', `port`='" . (int)$port . "', `listen_statement`='" . (int)$listen_statement . "', `namevirtualhost_statement`='" . (int)$namevirtualhost_statement . "', `vhostcontainer`='" . (int)$vhostcontainer . "', `vhostcontainer_servername_statement`='" . (int)$vhostcontainer_servername_statement . "', `specialsettings`='" . $db->escape($specialsettings) . "', `ssl`='" . (int)$ssl . "', `ssl_cert_file`='" . $db->escape($ssl_cert_file) . "', `ssl_key_file`='" . $db->escape($ssl_key_file) . "', `ssl_ca_file`='" . $db->escape($ssl_ca_file) . "', `default_vhostconf_domain`='" . $db->escape($default_vhostconf_domain) . "' WHERE `id`='" . (int)$id . "'");
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "`
SET
`ip` = '" . $db->escape($ip) . "',
`port` = '" . (int)$port . "',
`listen_statement` = '" . (int)$listen_statement . "',
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
`vhostcontainer` = '" . (int)$vhostcontainer . "',
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
`specialsettings` = '" . $db->escape($specialsettings) . "',
`ssl` = '" . (int)$ssl . "',
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
`docroot` = '" . $db->escape($docroot) . "'
WHERE `id`='" . (int)$id . "'
");
$log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
inserttask('1');
// 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);
/*
$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);
$title = $ipsandports_edit_data['ipsandports_edit']['title'];
$image = $ipsandports_edit_data['ipsandports_edit']['image'];
eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -22,19 +22,17 @@ 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(
'action' => $lng['logger']['action'],
'date' => $lng['logger']['date'],
'type' => $lng['logger']['type'],
'user' => $lng['logger']['user']
'user' => $lng['logger']['user'],
'text' => $lng['logger']['action']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_LOG, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'date';
@@ -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,35 +126,28 @@ 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

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

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -25,49 +25,58 @@ 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'];
}
$count ++;
eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";");
}
@@ -103,6 +112,13 @@ if($page == 'overview')
else
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
$phpconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
$phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data);
$title = $phpconfig_add_data['phpconfig_add']['title'];
$image = $phpconfig_add_data['phpconfig_add']['image'];
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
}
}
@@ -172,6 +188,12 @@ if($page == 'overview')
}
else
{
$phpconfig_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php';
$phpconfig_edit_form = htmlform::genHTMLForm($phpconfig_edit_data);
$title = $phpconfig_edit_data['phpconfig_edit']['title'];
$image = $phpconfig_edit_data['phpconfig_edit']['image'];
eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -32,7 +32,7 @@ if(($page == 'settings' || $page == 'overview')
{
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
$settings = loadSettings($settings_data, $db);
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
@@ -65,9 +65,14 @@ if(($page == 'settings' || $page == 'overview')
$only_enabledisable = true;
}
// check if the session timeout is too low #815
if (isset($_POST['session_sessiontimeout']) && $_POST['session_sessiontimeout'] <= 60) {
standard_error($lng['error']['session_timeout'], $lng['error']['session_timeout_desc']);
}
if(processFormEx(
$settings_data,
$_POST,
$settings_data,
$_POST,
array('filename' => $filename, 'action' => $action, 'page' => $page),
$_part,
$settings_all,
@@ -75,30 +80,35 @@ if(($page == 'settings' || $page == 'overview')
$only_enabledisable
)
) {
$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');
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
}
}
else
{
$_part = isset($_GET['part']) ? $_GET['part'] : '';
if($_part == '')
{
$_part = isset($_POST['part']) ? $_POST['part'] : '';
}
$fields = buildFormEx($settings_data, $_part);
$settings_page = '';
if($_part == '')
{
eval("\$settings_page .= \"" . getTemplate("settings/settings_overview") . "\";");
}
}
else
{
eval("\$settings_page .= \"" . getTemplate("settings/settings") . "\";");
}
eval("echo \"" . getTemplate("settings/settings_form_begin") . "\";");
eval("echo \$settings_page;");
eval("echo \"" . getTemplate("settings/settings_form_end") . "\";");
@@ -113,9 +123,11 @@ elseif($page == 'rebuildconfigs'
{
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles");
inserttask('1');
inserttask('10');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
inserttask('5');
redirectTo('admin_index.php', array('s' => $s));
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
}
else
{
@@ -214,4 +226,4 @@ elseif($page == 'enforcequotas'
{
ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page));
}
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -48,16 +48,28 @@ elseif(isset($_GET['id']))
$available_templates = array(
'createcustomer',
'pop_success',
'trafficninetypercent',
'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'
);
@@ -151,7 +163,7 @@ elseif($action == 'delete'
}
}
}
elseif($action == 'delete'
elseif($action == 'deletef'
&& $id != 0)
{
//file templates
@@ -208,6 +220,12 @@ elseif($action == 'add')
$template_options.= makeoption($lng['admin']['templates'][$template], $template, NULL, true);
}
$template_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_add.php';
$template_add_form = htmlform::genHTMLForm($template_add_data);
$title = $template_add_data['template_add']['title'];
$image = $template_add_data['template_add']['image'];
eval("echo \"" . getTemplate("templates/templates_add_2") . "\";");
}
elseif(isset($_POST['send'])
@@ -311,6 +329,12 @@ elseif($action == 'add')
$free_templates.= makeoption($lng['admin']['templates'][$template], $template, '', true);
}
$filetemplate_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_add.php';
$filetemplate_add_form = htmlform::genHTMLForm($filetemplate_add_data);
$title = $filetemplate_add_data['filetemplate_add']['title'];
$image = $filetemplate_add_data['filetemplate_add']['image'];
eval("echo \"" . getTemplate("templates/filetemplates_add") . "\";");
}
}
@@ -343,11 +367,18 @@ elseif($action == 'edit'
$result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `id`='$mailbodyid'");
$result = htmlentities_array($result);
$mailbody = $result['value'];
$template_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_edit.php';
$template_edit_form = htmlform::genHTMLForm($template_edit_data);
$title = $template_edit_data['template_edit']['title'];
$image = $template_edit_data['template_edit']['image'];
eval("echo \"" . getTemplate("templates/templates_edit") . "\";");
}
}
}
elseif($action == 'edit'
elseif($action == 'editf'
&& $id != 0)
{
//file templates
@@ -371,6 +402,13 @@ elseif($action == 'edit'
else
{
$row = htmlentities_array($row);
$filetemplate_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_edit.php';
$filetemplate_edit_form = htmlform::genHTMLForm($filetemplate_edit_data);
$title = $filetemplate_edit_data['filetemplate_edit']['title'];
$image = $filetemplate_edit_data['filetemplate_edit']['image'];
eval("echo \"" . getTemplate("templates/filetemplates_edit") . "\";");
}
}
@@ -380,5 +418,3 @@ elseif($action == 'edit'
exit;
}
}
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'admin');
@@ -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'
@@ -41,7 +57,7 @@ if($page == 'tickets'
$countcustomers = $db->query_first("SELECT COUNT(`customerid`) as `countcustomers` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . "");
$countcustomers = (int)$countcustomers['countcustomers'];
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets");
@@ -56,7 +72,7 @@ if($page == 'tickets'
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'lastchange';
$paging->sortorder = 'desc';
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `adminid` = "' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" ' . ($userinfo['customers_see_all'] ? '' : ' AND `adminid` = "' . (int)$userinfo['adminid'] . '"') . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -102,16 +118,20 @@ 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("ticket/tickets_customer") . "\";");
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
}
$tickets_count++;
@@ -140,12 +160,13 @@ if($page == 'tickets'
$cananswer = 1;
}
$row['subject'] = html_entity_decode($row['subject']);
if(strlen($row['subject']) > 20)
{
$row['subject'] = substr($row['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";");
eval("\$tickets.=\"" . getTemplate("tickets/tickets_tickets") . "\";");
$count++;
$_cid = $row['customerid'];
}
@@ -154,7 +175,7 @@ if($page == 'tickets'
$i++;
}
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
}
elseif($action == 'new')
{
@@ -169,7 +190,7 @@ if($page == 'tickets'
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
$newticket->Set('customer', (int)$_POST['customer'], true, false);
$newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
$newticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
if($newticket->Get('subject') == null)
{
@@ -198,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))
{
@@ -223,10 +248,17 @@ if($page == 'tickets'
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['low'], '3', $settings['ticket']['default_priority']);
$ticket_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_new.php';
$ticket_new_form = htmlform::genHTMLForm($ticket_new_data);
$title = $ticket_new_data['ticket_new']['title'];
$image = $ticket_new_data['ticket_new']['image'];
eval("echo \"" . getTemplate("tickets/tickets_new") . "\";");
}
}
else
@@ -243,7 +275,7 @@ if($page == 'tickets'
$replyticket = ticket::getInstanceOf($userinfo, $db, $settings, -1);
$replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$replyticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
$replyticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
if($replyticket->Get('message') == null)
{
@@ -294,18 +326,25 @@ 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');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
$row = $db->fetch_array($result);
@@ -322,12 +361,19 @@ 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');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
@@ -337,8 +383,13 @@ if($page == 'tickets'
$ticket_replies_count = $db->num_rows($andere) + 1;
// don't forget the main-ticket!
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_reply.php';
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
$title = $ticket_reply_data['ticket_reply']['title'];
$image = $ticket_reply_data['ticket_reply']['image'];
eval("echo \"" . getTemplate("tickets/tickets_reply") . "\";");
}
}
elseif($action == 'close'
@@ -424,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`
@@ -436,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);
@@ -453,14 +509,14 @@ elseif($page == 'categories'
{
$row = htmlentities_array($row);
$closedtickets_count = ($row['ticketcount'] - $row['ticketcountnotclosed']);
eval("\$ticketcategories.=\"" . getTemplate("ticket/tickets_categories") . "\";");
eval("\$ticketcategories.=\"" . getTemplate("tickets/tickets_categories") . "\";");
$count++;
}
$i++;
}
eval("echo \"" . getTemplate("ticket/categories") . "\";");
eval("echo \"" . getTemplate("tickets/categories") . "\";");
}
elseif($action == 'addcategory')
{
@@ -469,10 +525,11 @@ elseif($page == 'categories'
{
$category = validate($_POST['category'], 'category');
$order = validate($_POST['logicalorder'], 'logicalorder');
if($order < 1 || $order >= 1000)
{
$order = 1;
// use the latest available
$order = ticket::getHighestOrderNumber($db, $userinfo['adminid']) + 1;
}
if($category == '')
@@ -488,7 +545,15 @@ elseif($page == 'categories'
}
else
{
eval("echo \"" . getTemplate("ticket/tickets_newcategory") . "\";");
$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);
$title = $category_new_data['category_new']['title'];
$image = $category_new_data['category_new']['image'];
eval("echo \"" . getTemplate("tickets/tickets_newcategory") . "\";");
}
}
elseif($action == 'editcategory'
@@ -519,7 +584,14 @@ elseif($page == 'categories'
else
{
$row = $db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$id . '"');
eval("echo \"" . getTemplate("ticket/tickets_editcategory") . "\";");
$category_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_edit.php';
$category_edit_form = htmlform::genHTMLForm($category_edit_data);
$title = $category_edit_data['category_edit']['title'];
$image = $category_edit_data['category_edit']['image'];
eval("echo \"" . getTemplate("tickets/tickets_editcategory") . "\";");
}
}
elseif($action == 'deletecategory'
@@ -568,8 +640,7 @@ elseif($page == 'archive'
{
$categories[$x] = isset($_POST['category' . $x]) ? $_POST['category' . $x] : '';
}
$query = ticket::getArchiveSearchStatement($subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
$query = ticket::getArchiveSearchStatement($db, $subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
$fields = array(
'lastchange' => $lng['ticket']['lastchange'],
'ticket_answers' => $lng['ticket']['ticket_answers'],
@@ -627,25 +698,39 @@ elseif($page == 'archive'
{
if($paging->checkDisplay($i))
{
$ticket = htmlentities_array($ticket);
$ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
if($_cid != $ticket['customerid'])
{
$cid = $ticket['customerid'];
$usr = $db->query_first('SELECT `firstname`, `name`, `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'];
}
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
}
$tickets_count++;
switch ($ticket['priority'])
{
case 1: $ticket['display'] = 'high';
break;
case 2: $ticket['display'] = 'normal';
break;
case 3: $ticket['display'] = 'low';
break;
default: $ticket['display'] = 'unknown';
}
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
if($ticket['lastreplier'] == '1')
@@ -661,8 +746,8 @@ elseif($page == 'archive'
{
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
$ticket = htmlentities_array($ticket);
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
$count++;
$_cid = $ticket['customerid'];
}
@@ -671,7 +756,7 @@ elseif($page == 'archive'
$i++;
}
eval("echo \"" . getTemplate("ticket/archivesearch") . "\";");
eval("echo \"" . getTemplate("tickets/archivesearch") . "\";");
}
else
{
@@ -700,13 +785,13 @@ elseif($page == 'archive'
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
}
}
$priorities_options = makecheckbox('priority1', $lng['ticket']['unf_high'], '1');
$priorities_options.= makecheckbox('priority2', $lng['ticket']['unf_normal'], '2');
$priorities_options.= makecheckbox('priority3', $lng['ticket']['unf_low'], '3');
$priorities_options = makecheckbox('priority1', $lng['ticket']['high'], '1');
$priorities_options.= makecheckbox('priority2', $lng['ticket']['normal'], '2');
$priorities_options.= makecheckbox('priority3', $lng['ticket']['low'], '3');
$category_options = '';
$ccount = 0;
$result = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
@@ -725,7 +810,7 @@ elseif($page == 'archive'
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
eval("echo \"" . getTemplate("ticket/archive") . "\";");
eval("echo \"" . getTemplate("tickets/archive") . "\";");
}
}
elseif($action == 'view'
@@ -745,12 +830,19 @@ 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 = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
$row = $db->fetch_array($result);
@@ -767,23 +859,29 @@ 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 = $subticket->Get('subject');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true);
$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 = $mainticket->Get('subject');
$ticket_replies_count = $db->num_rows($andere) + 1;
// don't forget the main-ticket!
eval("echo \"" . getTemplate("ticket/tickets_view") . "\";");
eval("echo \"" . getTemplate("tickets/tickets_view") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
@@ -802,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');
}
?>

148
admin_traffic.php Normal file
View File

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

View File

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

1
cache/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*

0
cache/.keep vendored Normal file
View File

226
css/jquery.jqplot.css Normal file
View File

@@ -0,0 +1,226 @@
/*rules for the plot target div. These will be cascaded down to all plot elements according to css rules*/
.jqplot-target {
position: relative;
color: #666666;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 1em;
/* height: 300px;
width: 400px;*/
}
/*rules applied to all axes*/
.jqplot-axis {
font-size: 0.75em;
}
.jqplot-xaxis {
margin-top: 10px;
}
.jqplot-x2axis {
margin-bottom: 10px;
}
.jqplot-yaxis {
margin-right: 10px;
}
.jqplot-y2axis, .jqplot-y3axis, .jqplot-y4axis, .jqplot-y5axis, .jqplot-y6axis, .jqplot-y7axis, .jqplot-y8axis, .jqplot-y9axis {
margin-left: 10px;
margin-right: 10px;
}
/*rules applied to all axis tick divs*/
.jqplot-axis-tick, .jqplot-xaxis-tick, .jqplot-yaxis-tick, .jqplot-x2axis-tick, .jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
position: absolute;
}
.jqplot-xaxis-tick {
top: 0px;
/* initial position untill tick is drawn in proper place */
left: 15px;
/* padding-top: 10px;*/
vertical-align: top;
}
.jqplot-x2axis-tick {
bottom: 0px;
/* initial position untill tick is drawn in proper place */
left: 15px;
/* padding-bottom: 10px;*/
vertical-align: bottom;
}
.jqplot-yaxis-tick {
right: 0px;
/* initial position untill tick is drawn in proper place */
top: 15px;
/* padding-right: 10px;*/
text-align: right;
}
.jqplot-yaxis-tick.jqplot-breakTick {
right: -20px;
margin-right: 0px;
padding:1px 5px 1px 5px;
/* background-color: white;*/
z-index: 2;
font-size: 1.5em;
}
.jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
left: 0px;
/* initial position untill tick is drawn in proper place */
top: 15px;
/* padding-left: 10px;*/
/* padding-right: 15px;*/
text-align: left;
}
.jqplot-meterGauge-tick {
font-size: 0.75em;
color: #999999;
}
.jqplot-meterGauge-label {
font-size: 1em;
color: #999999;
}
.jqplot-xaxis-label {
margin-top: 10px;
font-size: 11pt;
position: absolute;
}
.jqplot-x2axis-label {
margin-bottom: 10px;
font-size: 11pt;
position: absolute;
}
.jqplot-yaxis-label {
margin-right: 10px;
/* text-align: center;*/
font-size: 11pt;
position: absolute;
}
.jqplot-y2axis-label, .jqplot-y3axis-label, .jqplot-y4axis-label, .jqplot-y5axis-label, .jqplot-y6axis-label, .jqplot-y7axis-label, .jqplot-y8axis-label, .jqplot-y9axis-label {
/* text-align: center;*/
font-size: 11pt;
position: absolute;
}
table.jqplot-table-legend {
margin-top: 12px;
margin-bottom: 12px;
margin-left: 12px;
margin-right: 12px;
}
table.jqplot-table-legend, table.jqplot-cursor-legend {
background-color: rgba(255,255,255,0.6);
border: 1px solid #cccccc;
position: absolute;
font-size: 0.75em;
}
td.jqplot-table-legend {
vertical-align:middle;
}
td.jqplot-seriesToggle:hover, td.jqplot-seriesToggle:active {
cursor: pointer;
}
td.jqplot-table-legend > div {
border: 1px solid #cccccc;
padding:1px;
}
div.jqplot-table-legend-swatch {
width:0px;
height:0px;
border-top-width: 5px;
border-bottom-width: 5px;
border-left-width: 6px;
border-right-width: 6px;
border-top-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-style: solid;
}
.jqplot-title {
top: 0px;
left: 0px;
padding-bottom: 0.5em;
font-size: 1.2em;
}
table.jqplot-cursor-tooltip {
border: 1px solid #cccccc;
font-size: 0.75em;
}
.jqplot-cursor-tooltip {
border: 1px solid #cccccc;
font-size: 0.75em;
white-space: nowrap;
background: rgba(208,208,208,0.5);
padding: 1px;
}
.jqplot-highlighter-tooltip {
border: 1px solid #cccccc;
font-size: 0.75em;
white-space: nowrap;
background: rgba(208,208,208,0.5);
padding: 1px;
}
.jqplot-point-label {
font-size: 0.75em;
z-index: 2;
}
td.jqplot-cursor-legend-swatch {
vertical-align:middle;
text-align:center;
}
div.jqplot-cursor-legend-swatch {
width:1.2em;
height:0.7em;
}
.jqplot-error {
/* Styles added to the plot target container when there is an error go here.*/
text-align: center;
}
.jqplot-error-message {
/* Styling of the custom error message div goes here.*/
position: relative;
top: 46%;
display: inline-block;
}
div.jqplot-bubble-label {
font-size: 0.8em;
/* background: rgba(90%, 90%, 90%, 0.15);*/
padding-left: 2px;
padding-right: 2px;
color: rgb(20%, 20%, 20%);
}
div.jqplot-bubble-label.jqplot-bubble-label-highlight {
background: rgba(90%, 90%, 90%, 0.7);
}
div.jqplot-noData-container {
text-align: center;
background-color: rgba(96%, 96%, 96%, 0.3);
}

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

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

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

@@ -14,21 +14,21 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
// Required code
define('AREA', 'customer');
require ("./lib/init.php");
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

@@ -14,67 +14,55 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
// Required code
define('AREA', 'customer');
require ("./lib/init.php");
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']);
$date_from_off = isset($_POST['date_from_off']) ? -1 : 0;
$date_until_off = isset($_POST['date_until_off']) ? -1 : 0;
/*
* @TODO validate date (DD-MM-YYYY)
*/
* @TODO validate date (DD-MM-YYYY)
*/
$ts_from = -1;
$ts_until = -1;
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,98 +80,82 @@ 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);
eval("echo \"" . getTemplate("email/autoresponder_add") . "\";");
}
//$isactive = makeyesno('active', '1', '0', '1');
// Edit autoresponder
$autoresponder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/autoresponder/formfield.autoresponder_add.php';
$autoresponder_add_form = htmlform::genHTMLForm($autoresponder_add_data);
else
$title = $autoresponder_add_data['autoresponder_add']['title'];
$image = $autoresponder_add_data['autoresponder_add']['image'];
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']);
$date_from_off = isset($_POST['date_from_off']) ? -1 : 0;
$date_until_off = isset($_POST['date_until_off']) ? -1 : 0;
/*
* @TODO validate date (DD-MM-YYYY)
*/
* @TODO validate date (DD-MM-YYYY)
*/
$ts_from = -1;
$ts_until = -1;
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) . "',
`enabled` = '" . (int)$ResponderActive . "',
`date_from` = '" . (int)$ts_from . "',
`date_until` = '" . (int)$ts_until . "',
`date_until` = '" . (int)$ts_until . "',
`subject` = '" . $db->escape($subject) . "'
WHERE `email` = '" . $db->escape($account) . "'
AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
@@ -194,71 +166,55 @@ 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');
}
$row = $db->fetch_array($result);
$subject = htmlspecialchars($row['subject']);
$message = htmlspecialchars($row['message']);
$date_from = (int)$row['date_from'];
$date_until = (int)$row['date_until'];
if($date_from == -1)
{
if ($date_from == -1) {
$deactivated = '-1';
}
else
{
$date_from = '';
} else {
$deactivated = '0';
$date_from = date('d-m-Y', $date_from);
}
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
if($date_until == -1)
{
if ($date_until == -1) {
$deactivated = '-1';
$date_until = '-1';
}
else
{
$date_until = '';
} else {
$deactivated = '0';
$date_until = date('d-m-Y', $date_until);
}
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
$checked = '';
//$isactive = makeyesno('active', '1', '0', $row['enabled']);
if($row['enabled'] == 1)
{
$checked = "checked=\"checked\"";
}
$autoresponder_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/autoresponder/formfield.autoresponder_edit.php';
$autoresponder_edit_form = htmlform::genHTMLForm($autoresponder_edit_data);
eval("echo \"" . getTemplate("email/autoresponder_edit") . "\";");
}
$title = $autoresponder_edit_data['autoresponder_edit']['title'];
$image = $autoresponder_edit_data['autoresponder_edit']['image'];
// 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');
}
@@ -272,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("email/autoresponder_autoresponder") . "\";");
}
eval("\$autoresponder.=\"" . getTemplate('autoresponder/autoresponder_autoresponder') . "\";");
$count++;
}
eval("echo \"" . getTemplate("email/autoresponder") . "\";");
eval("echo \"" . getTemplate('autoresponder/autoresponder') . "\";");
}
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -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));
}
}
@@ -368,9 +391,9 @@ elseif($page == 'domains')
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
}
$redirectcode = '';
if($settings['customredirect']['enabled'] == '1')
{
$redirectcode = '';
$codes = getRedirectCodesArray();
foreach($codes as $rc)
{
@@ -378,9 +401,22 @@ 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']);
$subdomain_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_add.php';
$subdomain_add_form = htmlform::genHTMLForm($subdomain_add_data);
$title = $subdomain_add_data['domain_add']['title'];
$image = $subdomain_add_data['domain_add']['image'];
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
}
}
@@ -388,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;
@@ -414,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');
@@ -514,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));
@@ -534,10 +582,17 @@ elseif($page == 'domains')
if(preg_match('/^https?\:\/\//', $result['documentroot'])
&& validateUrl($idna_convert->encode($result['documentroot']))
&& $settings['panel']['pathedit'] == 'Dropdown')
{
$urlvalue = $result['documentroot'];
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
) {
if($settings['panel']['pathedit'] == 'Dropdown')
{
$urlvalue = $result['documentroot'];
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
}
else
{
$urlvalue = '';
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot'], true);
}
}
else
{
@@ -545,10 +600,10 @@ elseif($page == 'domains')
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
}
$redirectcode = '';
if($settings['customredirect']['enabled'] == '1')
{
$def_code = getDomainRedirectId($id);
$redirectcode = '';
$codes = getRedirectCodesArray();
foreach($codes as $rc)
{
@@ -556,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']."'");
@@ -569,6 +628,12 @@ elseif($page == 'domains')
$domainip = $result_ipandport['ip'];
$result = htmlentities_array($result);
$subdomain_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_edit.php';
$subdomain_edit_form = htmlform::genHTMLForm($subdomain_edit_data);
$title = $subdomain_edit_data['domain_edit']['title'];
$image = $subdomain_edit_data['domain_edit']['image'];
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
}
}
@@ -578,5 +643,127 @@ elseif($page == 'domains')
}
}
}
elseif ($page == 'domainssleditor') {
if ($action == ''
|| $action == 'view'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$ssl_cert_file = isset($_POST['ssl_cert_file']) ? $_POST['ssl_cert_file'] : '';
$ssl_key_file = isset($_POST['ssl_key_file']) ? $_POST['ssl_key_file'] : '';
$ssl_ca_file = isset($_POST['ssl_ca_file']) ? $_POST['ssl_ca_file'] : '';
$ssl_cert_chainfile = isset($_POST['ssl_cert_chainfile']) ? $_POST['ssl_cert_chainfile'] : '';
$do_insert = isset($_POST['do_insert']) ? (($_POST['do_insert'] == 1) ? true : false) : false;
if ($ssl_cert_file != '' && $ssl_key_file == '') {
standard_error('sslcertificateismissingprivatekey');
}
$do_verify = true;
// no cert-file given -> forget everything
if ($ssl_cert_file == '') {
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
$do_verify = false;
}
// verify certificate content
if ($do_verify) {
// array openssl_x509_parse ( mixed $x509cert [, bool $shortnames = true ] )
// openssl_x509_parse() returns information about the supplied x509cert, including fields such as
// subject name, issuer name, purposes, valid from and valid to dates etc.
$cert_content = openssl_x509_parse($ssl_cert_file);
if (is_array($cert_content)
&& isset($cert_content['subject'])
&& isset($cert_content['subject']['CN'])
) {
// TODO self-signed certs might differ and don't need/want this
/*
$domain = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAINS."` WHERE `id`='".(int)$id."'");
if (strtolower($cert_content['subject']['CN']) != strtolower($idna_convert->decode($domain['domain']))) {
standard_error('sslcertificatewrongdomain');
}
*/
// bool openssl_x509_check_private_key ( mixed $cert , mixed $key )
// Checks whether the given key is the private key that corresponds to cert.
if (openssl_x509_check_private_key($ssl_cert_file, $ssl_key_file) === false) {
standard_error('sslcertificateinvalidcertkeypair');
}
// check optional stuff
if ($ssl_ca_file != '') {
$ca_content = openssl_x509_parse($ssl_ca_file);
if (!is_array($ca_content)) {
// invalid
standard_error('sslcertificateinvalidca');
}
}
if ($ssl_cert_chainfile != '') {
$chain_content = openssl_x509_parse($ssl_cert_chainfile);
if (!is_array($chain_content)) {
// invalid
standard_error('sslcertificateinvalidchain');
}
}
} else {
standard_error('sslcertificateinvalidcert');
}
}
// Add/Update database entry
$qrystart = "UPDATE ";
$qrywhere = "WHERE ";
if ($do_insert) {
$qrystart = "INSERT INTO ";
$qrywhere = ", ";
}
$db->query($qrystart." `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` SET
`ssl_cert_file` = '".$db->escape($ssl_cert_file)."',
`ssl_key_file` = '".$db->escape($ssl_key_file)."',
`ssl_ca_file` = '".$db->escape($ssl_ca_file)."',
`ssl_cert_chainfile` = '".$db->escape($ssl_cert_chainfile)."'
".$qrywhere." `domainid`='".(int)$id."';"
);
// insert task to re-generate webserver-configs (#1260)
inserttask('1');
// back to domain overview
redirectTo($filename, array('page' => 'domains', 's' => $s));
}
$result = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."`
WHERE `domainid`='".(int)$id."';"
);
$do_insert = false;
// if no entry can be found, behave like we have empty values
if (!is_array($result) || !isset($result['ssl_cert_file'])) {
$result = array(
'ssl_cert_file' => '',
'ssl_key_file' => '',
'ssl_ca_file' => '',
'ssl_cert_chainfile' => ''
);
$do_insert = true;
}
$result = htmlentities_array($result);
$ssleditor_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domain_ssleditor.php';
$ssleditor_form = htmlform::genHTMLForm($ssleditor_data);
$title = $ssleditor_data['domain_ssleditor']['title'];
$image = $ssleditor_data['domain_ssleditor']['image'];
eval("echo \"" . getTemplate("domains/domain_ssleditor") . "\";");
}
}
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -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,7 +281,20 @@ 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'];
$image = $email_add_data['emails_add']['image'];
eval("echo \"" . getTemplate("email/emails_add") . "\";");
}
}
@@ -321,40 +334,60 @@ elseif($page == 'emails')
$destinations_count = count($result['destination']);
$result = htmlentities_array($result);
$email_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_edit.php';
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'];
$image = $email_edit_data['emails_edit']['image'];
eval("echo \"" . getTemplate("email/emails_edit") . "\";");
}
}
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');
}
}
}
@@ -425,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,
@@ -448,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();
@@ -505,6 +569,13 @@ elseif($page == 'accounts')
$result['email_full'] = $idna_convert->decode($result['email_full']);
$result = htmlentities_array($result);
$quota = $settings['system']['mail_quota'];
$account_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addaccount.php';
$account_add_form = htmlform::genHTMLForm($account_add_data);
$title = $account_add_data['emails_addaccount']['title'];
$image = $account_add_data['emails_addaccount']['image'];
eval("echo \"" . getTemplate("email/account_add") . "\";");
}
}
@@ -536,13 +607,21 @@ 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
{
$result['email_full'] = $idna_convert->decode($result['email_full']);
$result = htmlentities_array($result);
$account_changepw_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php';
$account_changepw_form = htmlform::genHTMLForm($account_changepw_data);
$title = $account_changepw_data['emails_accountchangepasswd']['title'];
$image = $account_changepw_data['emails_accountchangepasswd']['image'];
eval("echo \"" . getTemplate("email/account_changepw") . "\";");
}
}
@@ -584,6 +663,13 @@ elseif($page == 'accounts')
{
$result['email_full'] = $idna_convert->decode($result['email_full']);
$result = htmlentities_array($result);
$quota_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangequota.php';
$quota_edit_form = htmlform::genHTMLForm($quota_edit_data);
$title = $quota_edit_data['emails_accountchangequota']['title'];
$image = $quota_edit_data['emails_accountchangequota']['image'];
eval("echo \"" . getTemplate("email/account_changequota") . "\";");
}
}
@@ -678,6 +764,13 @@ elseif($page == 'forwarders')
{
$result['email_full'] = $idna_convert->decode($result['email_full']);
$result = htmlentities_array($result);
$forwarder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addforwarder.php';
$forwarder_add_form = htmlform::genHTMLForm($forwarder_add_data);
$title = $forwarder_add_data['emails_addforwarder']['title'];
$image = $forwarder_add_data['emails_addforwarder']['image'];
eval("echo \"" . getTemplate("email/forwarder_add") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -39,6 +39,30 @@ if($page == 'overview')
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras");
eval("echo \"" . getTemplate("extras/extras") . "\";");
}
elseif($page == 'backup')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras_backup");
$result = $db->query("SELECT `backup_enabled` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$row = $db->fetch_array($result);
$backup_enabled = makeyesno('backup_enabled', '1', '0', $row['backup_enabled']);
if(isset($_POST['send']) && $_POST['send'] == 'send'){
$backup_enabled = ($_POST['backup_enabled'] == '1' ? '1' : '0');
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `backup_enabled`='" . $backup_enabled . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
$backup_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.backup.php';
$backup_form = htmlform::genHTMLForm($backup_data);
$title = $backup_data['backup']['title'];
$image = $backup_data['backup']['image'];
eval("echo \"" . getTemplate("extras/backup") . "\";");
}
elseif($page == 'htpasswds')
{
if($action == '')
@@ -161,6 +185,13 @@ elseif($page == 'htpasswds')
else
{
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
$htpasswd_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_add.php';
$htpasswd_add_form = htmlform::genHTMLForm($htpasswd_add_data);
$title = $htpasswd_add_data['htpasswd_add']['title'];
$image = $htpasswd_add_data['htpasswd_add']['image'];
eval("echo \"" . getTemplate("extras/htpasswds_add") . "\";");
}
}
@@ -220,6 +251,13 @@ elseif($page == 'htpasswds')
}
$result = htmlentities_array($result);
$htpasswd_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_edit.php';
$htpasswd_edit_form = htmlform::genHTMLForm($htpasswd_edit_data);
$title = $htpasswd_edit_data['htpasswd_edit']['title'];
$image = $htpasswd_edit_data['htpasswd_edit']['image'];
eval("echo \"" . getTemplate("extras/htpasswds_edit") . "\";");
}
}
@@ -314,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)
{
@@ -354,9 +402,18 @@ 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_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);
$title = $htaccess_add_data['htaccess_add']['title'];
$image = $htaccess_add_data['htaccess_add']['image'];
eval("echo \"" . getTemplate("extras/htaccess_add") . "\";");
}
}
@@ -414,10 +471,19 @@ 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_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';
$htaccess_edit_form = htmlform::genHTMLForm($htaccess_edit_data);
$title = $htaccess_edit_data['htaccess_edit']['title'];
$image = $htaccess_edit_data['htaccess_edit']['image'];
eval("echo \"" . getTemplate("extras/htaccess_edit") . "\";");
}
}

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -22,34 +22,27 @@ 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'],
'homedir' => $lng['panel']['path']
);
$paging = new paging($userinfo, $db, TABLE_FTP_USERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$result = $db->query("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' AND `username` NOT LIKE '%_backup'" . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
@@ -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,119 +71,87 @@ 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("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
while($row = $db->fetch_array($result))
{
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $db->escape($row['username']) . "'");
}
$result = $db->query_first("SELECT `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $db->escape($result['username']) . "'");
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
$log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=REPLACE(`members`,'," . $db->escape($result['username']) . "','') WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
if($userinfo['ftps_used'] == '1')
{
$resetaccnumber = " , `ftp_lastaccountnumber`='0'";
}
else
{
$resetaccnumber = '';
}
$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))
{
$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')");
while ($row = $db->fetch_array($result)) {
$db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($username) . "', 'user', '" . $db->escape($row['bytes_in_used']) . "', '0', '0', '0', '0', '0')");
}
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
@@ -203,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'])))
@@ -243,73 +199,80 @@ 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))
{
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
while ($row_domain = $db->fetch_array($result_domains)) {
$domainlist[] = $row_domain['domain'];
}
sort($domainlist);
if (isset($domainlist[0]) && $domainlist[0] != '') {
foreach ($domainlist as $dom) {
$domains .= makeoption($idna_convert->decode($dom), $dom);
}
}
}
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
//$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
$ftp_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_add.php';
$ftp_add_form = htmlform::genHTMLForm($ftp_add_data);
$title = $ftp_add_data['ftp_add']['title'];
$image = $ftp_add_data['ftp_add']['image'];
eval("echo \"" . getTemplate('ftp/accounts_add') . "\";");
}
}
}
elseif($action == 'edit'
&& $id != 0)
{
} 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`='" . $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']);
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'] . "'");
@@ -318,37 +281,34 @@ 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']);
}
}
eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";");
$ftp_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_edit.php';
$ftp_edit_form = htmlform::genHTMLForm($ftp_edit_data);
$title = $ftp_edit_data['ftp_edit']['title'];
$image = $ftp_edit_data['ftp_edit']['image'];
eval("echo \"" . getTemplate('ftp/accounts_edit') . "\";");
}
}
}
}
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -22,40 +22,32 @@ define('AREA', 'customer');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require('./lib/init.php');
require ("./lib/init.php");
if ($action == 'logout') {
$log->logAction(USR_ACTION, LOG_NOTICE, 'logged out');
if($action == 'logout')
{
$log->logAction(USR_ACTION, LOG_NOTICE, "logged out");
if($settings['session']['allow_multiple_login'] == '1')
{
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0' AND `hash` = '" . $s . "'");
$query = "DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0'";
if ($settings['session']['allow_multiple_login'] == '1') {
$query .= " AND `hash` = '" . $s . "'";
}
else
{
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0'");
}
$db->query($query);
redirectTo('index.php');
exit;
}
if($page == 'overview')
{
if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_index");
$domains = '';
$result = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `id` <> '" . (int)$userinfo['standardsubdomain'] . "' ");
$domainArray = array();
while($row = $db->fetch_array($result))
{
while ($row = $db->fetch_array($result)) {
$domainArray[] = $idna_convert->decode($row['domain']);
}
natsort($domainArray);
$domains = implode(', ', $domainArray);
$domains = implode(',<br />', $domainArray);
$userinfo['email'] = $idna_convert->decode($userinfo['email']);
$yesterday = time() - (60 * 60 * 24);
$month = date('M Y', $yesterday);
@@ -77,67 +69,49 @@ if($page == 'overview')
$awaitingtickets = $opentickets['count'];
$awaitingtickets_text = '';
if($opentickets > 0)
{
if ($opentickets > 0) {
$awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '<a href="customer_tickets.php?page=tickets&amp;s=' . $s . '">' . $opentickets['count'] . '</a>'));
}
eval("echo \"" . getTemplate("index/index") . "\";");
}
elseif($page == 'change_password')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send')
{
eval("echo \"" . getTemplate('index/index') . "\";");
} elseif ($page == 'change_password') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$old_password = validate($_POST['old_password'], 'old password');
if(md5($old_password) != $userinfo['password'])
{
if (md5($old_password) != $userinfo['password']) {
standard_error('oldpasswordnotcorrect');
exit;
}
$new_password = validate($_POST['new_password'], 'new password');
$new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm');
$new_password = validatePassword($_POST['new_password'], 'new password');
$new_password_confirm = validatePassword($_POST['new_password_confirm'], 'new password confirm');
if($old_password == '')
{
if ($old_password == '') {
standard_error(array('stringisempty', 'oldpassword'));
}
elseif($new_password == '')
{
} elseif($new_password == '') {
standard_error(array('stringisempty', 'newpassword'));
}
elseif($new_password_confirm == '')
{
} elseif($new_password_confirm == '') {
standard_error(array('stringisempty', 'newpasswordconfirm'));
}
elseif($new_password != $new_password_confirm)
{
} elseif($new_password != $new_password_confirm) {
standard_error('newpasswordconfirmerror');
}
else
{
} else {
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `password`='" . md5($new_password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `password`='" . md5($old_password) . "'");
$log->logAction(USR_ACTION, LOG_NOTICE, 'changed password');
if(isset($_POST['change_main_ftp'])
&& $_POST['change_main_ftp'] == 'true')
{
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($new_password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'");
if (isset($_POST['change_main_ftp'])
&& $_POST['change_main_ftp'] == 'true'
) {
$cryptPassword = makeCryptPassword($new_password);
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`='" . $db->escape($cryptPassword) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'");
$log->logAction(USR_ACTION, LOG_NOTICE, 'changed main ftp password');
}
if(isset($_POST['change_webalizer'])
&& $_POST['change_webalizer'] == 'true')
{
if(CRYPT_STD_DES == 1)
{
if (isset($_POST['change_webalizer'])
&& $_POST['change_webalizer'] == 'true'
) {
if (CRYPT_STD_DES == 1) {
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
$new_webalizer_password = crypt($new_password, $saltfordescrypt);
}
else
{
} else {
$new_webalizer_password = crypt($new_password);
}
@@ -146,44 +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') {
$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 {
$default_theme = $settings['panel']['default_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);
}
eval("echo \"" . getTemplate('index/change_theme') . "\";");
}
}
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -22,30 +22,22 @@ define('AREA', 'customer');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
$need_db_sql_data = true;
$need_root_db_sql_data = true;
require ("./lib/init.php");
require('./lib/init.php');
if(isset($_POST['id']))
{
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
}
elseif(isset($_GET['id']))
{
} elseif(isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if($page == 'overview')
{
if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql");
$lng['mysql']['description'] = str_replace('<SQL_HOST>', $sql['host'], $lng['mysql']['description']);
eval("echo \"" . getTemplate("mysql/mysql") . "\";");
}
elseif($page == 'mysqls')
{
if($action == '')
{
eval("echo \"" . getTemplate('mysql/mysql') . "\";");
} elseif($page == 'mysqls') {
if ($action == '') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql::mysqls");
$fields = array(
'databasename' => $lng['mysql']['databasename'],
@@ -62,121 +54,117 @@ elseif($page == 'mysqls')
$count = 0;
$mysqls = '';
while($row = $db->fetch_array($result))
{
if($paging->checkDisplay($i))
{
// Begin root-session
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
while ($row = $db->fetch_array($result)) {
if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row);
eval("\$mysqls.=\"" . getTemplate("mysql/mysqls_database") . "\";");
$mbdata = $db_root->query_first("SELECT SUM( data_length + index_length) / 1024 / 1024 'MB' FROM information_schema.TABLES WHERE table_schema = '" . $db_root->escape($row['databasename']) . "' GROUP BY table_schema ;");
$row['size'] = number_format($mbdata['MB'], 3, '.', '');
eval("\$mysqls.=\"" . getTemplate('mysql/mysqls_database') . "\";");
$count++;
}
$i++;
}
$db_root->close();
// End root-session
$mysqls_count = $db->num_rows($result);
eval("echo \"" . getTemplate("mysql/mysqls") . "\";");
}
elseif($action == 'delete'
&& $id != 0)
{
$result = $db->query_first('SELECT `id`, `databasename`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
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
{
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['databasename']);
} else {
$dbnamedesc = $result['databasename'];
if (isset($result['description']) && $result['description'] != '') {
$dbnamedesc .= ' ('.$result['description'].')';
}
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc);
}
}
}
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 . "'");
@@ -184,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,
@@ -240,73 +225,68 @@ 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');
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
$mysql_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_add.php';
$mysql_add_form = htmlform::genHTMLForm($mysql_add_data);
$title = $mysql_add_data['mysql_add']['title'];
$image = $mysql_add_data['mysql_add']['image'];
eval("echo \"" . getTemplate('mysql/mysqls_add') . "\";");
}
}
}
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
{
eval("echo \"" . getTemplate("mysql/mysqls_edit") . "\";");
} else {
$mysql_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_edit.php';
$mysql_edit_form = htmlform::genHTMLForm($mysql_edit_data);
$title = $mysql_edit_data['mysql_edit']['title'];
$image = $mysql_edit_data['mysql_edit']['image'];
eval("echo \"" . getTemplate('mysql/mysqls_edit') . "\";");
}
}
}
}
?>

View File

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

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'customer');
@@ -22,21 +22,20 @@ define('AREA', 'customer');
/**
* Include our init.php, which manages Sessions, Language etc.
*/
require ("./lib/init.php");
$intrafficpage = 1;
require('./lib/init.php');
$traffic = '';
$month = null;
$year = null;
if(isset($_POST['month'])
&& isset($_POST['year']))
{
if (isset($_POST['month'])
&& isset($_POST['year'])
) {
$month = intval($_POST['month']);
$year = intval($_POST['year']);
}
elseif(isset($_GET['month'])
&& isset($_GET['year']))
{
} elseif (isset($_GET['month'])
&& isset($_GET['year'])
) {
$month = intval($_GET['month']);
$year = intval($_GET['year']);
}
@@ -44,40 +43,25 @@ elseif(isset($_GET['month'])
//BAM! $_GET???
elseif (isset($_GET['page'])
&& $_GET['page'] == "current")
{
if(date('d') != '01')
{
&& $_GET['page'] == 'current'
) {
if (date('d') != '01') {
$month = date('m');
$year = date('Y');
}
else
{
if(date('m') == '01')
{
} else {
if (date('m') == '01') {
$month = 12;
$year = date('Y') - 1;
}
else
{
} else {
$month = date('m') - 1;
$year = date('Y');
}
}
}
if(!is_null($month)
&& !is_null($year))
{
if (!is_null($month)
&& !is_null($year)) {
$traf['byte'] = 0;
$result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`)
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid`='" . $userinfo['customerid'] . "'
AND `month` = '" . $month . "'
AND `year` = '" . $year . "'");
$row = mysql_fetch_row($result);
rsort($row);
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));;
$result = $db->query("SELECT
SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail',
`day`, `month`, `year`
@@ -90,106 +74,50 @@ if(!is_null($month)
$traffic_complete['mail'] = 0;
$show = '';
while($row = $db->fetch_array($result))
{
while ($row = $db->fetch_array($result)) {
$http = $row['http'];
$ftp = $row['ftp_up'] + $row['ftp_down'];
$mail = $row['mail'];
$traf['byte'] = $http + $ftp + $mail;
$traffic_complete['http']+= $http;
$traffic_complete['ftp']+= $ftp;
$traffic_complete['mail']+= $mail;
$traf['day'] = $row['day'];
$traffic_complete['http'] += $http;
$traffic_complete['ftp'] += $ftp;
$traffic_complete['mail'] += $mail;
$traf['day'] = $row['day'] . '.';
if(extension_loaded('bcmath'))
{
if (extension_loaded('bcmath')) {
$traf['ftptext'] = bcdiv($row['ftp_up'], 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($row['ftp_down'], 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
}
else
{
$traf['ftp'] = bcdiv($ftp, 1024, $settings['panel']['decimal_places']);
$traf['http'] = bcdiv($http, 1024, $settings['panel']['decimal_places']);
$traf['mail'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']);
$traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']);
} else {
$traf['ftptext'] = round($row['ftp_up'] / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($row['ftp_down'] / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
$traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
$traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
}
if($traf['byte'] != 0
&& $traf['max'] != 0)
{
$proz = $traf['max'] / 100;
$traf['http'] = round($http / $proz, 0);
$traf['ftp'] = round($ftp / $proz, 0);
$traf['mail'] = round($mail / $proz, 0);
if($traf['http'] == 0)
{
$traf['http'] = 1;
}
if($traf['ftp'] == 0)
{
$traf['ftp'] = 1;
}
if($traf['mail'] == 0)
{
$traf['mail'] = 1;
}
}
else
{
$traf['http'] = 0;
$traf['ftp'] = 0;
$traf['mail'] = 0;
}
if(extension_loaded('bcmath'))
{
$traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']);
}
else
{
$traf['http'] = round($http, $settings['panel']['decimal_places']);
$traf['ftp'] = round($ftp, $settings['panel']['decimal_places']);
$traf['mail'] = round($mail, $settings['panel']['decimal_places']);
$traf['byte'] = round($traf['byte'] / 1024, $settings['panel']['decimal_places']);
}
eval("\$traffic.=\"" . getTemplate("traffic/traffic_month") . "\";");
$show = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year'];
eval("\$traffic.=\"" . getTemplate('traffic/traffic_month') . "\";");
$show = $lng['traffic']['months'][intval($row['month'])] . ' ' . $row['year'];
}
if(extension_loaded('bcmath'))
{
if (extension_loaded('bcmath')) {
$traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024, $settings['panel']['decimal_places']);
}
else
{
} else {
$traffic_complete['http'] = round($traffic_complete['http'] / 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = round($traffic_complete['mail'] / 1024, $settings['panel']['decimal_places']);
}
eval("echo \"" . getTemplate("traffic/traffic_details") . "\";");
}
else
{
$result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`)
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid`='" . $userinfo['customerid'] . "'
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
$nums = mysql_num_rows($result);
if($nums > 0)
{
$row = mysql_fetch_row($result);
rsort($row);
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));
} else {
// no records yet
$traf['max'] = 0;
}
eval("echo \"" . getTemplate('traffic/traffic_details') . "\";");
} else {
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
@@ -197,88 +125,49 @@ else
$traffic_complete['ftp'] = 0;
$traffic_complete['mail'] = 0;
while($row = $db->fetch_array($result))
{
while ($row = $db->fetch_array($result)) {
$http = $row['http'];
$ftp_up = $row['ftp_up'];
$ftp_down = $row['ftp_down'];
$mail = $row['mail'];
$traffic_complete['http']+= $http;
$traffic_complete['ftp']+= $ftp_up + $ftp_down;
$traffic_complete['mail']+= $mail;
$traffic_complete['http'] += $http;
$traffic_complete['ftp'] += $ftp_up + $ftp_down;
$traffic_complete['mail'] += $mail;
$traf['month'] = $row['month'];
$traf['year'] = $row['year'];
$traf['monthname'] = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year'];
$traf['byte'] = $http + $ftp_up + $ftp_down + $mail;
if(extension_loaded('bcmath'))
{
$traf['ftptext'] = bcdiv($ftp_up, 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . bcdiv($ftp_down, 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)";
}
else
{
$traf['ftptext'] = round($ftp_up / 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . round($ftp_down / 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)";
$traf['httptext'] = round($http / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)";
$traf['mailtext'] = round($mail / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)";
if (extension_loaded('bcmath')) {
$traf['ftptext'] = bcdiv($ftp_up, 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($ftp_down, 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
$traf['ftp'] = bcdiv(($ftp_up + $ftp_down), 1024, $settings['panel']['decimal_places']);
$traf['http'] = bcdiv($http, 1024, $settings['panel']['decimal_places']);
$traf['mail'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']);
$traf['byte'] = bcdiv($traf['byte'], 1024 * 1024, $settings['panel']['decimal_places']);
} else {
$traf['ftptext'] = round($ftp_up / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($ftp_down / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
$traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
$traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
$traf['ftp'] = round(($ftp_up + $ftp_down) / 1024, $settings['panel']['decimal_places']);
$traf['http'] = round($http / 1024, $settings['panel']['decimal_places']);
$traf['mail'] = round($mail / 1024, $settings['panel']['decimal_places']);
$traf['byte'] = round($traf['byte'] / (1024 * 1024), $settings['panel']['decimal_places']);
}
if($traf['max'] != 0)
{
$proz = $traf['max'] / 100;
$traf['ftp'] = round(($ftp_up + $ftp_down) / $proz, 0);
$traf['http'] = round($http / $proz, 0);
$traf['mail'] = round($mail / $proz, 0);
if($traf['http'] == 0)
{
$traf['http'] = 1;
}
if($traf['ftp'] == 0)
{
$traf['ftp'] = 1;
}
if($traf['mail'] == 0)
{
$traf['mail'] = 1;
}
}
else
{
$traf['ftp'] = 0;
$traf['http'] = 0;
$traf['mail'] = 0;
}
if(extension_loaded('bcmath'))
{
$traf['byte'] = bcadd($traf['byte'] / (1024 * 1024), 0.0000, 4);
}
else
{
$traf['byte'] = round($traf['byte'] + (1024 * 1024), 4);
}
eval("\$traffic.=\"" . getTemplate("traffic/traffic_traffic") . "\";");
eval("\$traffic.=\"" . getTemplate('traffic/traffic_traffic') . "\";");
}
if(extension_loaded('bcmath'))
{
if (extension_loaded('bcmath')) {
$traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024 * 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024 * 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024 * 1024, $settings['panel']['decimal_places']);
}
else
{
$traffic_complete['http'] = round($traffic_complete['http'] / 1024 * 1024, $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024 * 1024, $settings['panel']['decimal_places']);
$traffic_complete['mail'] = round($traffic_complete['mail'] / 1024 * 1024, $settings['panel']['decimal_places']);
} else {
$traffic_complete['http'] = round($traffic_complete['http'] / (1024 * 1024), $settings['panel']['decimal_places']);
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / (1024 * 1024), $settings['panel']['decimal_places']);
$traffic_complete['mail'] = round($traffic_complete['mail'] / (1024 * 1024), $settings['panel']['decimal_places']);
}
eval("echo \"" . getTemplate("traffic/traffic") . "\";");
eval("echo \"" . getTemplate('traffic/traffic') . "\";");
}
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 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: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 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: 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

268
index.php
View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
*
*/
define('AREA', 'login');
@@ -22,69 +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
{
} 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) {
$loginname = getCustomerDetail($row2['customerid'], 'loginname');
if ($loginname !== false) {
$row3 = $db->query_first("SELECT `loginname` AS `customer` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `loginname`='" . $db->escape($loginname) . "'");
if ($row3['customer'] == $loginname) {
$table = "`" . TABLE_PANEL_CUSTOMERS . "`";
$uid = 'customerid';
$adminsession = '0';
$is_admin = false;
}
}
}
}
}
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;
}
@@ -92,191 +97,174 @@ 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($settings['session']['allow_multiple_login'] != '1')
{
if (isset($userinfo['theme']) && $userinfo['theme'] != '') {
$theme = $userinfo['theme'];
} else {
$theme = $settings['panel']['default_theme'];
}
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']) . "'");
}
$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']) . "')");
// check for field 'theme' in session-table, refs #607
$fields = mysql_list_fields($db->getDbName(), TABLE_PANEL_SESSIONS);
$columns = mysql_num_fields($fields);
$field_array = array();
for ($i = 0; $i < $columns; $i++) {
$field_array[] = mysql_field_name($fields, $i);
}
if($userinfo['adminsession'] == '1')
{
if(hasUpdates($version))
{
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) . "')");
}
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:
$message = $lng['pwdreminder']['success'];
$successmessage = $lng['pwdreminder']['success'];
break;
case 2:
$message = $lng['error']['login'];
break;
case 3:
$message = $lng['error']['login_blocked'];
$message = sprintf($lng['error']['login_blocked'],$settings['login']['deactivatetime']);
break;
case 4:
$message = $lng['error']['errorsendingmail'];
$cmail = isset($_GET['customermail']) ? $_GET['customermail'] : 'unknown';
$message = str_replace('%s', $cmail, $lng['error']['errorsendingmail']);
break;
case 5:
$message = $lng['error']['user_banned'];
break;
}
$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` FROM `" . TABLE_PANEL_CUSTOMERS . "`
$sql = "SELECT `adminid`, `customerid`, `firstname`, `name`, `company`, `email`, `loginname`, `def_language`, `deactivated` FROM `" . TABLE_PANEL_CUSTOMERS . "`
WHERE `loginname`='" . $db->escape($loginname) . "'
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']) {
$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!");
@@ -299,7 +287,7 @@ if($action == 'forgotpwd')
try {
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\\n", "<br />", $mail_body));
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
$mail->Send();
} catch(phpmailerException $e) {
@@ -313,44 +301,36 @@ if($action == 'forgotpwd')
if ($_mailerror) {
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
redirectTo('index.php', Array('showmessage' => '4'), true);
redirectTo('index.php', Array('showmessage' => '4', 'customermail' => $user['email']), true);
exit;
}
$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']['usernotfound'];
$message = $lng['login']['combination_not_found'];
}
unset($user);
}
} 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

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install
* @version $Id$
*
*/
/**
@@ -22,6 +22,12 @@
* installer, (c) 1999 - 2004 phpBB Group.
*/
// ensure that default timezone is set
if(function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get"))
{
@date_default_timezone_set(@date_default_timezone_get());
}
if(file_exists('../lib/userdata.inc.php'))
{
/**
@@ -31,9 +37,10 @@ if(file_exists('../lib/userdata.inc.php'))
require ('../lib/userdata.inc.php');
if(isset($sql)
&& is_array($sql))
{
die('Sorry, Froxlor is already configured...');
&& is_array($sql)
) {
$installed_hint = file_get_contents('../templates/Froxlor/misc/alreadyinstalledhint.tpl');
die($installed_hint);
}
}
@@ -88,58 +95,49 @@ if(file_exists('./lng/' . $language . '.lng.php'))
* BEGIN FUNCTIONS -----------------------------------------------
*/
function page_header()
{
function page_header() {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
<link rel="stylesheet" href="../templates/main.css" type="text/css" />
<title>Froxlor</title>
<meta charset="utf-8" />
<meta http-equiv="Default-Style" content="text/css" />
<link rel="stylesheet" href="../templates/Froxlor/assets/css/main.css" />
<!--[if IE]><link rel="stylesheet" href="../templates/Froxlor/assets/css/main_ie.css" /><![endif]-->
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../templates/Froxlor/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('../templates/Froxlor/assets/img/icons/text_align_left.png') no-repeat 5px 4px;
}
input[type="password"] {
background: #dae7ee url('../templates/Froxlor/assets/img/icons/password.png') no-repeat 4px 4px;
}
input[type="submit"] {
background: #ccc url('../templates/Froxlor/assets/img/icons/button_ok.png') no-repeat 4px 8px;
}
</style>
</head>
<body style="margin: 0; padding: 0;" onload="document.loginform.loginname.focus()">
<!--
We request you retain the full copyright notice below including the link to www.froxlor.org.
This not only gives respect to the large amount of time given freely by the developers
but also helps build interest, traffic and use of Froxlor. If you refuse
to include even this then support on our forums may be affected.
The Froxlor Team : 2009-2010
// -->
<!--
Templates based on work by Luca Piona (info@havanastudio.ch) and Luca Longinotti (chtekk@gentoo.org)
// -->
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="800"><img src="../images/header.gif" width="800" height="90" alt="" /></td>
<td class="header">&nbsp;</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td valign="top" bgcolor="#FFFFFF">
<br />
<br />
<body>
<div class="loginpage">
<?php
}
function page_footer()
{
function page_footer() {
?>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="100%" class="footer">
<br />Froxlor &copy; 2009-2010 by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
<br /><br/>
</td>
</tr>
</table>
</body>
</div>
<footer>
<span>
Froxlor &copy; 2009-<?php echo date('Y', time()); ?> by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
</span>
</footer>
</body>
</html>
<?php
}
@@ -148,24 +146,30 @@ function status_message($case, $text)
{
if($case == 'begin')
{
echo "\t\t<tr>\n\t\t\t<td class=\"main_field_name\">$text";
echo '<tr><td>'.$text;
}
else
{
echo " <span style=\"color:$case;\">$text</span></td>\n\t\t</tr>\n";
echo '</td><td class="installstatus">
<span style="color:'.$case.';">'.$text.'</span>
</td></tr>';
}
}
function requirement_checks()
{
global $lng;
function requirement_checks() {
global $lng, $theme;
page_header();
?>
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable">
<tr>
<td class="maintitle"><b><img src="../images/title.gif" alt="" />&nbsp;Froxlor Installation</b></td>
</tr>
<article class="install bradius">
<header class="dark">
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2>Requirements</h2>
<table class="noborder">
<?php
$_die = false;
@@ -195,9 +199,10 @@ function requirement_checks()
status_message('green', 'OK');
}
// check for mysql-extension
status_message('begin', $lng['install']['phpmysql']);
if(!extension_loaded('mysql'))
if(!extension_loaded('mysql') && !extension_loaded('mysqlnd'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
@@ -207,6 +212,20 @@ function requirement_checks()
status_message('green', 'OK');
}
// check for xml-extension
status_message('begin', $lng['install']['phpxml']);
if(!extension_loaded('xml'))
{
status_message('red', $lng['install']['notinstalled']);
$_die = true;
}
else
{
status_message('green', 'OK');
}
// check for filter-extension
status_message('begin', $lng['install']['phpfilter']);
if(!extension_loaded('filter'))
@@ -219,6 +238,7 @@ function requirement_checks()
status_message('green', 'OK');
}
// check for posix-extension
status_message('begin', $lng['install']['phpposix']);
if(!extension_loaded('posix'))
@@ -230,7 +250,8 @@ function requirement_checks()
{
status_message('green', 'OK');
}
// check for bcmath extension
status_message('begin', $lng['install']['phpbcmath']);
if(!extension_loaded('bcmath'))
@@ -242,6 +263,7 @@ function requirement_checks()
status_message('green', 'OK');
}
// check for open_basedir
status_message('begin', $lng['install']['openbasedir']);
$php_ob = @ini_get("open_basedir");
@@ -255,30 +277,32 @@ function requirement_checks()
status_message('green', 'OK');
}
?>
</table>
<?php
if($_die)
{
?>
<tr>
<td class="main_field_display" align="center">
<?php echo $lng['install']['diedbecauseofrequirements']; ?><br />
<a href="install.php"><?php echo $lng['install']['click_here_to_refresh']; ?></a>
</td>
</tr>
<p style="padding-left:15px;">
<strong><?php echo $lng['install']['diedbecauseofrequirements']; ?></strong>
</p>
<p class="submit">
<a href="install.php"><?php echo $lng['install']['click_here_to_refresh']; ?></a>
</p>
<?php
} else {
?>
<tr>
<td class="main_field_display" align="center">
<?php echo $lng['install']['froxlor_succ_checks']; ?><br />
<a href="install.php?check=1"><?php echo $lng['install']['click_here_to_continue']; ?></a>
</td>
</tr>
<p style="padding-left:15px;">
<strong><?php echo $lng['install']['froxlor_succ_checks']; ?></strong>
</p>
<p class="submit">
<a href="install.php?check=1"><?php echo $lng['install']['click_here_to_continue']; ?></a>
</p>
<?php
}
?>
</table>
<br />
<br />
</section>
</article>
<?php
page_footer();
}
@@ -443,6 +467,11 @@ else
{
$webserver = 'lighttpd';
}
elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "NGINX"
|| stristr($_SERVER['SERVER_SOFTWARE'], "nginx"))
{
$webserver = 'nginx';
}
else
{
// we don't need to bail out, since unknown does not affect any critical installation routines
@@ -493,10 +522,14 @@ if(isset($_POST['installstep'])
page_header();
?>
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable">
<tr>
<td class="maintitle"><b><img src="../images/title.gif" alt="" />&nbsp;Froxlor Installation</b></td>
</tr>
<article class="install bradius">
<header class="dark">
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2>Installation</h2>
<table class="noborder">
<?php
//first test if we can access the database server with the given root user and password
@@ -644,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'");
@@ -663,15 +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")
{
$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'");
}
// 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';");
@@ -680,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',
@@ -691,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) . "',
@@ -730,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,
@@ -742,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";
@@ -757,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));
@@ -779,15 +811,15 @@ if(isset($_POST['installstep'])
}
?>
<tr>
<td class="main_field_display" align="center">
<?php echo $lng['install']['froxlor_succ_installed']; ?><br />
<a href="../index.php"><?php echo $lng['install']['click_here_to_login']; ?></a>
</td>
</tr>
</table>
<br />
<br />
</table>
<p style="padding-left: 15px;">
<strong><?php echo $lng['install']['froxlor_succ_installed']; ?></strong>
</p>
<p class="submit">
<a href="../index.php"><?php echo $lng['install']['click_here_to_login']; ?></a>
</p>
</section>
</article>
<?php
page_footer();
}
@@ -802,116 +834,124 @@ else
page_header();
?>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get">
<input type="hidden" name="check" value="1" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
<tr>
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['welcome']; ?></b></td>
</tr>
<tr>
<td class="main_field_name" colspan="2"><?php echo $lng['install']['welcometext']; ?></td>
</tr>
<tr>
<td class="main_field_name"><?php echo $lng['install']['language']; ?>: </td>
<td class="main_field_display" nowrap="nowrap">
<select name="language" class="dropdown_noborder"><?php
$language_options = '';
while(list($language_file, $language_name) = each($languages))
{
$language_options.= "\n\t\t\t\t\t\t" . makeoption($language_name, $language_file, $language, true, true);
}
echo $language_options;
?>
<article class="install bradius">
<header class="dark">
<img src="../templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2><?php echo $lng['install']['language']; ?></h2>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;Install</legend>
<p>
<label for="language"><?php echo $lng['install']['language']; ?>:</label>&nbsp;
<select name="language" id="language">
<?php
$language_options = '';
while(list($language_file, $language_name) = each($languages)) {
$language_options.= makeoption($language_name, $language_file, $language, true, true);
}
echo $language_options;
?>
</select>
</td>
</tr>
<tr>
<td class="main_field_confirm" colspan="2">
<input class="bottom" type="submit" name="chooselang" value="Go" />
</td>
</tr>
</table>
</form>
<br />
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post">
<input type="hidden" name="check" value="1" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
<tr>
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['database']; ?></b></td>
</tr>
<tr>
<td class="main_field_name"><?php echo $lng['install']['mysql_hostname']; ?>:</td>
<td class="main_field_display"><input type="text" name="mysql_host" value="<?php echo htmlspecialchars($mysql_host); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"><?php echo $lng['install']['mysql_database']; ?>:</td>
<td class="main_field_display"><input type="text" name="mysql_database" value="<?php echo htmlspecialchars($mysql_database); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_user']; ?>:</td>
<td class="main_field_display"><input type="text" name="mysql_unpriv_user" value="<?php echo htmlspecialchars($mysql_unpriv_user); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $mysql_unpriv_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_pass']; ?>:</td>
<td class="main_field_display"><input type="password" name="mysql_unpriv_pass" value="<?php echo htmlspecialchars($mysql_unpriv_pass); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_root_user']; ?>:</td>
<td class="main_field_display"><input type="text" name="mysql_root_user" value="<?php echo htmlspecialchars($mysql_root_user); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $mysql_root_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_root_pass']; ?>:</td>
<td class="main_field_display"><input type="password" name="mysql_root_pass" value="<?php echo htmlspecialchars($mysql_root_pass); ?>"/></td>
</tr>
<tr>
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['admin_account']; ?></b></td>
</tr>
<tr>
<td class="main_field_name"><?php echo $lng['install']['admin_user']; ?>:</td>
<td class="main_field_display"><input type="text" name="admin_user" value="<?php echo htmlspecialchars($admin_user); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && ($admin_pass1 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass']; ?>:</td>
<td class="main_field_display"><input type="password" name="admin_pass1" value="<?php echo htmlspecialchars($admin_pass1); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && ($admin_pass2 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass_confirm']; ?>:</td>
<td class="main_field_display"><input type="password" name="admin_pass2" value="<?php echo htmlspecialchars($admin_pass2); ?>"/></td>
</tr>
<tr>
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['serversettings']; ?></b></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $servername == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['servername']; ?>:</td>
<td class="main_field_display"><input type="text" name="servername" value="<?php echo htmlspecialchars($servername); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['serverip']; ?>:</td>
<td class="main_field_display"><input type="text" name="serverip" value="<?php echo htmlspecialchars($serverip); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?>:</td>
<td class="main_field_display"><input type="radio" name="webserver" value="apache2" <?php echo $webserver == "apache2" ? 'checked="checked"' : "" ?>/>Apache2&nbsp;<br /><input type="radio" name="webserver" value="lighttpd" <?php echo $webserver == "lighttpd" ? 'checked="checked"' : "" ?>/>Lighttpd</td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpuser']; ?>:</td>
<td class="main_field_display"><input type="text" name="httpuser" value="<?php $posixusername = posix_getpwuid(posix_getuid()); echo $posixusername['name']; ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpgroup']; ?>:</td>
<td class="main_field_display"><input type="text" name="httpgroup" value="<?php $posixgroup = posix_getgrgid(posix_getgid()); echo $posixgroup['name']; ?>"/></td>
</tr>
<tr>
<td class="main_field_confirm" colspan="2"><input type="hidden" name="language" value="<?php echo htmlspecialchars($language); ?>"/><input type="hidden" name="installstep" value="1"/><input class="bottom" type="submit" name="submitbutton" value="<?php echo $lng['install']['next']; ?>"/></td>
</tr>
</table>
</form>
<br />
<br />
</p>
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="submit" name="chooselang" value="Go" />
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>
</section>
<section class="installsec">
<h2><?php echo $lng['install']['installdata']; ?></h2>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;Install</legend>
<p>
<strong><?php echo $lng['install']['database']; ?></strong>
</p>
<p>
<label for="mysql_host"><?php echo $lng['install']['mysql_hostname']; ?>:</label>&nbsp;
<input type="text" name="mysql_host" id="mysql_host" value="<?php echo htmlspecialchars($mysql_host); ?>" required/>
</p>
<p>
<label for="mysql_database"><?php echo $lng['install']['mysql_database']; ?>:</label>&nbsp;
<input type="text" name="mysql_database" id="mysql_database" value="<?php echo htmlspecialchars($mysql_database); ?>" required/>
</p>
<p>
<label for="mysql_unpriv_user"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_user']; ?>:</label>&nbsp;
<input type="text" name="mysql_unpriv_user" id="mysql_unpriv_user" value="<?php echo htmlspecialchars($mysql_unpriv_user); ?>" required/>
</p>
<p>
<label for="mysql_unpriv_pass"<?php echo ((!empty($_POST['installstep']) && $mysql_unpriv_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_pass']; ?>:</label>&nbsp;
<input type="password" name="mysql_unpriv_pass" id="mysql_unpriv_pass" value="<?php echo htmlspecialchars($mysql_unpriv_pass); ?>" required/>
</p>
<p>
<label for="mysql_root_user"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_root_user']; ?>:</label>&nbsp;
<input type="text" name="mysql_root_user" id="mysql_root_user" value="<?php echo htmlspecialchars($mysql_root_user); ?>" required/>
</p>
<p>
<label for="mysql_root_pass"<?php echo ((!empty($_POST['installstep']) && $mysql_root_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_root_pass']; ?>:</label>&nbsp;
<input type="password" name="mysql_root_pass" id="mysql_root_pass" value="<?php echo htmlspecialchars($mysql_root_pass); ?>" required/>
</p>
<p>
<strong><?php echo $lng['install']['admin_account']; ?></strong>
</p>
<p>
<label for="admin_user"><?php echo $lng['install']['admin_user']; ?>:</label>&nbsp;
<input type="text" name="admin_user" id="admin_user" value="<?php echo htmlspecialchars($admin_user); ?>" required/>
</p>
<p>
<label for="admin_pass1"<?php echo ((!empty($_POST['installstep']) && ($admin_pass1 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass']; ?>:</label>&nbsp;
<input type="password" name="admin_pass1" id="admin_pass1" value="<?php echo htmlspecialchars($admin_pass1); ?>" required/>
</p>
<p>
<label for="admin_pass2"<?php echo ((!empty($_POST['installstep']) && ($admin_pass2 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass_confirm']; ?>:</label>&nbsp;
<input type="password" name="admin_pass2" id="admin_pass2" value="<?php echo htmlspecialchars($admin_pass2); ?>" required/>
</p>
<p>
<strong><?php echo $lng['install']['serversettings']; ?></strong>
</p>
<p>
<label for="servername"<?php echo ((!empty($_POST['installstep']) && $servername == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['servername']; ?>:</label>&nbsp;
<input type="text" name="servername" id="servername" value="<?php echo htmlspecialchars($servername); ?>" required/>
</p>
<p>
<label for="serverip"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['serverip']; ?>:</label>&nbsp;
<input type="text" name="serverip" id="serverip" value="<?php echo htmlspecialchars($serverip); ?>" required/>
</p>
<p>
<label for="apache"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> Apache:</label>&nbsp;
<input type="radio" name="webserver" id="apache" value="apache2" <?php echo $webserver == "apache2" ? 'checked="checked"' : "" ?>/>Apache2
</p>
<p>
<label for="lighty"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> LigHTTPd:</label>&nbsp;
<input type="radio" name="webserver" id="lighty" value="lighttpd" <?php echo $webserver == "lighttpd" ? 'checked="checked"' : "" ?>/>LigHTTPd
</p>
<p>
<label for="nginx"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> Nginx:</label>&nbsp;
<input type="radio" name="webserver" id="nginx" value="nginx" <?php echo $webserver == "nginx" ? 'checked="checked"' : "" ?>/>Nginx
</p>
<p>
<label for="httpuser"<?php echo ((!empty($_POST['installstep']) && $httpuser == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpuser']; ?>:</label>&nbsp;
<input type="text" name="httpuser" id="httpuser" value="<?php $posixusername = posix_getpwuid(posix_getuid()); echo $posixusername['name']; ?>" required/>
</p>
<p>
<label for="httpgroup"<?php echo ((!empty($_POST['installstep']) && $httpgroup == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpgroup']; ?>:</label>&nbsp;
<input type="text" name="httpgroup" id="httpgroup" value="<?php $posixgroup = posix_getgrgid(posix_getgid()); echo $posixgroup['name']; ?>" required/>
</p>
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="hidden" name="language" value="<?php echo htmlspecialchars($language); ?>"/>
<input type="hidden" name="installstep" value="1"/>
<input class="bottom" type="submit" name="submitbutton" value="<?php echo $lng['install']['next']; ?>"/>
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>
</section>
</article>
<?php
page_footer();
}
@@ -924,5 +964,3 @@ else
/**
* END INSTALL ---------------------------------------------------
*/
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* @version $Id$
*
*/
/**
@@ -42,6 +42,7 @@ $lng['install']['httpuser'] = 'HTTP username';
$lng['install']['httpgroup'] = 'HTTP groupname';
$lng['install']['apacheversion'] = 'Apacheversion';
$lng['install']['next'] = 'Next';
$lng['install']['installdata'] = 'Installation - Data';
/**
* Progress
@@ -72,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
*/
@@ -97,5 +104,5 @@ $lng['install']['froxlor_succ_checks'] = 'All requirements are satisfied';
$lng['install']['phpmagic_quotes_runtime'] = 'Checking whether magic_quotes_runtime is off';
$lng['install']['active'] = 'no';
$lng['install']['phpmagic_quotes_runtime_description'] = 'PHP setting "magic_quotes_runtime" must be set to "Off" in order to avoid strange behavior of Froxlor. Disabling it for now (this is only temporary, please fix our php.ini).';
$lng['install']['phpxml'] = 'Testing if PHP XML-extension is installed...';
?>

View File

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

View File

@@ -14,7 +14,7 @@
* @author Froxlor Team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* @version $Id$
*
*/
/**
@@ -40,6 +40,7 @@ $lng['install']['servername'] = 'Servername (FQDN)';
$lng['install']['serverip'] = 'Server-IP';
$lng['install']['apacheversion'] = 'Apacheversion';
$lng['install']['next'] = 'Fortfahren';
$lng['install']['installdata'] = 'Installation - Daten';
/**
* Progress
@@ -72,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
*/
@@ -97,5 +104,5 @@ $lng['install']['froxlor_succ_checks'] = 'Alle Vorraussetzungen sind erf&uuml;ll
$lng['install']['phpmagic_quotes_runtime'] = 'Pr&uuml;fe ob magic_quotes_runtime ausgeschalten ist';
$lng['install']['active'] = 'nein';
$lng['install']['phpmagic_quotes_runtime_description'] = 'Die PHP Einstellung "magic_quotes_runtime" muss deaktiviert sein ("Off"), um merkw&uuml;rdige Verhalten von Froxlor zu umgehen. Sie wurde deaktiviert (nur tempor&auml;r, bitte php.ini anpassen).';
$lng['install']['phpxml'] = 'Teste, ob die PHP XML-Erweiterung installiert ist...';
?>

View File

@@ -12,7 +12,7 @@
* @author Michael Duergner <michael@duergner.com>
* @license GPLv2 http://files.syscp.org/misc/COPYING.txt
* @package System
* @version $Id$
*
*/
if(@php_sapi_name() != 'cli'

View File

@@ -12,7 +12,7 @@
* @author Martin Burchert <eremit@syscp.org>
* @license GPLv2 http://files.syscp.org/misc/COPYING.txt
* @package System
* @version $Id$
*
*/
// some configs

124
install/tsmarty2c.php Executable file
View File

@@ -0,0 +1,124 @@
#!/usr/bin/php
<?php
/**
* tsmarty2c.php - rips gettext strings from smarty template
*
* ------------------------------------------------------------------------- *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
* ------------------------------------------------------------------------- *
*
* This command line script rips gettext strings from smarty file,
* and prints them to stdout in C format, that can later be used with the
* standard gettext tools.
*
* Usage:
* ./tsmarty2c.php <filename or directory> <file2> <..> > smarty.c
*
* If a parameter is a directory, the template files within will be parsed.
*
* @package smarty-gettext
* @version $Id: tsmarty2c.php,v 1.3 2005/07/27 17:59:39 sagi Exp $
* @link http://smarty-gettext.sf.net/
* @author Sagi Bashari <sagi@boom.org.il>
* @copyright 2004-2005 Sagi Bashari
*/
// smarty open tag
$ldq = preg_quote('{');
// smarty close tag
$rdq = preg_quote('}');
// smarty command
$cmd = preg_quote('t');
// extensions of smarty files, used when going through a directory
$extensions = array('tpl');
// "fix" string - strip slashes, escape and convert new lines to \n
function fs($str)
{
$str = stripslashes($str);
$str = str_replace('"', '\"', $str);
$str = str_replace("\n", '\n', $str);
return $str;
}
// rips gettext strings from $file and prints them in C format
function do_file($file)
{
$content = @file_get_contents($file);
if (empty($content)) {
return;
}
global $ldq, $rdq, $cmd;
preg_match_all(
"/{$ldq}\s*({$cmd})\s*([^{$rdq}]*){$rdq}([^{$ldq}]*){$ldq}\/\\1{$rdq}/",
$content,
$matches
);
for ($i=0; $i < count($matches[0]); $i++) {
// TODO: add line number
echo "/* $file */\n"; // credit: Mike van Lammeren 2005-02-14
if (preg_match('/plural\s*=\s*["\']?\s*(.[^\"\']*)\s*["\']?/', $matches[2][$i], $match)) {
echo 'ngettext("'.fs($matches[3][$i]).'","'.fs($match[1]).'",x);'."\n";
} else {
echo 'gettext("'.fs($matches[3][$i]).'");'."\n";
}
echo "\n";
}
}
// go through a directory
function do_dir($dir)
{
$d = dir($dir);
while (false !== ($entry = $d->read())) {
if ($entry == '.' || $entry == '..') {
continue;
}
$entry = $dir.'/'.$entry;
if (is_dir($entry)) { // if a directory, go through it
do_dir($entry);
} else { // if file, parse only if extension is matched
$pi = pathinfo($entry);
if (isset($pi['extension']) && in_array($pi['extension'], $GLOBALS['extensions'])) {
do_file($entry);
}
}
}
$d->close();
}
for ($ac=1; $ac < $_SERVER['argc']; $ac++) {
if (is_dir($_SERVER['argv'][$ac])) { // go through directory
do_dir($_SERVER['argv'][$ac]);
} else { // do file
do_file($_SERVER['argv'][$ac]);
}
}
?>

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -12,7 +12,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install
* @version $Id$
*
*/
$updateto = '0.9-r0';

View File

@@ -12,7 +12,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* @version $Id$
*
*/
/**
@@ -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

@@ -12,7 +12,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* @version $Id$
*
*/
/**
@@ -26,7 +26,7 @@
*/
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
{
global $settings, $lng, $db;
global $settings, $lng, $db, $theme;
if(versionInUpdate($current_version, '0.9.4-svn2'))
{
@@ -73,9 +73,9 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$description = 'You can define a default support-ticket priority level which is pre-selected for new support-tickets.';
$question = '<strong>Which should be the default ticket-priority?:</strong>&nbsp;';
$question .= '<select name="update_deftic_priority">';
$priorities = makeoption($lng['ticket']['unf_high'], '1', '2');
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', '2');
$priorities.= makeoption($lng['ticket']['unf_low'], '3', '2');
$priorities = makeoption($lng['ticket']['high'], '1', '2');
$priorities.= makeoption($lng['ticket']['normal'], '2', '2');
$priorities.= makeoption($lng['ticket']['low'], '3', '2');
$question .= $priorities.'</select>';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
@@ -158,7 +158,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$question.= makeyesno('update_defdns_mailentry', '1', '0', '0');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.10-svn1'))
{
$has_nouser = false;
@@ -171,13 +171,13 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$has_nouser = true;
$guessed_user = 'www-data';
if(function_exists('posix_getuid')
&& function_exists('posix_getpwuid')
&& function_exists('posix_getpwuid')
) {
$_httpuser = posix_getpwuid(posix_getuid());
$guessed_user = $_httpuser['name'];
}
}
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
if(!isset($result) || !isset($result['value']))
{
@@ -185,7 +185,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$has_nogroup = true;
$guessed_group = 'www-data';
if(function_exists('posix_getgid')
&& function_exists('posix_getgrgid')
&& function_exists('posix_getgrgid')
) {
$_httpgroup = posix_getgrgid(posix_getgid());
$guessed_group = $_httpgroup['name'];
@@ -198,8 +198,8 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
if($has_nouser)
{
$question = '<strong>Please enter the webservers username:</strong>&nbsp;<input type="text" class="text" name="update_httpuser" value="'.$guessed_user.'" />';
}
elseif($has_nogroup)
}
elseif($has_nogroup)
{
$question2 = '<strong>Please enter the webservers groupname:</strong>&nbsp;<input type="text" class="text" name="update_httpgroup" value="'.$guessed_group.'" />';
if($has_nouser) {
@@ -238,7 +238,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$question.= '<input type="text" class="text" name="update_perlpath" value="/usr/bin/perl" />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.12-svn1'))
{
if($settings['system']['mod_fcgid'] == 1)
@@ -251,7 +251,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$question.= 'Local user:&nbsp;';
$question.= '<input type="text" class="text" name="update_fcgid_httpuser" value="froxlorlocal" /><br /><br />';
$question.= 'Local group:&nbsp;';
$question.= '<input type="text" class="text" name="update_fcgid_ownvhost" value="froxlorlocal" /><br />';
$question.= '<input type="text" class="text" name="update_fcgid_httpgroup" value="froxlorlocal" /><br />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
@@ -310,4 +310,235 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
if(versionInUpdate($current_version, '0.9.14-svn3'))
{
if((int)$settings['system']['awstats_enabled'] == 1)
{
$has_preconfig = true;
$description = 'To have icons in AWStats statistic-pages please enter the path to AWStats icons folder.';
$question = '<strong>Path to AWSTats icons folder:</strong>&nbsp;';
$question.= '<input type="text" class="text" name="update_awstats_icons" value="'.$settings['system']['awstats_icons'].'" />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
if(versionInUpdate($current_version, '0.9.14-svn4'))
{
if((int)$settings['system']['use_ssl'] == 1)
{
$has_preconfig = true;
$description = 'Froxlor now has the possibility to set \'SSLCertificateChainFile\' for the apache webserver.';
$question = '<strong>Enter filename (leave empty for none):</strong>&nbsp;';
$question.= '<input type="text" class="text" name="update_ssl_cert_chainfile" value="'.$settings['system']['ssl_cert_chainfile'].'" />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
if(versionInUpdate($current_version, '0.9.14-svn6'))
{
$has_preconfig = true;
$description = 'You can now allow customers to use any of their domains as username for the login.';
$question = '<strong>Do you want to enable domain-login for all customers?:</strong>&nbsp;';
$question.= makeyesno('update_allow_domain_login', '1', '0', '0');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
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>';
$question = '';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.16-svn1'))
{
$has_preconfig = true;
$description = 'Froxlor now features support for php-fpm.';
$question = '<strong>Do you want to enable php-fpm?:</strong>&nbsp;';
$question.= makeyesno('update_phpfpm_enabled', '1', '0', '0').'<br /><br />';
$question.= 'If \'yes\', please specify the configuration directory:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_configdir" value="/etc/php-fpm.d/" /><br /><br />';
$question.= 'Please specify the temporary files directory:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_tmpdir" value="/var/customers/tmp/" /><br /><br />';
$question.= 'Please specify the PEAR directory:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_peardir" value="/usr/share/php/:/usr/share/php5/" /><br /><br />';
$question.= 'Please specify the php-fpm restart-command:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_reload" value="/etc/init.d/php-fpm restart" /><br /><br />';
$question.= 'Please specify the php-fpm rocess manager control:&nbsp;';
$question.= '<select name="update_phpfpm_pm">';
$redirects = makeoption('static', 'static', 'static');
$redirects.= makeoption('dynamic', 'dynamic', 'static');
$question .= $redirects.'</select><br /><br />';
$question.= 'Please specify the number of child processes:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_max_children" value="1" /><br /><br />';
$question.= 'Please specify the number of requests per child before respawning:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_max_requests" value="0" /><br /><br />';
$question.= '<em>The following settings are only required if you chose process manager = dynamic</em><br /><br />';
$question.= 'Please specify the number of child processes created on startup:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_start_servers" value="20" /><br /><br />';
$question.= 'Please specify the desired minimum number of idle server processes:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_min_spare_servers" value="5" /><br /><br />';
$question.= 'Please specify the desired maximum number of idle server processes:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_max_spare_servers" value="35" /><br />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.16-svn2'))
{
if((int)$settings['phpfpm']['enabled'] == 1)
{
$has_preconfig = true;
$description = 'You can chose whether you want Froxlor to use PHP-FPM itself too now.';
$question = '<strong>Use PHP-FPM for the Froxlor Panel?:</strong>&nbsp;';
$question.= makeyesno('update_phpfpm_enabled_ownvhost', '1', '0', '0').'<br /><br />';
$question.= '<strong>If \'yes\', please specify local user/group (have to exist, Froxlor does not add them automatically):</strong><br /><br />';
$question.= 'Local user:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_httpuser" value="'.$settings['system']['mod_fcgid_httpuser'].'" /><br /><br />';
$question.= 'Local group:&nbsp;';
$question.= '<input type="text" class="text" name="update_phpfpm_httpgroup" value="'.$settings['system']['mod_fcgid_httpgroup'].'" /><br />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
if(versionInUpdate($current_version, '0.9.17-svn1'))
{
$has_preconfig = true;
$description = 'Select if you want to enable the web- and traffic-reports';
$question = '<strong>Enable?:</strong>&nbsp;';
$question.= makeyesno('update_system_report_enable', '1', '0', '1').'<br /><br />';
$question.= '<strong>If \'yes\', please specify a percentage value for web- and traffic when reports are to be sent:</strong><br /><br />';
$question.= 'Webusage warning level:&nbsp;';
$question.= '<input type="text" class="text" name="update_system_report_webmax" value="90" /><br /><br />';
$question.= 'Traffic warning level:&nbsp;';
$question.= '<input type="text" class="text" name="update_system_report_trafficmax" value="90" /><br />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.18-svn2'))
{
$has_preconfig = true;
$description = 'As you can (obviously) see, Froxlor now comes with a new theme. You also have the possibility to switch back to "Classic" if you want to.';
$question = '<strong>Select default panel theme:</strong>&nbsp;';
$question.= '<select name="update_default_theme">';
$themes = getThemes();
foreach($themes as $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

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install
* @version $Id$
*
*/
/**
@@ -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 . "` ");
@@ -43,9 +43,9 @@ if($settings['panel']['version'] == '1.0.10')
// Adding tables
$db->query("DROP TABLE IF EXISTS `" . TABLE_PANEL_HTACCESS . "`;");
$db->query("CREATE TABLE `" . TABLE_PANEL_HTACCESS . "` (" . " `id` int(11) unsigned NOT NULL auto_increment," . " `customerid` int(11) unsigned NOT NULL default '0'," . " `path` varchar(255) NOT NULL default ''," . " `options_indexes` tinyint(1) NOT NULL default '0'," . " PRIMARY KEY (`id`)" . ") TYPE=MyISAM ;");
$db->query("CREATE TABLE `" . TABLE_PANEL_HTACCESS . "` (" . " `id` int(11) unsigned NOT NULL auto_increment," . " `customerid` int(11) unsigned NOT NULL default '0'," . " `path` varchar(255) NOT NULL default ''," . " `options_indexes` tinyint(1) NOT NULL default '0'," . " PRIMARY KEY (`id`)" . ") ENGINE=MyISAM ;");
$db->query("DROP TABLE IF EXISTS `" . TABLE_PANEL_ADMINS . "`;");
$db->query("CREATE TABLE `" . TABLE_PANEL_ADMINS . "` (" . " `adminid` int(11) unsigned NOT NULL auto_increment," . " `loginname` varchar(50) NOT NULL default ''," . " `password` varchar(50) NOT NULL default ''," . " `name` varchar(255) NOT NULL default ''," . " `email` varchar(255) NOT NULL default ''," . " `customers` int(15) NOT NULL default '0'," . " `customers_used` int(15) NOT NULL default '0'," . " `customers_see_all` tinyint(1) NOT NULL default '0'," . " `domains` int(15) NOT NULL default '0'," . " `domains_used` int(15) NOT NULL default '0'," . " `domains_see_all` tinyint(1) NOT NULL default '0'," . " `change_serversettings` tinyint(1) NOT NULL default '0'," . " `diskspace` int(15) NOT NULL default '0'," . " `diskspace_used` int(15) NOT NULL default '0'," . " `mysqls` int(15) NOT NULL default '0'," . " `mysqls_used` int(15) NOT NULL default '0'," . " `emails` int(15) NOT NULL default '0'," . " `emails_used` int(15) NOT NULL default '0'," . " `email_forwarders` int(15) NOT NULL default '0'," . " `email_forwarders_used` int(15) NOT NULL default '0'," . " `ftps` int(15) NOT NULL default '0'," . " `ftps_used` int(15) NOT NULL default '0'," . " `subdomains` int(15) NOT NULL default '0'," . " `subdomains_used` int(15) NOT NULL default '0'," . " `traffic` int(15) NOT NULL default '0'," . " `traffic_used` int(15) NOT NULL default '0'," . " `deactivated` tinyint(1) NOT NULL default '0'," . " `lastlogin_succ` int(11) unsigned NOT NULL default '0'," . " `lastlogin_fail` int(11) unsigned NOT NULL default '0'," . " `loginfail_count` int(11) unsigned NOT NULL default '0'," . " PRIMARY KEY (`adminid`)" . ") TYPE=MyISAM ;");
$db->query("CREATE TABLE `" . TABLE_PANEL_ADMINS . "` (" . " `adminid` int(11) unsigned NOT NULL auto_increment," . " `loginname` varchar(50) NOT NULL default ''," . " `password` varchar(50) NOT NULL default ''," . " `name` varchar(255) NOT NULL default ''," . " `email` varchar(255) NOT NULL default ''," . " `customers` int(15) NOT NULL default '0'," . " `customers_used` int(15) NOT NULL default '0'," . " `customers_see_all` tinyint(1) NOT NULL default '0'," . " `domains` int(15) NOT NULL default '0'," . " `domains_used` int(15) NOT NULL default '0'," . " `domains_see_all` tinyint(1) NOT NULL default '0'," . " `change_serversettings` tinyint(1) NOT NULL default '0'," . " `diskspace` int(15) NOT NULL default '0'," . " `diskspace_used` int(15) NOT NULL default '0'," . " `mysqls` int(15) NOT NULL default '0'," . " `mysqls_used` int(15) NOT NULL default '0'," . " `emails` int(15) NOT NULL default '0'," . " `emails_used` int(15) NOT NULL default '0'," . " `email_forwarders` int(15) NOT NULL default '0'," . " `email_forwarders_used` int(15) NOT NULL default '0'," . " `ftps` int(15) NOT NULL default '0'," . " `ftps_used` int(15) NOT NULL default '0'," . " `subdomains` int(15) NOT NULL default '0'," . " `subdomains_used` int(15) NOT NULL default '0'," . " `traffic` int(15) NOT NULL default '0'," . " `traffic_used` int(15) NOT NULL default '0'," . " `deactivated` tinyint(1) NOT NULL default '0'," . " `lastlogin_succ` int(11) unsigned NOT NULL default '0'," . " `lastlogin_fail` int(11) unsigned NOT NULL default '0'," . " `loginfail_count` int(11) unsigned NOT NULL default '0'," . " PRIMARY KEY (`adminid`)" . ") ENGINE=MyISAM ;");
// Insert Admin user
@@ -79,4 +79,4 @@ if($settings['panel']['version'] == '1.0.10')
$settings['panel']['version'] = '1.2.0';
}
?>
?>

View File

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

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install
* @version $Id$
*
*/
if($settings['panel']['version'] == '1.2-beta1'
@@ -51,7 +51,7 @@ if($settings['panel']['version'] == '1.2.2-cvs1')
`language` varchar(30) NOT NULL default '',
`file` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM
) ENGINE=MyISAM
");
$db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`id`, `language`, `file`) VALUES (1, 'Deutsch', 'lng/german.lng.php');");
$db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`id`, `language`, `file`) VALUES (2, 'English', 'lng/english.lng.php');");
@@ -88,7 +88,7 @@ if($settings['panel']['version'] == '1.2.2-cvs3')
`id` int(11) unsigned NOT NULL auto_increment,
`file` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM
) ENGINE=MyISAM
");
$db->query("INSERT INTO `" . TABLE_PANEL_CRONSCRIPT . "` (`id`, `file`) VALUES (1, 'cron_traffic.php');");
$db->query("INSERT INTO `" . TABLE_PANEL_CRONSCRIPT . "` (`id`, `file`) VALUES (2, 'cron_tasks.php');");
@@ -146,7 +146,7 @@ if($settings['panel']['version'] == '1.2.3-cvs4')
PRIMARY KEY (`id`),
KEY `adminid` (`adminid`),
UNIQUE `date` (`adminid` , `year` , `month` , `day`)
) TYPE=MyISAM
) ENGINE=MyISAM
");
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs5' WHERE `settinggroup`='panel' AND `varname`='version'");
$settings['panel']['version'] = '1.2.3-cvs5';
@@ -267,7 +267,7 @@ if($settings['panel']['version'] == '1.2.6')
`value` longtext NOT NULL,
PRIMARY KEY (`id`),
KEY `adminid` (`adminid`)
) TYPE=MyISAM
) ENGINE=MyISAM
');
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'");
$settings['panel']['version'] = '1.2.6-cvs1';
@@ -458,7 +458,7 @@ if($settings['panel']['version'] == '1.2.12-svn1')
`port` int(5) NOT NULL default \'80\',
`default` int(1) NOT NULL default \'0\',
PRIMARY KEY (`id`)
) TYPE=MyISAM');
) ENGINE=MyISAM');
$db->query('INSERT INTO `' . TABLE_PANEL_IPSANDPORTS . '` (`ip`, `port`, `default`) VALUES (\'' . $settings['system']['ipaddress'] . '\', \'80\', \'1\')');
$db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.12-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\'');
$settings['panel']['version'] = '1.2.12-svn2';

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install
* @version $Id$
*
*/
if($settings['panel']['version'] == '1.2.19')
@@ -620,7 +620,7 @@ else
`mysql` bigint(30) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `customerid` (`customerid`)
) TYPE=MyISAM ;");
) ENGINE=MyISAM ;");
$db->query("CREATE TABLE `" . TABLE_PANEL_DISKSPACE_ADMINS . "` (
`id` int(11) unsigned NOT NULL auto_increment,
`adminid` int(11) unsigned NOT NULL default '0',
@@ -633,7 +633,7 @@ else
`mysql` bigint(30) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `adminid` (`adminid`)
) TYPE=MyISAM ;");
) ENGINE=MyISAM ;");
$db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (1, 'hosting', 10, 'hosting', 'lib/billing_class_hosting.php', 'invoice_fee_hosting', 'hosting_caption', 'hosting_rowcaption_setup', 'hosting_rowcaption_interval');");
$db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (2, 'domains', 20, 'domains', 'lib/billing_class_domains.php', 'invoice_fee_domains', 'domains_caption', 'domains_rowcaption_setup', 'domains_rowcaption_interval');");
$db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (3, 'traffic', 30, 'traffic', 'lib/billing_class_traffic.php', 'invoice_fee_traffic', 'traffic_caption', 'traffic_rowcaption_setup', 'traffic_rowcaption_interval');");
@@ -803,7 +803,7 @@ else
`description` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM");
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` (`id`, `phpsettings`, `description`) VALUES(1, 'short_open_tag = On\r\nasp_tags = Off\r\nprecision = 14\r\noutput_buffering = 4096\r\nallow_call_time_pass_reference = Off\r\nsafe_mode = {SAFE_MODE}\r\nsafe_mode_gid = Off\r\nsafe_mode_include_dir = \"{PEAR_DIR}\"\r\nsafe_mode_allowed_env_vars = PHP_\r\nsafe_mode_protected_env_vars = LD_LIBRARY_PATH\r\nopen_basedir = \"{OPEN_BASEDIR}\"\r\ndisable_functions = exec,passthru,shell_exec,system,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate\r\ndisable_classes =\r\nexpose_php = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\npost_max_size = 16M\r\nerror_reporting = E_ALL & ~E_NOTICE\r\ndisplay_errors = On\r\ndisplay_startup_errors = Off\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\nreport_memleaks = On\r\ntrack_errors = Off\r\nhtml_errors = Off\r\nvariables_order = \"GPCS\"\r\nregister_globals = Off\r\nregister_argc_argv = Off\r\ngpc_order = \"GPC\"\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\ninclude_path = \".:{PEAR_DIR}\"\r\nenable_dl = Off\r\nfile_uploads = On\r\nupload_tmp_dir = \"{TMP_DIR}\"\r\nupload_max_filesize = 32M\r\nallow_url_fopen = Off\r\nsendmail_path = \"/usr/sbin/sendmail -t -f {CUSTOMER_EMAIL}\"\r\nsession.save_handler = files\r\nsession.save_path = \"{TMP_DIR}\"\r\nsession.use_cookies = 1\r\nsession.name = PHPSESSID\r\nsession.auto_start = 0\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.cookie_domain =\r\nsession.serialize_handler = php\r\nsession.gc_probability = 1\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.referer_check =\r\nsession.entropy_length = 16\r\nsession.entropy_file = /dev/urandom\r\nsession.cache_limiter = nocache\r\nsession.cache_expire = 180\r\nsession.use_trans_sid = 0\r\nsuhosin.simulation = Off\r\nsuhosin.mail.protect = 1\r\n', 'Default Config')");
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` (`id`, `phpsettings`, `description`) VALUES(1, 'short_open_tag = On\r\nasp_tags = Off\r\nprecision = 14\r\noutput_buffering = 4096\r\nallow_call_time_pass_reference = Off\r\nsafe_mode = {SAFE_MODE}\r\nsafe_mode_gid = Off\r\nsafe_mode_include_dir = \"{PEAR_DIR}\"\r\nsafe_mode_allowed_env_vars = PHP_\r\nsafe_mode_protected_env_vars = LD_LIBRARY_PATH\r\n{OPEN_BASEDIR_C}open_basedir = \"{OPEN_BASEDIR}\"\r\ndisable_functions = exec,passthru,shell_exec,system,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate\r\ndisable_classes =\r\nexpose_php = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\npost_max_size = 16M\r\nerror_reporting = E_ALL & ~E_NOTICE\r\ndisplay_errors = On\r\ndisplay_startup_errors = Off\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\nreport_memleaks = On\r\ntrack_errors = Off\r\nhtml_errors = Off\r\nvariables_order = \"GPCS\"\r\nregister_globals = Off\r\nregister_argc_argv = Off\r\ngpc_order = \"GPC\"\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\ninclude_path = \".:{PEAR_DIR}\"\r\nenable_dl = Off\r\nfile_uploads = On\r\nupload_tmp_dir = \"{TMP_DIR}\"\r\nupload_max_filesize = 32M\r\nallow_url_fopen = Off\r\nsendmail_path = \"/usr/sbin/sendmail -t -f {CUSTOMER_EMAIL}\"\r\nsession.save_handler = files\r\nsession.save_path = \"{TMP_DIR}\"\r\nsession.use_cookies = 1\r\nsession.name = PHPSESSID\r\nsession.auto_start = 0\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.cookie_domain =\r\nsession.serialize_handler = php\r\nsession.gc_probability = 1\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.referer_check =\r\nsession.entropy_length = 16\r\nsession.entropy_file = /dev/urandom\r\nsession.cache_limiter = nocache\r\nsession.cache_expire = 180\r\nsession.use_trans_sid = 0\r\nsuhosin.simulation = Off\r\nsuhosin.mail.protect = 1\r\n', 'Default Config')");
$db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `phpsettingid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1'");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_wrapper', '0')");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_starter', '0')");
@@ -1081,4 +1081,4 @@ else
?>
?>

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install
* @version $Id$
*
*/
if($settings['panel']['version'] == '1.4')

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install
* @version $Id$
*
*/
$updatelog = FroxlorLogger::getInstanceOf(array('loginname' => 'updater'), $db, $settings);
@@ -105,5 +105,3 @@ if(isFroxlor())
$filelog->logAction(ADM_ACTION, LOG_WARNING, '--------------- END LOG ---------------');
unset($filelog);
}
?>

30
js/excanvas.min.js vendored Normal file

File diff suppressed because one or more lines are too long

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

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

File diff suppressed because one or more lines are too long

18
js/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

4
js/jquery.tablesorter.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,312 @@
/**
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
* Version: 1.0.0b2_r792
*
* Copyright (c) 2009-2011 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
* choose the license that best suits your project and use it accordingly.
*
* Although not required, the author would appreciate an email letting him
* know of any substantial use of jqPlot. You can reach the author at:
* chris at jqplot dot com or see http://www.jqplot.com/info.php .
*
* If you are feeling kind and generous, consider supporting the project by
* making a donation at: http://www.jqplot.com/donate.php .
*
* sprintf functions contained in jqplot.sprintf.js by Ash Searle:
*
* version 2007.04.27
* author Ash Searle
* http://hexmen.com/blog/2007/03/printf-sprintf/
* http://hexmen.com/js/sprintf.js
* The author (Ash Searle) has placed this code in the public domain:
* "This code is unrestricted: you are free to use it however you like."
*
*/
(function($) {
// Class: $.jqplot.BezierCurveRenderer.js
// Renderer which draws lines as stacked bezier curves.
// Data for the line will not be specified as an array of
// [x, y] data point values, but as a an array of [start piont, bezier curve]
// So, the line is specified as: [[xstart, ystart], [cp1x, cp1y, cp2x, cp2y, xend, yend]].
$.jqplot.BezierCurveRenderer = function(){
$.jqplot.LineRenderer.call(this);
};
$.jqplot.BezierCurveRenderer.prototype = new $.jqplot.LineRenderer();
$.jqplot.BezierCurveRenderer.prototype.constructor = $.jqplot.BezierCurveRenderer;
// Method: setGridData
// converts the user data values to grid coordinates and stores them
// in the gridData array.
// Called with scope of a series.
$.jqplot.BezierCurveRenderer.prototype.setGridData = function(plot) {
// recalculate the grid data
var xp = this._xaxis.series_u2p;
var yp = this._yaxis.series_u2p;
// this._plotData should be same as this.data
var data = this.data;
this.gridData = [];
this._prevGridData = [];
// if seriesIndex = 0, fill to x axis.
// if seriesIndex > 0, fill to previous series data.
var idx = this.index;
if (data.length == 2) {
if (idx == 0) {
this.gridData = [
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]),
xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])],
[xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, this._yaxis.min)],
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)]
];
}
else {
var psd = plot.series[idx-1].data;
this.gridData = [
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]),
xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])],
[xp.call(this._xaxis, psd[1][4]), yp.call(this._yaxis, psd[1][5])],
[xp.call(this._xaxis, psd[1][2]), yp.call(this._yaxis, psd[1][3]),
xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]),
xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])]
];
}
}
else {
if (idx == 0) {
this.gridData = [
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]),
xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])],
[xp.call(this._xaxis, data[3][1]), yp.call(this._yaxis, this._yaxis.min)],
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)]
];
}
else {
var psd = plot.series[idx-1].data;
this.gridData = [
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]),
xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])],
[xp.call(this._xaxis, psd[3][0]), yp.call(this._yaxis, psd[3][1])],
[xp.call(this._xaxis, psd[2][0]), yp.call(this._yaxis, psd[2][1]),
xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]),
xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])]
];
}
}
};
// Method: makeGridData
// converts any arbitrary data values to grid coordinates and
// returns them. This method exists so that plugins can use a series'
// linerenderer to generate grid data points without overwriting the
// grid data associated with that series.
// Called with scope of a series.
$.jqplot.BezierCurveRenderer.prototype.makeGridData = function(data, plot) {
// recalculate the grid data
var xp = this._xaxis.series_u2p;
var yp = this._yaxis.series_u2p;
var gd = [];
var pgd = [];
// if seriesIndex = 0, fill to x axis.
// if seriesIndex > 0, fill to previous series data.
var idx = this.index;
if (data.length == 2) {
if (idx == 0) {
gd = [
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]),
xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])],
[xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, this._yaxis.min)],
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)]
];
}
else {
var psd = plot.series[idx-1].data;
gd = [
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]),
xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])],
[xp.call(this._xaxis, psd[1][4]), yp.call(this._yaxis, psd[1][5])],
[xp.call(this._xaxis, psd[1][2]), yp.call(this._yaxis, psd[1][3]),
xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]),
xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])]
];
}
}
else {
if (idx == 0) {
gd = [
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]),
xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])],
[xp.call(this._xaxis, data[3][1]), yp.call(this._yaxis, this._yaxis.min)],
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)]
];
}
else {
var psd = plot.series[idx-1].data;
gd = [
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]),
xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])],
[xp.call(this._xaxis, psd[3][0]), yp.call(this._yaxis, psd[3][1])],
[xp.call(this._xaxis, psd[2][0]), yp.call(this._yaxis, psd[2][1]),
xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]),
xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])]
];
}
}
return gd;
};
// called within scope of series.
$.jqplot.BezierCurveRenderer.prototype.draw = function(ctx, gd, options) {
var i;
ctx.save();
if (gd.length) {
if (this.showLine) {
ctx.save();
var opts = (options != null) ? options : {};
ctx.fillStyle = opts.fillStyle || this.color;
ctx.beginPath();
ctx.moveTo(gd[0][0], gd[0][1]);
ctx.bezierCurveTo(gd[1][0], gd[1][1], gd[1][2], gd[1][3], gd[1][4], gd[1][5]);
ctx.lineTo(gd[2][0], gd[2][1]);
if (gd[3].length == 2) {
ctx.lineTo(gd[3][0], gd[3][1]);
}
else {
ctx.bezierCurveTo(gd[3][0], gd[3][1], gd[3][2], gd[3][3], gd[3][4], gd[3][5]);
}
ctx.closePath();
ctx.fill();
ctx.restore();
}
}
ctx.restore();
};
$.jqplot.BezierCurveRenderer.prototype.drawShadow = function(ctx, gd, options) {
// This is a no-op, shadows drawn with lines.
};
$.jqplot.BezierAxisRenderer = function() {
$.jqplot.LinearAxisRenderer.call(this);
};
$.jqplot.BezierAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer();
$.jqplot.BezierAxisRenderer.prototype.constructor = $.jqplot.BezierAxisRenderer;
// Axes on a plot with Bezier Curves
$.jqplot.BezierAxisRenderer.prototype.init = function(options){
$.extend(true, this, options);
var db = this._dataBounds;
// Go through all the series attached to this axis and find
// the min/max bounds for this axis.
for (var i=0; i<this._series.length; i++) {
var s = this._series[i];
var d = s.data;
if (d.length == 4) {
for (var j=0; j<d.length; j++) {
if (this.name == 'xaxis' || this.name == 'x2axis') {
if (d[j][0] < db.min || db.min == null) {
db.min = d[j][0];
}
if (d[j][0] > db.max || db.max == null) {
db.max = d[j][0];
}
}
else {
if (d[j][1] < db.min || db.min == null) {
db.min = d[j][1];
}
if (d[j][1] > db.max || db.max == null) {
db.max = d[j][1];
}
}
}
}
else {
if (this.name == 'xaxis' || this.name == 'x2axis') {
if (d[0][0] < db.min || db.min == null) {
db.min = d[0][0];
}
if (d[0][0] > db.max || db.max == null) {
db.max = d[0][0];
}
for (var j=0; j<5; j+=2) {
if (d[1][j] < db.min || db.min == null) {
db.min = d[1][j];
}
if (d[1][j] > db.max || db.max == null) {
db.max = d[1][j];
}
}
}
else {
if (d[0][1] < db.min || db.min == null) {
db.min = d[0][1];
}
if (d[0][1] > db.max || db.max == null) {
db.max = d[0][1];
}
for (var j=1; j<6; j+=2) {
if (d[1][j] < db.min || db.min == null) {
db.min = d[1][j];
}
if (d[1][j] > db.max || db.max == null) {
db.max = d[1][j];
}
}
}
}
}
};
// setup default renderers for axes and legend so user doesn't have to
// called with scope of plot
function preInit(target, data, options) {
options = options || {};
options.axesDefaults = $.extend(true, {pad:0}, options.axesDefaults);
options.legend = $.extend(true, {placement:'outside'}, options.legend);
// only set these if there is a pie series
var setopts = false;
if (options.seriesDefaults.renderer == $.jqplot.BezierCurveRenderer) {
setopts = true;
}
else if (options.series) {
for (var i=0; i < options.series.length; i++) {
if (options.series[i].renderer == $.jqplot.BezierCurveRenderer) {
setopts = true;
}
}
}
if (setopts) {
options.axesDefaults.renderer = $.jqplot.BezierAxisRenderer;
}
}
$.jqplot.preInitHooks.push(preInit);
})(jQuery);

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