forked from Wavyzz/dolibarr
Compare commits
387 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58b2b91928 | ||
|
|
d11e22c970 | ||
|
|
0428d5eee4 | ||
|
|
dd60c384a5 | ||
|
|
ba896c024d | ||
|
|
928af1a2b3 | ||
|
|
7382f4e3ee | ||
|
|
a3c74aa9bd | ||
|
|
59c84747ac | ||
|
|
45f09da98a | ||
|
|
5c2d8656cc | ||
|
|
a13bf2b93f | ||
|
|
65304f2e77 | ||
|
|
8a6cd7f84d | ||
|
|
ea21064ca2 | ||
|
|
4e395e741c | ||
|
|
b5a12ff088 | ||
|
|
9623d50f48 | ||
|
|
deecfe5d07 | ||
|
|
1f98a23587 | ||
|
|
1d5db424a1 | ||
|
|
8d0cafc687 | ||
|
|
57958e25bf | ||
|
|
9edb149d2c | ||
|
|
622720132d | ||
|
|
bdd8b393f9 | ||
|
|
55ac02382b | ||
|
|
70cd7b87e9 | ||
|
|
18ae5ff6ea | ||
|
|
52c2d39194 | ||
|
|
0b56923de5 | ||
|
|
189cba6c41 | ||
|
|
de5612ae0b | ||
|
|
f23d826e0a | ||
|
|
62f14e3dd5 | ||
|
|
643e077c68 | ||
|
|
5e490f8530 | ||
|
|
a67f6cc732 | ||
|
|
06c17b806e | ||
|
|
8deeac403a | ||
|
|
ed724b82d3 | ||
|
|
9fed7fba30 | ||
|
|
cb04444301 | ||
|
|
8c030f4f81 | ||
|
|
4ef651d50b | ||
|
|
6bd438fc7f | ||
|
|
657c7eb4cf | ||
|
|
a00439b375 | ||
|
|
cb6f9f40b8 | ||
|
|
cfa8ca5c52 | ||
|
|
3354b35e75 | ||
|
|
3556adc11d | ||
|
|
0d83691c5b | ||
|
|
bcfd35648b | ||
|
|
554a5b4c29 | ||
|
|
eb543f0606 | ||
|
|
1f4d3207fe | ||
|
|
83d75aaa31 | ||
|
|
2e74a4ba85 | ||
|
|
5d502aa7d1 | ||
|
|
c28c5c1003 | ||
|
|
383195581f | ||
|
|
6c27963d1d | ||
|
|
6406d4e64c | ||
|
|
142e7e55d7 | ||
|
|
56188ca798 | ||
|
|
c8c31b2167 | ||
|
|
86aab20c0a | ||
|
|
4c52e477e4 | ||
|
|
b8b400a5a4 | ||
|
|
92cb694f55 | ||
|
|
2be18e834a | ||
|
|
b554dfc3d2 | ||
|
|
183ba3e8ca | ||
|
|
f2365a4c8d | ||
|
|
db840bf8de | ||
|
|
4713738ea3 | ||
|
|
d8894b149e | ||
|
|
407978991c | ||
|
|
0d1159d862 | ||
|
|
06442f4755 | ||
|
|
54dd02413f | ||
|
|
7feff22c1a | ||
|
|
a5a4ef538d | ||
|
|
c8bd77ddd7 | ||
|
|
1c32b4231d | ||
|
|
31560e19df | ||
|
|
e9a8ec1795 | ||
|
|
26aa12de97 | ||
|
|
00d185f648 | ||
|
|
4e05640ecb | ||
|
|
ff33cb4a88 | ||
|
|
5ce0fe1405 | ||
|
|
7c61f6fd88 | ||
|
|
42b3e109d7 | ||
|
|
d11971dbbd | ||
|
|
20d90831e1 | ||
|
|
0160fb8c5e | ||
|
|
a51114d571 | ||
|
|
52f270d623 | ||
|
|
9c42cdc7d3 | ||
|
|
d79b65ce49 | ||
|
|
2b85a2fcd4 | ||
|
|
4fd98dfb72 | ||
|
|
06eca56e00 | ||
|
|
2d818fc886 | ||
|
|
180908bfe1 | ||
|
|
3dcf553a47 | ||
|
|
f9bda74e22 | ||
|
|
73f1d8ee99 | ||
|
|
1a73347866 | ||
|
|
d7308525ae | ||
|
|
4deeb20dd8 | ||
|
|
0a8016e2aa | ||
|
|
7ed980fab5 | ||
|
|
368af101ef | ||
|
|
8b224e9e2d | ||
|
|
03ec0d7cc5 | ||
|
|
a717297a8c | ||
|
|
086a0ae340 | ||
|
|
599971b27a | ||
|
|
f23462a173 | ||
|
|
a83c7d0992 | ||
|
|
f67636d0f3 | ||
|
|
92fe8ebe1d | ||
|
|
2812bfae7a | ||
|
|
1a969e61e9 | ||
|
|
fd9565934c | ||
|
|
a465814fd4 | ||
|
|
514babeab1 | ||
|
|
caadf396e2 | ||
|
|
5c2922a17b | ||
|
|
1618ce29c7 | ||
|
|
f11430dec8 | ||
|
|
ea51673ce7 | ||
|
|
d9d32bb9f5 | ||
|
|
76f8d1d37c | ||
|
|
1cbd628971 | ||
|
|
46ae38c86d | ||
|
|
b6c9a37415 | ||
|
|
79cafb1c12 | ||
|
|
21d30c1b3e | ||
|
|
82af0ed28f | ||
|
|
ffaadcc930 | ||
|
|
95b976c3d5 | ||
|
|
190bcf61e4 | ||
|
|
229ae171de | ||
|
|
face8fc0be | ||
|
|
72f67f640d | ||
|
|
0b7b27e795 | ||
|
|
04bb23d9bf | ||
|
|
ed48969630 | ||
|
|
96294403e2 | ||
|
|
c1b1dcc5e7 | ||
|
|
646651e731 | ||
|
|
90c4e6598b | ||
|
|
952864f532 | ||
|
|
23226ad472 | ||
|
|
6cf8c5c102 | ||
|
|
1b1b58ad5a | ||
|
|
1725e5b591 | ||
|
|
7a49d56589 | ||
|
|
43f1fbed01 | ||
|
|
a8913704e9 | ||
|
|
f7476d5727 | ||
|
|
68c1fa6c34 | ||
|
|
94f9fb2e2f | ||
|
|
0ade601a11 | ||
|
|
dc1457b96a | ||
|
|
ceb5f161f6 | ||
|
|
b4440a6b2e | ||
|
|
fd362f1108 | ||
|
|
6f1fd1ae53 | ||
|
|
5c62e8865a | ||
|
|
e13696db55 | ||
|
|
964bb0968f | ||
|
|
91faac4c87 | ||
|
|
06679ede7c | ||
|
|
4a4cdc0839 | ||
|
|
ee31359488 | ||
|
|
230f4f8f57 | ||
|
|
4278a113a0 | ||
|
|
da0dc3472b | ||
|
|
e94b20f684 | ||
|
|
be85c5c381 | ||
|
|
d4ca08db00 | ||
|
|
8416014cff | ||
|
|
c0691b01eb | ||
|
|
795310b934 | ||
|
|
3e72bdbc87 | ||
|
|
791c08c006 | ||
|
|
7c7d0bd495 | ||
|
|
9bd8e3434e | ||
|
|
a8f69ad16f | ||
|
|
fc46a1ff97 | ||
|
|
decdc2a9a3 | ||
|
|
bd0be8f358 | ||
|
|
7700293bdf | ||
|
|
60c77f3d50 | ||
|
|
9f770d862d | ||
|
|
ca67f976b6 | ||
|
|
e722138608 | ||
|
|
32d2b0a9d6 | ||
|
|
30026ecddb | ||
|
|
d53a56f13f | ||
|
|
49c7a1f2b4 | ||
|
|
b9b2dbe9b1 | ||
|
|
1726720d16 | ||
|
|
84a09808fc | ||
|
|
f47d6c71ed | ||
|
|
b623392062 | ||
|
|
425ca83a99 | ||
|
|
15efd9e8a1 | ||
|
|
50443f1977 | ||
|
|
2bb87aabbe | ||
|
|
2519690020 | ||
|
|
ea0e05b07c | ||
|
|
21d028c064 | ||
|
|
c9a35c4e3a | ||
|
|
22006aa4dc | ||
|
|
82b31e1f5b | ||
|
|
7a3ef9bf8a | ||
|
|
d0480f1d90 | ||
|
|
9b4b8db189 | ||
|
|
562be023c6 | ||
|
|
4799c6692e | ||
|
|
01d37ad159 | ||
|
|
1b2a4f4742 | ||
|
|
bfba7bbc7f | ||
|
|
8d95ae1884 | ||
|
|
748ac3a5a7 | ||
|
|
5ea6b99593 | ||
|
|
33b9c5af45 | ||
|
|
85e797596f | ||
|
|
34fe219dcb | ||
|
|
2fe16db244 | ||
|
|
ebf73de8cd | ||
|
|
b26c3266ed | ||
|
|
f4759a0e6e | ||
|
|
656d4942a6 | ||
|
|
7921965fe2 | ||
|
|
5953f18f54 | ||
|
|
7a6a462ef2 | ||
|
|
21a4dd9685 | ||
|
|
41e8011a80 | ||
|
|
46987ea4bd | ||
|
|
6c7206d210 | ||
|
|
39e34357a1 | ||
|
|
557c96455e | ||
|
|
ea07afd6c2 | ||
|
|
7e933ca175 | ||
|
|
47c0b8272d | ||
|
|
afd9b817be | ||
|
|
f5cc12895a | ||
|
|
c7daf233cd | ||
|
|
9edd80b850 | ||
|
|
67adc11086 | ||
|
|
129bb0cf2f | ||
|
|
69b429914f | ||
|
|
74887b5850 | ||
|
|
3641a4b5bb | ||
|
|
d4d598d0aa | ||
|
|
450ccf31a7 | ||
|
|
6b9717b250 | ||
|
|
2a19e9d2a1 | ||
|
|
9200847eaa | ||
|
|
3918335bf7 | ||
|
|
99006125fd | ||
|
|
dfcfb48057 | ||
|
|
62ecc497fa | ||
|
|
f7b0e1a976 | ||
|
|
0092f1bc89 | ||
|
|
6e84b8ca63 | ||
|
|
fa0e1ca87e | ||
|
|
58df839271 | ||
|
|
d5b21a05b2 | ||
|
|
455789d575 | ||
|
|
965057307f | ||
|
|
2515d27d19 | ||
|
|
d390f3137f | ||
|
|
2b77a99fa3 | ||
|
|
3a2caa3e46 | ||
|
|
a9c03aa01e | ||
|
|
32339b03fd | ||
|
|
52f324002c | ||
|
|
db53aa53b6 | ||
|
|
ab80f6aaa7 | ||
|
|
eff43a8e0c | ||
|
|
e503b2d858 | ||
|
|
216df5ad07 | ||
|
|
907c7f748d | ||
|
|
91b8f33ea5 | ||
|
|
5580a4cc30 | ||
|
|
cb8b5188be | ||
|
|
8e9f3cabf3 | ||
|
|
c31c40a61e | ||
|
|
6958fe9693 | ||
|
|
e0e3c07670 | ||
|
|
64c4d59466 | ||
|
|
312f81004f | ||
|
|
5f001c1079 | ||
|
|
12a3ce7746 | ||
|
|
6b07571f09 | ||
|
|
294cc73481 | ||
|
|
0f20381453 | ||
|
|
2187f3fda7 | ||
|
|
5f7d552c71 | ||
|
|
ef36cbc1be | ||
|
|
5b609c7ea1 | ||
|
|
672dc99145 | ||
|
|
54f588cb90 | ||
|
|
7cb3e6f780 | ||
|
|
d41d516072 | ||
|
|
f235caf4ec | ||
|
|
4ddb9023d7 | ||
|
|
ca7fa84d80 | ||
|
|
6e291ad70f | ||
|
|
435ee2cc26 | ||
|
|
6c7eb59f31 | ||
|
|
ab94865c71 | ||
|
|
8ec22d9f67 | ||
|
|
fb59b5c69a | ||
|
|
a31a74134c | ||
|
|
5169437c2d | ||
|
|
f9b2f29547 | ||
|
|
64ddee017b | ||
|
|
1a56c5b021 | ||
|
|
779e33d490 | ||
|
|
c628cfd99a | ||
|
|
3abffac52a | ||
|
|
25640853f5 | ||
|
|
b0c55c77c3 | ||
|
|
a17f7d1041 | ||
|
|
779eacd9c1 | ||
|
|
a4359d6eaa | ||
|
|
c3040f9609 | ||
|
|
e446d8c7a2 | ||
|
|
6212d1a425 | ||
|
|
42c8b25597 | ||
|
|
381ce5fee3 | ||
|
|
71c43c9069 | ||
|
|
2ee9ca9c79 | ||
|
|
16fccd7892 | ||
|
|
346fd0d09b | ||
|
|
4f5456c8d8 | ||
|
|
a8f66a9b09 | ||
|
|
ab52d046b9 | ||
|
|
7e843d855a | ||
|
|
a11e4ceb44 | ||
|
|
4f490f3e2d | ||
|
|
28aa89c659 | ||
|
|
0e4ca576ec | ||
|
|
53a78838f8 | ||
|
|
eb6008bb4d | ||
|
|
a748466758 | ||
|
|
c7317ed2a1 | ||
|
|
1e526a2a03 | ||
|
|
b141f3caf5 | ||
|
|
5aae71f9de | ||
|
|
bb917bea08 | ||
|
|
3870428f16 | ||
|
|
307c010b90 | ||
|
|
d7e579e234 | ||
|
|
45e34aba65 | ||
|
|
2a12b24644 | ||
|
|
b948ee1212 | ||
|
|
8a20b670e7 | ||
|
|
6ef98b3d46 | ||
|
|
d3198894b8 | ||
|
|
231fd6b2ae | ||
|
|
8f32a35faa | ||
|
|
6616254504 | ||
|
|
a98e57c596 | ||
|
|
d4cc4b4288 | ||
|
|
1104387b72 | ||
|
|
49bb9d774d | ||
|
|
58b0751599 | ||
|
|
dc46b82cf3 | ||
|
|
141fa014e6 | ||
|
|
b6b873cfc5 | ||
|
|
ae8b16b9fc | ||
|
|
64d60d1270 | ||
|
|
56daf57cb1 | ||
|
|
9a4314947d | ||
|
|
d892f36fe8 | ||
|
|
4804530468 | ||
|
|
06b0330d84 |
24
ChangeLog
24
ChangeLog
@@ -2,11 +2,7 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
***** ChangeLog for 3.3 compared to 3.2 *****
|
***** ChangeLog for 3.2.0 compared to 3.1.2 *****
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.2 compared to 3.1 *****
|
|
||||||
WARNING: PHP lower than 5.x are no more supported.
|
WARNING: PHP lower than 5.x are no more supported.
|
||||||
WARNING: Because of a major datastructure change onto supplier prices tables, be aware
|
WARNING: Because of a major datastructure change onto supplier prices tables, be aware
|
||||||
to make a backup of your database before making upgrade.
|
to make a backup of your database before making upgrade.
|
||||||
@@ -70,6 +66,10 @@ For users:
|
|||||||
- Fix: Can use POS module with several concurrent users.
|
- Fix: Can use POS module with several concurrent users.
|
||||||
- Fix: Installer don't fails with Mysql version that added a ssl_cypher field.
|
- Fix: Installer don't fails with Mysql version that added a ssl_cypher field.
|
||||||
- Fix: Sanitize input parameters.
|
- Fix: Sanitize input parameters.
|
||||||
|
- Fix: [ bug #368 ] Product list
|
||||||
|
- Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills
|
||||||
|
- Fix: [ bug #399 ] Bad calculation of local taxes in update line products
|
||||||
|
- Fix: [ bug #427 ] Bad links to wiki help in certains menus
|
||||||
|
|
||||||
For developers:
|
For developers:
|
||||||
- New: Can add a left menu into an existing top menu or left menu.
|
- New: Can add a left menu into an existing top menu or left menu.
|
||||||
@@ -98,6 +98,20 @@ For developers:
|
|||||||
WARNING: To reduce technic debt, all functions dolibarr_xxx were renamed int dol_xxx.
|
WARNING: To reduce technic debt, all functions dolibarr_xxx were renamed int dol_xxx.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.1.2 compared to 3.1.1 *****
|
||||||
|
|
||||||
|
- Fix: Can clone a proposal
|
||||||
|
- Fix: Add member ID in substitution method
|
||||||
|
- Fix: Duplicate end tag and missing form parts
|
||||||
|
- Fix: Support companies with no prof id.
|
||||||
|
- Fix: Sanitize data
|
||||||
|
- Fix: Bug #318
|
||||||
|
- Fix: Bug #369
|
||||||
|
- Fix: More bugs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.1.1 compared to 3.1.0 *****
|
***** ChangeLog for 3.1.1 compared to 3.1.0 *****
|
||||||
|
|
||||||
- New: Add option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS. With this option added,
|
- New: Add option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS. With this option added,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
dolibarr (3.3.0+nmu1) unstable; urgency=low
|
dolibarr (3.2.0+nmu1) unstable; urgency=low
|
||||||
|
|
||||||
* Non-maintainer upload.
|
* Non-maintainer upload.
|
||||||
* New upstream release.
|
* New upstream release.
|
||||||
closes: bug#634783
|
closes: bug#634783
|
||||||
|
|
||||||
-- Dolibarr team <contact@dolibarr.org> Mon, 10 Aug 2011 12:00:00 +0100
|
-- Dolibarr team <contact@dolibarr.org> Mon, 18 Jun 2012 12:00:00 +0100
|
||||||
|
|
||||||
# For a changelog file dedicated to end users, see /usr/share/doc/dolibarr/ChangeLog.gz
|
# For a changelog file dedicated to end users, see /usr/share/doc/dolibarr/ChangeLog.gz
|
||||||
@@ -9,13 +9,12 @@ Build-Depends: debhelper (>= 7), po-debconf, dpatch
|
|||||||
Package: dolibarr
|
Package: dolibarr
|
||||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||||
php5-mysql | php5-mysqli,
|
php5-mysql | php5-mysqli,
|
||||||
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip, php-fpdf,
|
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
|
||||||
libphp-adodb,
|
php-fpdf,
|
||||||
libfpdi-php,
|
libphp-adodb,
|
||||||
libfpdf-tpl-php,
|
|
||||||
libnusoap-php,
|
libnusoap-php,
|
||||||
libphp-pclzip,
|
libphp-pclzip,
|
||||||
libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor,
|
libjs-jquery, libjs-jquery-ui, ckeditor,
|
||||||
ttf-dejavu-core,
|
ttf-dejavu-core,
|
||||||
xdg-utils,
|
xdg-utils,
|
||||||
mysql-server,
|
mysql-server,
|
||||||
|
|||||||
@@ -6,11 +6,10 @@ Installed-Size: 61200
|
|||||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||||
php5-mysql | php5-mysqli,
|
php5-mysql | php5-mysqli,
|
||||||
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
|
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
|
||||||
|
libphp-adodb,
|
||||||
libnusoap-php,
|
libnusoap-php,
|
||||||
libphp-pclzip,
|
libphp-pclzip,
|
||||||
libfpdi-php,
|
libjs-jquery, libjs-jquery-ui, ckeditor,
|
||||||
libfpdf-tpl-php,
|
|
||||||
ckeditor,
|
|
||||||
ttf-dejavu-core,
|
ttf-dejavu-core,
|
||||||
xdg-utils,
|
xdg-utils,
|
||||||
mysql-server
|
mysql-server
|
||||||
|
|||||||
@@ -83,8 +83,9 @@ case "$1" in
|
|||||||
chown -R root:www-data $installconfig
|
chown -R root:www-data $installconfig
|
||||||
chmod -R 660 $installconfig
|
chmod -R 660 $installconfig
|
||||||
|
|
||||||
if [ ! -s $config ]
|
# If a conf already exists and its content was already completed by installer
|
||||||
then
|
if [ ! -s $config ] || ! grep -q "File generated by" $config
|
||||||
|
then
|
||||||
# Create an empty conf.php with permission to web server
|
# Create an empty conf.php with permission to web server
|
||||||
echo Create empty file $config
|
echo Create empty file $config
|
||||||
touch $config
|
touch $config
|
||||||
@@ -93,17 +94,17 @@ case "$1" in
|
|||||||
else
|
else
|
||||||
# File already exist. We add params not found.
|
# File already exist. We add params not found.
|
||||||
echo Add new params to overwrite path to use shared libraries/fonts
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_CKEDITOR" $config || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_JQUERY" $config || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_JQUERY_UI" $config || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
#
|
#
|
||||||
# see: dh_installdeb(1)
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
set -e
|
#set -e
|
||||||
|
set +e
|
||||||
|
|
||||||
# summary of how this script can be called:
|
# summary of how this script can be called:
|
||||||
# * <postrm> `remove'
|
# * <postrm> `remove'
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ $force_install_lockinstall='444';
|
|||||||
|
|
||||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||||
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||||
$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
||||||
$force_dolibarr_lib_GEOIP_PATH='';
|
$force_dolibarr_lib_GEOIP_PATH='';
|
||||||
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||||
$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||||
@@ -36,7 +36,7 @@ $force_dolibarr_lib_TCPDF_PATH='';
|
|||||||
$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||||
$force_dolibarr_js_JQUERY='/javascript/jquery';
|
$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||||
$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||||
$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
|
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -93,17 +93,18 @@ clean:
|
|||||||
# clean from all embedded libraries (we use package dependencies instead)
|
# clean from all embedded libraries (we use package dependencies instead)
|
||||||
rm -fr htdocs/includes/adodbtime
|
rm -fr htdocs/includes/adodbtime
|
||||||
rm -fr htdocs/includes/ckeditor
|
rm -fr htdocs/includes/ckeditor
|
||||||
rm -fr htdocs/includes/fpdfi
|
# rm -fr htdocs/includes/fpdfi
|
||||||
rm -fr htdocs/includes/fonts
|
rm -fr htdocs/includes/fonts
|
||||||
rm -fr htdocs/includes/geoip
|
rm -fr htdocs/includes/geoip
|
||||||
rm -fr htdocs/includes/nusoap
|
rm -fr htdocs/includes/nusoap
|
||||||
rm -fr htdocs/includes/odtphp/zip/pclzip
|
rm -fr htdocs/includes/odtphp/zip/pclzip
|
||||||
rm -fr htdocs/includes/jquery/css
|
rm -fr htdocs/includes/jquery/css
|
||||||
rm -fr htdocs/includes/jquery/js
|
rm -fr htdocs/includes/jquery/js
|
||||||
rm -fr htdocs/includes/jquery/plugins/flot
|
# rm -fr htdocs/includes/jquery/plugins/flot
|
||||||
rm -fr htdocs/includes/jquery/plugins/jstree
|
rm -fr htdocs/includes/jquery/plugins/jstree
|
||||||
rm -fr htdocs/includes/jquery/plugins/lightbox
|
rm -fr htdocs/includes/jquery/plugins/lightbox
|
||||||
rm -fr htdocs/includes/jquery/plugins/mobile
|
rm -fr htdocs/includes/jquery/plugins/mobile
|
||||||
|
rm -fr htdocs/includes/jquery/plugins/multiselect
|
||||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
|
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
|
||||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
|
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
|
||||||
rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33
|
rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ PROJECT_NAME = dolibarr
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 3.3.0
|
PROJECT_NUMBER = 3.2.0
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
|
|||||||
@@ -16,13 +16,14 @@
|
|||||||
[Setup]
|
[Setup]
|
||||||
; ----- Change this -----
|
; ----- Change this -----
|
||||||
AppName=DoliWamp
|
AppName=DoliWamp
|
||||||
; DoliWamp-x.x.x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
|
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||||
AppVerName=DoliWamp-3.3.0-alpha
|
AppVerName=DoliWamp-3.2.0
|
||||||
; DoliWamp-x.x x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
|
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||||
OutputBaseFilename=DoliWamp-3.3.0-alpha
|
OutputBaseFilename=DoliWamp-3.2.0
|
||||||
; Define full path from wich all relative path are defined
|
; Define full path from wich all relative path are defined
|
||||||
; You must modify this to put here your dolibarr root directory
|
; You must modify this to put here your dolibarr root directory
|
||||||
SourceDir=c:\Documents and Settings\ldestail\git\dolibarr
|
;SourceDir=C:\Documents and Settings\ldestail\git\dolibarr_old
|
||||||
|
SourceDir=Z:\home\ldestail\git\dolibarr_old
|
||||||
; ----- End of change
|
; ----- End of change
|
||||||
;OutputManifestFile=build\doliwampbuild.log
|
;OutputManifestFile=build\doliwampbuild.log
|
||||||
AppId=doliwamp
|
AppId=doliwamp
|
||||||
@@ -31,7 +32,7 @@ AppPublisherURL=http://www.nltechno.com
|
|||||||
AppSupportURL=http://www.dolibarr.org
|
AppSupportURL=http://www.dolibarr.org
|
||||||
AppUpdatesURL=http://www.dolibarr.org
|
AppUpdatesURL=http://www.dolibarr.org
|
||||||
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
|
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
|
||||||
AppCopyright=Copyright (C) 2008-2011 Laurent Destailleur, NLTechno
|
AppCopyright=Copyright (C) 2008-2012 Laurent Destailleur, NLTechno
|
||||||
DefaultDirName=c:\dolibarr
|
DefaultDirName=c:\dolibarr
|
||||||
DefaultGroupName=Dolibarr
|
DefaultGroupName=Dolibarr
|
||||||
;LicenseFile=COPYING
|
;LicenseFile=COPYING
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ use Cwd;
|
|||||||
|
|
||||||
$PROJECT="dolibarr";
|
$PROJECT="dolibarr";
|
||||||
$MAJOR="3";
|
$MAJOR="3";
|
||||||
$MINOR="3";
|
$MINOR="2";
|
||||||
$BUILD="0-alpha"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
|
$BUILD="0"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
|
||||||
$RPMSUBVERSION="auto"; # auto use value found into BUILD
|
$RPMSUBVERSION="auto"; # auto use value found into BUILD
|
||||||
|
|
||||||
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||||
@@ -24,7 +24,7 @@ $RPMSUBVERSION="auto"; # auto use value found into BUILD
|
|||||||
"RPM_OPENSUSE"=>"rpmbuild",
|
"RPM_OPENSUSE"=>"rpmbuild",
|
||||||
"DEB"=>"dpkg",
|
"DEB"=>"dpkg",
|
||||||
"APS"=>"zip",
|
"APS"=>"zip",
|
||||||
"EXEDOLIWAMP"=>"iscc.exe"
|
"EXEDOLIWAMP"=>"ISCC.exe"
|
||||||
);
|
);
|
||||||
%ALTERNATEPATH=(
|
%ALTERNATEPATH=(
|
||||||
"7z"=>"7-ZIP",
|
"7z"=>"7-ZIP",
|
||||||
@@ -38,7 +38,7 @@ $FILENAMEZIP="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
|||||||
$FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
|
$FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
|
||||||
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}";
|
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}";
|
||||||
$FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
$FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
||||||
$FILENAMEEXEDOLIWAMP="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
$FILENAMEEXEDOLIWAMP="DoliWamp-$MAJOR.$MINOR.$BUILD";
|
||||||
if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat
|
if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat
|
||||||
if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake
|
if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake
|
||||||
|
|
||||||
@@ -102,7 +102,8 @@ for (0..@ARGV-1) {
|
|||||||
$FILENAMESNAPSHOT.="-".$PREFIX;
|
$FILENAMESNAPSHOT.="-".$PREFIX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($ENV{"DESTI"}) { $DESTI = $ENV{"DESTI"}; } # Force output dir if env DESTI is defined
|
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTI is defined
|
||||||
|
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTI is defined
|
||||||
|
|
||||||
|
|
||||||
print "Makepack version $VERSION\n";
|
print "Makepack version $VERSION\n";
|
||||||
@@ -165,7 +166,7 @@ $atleastonerpm=0;
|
|||||||
foreach my $target (keys %CHOOSEDTARGET) {
|
foreach my $target (keys %CHOOSEDTARGET) {
|
||||||
if ($target =~ /RPM/i)
|
if ($target =~ /RPM/i)
|
||||||
{
|
{
|
||||||
if ($atleastonerpm && ! $ENV{"DESTI"})
|
if ($atleastonerpm && ($DESTI eq "$SOURCE/build"))
|
||||||
{
|
{
|
||||||
print "Error: You asked creation of several rpms. Because all rpm have same name, you must defined an environment variable DESTI to tell packager where it can create subdirs for each generated package.\n";
|
print "Error: You asked creation of several rpms. Because all rpm have same name, you must defined an environment variable DESTI to tell packager where it can create subdirs for each generated package.\n";
|
||||||
exit;
|
exit;
|
||||||
@@ -323,7 +324,6 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/lightbox`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/lightbox`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jstree`;
|
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
||||||
@@ -763,8 +763,10 @@ if ($nboftargetok) {
|
|||||||
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
|
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
|
||||||
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
||||||
|
|
||||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
$SOURCEBACK=$SOURCE;
|
||||||
$cmd= "iscc.exe \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\"";
|
$SOURCEBACK =~ s/\//\\/g;
|
||||||
|
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||||
|
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"";
|
||||||
print "$cmd\n";
|
print "$cmd\n";
|
||||||
$ret= `$cmd`;
|
$ret= `$cmd`;
|
||||||
#print "$ret\n";
|
#print "$ret\n";
|
||||||
@@ -772,6 +774,8 @@ if ($nboftargetok) {
|
|||||||
# Move to final dir
|
# Move to final dir
|
||||||
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||||
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||||
|
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||||
|
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ This files describe steps made by Dolibarr packaging team to make a
|
|||||||
beta version of Dolibarr, step by step.
|
beta version of Dolibarr, step by step.
|
||||||
|
|
||||||
- Check all files are commited.
|
- Check all files are commited.
|
||||||
- Update version/info in / directory (README*.txt, ChangeLog...)
|
- Update version/info in /ChangeLog and /filefunc.inc.php
|
||||||
- Update version number with x.x.x in build/doxygen/dolibarr-doxygen.doxyfile
|
- Update version number with x.x.x in build/doxygen/dolibarr-doxygen.doxyfile
|
||||||
- Update version number with x.x.x in build/perl/virtualmin/dolibarr.pl
|
- Update version number with x.x.x in build/perl/virtualmin/dolibarr.pl
|
||||||
- Update version number with x.x.x-y in build/makepack-dolibarr.pl
|
- Update version number with x.x.x-y in build/makepack-dolibarr.pl
|
||||||
@@ -34,7 +34,7 @@ This files describe steps made by Dolibarr packaging team to make a
|
|||||||
complete release of Dolibarr, step by step.
|
complete release of Dolibarr, step by step.
|
||||||
|
|
||||||
- Check all files are commited.
|
- Check all files are commited.
|
||||||
- Update version/info in / directory (README*.txt, ChangeLog...)
|
- Update version/info in /ChangeLog and /filefunc.inc.php
|
||||||
- Update version number with x.x.x-y in build/makepack-dolibarr.pl
|
- Update version number with x.x.x-y in build/makepack-dolibarr.pl
|
||||||
- Update version number with x.x.x-y in build/exe/doliwamp/doliwamp.iss
|
- Update version number with x.x.x-y in build/exe/doliwamp/doliwamp.iss
|
||||||
- Update version number with x.x.x-y in htdocs/filefunc.inc.php
|
- Update version number with x.x.x-y in htdocs/filefunc.inc.php
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
<CompanyName />
|
<CompanyName />
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>DoliWamp</Program_Name>
|
<Program_Name>DoliWamp</Program_Name>
|
||||||
<Program_Version>3.1.0</Program_Version>
|
<Program_Version>3.2..0</Program_Version>
|
||||||
<Program_Release_Month>07</Program_Release_Month>
|
<Program_Release_Month>05</Program_Release_Month>
|
||||||
<Program_Release_Day>09</Program_Release_Day>
|
<Program_Release_Day>10</Program_Release_Day>
|
||||||
<Program_Release_Year>2011</Program_Release_Year>
|
<Program_Release_Year>2012</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
@@ -43,6 +43,7 @@
|
|||||||
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
||||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
||||||
@@ -81,6 +82,11 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
|
|||||||
</Web_Info>
|
</Web_Info>
|
||||||
<Permissions>
|
<Permissions>
|
||||||
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
||||||
|
<EULA>GNU GPL</EULA>
|
||||||
|
</Permissions>
|
||||||
|
<ASP>
|
||||||
|
<ASP_FORM>Y</ASP_FORM>
|
||||||
|
<ASP_Member>N</ASP_Member>
|
||||||
<ASP_Member_Number />
|
<ASP_Member_Number />
|
||||||
</ASP>
|
</ASP>
|
||||||
<Affiliates>
|
<Affiliates>
|
||||||
@@ -187,9 +193,4 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
|
|||||||
<Affiliates_Yaskifo_Order_Page />
|
<Affiliates_Yaskifo_Order_Page />
|
||||||
<Affiliates_Yaskifo_Vendor_ID />
|
<Affiliates_Yaskifo_Vendor_ID />
|
||||||
<Affiliates_Yaskifo_Product_ID />
|
<Affiliates_Yaskifo_Product_ID />
|
||||||
</Affiliates>
|
|
||||||
<ASP>
|
|
||||||
<ASP_FORM>Y</ASP_FORM>
|
|
||||||
<ASP_Member>N</ASP_Member>
|
|
||||||
<ASP_Member_Number />
|
|
||||||
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
<CompanyName />
|
<CompanyName />
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>Dolibarr</Program_Name>
|
<Program_Name>Dolibarr</Program_Name>
|
||||||
<Program_Version>3.1..0</Program_Version>
|
<Program_Version>3.2.0</Program_Version>
|
||||||
<Program_Release_Month>07</Program_Release_Month>
|
<Program_Release_Month>05</Program_Release_Month>
|
||||||
<Program_Release_Day>09</Program_Release_Day>
|
<Program_Release_Day>10</Program_Release_Day>
|
||||||
<Program_Release_Year>2011</Program_Release_Year>
|
<Program_Release_Year>2012</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
@@ -43,11 +43,31 @@
|
|||||||
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple to install
|
Simple to install
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple to use
|
Simple to use
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Simple to develop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
||||||
|
</English>
|
||||||
|
<French>
|
||||||
|
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||||
|
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||||
|
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
||||||
|
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||||
|
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
||||||
|
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
||||||
@@ -56,18 +76,6 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
|
|||||||
|
|
||||||
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
||||||
|
|
||||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
|
||||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
|
||||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
|
||||||
</Italian>
|
|
||||||
<French>
|
|
||||||
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
|
||||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
|
||||||
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
|
||||||
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
|
||||||
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
|
||||||
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple pour le développement (pas de frameworks lourds).
|
Simple pour le développement (pas de frameworks lourds).
|
||||||
@@ -88,6 +96,11 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
|||||||
<Web_Info>
|
<Web_Info>
|
||||||
<Application_URLs>
|
<Application_URLs>
|
||||||
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
||||||
|
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
|
||||||
|
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||||
|
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||||
|
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
||||||
|
</Application_URLs>
|
||||||
<Download_URLs>
|
<Download_URLs>
|
||||||
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
||||||
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
||||||
@@ -194,9 +207,4 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
|||||||
<Affiliates_Shareasale_Product_ID />
|
<Affiliates_Shareasale_Product_ID />
|
||||||
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
||||||
<Affiliates_SWReg_Order_Page />
|
<Affiliates_SWReg_Order_Page />
|
||||||
<Affiliates_VFree_Vendor_ID />
|
|
||||||
<Affiliates_VFree_Product_ID />
|
|
||||||
<Affiliates_VFree_Maximum_Commission_Rate />
|
|
||||||
<Affiliates_Yaskifo_Order_Page />
|
|
||||||
<Affiliates_Yaskifo_Vendor_ID />
|
|
||||||
<Affiliates_SWReg_Vendor_ID />
|
<Affiliates_SWReg_Vendor_ID />
|
||||||
|
|||||||
@@ -6,26 +6,26 @@
|
|||||||
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
|
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
|
||||||
</MASTER_PAD_VERSION_INFO>
|
</MASTER_PAD_VERSION_INFO>
|
||||||
<Company_Info>
|
<Company_Info>
|
||||||
<Company_Name>Dolibarr team</Company_Name>
|
<Company_Name>NLTechno</Company_Name>
|
||||||
<Address_1>11 rue raymond Queneau</Address_1>
|
<Address_1>11 Rue raymond Queneau</Address_1>
|
||||||
<Address_2 />
|
<Address_2 />
|
||||||
<City_Town>Rueil Malmaison</City_Town>
|
<City_Town>Rueil Malmaison</City_Town>
|
||||||
<State_Province />
|
<State_Province />
|
||||||
<Zip_Postal_Code>92500</Zip_Postal_Code>
|
<Zip_Postal_Code>92500</Zip_Postal_Code>
|
||||||
<Country>FRANCE</Country>
|
<Country>FRANCE</Country>
|
||||||
<Company_WebSite_URL>http://www.dolibarr.org</Company_WebSite_URL>
|
<Company_WebSite_URL>http://www.nltechno.com</Company_WebSite_URL>
|
||||||
<Contact_Info>
|
<Contact_Info>
|
||||||
<Author_First_Name>Dolibarr team</Author_First_Name>
|
<Author_First_Name>NLTechno</Author_First_Name>
|
||||||
<Author_Last_Name>Dolibarr team</Author_Last_Name>
|
<Author_Last_Name>NLTechno</Author_Last_Name>
|
||||||
<Author_Email>dolibarr-dev@nongnu.org</Author_Email>
|
<Author_Email>dolibarr@nltechno.com</Author_Email>
|
||||||
<Contact_First_Name>Dolibarr team</Contact_First_Name>
|
<Contact_First_Name>NLTechno</Contact_First_Name>
|
||||||
<Contact_Last_Name>Dolibarr team</Contact_Last_Name>
|
<Contact_Last_Name>NLTechno</Contact_Last_Name>
|
||||||
<Contact_Email>dolibarr-dev@nongnu.org</Contact_Email>
|
<Contact_Email>dolibarr@nltechno.com</Contact_Email>
|
||||||
</Contact_Info>
|
</Contact_Info>
|
||||||
<Support_Info>
|
<Support_Info>
|
||||||
<Sales_Email>dolibarr-dev@nongnu.org</Sales_Email>
|
<Sales_Email>dolibarr@nltechno.com</Sales_Email>
|
||||||
<Support_Email>dolibarr-dev@nongnu.org</Support_Email>
|
<Support_Email>dolibarr@nltechno.com</Support_Email>
|
||||||
<General_Email>dolibarr-dev@nongnu.org</General_Email>
|
<General_Email>dolibarr@nltechno.com</General_Email>
|
||||||
<Sales_Phone />
|
<Sales_Phone />
|
||||||
<Support_Phone />
|
<Support_Phone />
|
||||||
<General_Phone />
|
<General_Phone />
|
||||||
@@ -34,10 +34,10 @@
|
|||||||
</Company_Info>
|
</Company_Info>
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>Dolibarr</Program_Name>
|
<Program_Name>Dolibarr</Program_Name>
|
||||||
<Program_Version>3.1.0</Program_Version>
|
<Program_Version>3.2.0</Program_Version>
|
||||||
<Program_Release_Month>07</Program_Release_Month>
|
<Program_Release_Month>06</Program_Release_Month>
|
||||||
<Program_Release_Day>09</Program_Release_Day>
|
<Program_Release_Day>18</Program_Release_Day>
|
||||||
<Program_Release_Year>2011</Program_Release_Year>
|
<Program_Release_Year>2012</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
@@ -46,14 +46,14 @@
|
|||||||
<Program_Install_Support>No Install Support</Program_Install_Support>
|
<Program_Install_Support>No Install Support</Program_Install_Support>
|
||||||
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
||||||
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
||||||
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info>
|
<Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
|
||||||
<Program_Specific_Category>Business</Program_Specific_Category>
|
<Program_Specific_Category>Business</Program_Specific_Category>
|
||||||
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
||||||
<Program_System_Requirements>None</Program_System_Requirements>
|
<Program_System_Requirements>None</Program_System_Requirements>
|
||||||
<File_Info>
|
<File_Info>
|
||||||
<File_Size_Bytes>18037439</File_Size_Bytes>
|
<File_Size_Bytes>9359175</File_Size_Bytes>
|
||||||
<File_Size_K>18037</File_Size_K>
|
<File_Size_K>9139</File_Size_K>
|
||||||
<File_Size_MB>18.03</File_Size_MB>
|
<File_Size_MB>8.93</File_Size_MB>
|
||||||
</File_Info>
|
</File_Info>
|
||||||
<Expire_Info>
|
<Expire_Info>
|
||||||
<Has_Expire_Info>N</Has_Expire_Info>
|
<Has_Expire_Info>N</Has_Expire_Info>
|
||||||
@@ -73,9 +73,13 @@
|
|||||||
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple to install
|
Simple to install
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple to use
|
Simple to use
|
||||||
|
|
||||||
|
|
||||||
@@ -85,9 +89,13 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
|
|||||||
|
|
||||||
|
|
||||||
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
||||||
|
</English>
|
||||||
<French>
|
<French>
|
||||||
|
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||||
|
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
||||||
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||||
|
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||||
|
|
||||||
|
|
||||||
@@ -118,6 +126,11 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
|||||||
<Web_Info>
|
<Web_Info>
|
||||||
<Application_URLs>
|
<Application_URLs>
|
||||||
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
||||||
|
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
|
||||||
|
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||||
|
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||||
|
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
||||||
|
</Application_URLs>
|
||||||
<Download_URLs>
|
<Download_URLs>
|
||||||
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
||||||
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
||||||
@@ -224,9 +237,4 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
|||||||
<Affiliates_Shareasale_Product_ID />
|
<Affiliates_Shareasale_Product_ID />
|
||||||
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
||||||
<Affiliates_SWReg_Order_Page />
|
<Affiliates_SWReg_Order_Page />
|
||||||
<Affiliates_VFree_Vendor_ID />
|
|
||||||
<Affiliates_VFree_Product_ID />
|
|
||||||
<Affiliates_VFree_Maximum_Commission_Rate />
|
|
||||||
<Affiliates_Yaskifo_Order_Page />
|
|
||||||
<Affiliates_Yaskifo_Vendor_ID />
|
|
||||||
<Affiliates_SWReg_Vendor_ID />
|
<Affiliates_SWReg_Vendor_ID />
|
||||||
|
|||||||
@@ -34,10 +34,10 @@
|
|||||||
</Company_Info>
|
</Company_Info>
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>DoliWamp</Program_Name>
|
<Program_Name>DoliWamp</Program_Name>
|
||||||
<Program_Version>3.1.0</Program_Version>
|
<Program_Version>3.2.0</Program_Version>
|
||||||
<Program_Release_Month>07</Program_Release_Month>
|
<Program_Release_Month>06</Program_Release_Month>
|
||||||
<Program_Release_Day>09</Program_Release_Day>
|
<Program_Release_Day>18</Program_Release_Day>
|
||||||
<Program_Release_Year>2011</Program_Release_Year>
|
<Program_Release_Year>2012</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
@@ -94,8 +94,8 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
|
|||||||
</Italian>
|
</Italian>
|
||||||
</Program_Descriptions>
|
</Program_Descriptions>
|
||||||
<Web_Info>
|
<Web_Info>
|
||||||
<Application_URLs>
|
<Application_URLs>
|
||||||
<Application_Info_URL>http://www.nltechno.com/pages/dolibarrwinbin.php</Application_Info_URL>
|
<Application_Info_URL>http://www.nltechno.com/doliwamp/</Application_Info_URL>
|
||||||
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
|
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
|
||||||
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||||
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ return "Regis Houssin";
|
|||||||
# script_dolibarr_versions()
|
# script_dolibarr_versions()
|
||||||
sub script_dolibarr_versions
|
sub script_dolibarr_versions
|
||||||
{
|
{
|
||||||
return ( "3.3.0", "3.2.0", "3.1.0", "3.0.1", "2.9.0" );
|
return ( "3.2.0", "3.1.1", "3.0.1", "2.9.0" );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_category
|
sub script_dolibarr_category
|
||||||
@@ -43,13 +43,6 @@ sub script_dolibarr_php_vers
|
|||||||
return ( 5 );
|
return ( 5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_php_vars
|
|
||||||
{
|
|
||||||
return ( [ 'memory_limit', '64M', '+' ],
|
|
||||||
[ 'upload_max_filesize', '10M', '+' ],
|
|
||||||
[ 'max_execution_time', '60', '+' ] );
|
|
||||||
}
|
|
||||||
|
|
||||||
sub script_dolibarr_php_modules
|
sub script_dolibarr_php_modules
|
||||||
{
|
{
|
||||||
local ($d, $ver, $phpver, $opts) = @_;
|
local ($d, $ver, $phpver, $opts) = @_;
|
||||||
@@ -348,21 +341,32 @@ if ($opts->{'newdb'}) {
|
|||||||
return (1, "Dolibarr directory and tables deleted.");
|
return (1, "Dolibarr directory and tables deleted.");
|
||||||
}
|
}
|
||||||
|
|
||||||
# script_dolibarr_latest(version)
|
# script_dolibarr_realversion(&domain, &opts)
|
||||||
# Returns a URL and regular expression or callback func to get the version
|
# Returns the real version number of some script install, or undef if unknown
|
||||||
sub script_dolibarr_latest
|
sub script_dolibarr_realversion
|
||||||
|
{
|
||||||
|
local ($d, $opts, $sinfo) = @_;
|
||||||
|
local $lref = &read_file_lines("$opts->{'dir'}/filefunc.inc.php", 1);
|
||||||
|
foreach my $l (@$lref) {
|
||||||
|
if ($l =~ /'DOL_VERSION','([0-9a-z\.\-]+)'/) {
|
||||||
|
return $1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
|
# script_dolibarr_check_latest(version)
|
||||||
|
# Checks if some version is the latest for this project, and if not returns
|
||||||
|
# a newer one. Otherwise returns undef.
|
||||||
|
sub script_dolibarr_check_latest
|
||||||
{
|
{
|
||||||
local ($ver) = @_;
|
local ($ver) = @_;
|
||||||
if ($ver >= 3.0) {
|
local @vers = &osdn_package_versions("dolibarr",
|
||||||
return ( "http://sourceforge.net/projects/dolibarr/files/".
|
$ver >= 3 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" :
|
||||||
"Dolibarr%20ERP-CRM",
|
$ver >= 2.9 ? "dolibarr\\-(2\\.9\\.[0-9\\.]+)\\.tgz" :
|
||||||
"(3\\.[0-9\\.]+)" );
|
"dolibarr\\-(2\\.8\\.[0-9\\.]+)\\.tgz");
|
||||||
}
|
return "Failed to find versions" if (!@vers);
|
||||||
elsif ($ver >= 2.9) {
|
return $ver eq $vers[0] ? undef : $vers[0];
|
||||||
return ( "http://www.dolibarr.fr/files/stable/",
|
|
||||||
"dolibarr\\-(2\\.[0-9\\.]+)" );
|
|
||||||
}
|
|
||||||
return ( );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_site
|
sub script_dolibarr_site
|
||||||
@@ -376,4 +380,3 @@ return 2;
|
|||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
|||||||
@@ -217,6 +217,26 @@ echo Create document directory $docdir
|
|||||||
# Set correct owner on config files
|
# Set correct owner on config files
|
||||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# If a conf already exists and its content was already completed by installer
|
||||||
|
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||||
|
if [ -s $config ] && grep -q "File generated by" $config
|
||||||
|
then
|
||||||
|
# File already exist. We add params not found.
|
||||||
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
|
fi
|
||||||
|
|
||||||
# Create config for se $seconfig
|
# Create config for se $seconfig
|
||||||
echo Add SE Linux permissions for dolibarr
|
echo Add SE Linux permissions for dolibarr
|
||||||
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||||
@@ -292,5 +312,5 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a
|
* Mon Jun 18 2012 Laurent Destailleur 3.2.0-0.3
|
||||||
- Initial version (#723326)
|
- Initial version (#723326)
|
||||||
|
|||||||
@@ -254,6 +254,26 @@ fi
|
|||||||
# Set correct owner on config files
|
# Set correct owner on config files
|
||||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# If a conf already exists and its content was already completed by installer
|
||||||
|
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||||
|
if [ -s $config ] && grep -q "File generated by" $config
|
||||||
|
then
|
||||||
|
# File already exist. We add params not found.
|
||||||
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
|
fi
|
||||||
|
|
||||||
# Create config for se $seconfig
|
# Create config for se $seconfig
|
||||||
if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
||||||
echo Add SE Linux permissions for dolibarr
|
echo Add SE Linux permissions for dolibarr
|
||||||
@@ -348,5 +368,5 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a
|
* Mon Jun 18 2012 Laurent Destailleur 3.2.0-0.3
|
||||||
- Initial version (#723326)
|
- Initial version (#723326)
|
||||||
|
|||||||
@@ -214,6 +214,26 @@ echo Create document directory $docdir
|
|||||||
# Set correct owner on config files
|
# Set correct owner on config files
|
||||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# If a conf already exists and its content was already completed by installer
|
||||||
|
export confcomplete=`grep -c "File generated by" %{_sysconfdir}/dolibarr/conf.php 2>/dev/null`
|
||||||
|
if [ -s %{_sysconfdir}/dolibarr/conf.php -a "x$confcomplete" != "x0" ]
|
||||||
|
then
|
||||||
|
# File already exist. We add params not found.
|
||||||
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/TTF/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a config link dolibarr.conf
|
# Create a config link dolibarr.conf
|
||||||
if [ ! -L $apachelink ]; then
|
if [ ! -L $apachelink ]; then
|
||||||
echo Create dolibarr web server config link $apachelink
|
echo Create dolibarr web server config link $apachelink
|
||||||
@@ -281,5 +301,5 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a
|
* Mon Jun 18 2012 Laurent Destailleur 3.2.0-0.3
|
||||||
- Initial version (#723326)
|
- Initial version (#723326)
|
||||||
|
|||||||
@@ -219,6 +219,26 @@ echo Create document directory $docdir
|
|||||||
# Set correct owner on config files
|
# Set correct owner on config files
|
||||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# If a conf already exists and its content was already completed by installer
|
||||||
|
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||||
|
if [ -s $config ] && grep -q "File generated by" $config
|
||||||
|
then
|
||||||
|
# File already exist. We add params not found.
|
||||||
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a config link dolibarr.conf
|
# Create a config link dolibarr.conf
|
||||||
if [ ! -L $apachelink ]; then
|
if [ ! -L $apachelink ]; then
|
||||||
echo Create dolibarr web server config link $apachelink
|
echo Create dolibarr web server config link $apachelink
|
||||||
@@ -286,5 +306,5 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a
|
* Mon Jun 18 2012 Laurent Destailleur 3.2.0-0.3
|
||||||
- Initial version (#723326)
|
- Initial version (#723326)
|
||||||
|
|||||||
@@ -30,6 +30,6 @@ $force_dolibarr_lib_TCPDF_PATH='';
|
|||||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype';
|
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
#------------------------------------------------------
|
#------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
export dumpfile="mysqldump_dolibarr_3.1.0.sql"
|
export dumpfile=`ls mysqldump_dolibarr_*.sql | sort | tail -n 1`
|
||||||
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
|
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
|
||||||
if [ "x$mydir" = "x" ]
|
if [ "x$mydir" = "x" ]
|
||||||
then
|
then
|
||||||
|
|||||||
6200
dev/initdata/mysqldump_dolibarr_3.2.0.sql
Normal file
6200
dev/initdata/mysqldump_dolibarr_3.2.0.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -50,7 +50,7 @@ $action = GETPOST('action','alpha');
|
|||||||
if ($action == 'update' || $action == 'add')
|
if ($action == 'update' || $action == 'add')
|
||||||
{
|
{
|
||||||
$constname=GETPOST('constname','alpha');
|
$constname=GETPOST('constname','alpha');
|
||||||
$constvalue=(GETPOST('constvalue_'.$constname,'alpha') ? GETPOST('constvalue_'.$constname,'alpha') : GETPOST('constvalue','alpha'));
|
$constvalue=(GETPOST('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname) : GETPOST('constvalue'));
|
||||||
|
|
||||||
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue='';
|
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue='';
|
||||||
if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
|
if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
|
||||||
@@ -60,7 +60,7 @@ if ($action == 'update' || $action == 'add')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$consttype=GETPOST('consttype','alpha');
|
$consttype=GETPOST('consttype','alpha');
|
||||||
$constnote=GETPOST('constnote','alpha');
|
$constnote=GETPOST('constnote');
|
||||||
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
|
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
@@ -78,7 +78,7 @@ if ($action == 'update' || $action == 'add')
|
|||||||
// Action activation d'un sous module du module adherent
|
// Action activation d'un sous module du module adherent
|
||||||
if ($action == 'set')
|
if ($action == 'set')
|
||||||
{
|
{
|
||||||
$result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value','alpha'),'',0,'',$conf->entity);
|
$result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value'),'',0,'',$conf->entity);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
print $db->error();
|
print $db->error();
|
||||||
@@ -271,4 +271,4 @@ dol_fiche_end();
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ $mesg=isset($_GET["mesg"])?'<div class="ok">'.$_GET["mesg"].'</div>':'';
|
|||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->rights->adherent->lire) accessforbidden();
|
$result=restrictedArea($user,'adherent',$id);
|
||||||
|
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$result=$object->fetch($id);
|
$result=$object->fetch($id);
|
||||||
|
|||||||
@@ -39,8 +39,12 @@ $langs->load("users");
|
|||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
|
|
||||||
|
|
||||||
|
$action=GETPOST('action','alpha');
|
||||||
|
$rowid=GETPOST('rowid','int');
|
||||||
|
$typeid=GETPOST('typeid','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->rights->adherent->cotisation->lire) accessforbidden();
|
$result=restrictedArea($user,'adherent',$rowid);
|
||||||
|
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
@@ -50,10 +54,6 @@ $errmsg='';
|
|||||||
$defaultdelay=1;
|
$defaultdelay=1;
|
||||||
$defaultdelayunit='y';
|
$defaultdelayunit='y';
|
||||||
|
|
||||||
$action=GETPOST('action');
|
|
||||||
$rowid=GETPOST('rowid');
|
|
||||||
$typeid=GETPOST('typeid');
|
|
||||||
|
|
||||||
if ($rowid)
|
if ($rowid)
|
||||||
{
|
{
|
||||||
// Load member
|
// Load member
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Build and output PDF
|
// Build and output PDF
|
||||||
if (empty($mode) || $mode=='card' || $mode='cardlogin')
|
if (empty($mode) || $mode=='card' || $mode=='cardlogin')
|
||||||
{
|
{
|
||||||
if (! count($arrayofmembers))
|
if (! count($arrayofmembers))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -184,13 +184,13 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function makeSubstitution($text)
|
function makeSubstitution($text)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$birthday = dol_print_date($this->naiss,'day');
|
$birthday = dol_print_date($this->naiss,'day');
|
||||||
|
|
||||||
$msgishtml = 0;
|
$msgishtml = 0;
|
||||||
if (dol_textishtml($text,1)) $msgishtml = 1;
|
if (dol_textishtml($text,1)) $msgishtml = 1;
|
||||||
|
|
||||||
$infos='';
|
$infos='';
|
||||||
if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n";
|
if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n";
|
||||||
$infos.= $langs->transnoentities("id").": ".$this->id."\n";
|
$infos.= $langs->transnoentities("id").": ".$this->id."\n";
|
||||||
@@ -202,12 +202,15 @@ class Adherent extends CommonObject
|
|||||||
$infos.= $langs->transnoentities("Town").": ".$this->town."\n";
|
$infos.= $langs->transnoentities("Town").": ".$this->town."\n";
|
||||||
$infos.= $langs->transnoentities("Country").": ".$this->country."\n";
|
$infos.= $langs->transnoentities("Country").": ".$this->country."\n";
|
||||||
$infos.= $langs->transnoentities("EMail").": ".$this->email."\n";
|
$infos.= $langs->transnoentities("EMail").": ".$this->email."\n";
|
||||||
$infos.= $langs->transnoentities("Login").": ".$this->login."\n";
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
$infos.= $langs->transnoentities("Password").": ".$this->pass."\n";
|
{
|
||||||
|
$infos.= $langs->transnoentities("Login").": ".$this->login."\n";
|
||||||
|
$infos.= $langs->transnoentities("Password").": ".$this->pass."\n";
|
||||||
|
}
|
||||||
$infos.= $langs->transnoentities("Birthday").": ".$birthday."\n";
|
$infos.= $langs->transnoentities("Birthday").": ".$birthday."\n";
|
||||||
$infos.= $langs->transnoentities("Photo").": ".$this->photo."\n";
|
$infos.= $langs->transnoentities("Photo").": ".$this->photo."\n";
|
||||||
$infos.= $langs->transnoentities("Public").": ".yn($this->public);
|
$infos.= $langs->transnoentities("Public").": ".yn($this->public);
|
||||||
|
|
||||||
// Substitutions
|
// Substitutions
|
||||||
$substitutionarray=array(
|
$substitutionarray=array(
|
||||||
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
|
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
|
||||||
@@ -227,9 +230,9 @@ class Adherent extends CommonObject
|
|||||||
'%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
|
'%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
|
||||||
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass
|
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass
|
||||||
);
|
);
|
||||||
|
|
||||||
complete_substitutions_array($substitutionarray, $langs);
|
complete_substitutions_array($substitutionarray, $langs);
|
||||||
|
|
||||||
return make_substitutions($text,$substitutionarray);
|
return make_substitutions($text,$substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -696,6 +699,10 @@ class Adherent extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_member WHERE fk_member = ".$rowid;
|
||||||
|
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||||
|
$resql=$this->db->query($sql);
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid;
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid;
|
||||||
dol_syslog(get_class($this)."::delete sql=".$sql);
|
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
@@ -968,7 +975,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function fetch($rowid,$ref='',$fk_soc='')
|
function fetch($rowid,$ref='',$fk_soc='')
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $langs;
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.adresse as address, d.cp as zip, d.ville as town, d.note,";
|
$sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.adresse as address, d.cp as zip, d.ville as town, d.note,";
|
||||||
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
|
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
|
||||||
@@ -989,10 +996,12 @@ class Adherent extends CommonObject
|
|||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as dep ON d.fk_departement = dep.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as dep ON d.fk_departement = dep.rowid";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON d.rowid = u.fk_member";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON d.rowid = u.fk_member";
|
||||||
$sql.= " WHERE d.fk_adherent_type = t.rowid";
|
$sql.= " WHERE d.fk_adherent_type = t.rowid";
|
||||||
$sql.= " AND d.entity = ".$conf->entity;
|
if ($rowid) $sql.= " AND d.rowid=".$rowid;
|
||||||
if ($ref) $sql.= " AND d.rowid='".$ref."'";
|
elseif ($ref || $fk_soc) {
|
||||||
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
|
$sql.= " AND d.entity IN (".getEntity().")";
|
||||||
else $sql.= " AND d.rowid=".$rowid;
|
if ($ref) $sql.= " AND d.rowid='".$ref."'";
|
||||||
|
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
|
||||||
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch sql=".$sql);
|
dol_syslog(get_class($this)."::fetch sql=".$sql);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -27,22 +27,26 @@
|
|||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/member.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/member.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
||||||
|
|
||||||
|
$langs->load("members");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load('other');
|
$langs->load('other');
|
||||||
|
|
||||||
|
$id=GETPOST('id','int');
|
||||||
|
$action=GETPOST('action','alpha');
|
||||||
|
$confirm=GETPOST('confirm','alpha');
|
||||||
$mesg = "";
|
$mesg = "";
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = GETPOST('id','int');
|
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$id = $user->societe_id;
|
$id = $user->societe_id;
|
||||||
}
|
}
|
||||||
//$result = restrictedArea($user, 'societe', $id);
|
$result=restrictedArea($user,'adherent',$id);
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
@@ -65,16 +69,25 @@ $upload_dir = $conf->adherent->dir_output . "/" . get_exdir($id,2,0,1) . '/' . $
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Envoie fichier
|
// Envoie fichier
|
||||||
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -96,11 +109,12 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Suppression fichier
|
// Suppression fichier
|
||||||
if ($_REQUEST['action'] == 'confirm_deletefile' && $_REQUEST['confirm'] == 'yes')
|
if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
$file = $upload_dir . "/" . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$langs->load("other");
|
||||||
|
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file);
|
dol_delete_file($file);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -197,21 +211,21 @@ if ($id > 0)
|
|||||||
/*
|
/*
|
||||||
* Confirmation suppression fichier
|
* Confirmation suppression fichier
|
||||||
*/
|
*/
|
||||||
if ($_GET['action'] == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$member->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Affiche formulaire upload
|
// Affiche formulaire upload
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/adherents/document.php?id='.$id,'',0,0,$user->rights->adherent->creer);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/adherents/document.php?id='.$member->id,'',0,0,$user->rights->adherent->creer,50,$object);
|
||||||
|
|
||||||
|
|
||||||
// List of document
|
// List of document
|
||||||
$param='&socid='.$societe->id;
|
$param='&socid='.$societe->id;
|
||||||
$formfile->list_of_documents($filearray,$member,'member',$param, 0, get_exdir($id,2,0,1).'/'.$id.'/');
|
$formfile->list_of_documents($filearray,$member,'member',$param, 0, get_exdir($member->id,2,0,1).'/'.$member->id.'/');
|
||||||
|
|
||||||
print "<br><br>";
|
print "<br><br>";
|
||||||
}
|
}
|
||||||
@@ -226,9 +240,7 @@ else
|
|||||||
print $langs->trans("ErrorRecordNotFound");
|
print $langs->trans("ErrorRecordNotFound");
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -41,21 +41,22 @@ $langs->load("bills");
|
|||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
|
|
||||||
|
|
||||||
|
$action=GETPOST('action','alpha');
|
||||||
|
$confirm=GETPOST('confirm','alpha');
|
||||||
|
$rowid=GETPOST('rowid','int');
|
||||||
|
$typeid=GETPOST('typeid','int');
|
||||||
|
$userid=GETPOST('userid','int');
|
||||||
|
$socid=GETPOST('socid','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->rights->adherent->lire) accessforbidden();
|
$result=restrictedArea($user,'adherent',$rowid);
|
||||||
|
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
$errmsg=''; $errmsgs=array();
|
$errmsg=''; $errmsgs=array();
|
||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
|
||||||
$confirm=GETPOST('confirm','alpha');
|
|
||||||
$rowid=GETPOST('rowid','int');
|
|
||||||
$typeid=GETPOST('typeid','int');
|
|
||||||
$userid=GETPOST('userid','int');
|
|
||||||
$socid=GETPOST('socid','int');
|
|
||||||
|
|
||||||
if ($rowid > 0)
|
if ($rowid > 0)
|
||||||
{
|
{
|
||||||
// Load member
|
// Load member
|
||||||
@@ -67,16 +68,12 @@ if ($rowid > 0)
|
|||||||
if ($object->user_id)
|
if ($object->user_id)
|
||||||
{
|
{
|
||||||
// $user est le user qui edite, $object->user_id est l'id de l'utilisateur lies au membre edite
|
// $user est le user qui edite, $object->user_id est l'id de l'utilisateur lies au membre edite
|
||||||
$caneditfielduser=( (($user->id == $object->user_id) && $user->rights->user->self->creer)
|
$caneditfielduser=((($user->id == $object->user_id) && $user->rights->user->self->creer)
|
||||||
|| (($user->id != $object->user_id) && $user->rights->user->user->creer) );
|
|| (($user->id != $object->user_id) && $user->rights->user->user->creer));
|
||||||
$caneditpassworduser=( (($user->id == $object->user_id) && $user->rights->user->self->password)
|
$caneditpassworduser=((($user->id == $object->user_id) && $user->rights->user->self->password)
|
||||||
|| (($user->id != $adh->user_id) && $user->rights->user->user->password) );
|
|| (($user->id != $object->user_id) && $user->rights->user->user->password));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define variables to know what current user can do on members
|
// Define variables to know what current user can do on members
|
||||||
$canaddmember=$user->rights->adherent->creer;
|
$canaddmember=$user->rights->adherent->creer;
|
||||||
@@ -163,7 +160,7 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user
|
|||||||
{
|
{
|
||||||
// Creation user
|
// Creation user
|
||||||
$nuser = new User($db);
|
$nuser = new User($db);
|
||||||
$result=$nuser->create_from_member($object,GETPOST('login','alpha'));
|
$result=$nuser->create_from_member($object,GETPOST('login'));
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@@ -184,7 +181,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
|
|||||||
{
|
{
|
||||||
// Creation user
|
// Creation user
|
||||||
$company = new Societe($db);
|
$company = new Societe($db);
|
||||||
$result=$company->create_from_member($object,GETPOST('companyname','alpha'));
|
$result=$company->create_from_member($object,GETPOST('companyname'));
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@@ -203,8 +200,13 @@ if ($action == 'confirm_sendinfo' && $confirm == 'yes')
|
|||||||
{
|
{
|
||||||
if ($object->email)
|
if ($object->email)
|
||||||
{
|
{
|
||||||
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
|
$from=$conf->email_from;
|
||||||
$mesg=$langs->trans("CardSent");
|
if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM;
|
||||||
|
|
||||||
|
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
|
||||||
|
|
||||||
|
$langs->load("mails");
|
||||||
|
$mesg=$langs->trans("MailSuccessfulySent", $from, $object->email);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -822,8 +824,8 @@ if ($action == 'edit')
|
|||||||
|
|
||||||
$res=$object->fetch($rowid);
|
$res=$object->fetch($rowid);
|
||||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||||
//$res=$object->fetch_optionals($object->id,$extralabels);
|
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||||
//if ($res < 0) { dol_print_error($db); exit; }
|
if ($res < 0) { dol_print_error($db); exit; }
|
||||||
|
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
$adht->fetch($object->typeid);
|
$adht->fetch($object->typeid);
|
||||||
@@ -1049,13 +1051,14 @@ if ($action == 'edit')
|
|||||||
|
|
||||||
if ($rowid && $action != 'edit')
|
if ($rowid && $action != 'edit')
|
||||||
{
|
{
|
||||||
/* ************************************************************************** */
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Mode affichage */
|
/* Mode affichage */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
//$object = new Adherent($db);
|
|
||||||
$res=$object->fetch($rowid);
|
$res=$object->fetch($rowid);
|
||||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||||
@@ -1509,7 +1512,7 @@ if ($rowid && $action != 'edit')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Action SPIP
|
// Action SPIP
|
||||||
if ($conf->global->ADHERENT_USE_SPIP)
|
if ($conf->mailmanspip->enabled && $conf->global->ADHERENT_USE_SPIP)
|
||||||
{
|
{
|
||||||
$isinspip=$object->is_in_spip();
|
$isinspip=$object->is_in_spip();
|
||||||
if ($isinspip == 1)
|
if ($isinspip == 1)
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -59,7 +60,10 @@ $AdherentType=array();
|
|||||||
$sql = "SELECT t.rowid, t.libelle, t.cotisation,";
|
$sql = "SELECT t.rowid, t.libelle, t.cotisation,";
|
||||||
$sql.= " d.statut, count(d.rowid) as somme";
|
$sql.= " d.statut, count(d.rowid) as somme";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d ON t.rowid = d.fk_adherent_type";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d";
|
||||||
|
$sql.= " ON t.rowid = d.fk_adherent_type";
|
||||||
|
$sql.= " AND d.entity IN (".getEntity().")";
|
||||||
|
$sql.= " WHERE t.entity IN (".getEntity().")";
|
||||||
$sql.= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut";
|
$sql.= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut";
|
||||||
|
|
||||||
dol_syslog("index.php::select nb of members by type sql=".$sql, LOG_DEBUG);
|
dol_syslog("index.php::select nb of members by type sql=".$sql, LOG_DEBUG);
|
||||||
@@ -94,8 +98,9 @@ $now=dol_now();
|
|||||||
// old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future)
|
// old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future)
|
||||||
$sql = "SELECT count(*) as somme , d.fk_adherent_type";
|
$sql = "SELECT count(*) as somme , d.fk_adherent_type";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
||||||
//$sql.= " WHERE d.statut = 1 AND ((t.cotisation = 0 AND d.datefin IS NULL) OR d.datefin >= ".$db->idate($now).')';
|
$sql.= " WHERE d.entity IN (".getEntity().")";
|
||||||
$sql.= " WHERE d.statut = 1 AND d.datefin >= ".$db->idate($now);
|
//$sql.= " AND d.statut = 1 AND ((t.cotisation = 0 AND d.datefin IS NULL) OR d.datefin >= ".$db->idate($now).')';
|
||||||
|
$sql.= " AND d.statut = 1 AND d.datefin >= ".$db->idate($now);
|
||||||
$sql.= " AND t.rowid = d.fk_adherent_type";
|
$sql.= " AND t.rowid = d.fk_adherent_type";
|
||||||
$sql.= " GROUP BY d.fk_adherent_type";
|
$sql.= " GROUP BY d.fk_adherent_type";
|
||||||
|
|
||||||
@@ -212,7 +217,8 @@ $sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname,";
|
|||||||
$sql.= " a.tms as datem, datefin as date_end_subscription,";
|
$sql.= " a.tms as datem, datefin as date_end_subscription,";
|
||||||
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
|
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
|
||||||
$sql.= " WHERE a.fk_adherent_type = ta.rowid";
|
$sql.= " WHERE a.entity IN (".getEntity().")";
|
||||||
|
$sql.= " AND a.fk_adherent_type = ta.rowid";
|
||||||
$sql.= $db->order("a.tms","DESC");
|
$sql.= $db->order("a.tms","DESC");
|
||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
@@ -260,11 +266,12 @@ else
|
|||||||
*/
|
*/
|
||||||
$max=5;
|
$max=5;
|
||||||
|
|
||||||
$sql = "SELECT a.rowid, a.statut, a.nom, a.prenom,";
|
$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname,";
|
||||||
$sql.= " datefin as date_end_subscription,";
|
$sql.= " datefin as date_end_subscription,";
|
||||||
$sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation";
|
$sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c";
|
||||||
$sql.= " WHERE c.fk_adherent = a.rowid";
|
$sql.= " WHERE a.entity IN (".getEntity().")";
|
||||||
|
$sql.= " AND c.fk_adherent = a.rowid";
|
||||||
$sql.= $db->order("c.tms","DESC");
|
$sql.= $db->order("c.tms","DESC");
|
||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
@@ -350,7 +357,8 @@ $numb=0;
|
|||||||
|
|
||||||
$sql = "SELECT c.cotisation, c.dateadh";
|
$sql = "SELECT c.cotisation, c.dateadh";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c";
|
||||||
$sql.= " WHERE d.rowid = c.fk_adherent";
|
$sql.= " WHERE d.entity IN (".getEntity().")";
|
||||||
|
$sql.= " AND d.rowid = c.fk_adherent";
|
||||||
if(isset($date_select) && $date_select != '')
|
if(isset($date_select) && $date_select != '')
|
||||||
{
|
{
|
||||||
$sql .= " AND dateadh LIKE '$date_select%'";
|
$sql .= " AND dateadh LIKE '$date_select%'";
|
||||||
@@ -406,7 +414,6 @@ print '</td></tr>';
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -32,8 +32,10 @@ $langs->load("bills");
|
|||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
|
|
||||||
if (!$user->rights->adherent->lire)
|
$id=(GETPOST('id','int') ? GETPOST('id','int') : GETPOST('rowid','int'));
|
||||||
accessforbidden();
|
|
||||||
|
// Security check
|
||||||
|
$result=restrictedArea($user,'adherent',$id);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -43,9 +45,8 @@ if (!$user->rights->adherent->lire)
|
|||||||
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||||
|
|
||||||
$adh = new Adherent($db);
|
$adh = new Adherent($db);
|
||||||
$adh->id=$_GET["id"];
|
$adh->fetch($id);
|
||||||
$adh->fetch($_GET["id"]);
|
$adh->info($id);
|
||||||
$adh->info($_GET["id"]);
|
|
||||||
|
|
||||||
$head = member_prepare_head($adh);
|
$head = member_prepare_head($adh);
|
||||||
|
|
||||||
@@ -59,7 +60,6 @@ print '</td></tr></table>';
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ $search_login=GETPOST("search_login");
|
|||||||
$type=GETPOST("type");
|
$type=GETPOST("type");
|
||||||
$search_email=GETPOST("search_email");
|
$search_email=GETPOST("search_email");
|
||||||
$search_categ=GETPOST("search_categ");
|
$search_categ=GETPOST("search_categ");
|
||||||
$sall=GETPOST("sall",'int');
|
$sall=GETPOST("sall");
|
||||||
|
|
||||||
if (GETPOST("button_removefilter"))
|
if (GETPOST("button_removefilter"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,14 +27,15 @@ require_once(DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php');
|
|||||||
require_once(DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
||||||
|
|
||||||
$action=GETPOST('action');
|
$langs->load("companies");
|
||||||
$id=GETPOST('id','int');
|
$langs->load("members");
|
||||||
|
|
||||||
$langs->load("companies");
|
|
||||||
$langs->load("members");
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
if (!$user->rights->adherent->lire) accessforbidden();
|
$action=GETPOST('action','alpha');
|
||||||
|
$id=GETPOST('id','int');
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
$result=restrictedArea($user,'adherent',$id);
|
||||||
|
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$result=$object->fetch($id);
|
$result=$object->fetch($id);
|
||||||
@@ -49,7 +50,7 @@ if ($result > 0)
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($_POST["action"] == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"])
|
if ($action == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"])
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
@@ -174,7 +175,7 @@ if ($id)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ if ($mode)
|
|||||||
$data = array();
|
$data = array();
|
||||||
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label";
|
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label";
|
||||||
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid";
|
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid";
|
||||||
$sql.=" WHERE d.statut = 1";
|
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||||
|
$sql.=" AND d.statut = 1";
|
||||||
$sql.=" GROUP BY c.libelle, c.code";
|
$sql.=" GROUP BY c.libelle, c.code";
|
||||||
//print $sql;
|
//print $sql;
|
||||||
}
|
}
|
||||||
@@ -88,7 +89,8 @@ if ($mode)
|
|||||||
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = c.rowid";
|
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = c.rowid";
|
||||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region";
|
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region";
|
||||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
||||||
$sql.=" WHERE d.statut = 1";
|
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||||
|
$sql.=" AND d.statut = 1";
|
||||||
$sql.=" GROUP BY p.libelle, p.code, c.nom";
|
$sql.=" GROUP BY p.libelle, p.code, c.nom";
|
||||||
//print $sql;
|
//print $sql;
|
||||||
}
|
}
|
||||||
@@ -102,7 +104,8 @@ if ($mode)
|
|||||||
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.ville as label2";
|
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.ville as label2";
|
||||||
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d";
|
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d";
|
||||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
||||||
$sql.=" WHERE d.statut = 1";
|
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||||
|
$sql.=" AND d.statut = 1";
|
||||||
$sql.=" GROUP BY p.libelle, p.code, d.ville";
|
$sql.=" GROUP BY p.libelle, p.code, d.ville";
|
||||||
//print $sql;
|
//print $sql;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -49,8 +49,8 @@ $pagenext = $page + 1;
|
|||||||
if (! $sortorder) { $sortorder="DESC"; }
|
if (! $sortorder) { $sortorder="DESC"; }
|
||||||
if (! $sortfield) { $sortfield="d.nom"; }
|
if (! $sortfield) { $sortfield="d.nom"; }
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->rights->adherent->lire) accessforbidden();
|
$result=restrictedArea($user,'adherent',$rowid,'adherent_type');
|
||||||
|
|
||||||
if (GETPOST('button_removefilter'))
|
if (GETPOST('button_removefilter'))
|
||||||
{
|
{
|
||||||
@@ -153,7 +153,8 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||||||
|
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
|
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||||
|
$sql.= " WHERE d.entity IN (".getEntity().")";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
@@ -267,10 +268,8 @@ if ($rowid > 0)
|
|||||||
if ($action != 'edit')
|
if ($action != 'edit')
|
||||||
{
|
{
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
$adht->id = $rowid;
|
|
||||||
$adht->fetch($rowid);
|
$adht->fetch($rowid);
|
||||||
|
|
||||||
|
|
||||||
$h=0;
|
$h=0;
|
||||||
|
|
||||||
$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
|
$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
|
||||||
@@ -344,7 +343,7 @@ if ($rowid > 0)
|
|||||||
$sql.= " t.libelle as type, t.cotisation";
|
$sql.= " t.libelle as type, t.cotisation";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
||||||
$sql.= " WHERE d.fk_adherent_type = t.rowid ";
|
$sql.= " WHERE d.fk_adherent_type = t.rowid ";
|
||||||
$sql.= " AND d.entity = ".$conf->entity;
|
$sql.= " AND d.entity IN (".getEntity().")";
|
||||||
$sql.= " AND t.rowid = ".$adht->id;
|
$sql.= " AND t.rowid = ".$adht->id;
|
||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php');
|
|||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
|
$langs->load("orders");
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ if (!$user->admin) accessforbidden();
|
|||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$value=GETPOST('value','alpha');
|
$value=GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
|
||||||
$scandir = GETPOST('scandir','alpha');
|
|
||||||
$type='shipping';
|
|
||||||
|
|
||||||
if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
|
if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
|
||||||
{
|
{
|
||||||
@@ -53,59 +50,6 @@ if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
if ($action == 'updateMask')
|
|
||||||
{
|
|
||||||
$maskconst=GETPOST('maskconstexpedition','alpha');
|
|
||||||
$maskvalue=GETPOST('maskexpedition','alpha');
|
|
||||||
if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
|
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'set_SHIPPING_FREE_TEXT')
|
|
||||||
{
|
|
||||||
$freetext=GETPOST('SHIPPING_FREE_TEXT','alpha');
|
|
||||||
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'set_SHIPPING_DRAFT_WATERMARK')
|
|
||||||
{
|
|
||||||
$draft=GETPOST('SHIPPING_DRAFT_WATERMARK','alpha');
|
|
||||||
|
|
||||||
$res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'specimen')
|
if ($action == 'specimen')
|
||||||
{
|
{
|
||||||
$modele=GETPOST('module','alpha');
|
$modele=GETPOST('module','alpha');
|
||||||
@@ -118,11 +62,11 @@ if ($action == 'specimen')
|
|||||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||||
foreach($dirmodels as $reldir)
|
foreach($dirmodels as $reldir)
|
||||||
{
|
{
|
||||||
$file=dol_buildpath($reldir."core/modules/expedition/doc/pdf_".$modele.".modules.php",0);
|
$file=dol_buildpath($reldir."core/modules/expedition/doc/pdf_expedition_".$modele.".modules.php",0);
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
$filefound=1;
|
$filefound=1;
|
||||||
$classname = "pdf_".$modele;
|
$classname = "pdf_expedition_".$modele;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,8 +84,8 @@ if ($action == 'specimen')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg='<font class="error">'.$obj->error.'</font>';
|
$mesg='<font class="error">'.$module->error.'</font>';
|
||||||
dol_syslog($obj->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -154,13 +98,30 @@ if ($action == 'specimen')
|
|||||||
// Activate a model
|
// Activate a model
|
||||||
if ($action == 'set')
|
if ($action == 'set')
|
||||||
{
|
{
|
||||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
$label = GETPOST('label','alpha');
|
||||||
|
$scandir = GETPOST('scandir','alpha');
|
||||||
|
|
||||||
|
$type='shipping';
|
||||||
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
||||||
|
$sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", ";
|
||||||
|
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||||
|
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
||||||
|
$sql.= ")";
|
||||||
|
if ($db->query($sql))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'del')
|
if ($action == 'del')
|
||||||
{
|
{
|
||||||
$ret = delDocumentModel($value, $type);
|
$type='shipping';
|
||||||
if ($ret > 0)
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
|
$sql.= " WHERE nom = '".$db->escape($value)."'";
|
||||||
|
$sql.= " AND type = '".$type."'";
|
||||||
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
|
|
||||||
|
if ($db->query($sql))
|
||||||
{
|
{
|
||||||
if ($conf->global->EXPEDITION_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF',$conf->entity);
|
if ($conf->global->EXPEDITION_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF',$conf->entity);
|
||||||
}
|
}
|
||||||
@@ -169,18 +130,37 @@ if ($action == 'del')
|
|||||||
// Set default model
|
// Set default model
|
||||||
if ($action == 'setdoc')
|
if ($action == 'setdoc')
|
||||||
{
|
{
|
||||||
|
$label = GETPOST('label','alpha');
|
||||||
|
$scandir = GETPOST('scandir','alpha');
|
||||||
|
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||||
{
|
{
|
||||||
// La constante qui a ete lue en avant du nouveau set
|
|
||||||
// on passe donc par une variable pour avoir un affichage coherent
|
|
||||||
$conf->global->EXPEDITION_ADDON_PDF = $value;
|
$conf->global->EXPEDITION_ADDON_PDF = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// On active le modele
|
// On active le modele
|
||||||
$ret = delDocumentModel($value, $type);
|
$type='shipping';
|
||||||
if ($ret > 0)
|
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
|
$sql_del.= " WHERE nom = '".$db->escape($value)."'";
|
||||||
|
$sql_del.= " AND type = '".$type."'";
|
||||||
|
$sql_del.= " AND entity = ".$conf->entity;
|
||||||
|
$result1=$db->query($sql_del);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
||||||
|
$sql.= " VALUES ('".$db->escape($value)."', '".$type."', ".$conf->entity.", ";
|
||||||
|
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||||
|
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
||||||
|
$sql.= ")";
|
||||||
|
$result2=$db->query($sql);
|
||||||
|
if ($result1 && $result2)
|
||||||
{
|
{
|
||||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,8 +240,28 @@ if ($action == 'setmod')
|
|||||||
// TODO Verifier si module numerotation choisi peut etre active
|
// TODO Verifier si module numerotation choisi peut etre active
|
||||||
// par appel methode canBeActivated
|
// par appel methode canBeActivated
|
||||||
|
|
||||||
dolibarr_set_const($db, "EXPEDITION_ADDON",$value,'chaine',0,'',$conf->entity);
|
$module=GETPOST('module','alpha');
|
||||||
|
|
||||||
|
dolibarr_set_const($db, "EXPEDITION_ADDON",$module,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'updateMask')
|
||||||
|
{
|
||||||
|
$maskconst=GETPOST('maskconstexpedition','alpha');
|
||||||
|
$maskvalue=GETPOST('maskexpedition','alpha');
|
||||||
|
if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'setmodel')
|
if ($action == 'setmodel')
|
||||||
@@ -269,6 +269,39 @@ if ($action == 'setmodel')
|
|||||||
dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'set_SHIPPING_DRAFT_WATERMARK')
|
||||||
|
{
|
||||||
|
$draft=GETPOST('SHIPPING_DRAFT_WATERMARK','alpha');
|
||||||
|
$res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'set_SHIPPING_FREE_TEXT')
|
||||||
|
{
|
||||||
|
$free=GETPOST('SHIPPING_FREE_TEXT','alpha');
|
||||||
|
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$free,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -535,7 +535,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -543,7 +543,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,7 +555,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,9 @@ foreach($modules as $const => $desc)
|
|||||||
|
|
||||||
if (GETPOST('save','alpha'))
|
if (GETPOST('save','alpha'))
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "FCKEDITOR_TEST", GETPOST('formtestfield','alpha'),'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "FCKEDITOR_TEST", GETPOST('formtestfield'),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if ($res > 0) $mesg=$langs->trans("RecordModifiedSuccessfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -103,56 +105,64 @@ print '<br>';
|
|||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
if (empty($conf->use_javascript_ajax))
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td colspan="2">'.$langs->trans("ActivateFCKeditor").'</td>';
|
|
||||||
print '<td align="center" width="100">'.$langs->trans("Action").'</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
// Modules
|
|
||||||
foreach($modules as $const => $desc)
|
|
||||||
{
|
{
|
||||||
// Si condition non remplie, on ne propose pas l'option
|
dol_htmloutput_errors('',array($langs->trans("NotAvailable"),$langs->trans("JavascriptDisabled")),1);
|
||||||
if (! $conditions[$const]) continue;
|
|
||||||
|
|
||||||
$var=!$var;
|
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td width="16">'.img_object("",$picto[$const]).'</td>';
|
|
||||||
print '<td>'.$langs->trans($desc).'</td>';
|
|
||||||
print '<td align="center" width="100">';
|
|
||||||
$constante = 'FCKEDITOR_ENABLE_'.$const;
|
|
||||||
$value = $conf->global->$constante;
|
|
||||||
if($value == 0)
|
|
||||||
{
|
|
||||||
print '<a href="fckeditor.php?action=activate_'.strtolower($const).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
|
||||||
}
|
|
||||||
else if($value == 1)
|
|
||||||
{
|
|
||||||
print '<a href="fckeditor.php?action=disable_'.strtolower($const).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</td>";
|
|
||||||
print '</tr>';
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td colspan="2">'.$langs->trans("ActivateFCKeditor").'</td>';
|
||||||
|
print '<td align="center" width="100">'.$langs->trans("Action").'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
print '</table>'."\n";
|
// Modules
|
||||||
|
foreach($modules as $const => $desc)
|
||||||
|
{
|
||||||
|
// Si condition non remplie, on ne propose pas l'option
|
||||||
|
if (! $conditions[$const]) continue;
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td width="16">'.img_object("",$picto[$const]).'</td>';
|
||||||
|
print '<td>'.$langs->trans($desc).'</td>';
|
||||||
|
print '<td align="center" width="100">';
|
||||||
|
$constante = 'FCKEDITOR_ENABLE_'.$const;
|
||||||
|
$value = $conf->global->$constante;
|
||||||
|
if($value == 0)
|
||||||
|
{
|
||||||
|
print '<a href="fckeditor.php?action=activate_'.strtolower($const).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
|
}
|
||||||
|
else if($value == 1)
|
||||||
|
{
|
||||||
|
print '<a href="fckeditor.php?action=disable_'.strtolower($const).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<br>'."\n";
|
print "</td>";
|
||||||
print_fiche_titre($langs->trans("TestSubmitForm"),'','');
|
print '</tr>';
|
||||||
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
}
|
||||||
$uselocalbrowser=true;
|
|
||||||
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,'dolibarr_notes','In', true, $uselocalbrowser);
|
|
||||||
$editor->Create();
|
|
||||||
print '<center><br><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
|
|
||||||
print '</form>'."\n";
|
|
||||||
|
|
||||||
/*
|
print '</table>'."\n";
|
||||||
print '<!-- Result -->';
|
|
||||||
print $_POST["formtestfield"];
|
dol_htmloutput_mesg($mesg);
|
||||||
print '<!-- Result -->';
|
|
||||||
print $conf->global->FCKEDITOR_TEST;
|
print '<br>'."\n";
|
||||||
*/
|
print_fiche_titre($langs->trans("TestSubmitForm"),'','');
|
||||||
|
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
|
$uselocalbrowser=true;
|
||||||
|
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,'dolibarr_notes','In', true, $uselocalbrowser);
|
||||||
|
$editor->Create();
|
||||||
|
print '<center><br><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
|
||||||
|
print '</form>'."\n";
|
||||||
|
|
||||||
|
/*
|
||||||
|
print '<!-- Result -->';
|
||||||
|
print $_POST["formtestfield"];
|
||||||
|
print '<!-- Result -->';
|
||||||
|
print $conf->global->FCKEDITOR_TEST;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ if ($action == 'edit') // Edit
|
|||||||
|
|
||||||
// Hide wiki link on login page
|
// Hide wiki link on login page
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/common/helpdoc.png','',1)).'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td>';
|
||||||
print $form->selectyesno('MAIN_HELP_DISABLELINK',isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
print $form->selectyesno('MAIN_HELP_DISABLELINK',isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
@@ -366,7 +366,7 @@ else // Show
|
|||||||
|
|
||||||
// Link to wiki help
|
// Link to wiki help
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/common/helpdoc.png','',1)).'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td colspan="2">';
|
||||||
print yn($conf->global->MAIN_HELP_DISABLELINK,1);
|
print yn($conf->global->MAIN_HELP_DISABLELINK,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE',GETPOST("type"),'chaine',0,'',$conf->entity)) $error++;
|
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE',GETPOST("type"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION',GETPOST("version"),'chaine',0,'',$conf->entity)) $error++;
|
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION',GETPOST("LDAP_SERVER_PROTOCOLVERSION"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST',GETPOST("host"),'chaine',0,'',$conf->entity)) $error++;
|
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST',GETPOST("host"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE',GETPOST("slave"),'chaine',0,'',$conf->entity)) $error++;
|
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE',GETPOST("slave"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT',GETPOST("port"),'chaine',0,'',$conf->entity)) $error++;
|
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT',GETPOST("port"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
@@ -169,7 +169,7 @@ print '<tr '.$bc[$var].'><td>'.$langs->trans("Version").'</td><td>';
|
|||||||
$arraylist=array();
|
$arraylist=array();
|
||||||
$arraylist['3']='Version 3';
|
$arraylist['3']='Version 3';
|
||||||
$arraylist['2']='Version 2';
|
$arraylist['2']='Version 2';
|
||||||
print $form->selectarray('version',$arraylist,$conf->global->LDAP_SERVER_PROTOCOLVERSION);
|
print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION',$arraylist,$conf->global->LDAP_SERVER_PROTOCOLVERSION);
|
||||||
print '</td><td>'.$langs->trans("LDAPServerProtocolVersion").'</td></tr>';
|
print '</td><td>'.$langs->trans("LDAPServerProtocolVersion").'</td></tr>';
|
||||||
|
|
||||||
// Serveur primaire
|
// Serveur primaire
|
||||||
|
|||||||
@@ -41,15 +41,17 @@ $action = GETPOST('action','alpha');
|
|||||||
if ($action == 'setvalue' && $user->admin)
|
if ($action == 'setvalue' && $user->admin)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$mailfrom = GETPOST('MAILING_EMAIL_FROM','alpha');
|
$mailfrom = GETPOST('MAILING_EMAIL_FROM','alpha');
|
||||||
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
|
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
|
||||||
|
|
||||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",$checkread,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@@ -101,11 +103,31 @@ print '<input size="32" type="text" name="MAILING_EMAIL_ERRORSTO" value="'.$conf
|
|||||||
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
|
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
/*
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
|
print $langs->trans("ActivateCheckRead").'</td><td>';
|
||||||
|
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1)
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=0">';
|
||||||
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
||||||
print '</table></form>';
|
print '</table></form>';
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -147,7 +147,8 @@ if (! empty($_POST['removedfile']) || ! empty($_POST['removedfilehtml']))
|
|||||||
$result = dol_delete_file($pathtodelete,1);
|
$result = dol_delete_file($pathtodelete,1);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$message = '<div class="ok">'.$langs->trans("FileWasRemoved",$filetodelete).'</div>';
|
$langs->load("other");
|
||||||
|
$message = '<div class="ok">'.$langs->trans("FileWasRemoved",$filetodelete).'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php');
|
||||||
|
|||||||
@@ -222,13 +222,13 @@ foreach ($dirmodels as $reldir)
|
|||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->PROJECT_ADDON == $classname)
|
if ($conf->global->PROJECT_ADDON == 'mod_'.$classname)
|
||||||
{
|
{
|
||||||
print img_picto($langs->trans("Activated"),'switch_on');
|
print img_picto($langs->trans("Activated"),'switch_on');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value=mod_'.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
$result=dol_mkdir($upload_dir); // Create dir if not exists
|
$result=dol_mkdir($upload_dir); // Create dir if not exists
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],1,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1,0,$_FILES['userfile']['error']);
|
||||||
|
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
*
|
||||||
@@ -178,14 +178,14 @@ $var=true;
|
|||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_FILE_ON" '.$option.' value="1" '.($syslog_file_on?' checked="checked"':'').'> '.$langs->trans("SyslogSimpleFile").'</td>';
|
print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_FILE_ON" '.$option.' value="1" '.($syslog_file_on?' checked="checked"':'').'> '.$langs->trans("SyslogSimpleFile").'</td>';
|
||||||
print '<td width="250" nowrap="nowrap">'.$langs->trans("SyslogFilename").': <input type="text" class="flat" name="filename" '.$option.' size="60" value="'.$defaultsyslogfile.'">';
|
print '<td nowrap="nowrap">'.$langs->trans("SyslogFilename").': <input type="text" class="flat" name="filename" '.$option.' size="60" value="'.$defaultsyslogfile.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "<td align=\"left\">".$form->textwithpicto('',$langs->trans("YouCanUseDOL_DATA_ROOT"));
|
print "<td align=\"left\">".$form->textwithpicto('',$langs->trans("YouCanUseDOL_DATA_ROOT"));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_SYSLOG_ON" '.$option.' value="1" '.($syslog_syslog_on?' checked="checked"':'').'> '.$langs->trans("SyslogSyslog").'</td>';
|
print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_SYSLOG_ON" '.$option.' value="1" '.($syslog_syslog_on?' checked="checked"':'').'> '.$langs->trans("SyslogSyslog").'</td>';
|
||||||
print '<td width="250" nowrap="nowrap">'.$langs->trans("SyslogFacility").': <input type="text" class="flat" name="facility" '.$option.' value="'.$defaultsyslogfacility.'">';
|
print '<td nowrap="nowrap">'.$langs->trans("SyslogFacility").': <input type="text" class="flat" name="facility" '.$option.' value="'.$defaultsyslogfacility.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "<td align=\"left\">".$form->textwithpicto('','Only LOG_USER supported on Windows');
|
print "<td align=\"left\">".$form->textwithpicto('','Only LOG_USER supported on Windows');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@@ -202,7 +202,7 @@ try
|
|||||||
if (! class_exists('FirePHP')) print ' disabled="disabled"';
|
if (! class_exists('FirePHP')) print ' disabled="disabled"';
|
||||||
else print ($syslog_firephp_on?' checked="checked"':"");
|
else print ($syslog_firephp_on?' checked="checked"':"");
|
||||||
print '> '.$langs->trans("FirePHP").'</td>';
|
print '> '.$langs->trans("FirePHP").'</td>';
|
||||||
print '<td width="250" nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "<td align=\"left\">".$form->textwithpicto('','FirePHP must be installed onto PHP and FirePHP plugin for Firefox must also be installed');
|
print "<td align=\"left\">".$form->textwithpicto('','FirePHP must be installed onto PHP and FirePHP plugin for Firefox must also be installed');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@@ -232,7 +232,7 @@ print '<td align="right"><input type="submit" class="button" '.$option.' value="
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width=\"140\">'.$langs->trans("SyslogLevel").'</td>';
|
print '<tr '.$bc[$var].'><td width="140">'.$langs->trans("SyslogLevel").'</td>';
|
||||||
print '<td colspan="2"><select class="flat" name="level" '.$option.'>';
|
print '<td colspan="2"><select class="flat" name="level" '.$option.'>';
|
||||||
print '<option value="'.LOG_EMERG.'" '.($conf->global->SYSLOG_LEVEL==LOG_EMERG?'SELECTED':'').'>LOG_EMERG ('.LOG_EMERG.')</option>';
|
print '<option value="'.LOG_EMERG.'" '.($conf->global->SYSLOG_LEVEL==LOG_EMERG?'SELECTED':'').'>LOG_EMERG ('.LOG_EMERG.')</option>';
|
||||||
print '<option value="'.LOG_ALERT.'" '.($conf->global->SYSLOG_LEVEL==LOG_ALERT?'SELECTED':'').'>LOG_ALERT ('.LOG_ALERT.')</option>';
|
print '<option value="'.LOG_ALERT.'" '.($conf->global->SYSLOG_LEVEL==LOG_ALERT?'SELECTED':'').'>LOG_ALERT ('.LOG_ALERT.')</option>';
|
||||||
|
|||||||
@@ -157,10 +157,16 @@ $txt =$langs->trans("OSTZ").' (variable system TZ): '.($_ENV["TZ"]?$_ENV["TZ"]:$
|
|||||||
$txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
|
$txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP
|
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP
|
||||||
$a=getServerTimeZoneString();
|
$a=getServerTimeZoneInt('now');
|
||||||
$a.=' '.(getServerTimeZoneInt()>=0?'+':'').getServerTimeZoneInt();
|
$b=getServerTimeZoneInt('winter');
|
||||||
$a.=' ('.(getServerTimeZoneInt()>=0?'+':'').(getServerTimeZoneInt()*3600).')';
|
$c=getServerTimeZoneInt('summer');
|
||||||
print $form->textwithtooltip($a,$txt,2,1,img_info(''));
|
$daylight=(is_numeric($c) && is_numeric($b))?round($c-$b):'unknown';
|
||||||
|
//print $a." ".$b." ".$c." ".$daylight;
|
||||||
|
$val=($a>=0?'+':'').$a;
|
||||||
|
$val.=' ('.($a==='unknown'?'unknown':($a>=0?'+':'').($a*3600)).')';
|
||||||
|
$val.=' '.getServerTimeZoneString().' '.($b>=0?'+':'').$b.' ('.($b>=0?'+':'').($b*3600).')';
|
||||||
|
$val.=' '.$langs->trans("DaylingSavingTime").': '.($daylight==='unknown'?'unknown':yn($daylight));
|
||||||
|
print $form->textwithtooltip($val,$txt,2,1,img_info(''));
|
||||||
print '</td></tr>'."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php
|
print '</td></tr>'."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="300"> => '.$langs->trans("CurrentHour").'</td><td>'.dol_print_date(dol_now(),'dayhour','tzserver').'</td></tr>'."\n";
|
print '<tr '.$bc[$var].'><td width="300"> => '.$langs->trans("CurrentHour").'</td><td>'.dol_print_date(dol_now(),'dayhour','tzserver').'</td></tr>'."\n";
|
||||||
|
|||||||
@@ -47,29 +47,30 @@ $modules = array();
|
|||||||
$modules_names = array();
|
$modules_names = array();
|
||||||
$modules_files = array();
|
$modules_files = array();
|
||||||
|
|
||||||
|
// Search modules dirs
|
||||||
|
$modulesdir = array();
|
||||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||||
{
|
{
|
||||||
$modulesdir[] = $dirroot . "/core/modules/";
|
$modulesdir[$dirroot . '/core/modules/'] = $dirroot . '/core/modules/';
|
||||||
|
|
||||||
if ($type == 'alt')
|
$handle=@opendir($dirroot);
|
||||||
{
|
if (is_resource($handle))
|
||||||
$handle=@opendir($dirroot);
|
{
|
||||||
if (is_resource($handle))
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
while (($file = readdir($handle))!==false)
|
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||||
{
|
{
|
||||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
|
||||||
{
|
{
|
||||||
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
|
$modulesdir[$dirroot . '/' . $file . '/core/modules/'] = $dirroot . '/' . $file . '/core/modules/';
|
||||||
{
|
}
|
||||||
$modulesdir[] = $dirroot . '/' . $file . '/core/modules/';
|
}
|
||||||
}
|
}
|
||||||
}
|
closedir($handle);
|
||||||
}
|
}
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
//var_dump($modulesdir);
|
||||||
|
|
||||||
|
|
||||||
// Load list of modules
|
// Load list of modules
|
||||||
foreach($modulesdir as $dir)
|
foreach($modulesdir as $dir)
|
||||||
|
|||||||
@@ -33,9 +33,7 @@ if ($_GET["msg"]) $message='<div class="error">'.$_GET["msg"].'</div>';
|
|||||||
|
|
||||||
|
|
||||||
$urldolibarr='http://www.dolibarr.org/downloads/';
|
$urldolibarr='http://www.dolibarr.org/downloads/';
|
||||||
//$urldolibarrmodules='http://www.dolibarr.org/downloads/cat_view/65-modulesaddon';
|
|
||||||
$urldolibarrmodules='http://www.dolistore.com/';
|
$urldolibarrmodules='http://www.dolistore.com/';
|
||||||
//$urldolibarrthemes='http://www.dolibarr.org/';
|
|
||||||
$urldolibarrthemes='http://www.dolistore.com/';
|
$urldolibarrthemes='http://www.dolistore.com/';
|
||||||
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
|
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
|
||||||
$dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot);
|
$dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot);
|
||||||
@@ -141,4 +139,4 @@ print $langs->trans("SetupIsReadyForUse").'<br>';
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -87,14 +87,14 @@ $workflow=array(
|
|||||||
//, 'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_INVOICE')
|
//, 'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_INVOICE')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$workflow = array_merge($workflow, $conf->modules_parts['workflow']);
|
if (! empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow'])) $workflow = array_merge($workflow, $conf->modules_parts['workflow']);
|
||||||
|
|
||||||
foreach($workflow as $child => $parents)
|
foreach($workflow as $child => $parents)
|
||||||
{
|
{
|
||||||
if ($conf->$child->enabled)
|
if ($conf->$child->enabled)
|
||||||
{
|
{
|
||||||
$langs->Load($child.'@'.$child);
|
$langs->Load($child.'@'.$child);
|
||||||
|
|
||||||
foreach($parents as $parent => $actions)
|
foreach($parents as $parent => $actions)
|
||||||
{
|
{
|
||||||
if ($conf->$parent->enabled)
|
if ($conf->$parent->enabled)
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ if ($id || $ref)
|
|||||||
$objecttype = 'adherent&categorie';
|
$objecttype = 'adherent&categorie';
|
||||||
$objectid = isset($id)?$id:(isset($ref)?$ref:'');
|
$objectid = isset($id)?$id:(isset($ref)?$ref:'');
|
||||||
$dbtablename = 'adherent';
|
$dbtablename = 'adherent';
|
||||||
$fieldid = isset($ref)?'ref':'rowid';
|
$fieldid = ! empty($ref)?'ref':'rowid';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/cactioncomm.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/cactioncomm.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/actioncomm.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/actioncomm.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
||||||
|
|
||||||
@@ -67,17 +68,24 @@ if (! $sortfield) $sortfield="name";
|
|||||||
*/
|
*/
|
||||||
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
|
||||||
|
|
||||||
// Creation repertoire si n'existe pas
|
// Creation repertoire si n'existe pas
|
||||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ if ($action == 'create')
|
|||||||
print '<form name="formaction" action="'.DOL_URL_ROOT.'/comm/action/fiche.php" method="POST">';
|
print '<form name="formaction" action="'.DOL_URL_ROOT.'/comm/action/fiche.php" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="add_action">';
|
print '<input type="hidden" name="action" value="add_action">';
|
||||||
print '<input type="hidden" name="backtopage" value="'.((! empty($backtopage) && $backtopage != '1') ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
||||||
|
|
||||||
if (GETPOST("actioncode") == 'AC_RDV') print_fiche_titre($langs->trans("AddActionRendezVous"));
|
if (GETPOST("actioncode") == 'AC_RDV') print_fiche_titre($langs->trans("AddActionRendezVous"));
|
||||||
else print_fiche_titre($langs->trans("AddAnAction"));
|
else print_fiche_titre($langs->trans("AddAnAction"));
|
||||||
@@ -673,7 +673,7 @@ if ($id)
|
|||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||||
print '<input type="hidden" name="ref_ext" value="'.$act->ref_ext.'">';
|
print '<input type="hidden" name="ref_ext" value="'.$act->ref_ext.'">';
|
||||||
print '<input type="hidden" name="backtopage" value="'.((! empty($backtopage) && $backtopage != '1')? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1'? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
@@ -741,7 +741,7 @@ if ($id)
|
|||||||
|
|
||||||
// Contact
|
// Contact
|
||||||
print '<td>'.$langs->trans("Contact").'</td><td width="30%">';
|
print '<td>'.$langs->trans("Contact").'</td><td width="30%">';
|
||||||
print $form->selectarray("contactid", $act->societe->contact_array(), $act->contact->id, 1);
|
print $form->selectarray("contactid", (empty($act->societe->id)?array():$act->societe->contact_array()), $act->contact->id, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ if ($action=='delete_action')
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
|
$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||||
llxHeader('',$langs->trans("Agenda"),$help_url);
|
llxHeader('',$langs->trans("Agenda"),$help_url);
|
||||||
|
|
||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
|
|||||||
@@ -151,13 +151,26 @@ if ($action == 'delete')
|
|||||||
$sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles where rowid=".$id;
|
$sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles where rowid=".$id;
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{ //on récurpére l'id du mailing
|
||||||
$file = $dirmod."/modules_mailings.php";
|
$id = GETPOST('id','int');
|
||||||
$classname = "MailingTargets";
|
|
||||||
require_once($file);
|
|
||||||
|
|
||||||
$obj = new $classname($db);
|
if (!empty($id))
|
||||||
$obj->update_nb($id);
|
{
|
||||||
|
$file = $dirmod."/modules_mailings.php";
|
||||||
|
$classname = "MailingTargets";
|
||||||
|
require_once($file);
|
||||||
|
|
||||||
|
$obj = new $classname($db);
|
||||||
|
$obj->update_nb($id);
|
||||||
|
|
||||||
|
Header("Location: cibles.php?id=".$id);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Header("Location: liste.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ $substitutionarray=array(
|
|||||||
'__SIGNATURE__' => 'Signature',
|
'__SIGNATURE__' => 'Signature',
|
||||||
'__PERSONALIZED__' => 'Personalized'
|
'__PERSONALIZED__' => 'Personalized'
|
||||||
);
|
);
|
||||||
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
|
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||||
{
|
{
|
||||||
$substitutionarray=array_merge(
|
$substitutionarray=array_merge(
|
||||||
$substitutionarray,
|
$substitutionarray,
|
||||||
@@ -81,7 +81,7 @@ $substitutionarrayfortest=array(
|
|||||||
'__SIGNATURE__' => 'TESTSignature',
|
'__SIGNATURE__' => 'TESTSignature',
|
||||||
'__PERSONALIZED__' => 'TESTPersonalized'
|
'__PERSONALIZED__' => 'TESTPersonalized'
|
||||||
);
|
);
|
||||||
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
|
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||||
{
|
{
|
||||||
$substitutionarrayfortest=array_merge(
|
$substitutionarrayfortest=array_merge(
|
||||||
$substitutionarrayfortest,
|
$substitutionarrayfortest,
|
||||||
@@ -681,14 +681,12 @@ else
|
|||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Confirm reset
|
// Confirm reset
|
||||||
else if ($action == 'reset')
|
else if ($action == 'reset')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Confirm delete
|
// Confirm delete
|
||||||
else if ($action == 'delete')
|
else if ($action == 'delete')
|
||||||
{
|
{
|
||||||
@@ -696,7 +694,8 @@ else
|
|||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action != 'edit')
|
|
||||||
|
if ($action != 'edit')
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Mailing en mode visu
|
* Mailing en mode visu
|
||||||
@@ -747,12 +746,12 @@ else
|
|||||||
|
|
||||||
// From
|
// From
|
||||||
print '<tr><td>'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
print '<tr><td>'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
||||||
print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string');
|
print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'email');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Errors to
|
// Errors to
|
||||||
print '<tr><td>'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
print '<tr><td>'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
||||||
print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string');
|
print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'email');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
@@ -763,7 +762,7 @@ else
|
|||||||
print $langs->trans("TotalNbOfDistinctRecipients");
|
print $langs->trans("TotalNbOfDistinctRecipients");
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
$nbemail = ($object->nbemail?$object->nbemail:img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>');
|
$nbemail = ($object->nbemail?$object->nbemail:img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>');
|
||||||
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
if ($object->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
||||||
{
|
{
|
||||||
if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0)
|
if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0)
|
||||||
{
|
{
|
||||||
@@ -955,9 +954,13 @@ else
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
// Ref
|
||||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'.$object->id.'</td></tr>';
|
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'.$object->id.'</td></tr>';
|
||||||
|
// Topic
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
|
print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
|
||||||
|
// From
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>';
|
print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>';
|
||||||
|
// To
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1).'</td></tr>';
|
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1).'</td></tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
@@ -1043,7 +1046,7 @@ else
|
|||||||
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
||||||
print '__ID__ = '.$langs->trans("IdRecord").'<br>';
|
print '__ID__ = '.$langs->trans("IdRecord").'<br>';
|
||||||
print '__EMAIL__ = '.$langs->trans("EMail").'<br>';
|
print '__EMAIL__ = '.$langs->trans("EMail").'<br>';
|
||||||
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
|
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||||
{
|
{
|
||||||
print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>';
|
print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>';
|
||||||
print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>';
|
print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -155,7 +155,7 @@ if ($result)
|
|||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
$nbemail = $obj->nbemail;
|
$nbemail = $obj->nbemail;
|
||||||
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
||||||
{
|
{
|
||||||
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
||||||
print $form->textwithpicto($nbemail,$text,1,'warning');
|
print $form->textwithpicto($nbemail,$text,1,'warning');
|
||||||
@@ -192,7 +192,7 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes')
|
|||||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->propale->supprimer)
|
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->propale->supprimer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
$object->fetch_thirdparty();
|
||||||
$result=$object->delete($user);
|
$result=$object->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@@ -834,6 +835,7 @@ else if ($action == "addline" && $user->rights->propale->creer)
|
|||||||
unset($_POST['np_price']);
|
unset($_POST['np_price']);
|
||||||
unset($_POST['dp_desc']);
|
unset($_POST['dp_desc']);
|
||||||
unset($_POST['np_tva_tx']);
|
unset($_POST['np_tva_tx']);
|
||||||
|
unset($_POST['np_desc']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1146,7 +1148,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
//'text' => $langs->trans("ConfirmClone"),
|
//'text' => $langs->trans("ConfirmClone"),
|
||||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
||||||
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid','int'),'socid','(s.client=1 OR s.client=3)'))
|
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid','int'),'socid','(s.client=1 OR s.client=2 OR s.client=3)'))
|
||||||
);
|
);
|
||||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||||
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
||||||
@@ -2002,7 +2004,7 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
||||||
if ($objp->fk_statut == 1 && $objp->dfv < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
|
if ($objp->fk_statut == 1 && $db->jdate($objp->dfv) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="16" align="right" class="nobordernopadding">';
|
print '<td width="16" align="right" class="nobordernopadding">';
|
||||||
@@ -2028,7 +2030,7 @@ else
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print $companystatic->getNomUrl(1,'customer');
|
print $companystatic->getNomUrl(1,'customer');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Customer ref
|
// Customer ref
|
||||||
print '<td nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
print $objp->ref_client;
|
print $objp->ref_client;
|
||||||
|
|||||||
@@ -1588,6 +1588,7 @@ class Propal extends CommonObject
|
|||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
$this->statut = 0;
|
$this->statut = 0;
|
||||||
|
$this->brouillon = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1809,7 +1810,7 @@ class Propal extends CommonObject
|
|||||||
{
|
{
|
||||||
dol_delete_preview($this);
|
dol_delete_preview($this);
|
||||||
|
|
||||||
if (!dol_delete_file($file))
|
if (! dol_delete_file($file,0,0,0,$this)) // For triggers
|
||||||
{
|
{
|
||||||
$this->error='ErrorFailToDeleteFile';
|
$this->error='ErrorFailToDeleteFile';
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ require("../../main.inc.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/propal.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/propal.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
|
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
@@ -74,10 +75,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -104,12 +114,13 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
if ($object->fetch($id))
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$langs->load("other");
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,13 +192,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
*/
|
*/
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Affiche formulaire upload
|
// Affiche formulaire upload
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id,'',0,0,$user->rights->propale->creer);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id,'',0,0,$user->rights->propale->creer,50,$object);
|
||||||
|
|
||||||
|
|
||||||
// List of document
|
// List of document
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -48,9 +48,10 @@ if ($user->societe_id > 0)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$propalstatic=new Propal($db);
|
$propalstatic=new Propal($db);
|
||||||
|
$companystatic=new Societe($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
$help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES:Módulo Presupuestos";
|
$help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES:Módulo_Presupuestos";
|
||||||
|
|
||||||
llxHeader("",$langs->trans("ProspectionArea"),$help_url);
|
llxHeader("",$langs->trans("ProspectionArea"),$help_url);
|
||||||
|
|
||||||
@@ -155,7 +156,7 @@ else
|
|||||||
*/
|
*/
|
||||||
if ($conf->propal->enabled)
|
if ($conf->propal->enabled)
|
||||||
{
|
{
|
||||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.rowid as socid";
|
$sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@@ -182,9 +183,18 @@ if ($conf->propal->enabled)
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td nowrap="nowrap">';
|
|
||||||
print "<a href=".DOL_URL_ROOT."/comm/propal.php?id=".$obj->rowid.">".img_object($langs->trans("ShowPropal"),"propal").' '.$obj->ref."</a></td>";
|
$propalstatic->id=$obj->rowid;
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td></tr>';
|
$propalstatic->ref=$obj->ref;
|
||||||
|
print '<td nowrap="nowrap">'.$propalstatic->getNomUrl(1).'</td>';
|
||||||
|
|
||||||
|
$companystatic->id=$obj->socid;
|
||||||
|
$companystatic->name=$obj->socname;
|
||||||
|
$companystatic->client=$obj->client;
|
||||||
|
$companystatic->canvas=$obj->canvas;
|
||||||
|
print '<td>'.$companystatic->getNomUrl(1,'customer',24).'</td>';
|
||||||
|
|
||||||
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -201,7 +211,7 @@ $max=5;
|
|||||||
* Last modified proposals
|
* Last modified proposals
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.rowid as socid,";
|
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as socname, s.rowid as socid, s.canvas, s.client,";
|
||||||
$sql.= " date_cloture as datec";
|
$sql.= " date_cloture as datec";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
@@ -255,7 +265,12 @@ if ($resql)
|
|||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
$companystatic->id=$obj->socid;
|
||||||
|
$companystatic->name=$obj->socname;
|
||||||
|
$companystatic->client=$obj->client;
|
||||||
|
$companystatic->canvas=$obj->canvas;
|
||||||
|
print '<td>'.$companystatic->getNomUrl(1,'customer').'</td>';
|
||||||
|
|
||||||
print '<td>'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
print '<td>'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
||||||
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,5).'</td>';
|
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@@ -274,7 +289,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
|||||||
{
|
{
|
||||||
$langs->load("propal");
|
$langs->load("propal");
|
||||||
|
|
||||||
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
|
$sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@@ -324,8 +339,13 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
|||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
|
$companystatic->id=$obj->socid;
|
||||||
|
$companystatic->name=$obj->socname;
|
||||||
|
$companystatic->client=$obj->client;
|
||||||
|
$companystatic->canvas=$obj->canvas;
|
||||||
|
print '<td align="left">'.$companystatic->getNomUrl(1,'customer',44).'</td>'."\n";
|
||||||
|
|
||||||
print '<td align="left"><a href="fiche.php?socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,44).'</a></td>'."\n";
|
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
|
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
|
||||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||||
|
|||||||
@@ -620,7 +620,7 @@ class Commande extends CommonObject
|
|||||||
|
|
||||||
// $date_commande is deprecated
|
// $date_commande is deprecated
|
||||||
$date = ($this->date_commande ? $this->date_commande : $this->date);
|
$date = ($this->date_commande ? $this->date_commande : $this->date);
|
||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@@ -1234,13 +1234,11 @@ class Commande extends CommonObject
|
|||||||
$sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc';
|
$sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc';
|
||||||
$sql.= ', ca.code as availability_code';
|
$sql.= ', ca.code as availability_code';
|
||||||
$sql.= ', dr.code as demand_reason_code';
|
$sql.= ', dr.code as demand_reason_code';
|
||||||
$sql.= ', el.fk_source';
|
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande as c';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande as c';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON (c.fk_cond_reglement = cr.rowid)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON (c.fk_cond_reglement = cr.rowid)';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON (c.fk_mode_reglement = p.id)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON (c.fk_mode_reglement = p.id)';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON (c.fk_availability = ca.rowid)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON (c.fk_availability = ca.rowid)';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON (c.fk_demand_reason = ca.rowid)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON (c.fk_demand_reason = ca.rowid)';
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = c.rowid AND el.targettype = '".$this->element."'";
|
|
||||||
$sql.= " WHERE c.entity = ".$conf->entity;
|
$sql.= " WHERE c.entity = ".$conf->entity;
|
||||||
if ($id) $sql.= " AND c.rowid=".$id;
|
if ($id) $sql.= " AND c.rowid=".$id;
|
||||||
if ($ref) $sql.= " AND c.ref='".$this->db->escape($ref)."'";
|
if ($ref) $sql.= " AND c.ref='".$this->db->escape($ref)."'";
|
||||||
@@ -1292,7 +1290,6 @@ class Commande extends CommonObject
|
|||||||
$this->demand_reason_code = $obj->demand_reason_code;
|
$this->demand_reason_code = $obj->demand_reason_code;
|
||||||
$this->date_livraison = $this->db->jdate($obj->date_livraison);
|
$this->date_livraison = $this->db->jdate($obj->date_livraison);
|
||||||
$this->fk_delivery_address = $obj->fk_adresse_livraison;
|
$this->fk_delivery_address = $obj->fk_adresse_livraison;
|
||||||
$this->propale_id = $obj->fk_source;
|
|
||||||
|
|
||||||
$this->extraparams = (array) json_decode($obj->extraparams, true);
|
$this->extraparams = (array) json_decode($obj->extraparams, true);
|
||||||
|
|
||||||
@@ -1302,22 +1299,6 @@ class Commande extends CommonObject
|
|||||||
|
|
||||||
$this->db->free();
|
$this->db->free();
|
||||||
|
|
||||||
if ($this->propale_id)
|
|
||||||
{
|
|
||||||
$sqlp = "SELECT ref";
|
|
||||||
$sqlp.= " FROM ".MAIN_DB_PREFIX."propal";
|
|
||||||
$sqlp.= " WHERE rowid = ".$this->propale_id;
|
|
||||||
|
|
||||||
$resqlprop = $this->db->query($sqlp);
|
|
||||||
|
|
||||||
if ($resqlprop)
|
|
||||||
{
|
|
||||||
$objp = $this->db->fetch_object($resqlprop);
|
|
||||||
$this->propale_ref = $objp->ref;
|
|
||||||
$this->db->free($resqlprop);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lines
|
* Lines
|
||||||
*/
|
*/
|
||||||
@@ -2304,7 +2285,7 @@ class Commande extends CommonObject
|
|||||||
{
|
{
|
||||||
dol_delete_preview($this);
|
dol_delete_preview($this);
|
||||||
|
|
||||||
if (!dol_delete_file($file))
|
if (! dol_delete_file($file,0,0,0,$this)) // For triggers
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
|
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
@@ -2313,7 +2294,7 @@ class Commande extends CommonObject
|
|||||||
}
|
}
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
if (!dol_delete_dir($dir))
|
if (! dol_delete_dir($dir))
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorCanNotDeleteDir",$dir);
|
$this->error=$langs->trans("ErrorCanNotDeleteDir",$dir);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
@@ -2363,7 +2344,8 @@ class Commande extends CommonObject
|
|||||||
$clause = " AND";
|
$clause = " AND";
|
||||||
}
|
}
|
||||||
$sql.= $clause." c.entity = ".$conf->entity;
|
$sql.= $clause." c.entity = ".$conf->entity;
|
||||||
$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0";
|
//$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0";
|
||||||
|
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
|
||||||
if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id;
|
if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id;
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
@@ -2444,7 +2426,7 @@ class Commande extends CommonObject
|
|||||||
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceledShort');
|
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceledShort');
|
||||||
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraftShort');
|
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraftShort');
|
||||||
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidatedShort');
|
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidatedShort');
|
||||||
if ($statut==2) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3').' '.$langs->trans('StatusOrderSentShort');
|
if ($statut==2) return img_picto($langs->trans('StatusOrderSent'),'statut3').' '.$langs->trans('StatusOrderSentShort');
|
||||||
if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBillShort');
|
if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBillShort');
|
||||||
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessedShort');
|
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessedShort');
|
||||||
}
|
}
|
||||||
@@ -2462,7 +2444,7 @@ class Commande extends CommonObject
|
|||||||
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceled');
|
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceled');
|
||||||
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraft');
|
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraft');
|
||||||
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidated');
|
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidated');
|
||||||
if ($statut==2) return img_picto($langs->trans('StatusOrderSentShort'),'statut3').' '.$langs->trans('StatusOrderOnProcess');
|
if ($statut==2) return img_picto($langs->trans('StatusOrderSentShort'),'statut3').' '.$langs->trans('StatusOrderSent');
|
||||||
if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBill');
|
if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBill');
|
||||||
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessed');
|
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessed');
|
||||||
}
|
}
|
||||||
@@ -2471,7 +2453,7 @@ class Commande extends CommonObject
|
|||||||
if ($statut==-1) return $langs->trans('StatusOrderCanceledShort').' '.img_picto($langs->trans('StatusOrderCanceled'),'statut5');
|
if ($statut==-1) return $langs->trans('StatusOrderCanceledShort').' '.img_picto($langs->trans('StatusOrderCanceled'),'statut5');
|
||||||
if ($statut==0) return $langs->trans('StatusOrderDraftShort').' '.img_picto($langs->trans('StatusOrderDraft'),'statut0');
|
if ($statut==0) return $langs->trans('StatusOrderDraftShort').' '.img_picto($langs->trans('StatusOrderDraft'),'statut0');
|
||||||
if ($statut==1) return $langs->trans('StatusOrderValidatedShort').' '.img_picto($langs->trans('StatusOrderValidated'),'statut1');
|
if ($statut==1) return $langs->trans('StatusOrderValidatedShort').' '.img_picto($langs->trans('StatusOrderValidated'),'statut1');
|
||||||
if ($statut==2) return $langs->trans('StatusOrderSentShort').' '.img_picto($langs->trans('StatusOrderOnProcess'),'statut3');
|
if ($statut==2) return $langs->trans('StatusOrderSentShort').' '.img_picto($langs->trans('StatusOrderSent'),'statut3');
|
||||||
if ($statut==3 && ! $facturee) return $langs->trans('StatusOrderToBillShort').' '.img_picto($langs->trans('StatusOrderToBill'),'statut7');
|
if ($statut==3 && ! $facturee) return $langs->trans('StatusOrderToBillShort').' '.img_picto($langs->trans('StatusOrderToBill'),'statut7');
|
||||||
if ($statut==3 && $facturee) return $langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6');
|
if ($statut==3 && $facturee) return $langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ include_once DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.commande.class.php";
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class CommandeStats
|
* Class to manage order statistics
|
||||||
* \brief Classe permettant la gestion des stats des commandes
|
|
||||||
*/
|
*/
|
||||||
class CommandeStats extends Stats
|
class CommandeStats extends Stats
|
||||||
{
|
{
|
||||||
@@ -66,7 +65,7 @@ class CommandeStats extends Stats
|
|||||||
$this->from = MAIN_DB_PREFIX.$object->table_element." as c";
|
$this->from = MAIN_DB_PREFIX.$object->table_element." as c";
|
||||||
$this->from.= ", ".MAIN_DB_PREFIX."societe as s";
|
$this->from.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
$this->field='total_ht';
|
$this->field='total_ht';
|
||||||
$this->where.= " c.fk_statut > 0";
|
$this->where.= " c.fk_statut > 0"; // Not draft and not cancelled
|
||||||
}
|
}
|
||||||
if ($mode == 'supplier')
|
if ($mode == 'supplier')
|
||||||
{
|
{
|
||||||
@@ -74,7 +73,7 @@ class CommandeStats extends Stats
|
|||||||
$this->from = MAIN_DB_PREFIX.$object->table_element." as c";
|
$this->from = MAIN_DB_PREFIX.$object->table_element." as c";
|
||||||
$this->from.= ", ".MAIN_DB_PREFIX."societe as s";
|
$this->from.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
$this->field='total_ht';
|
$this->field='total_ht';
|
||||||
$this->where.= " c.fk_statut > 0";
|
$this->where.= " c.fk_statut > 0"; // Not draft and not cancelled
|
||||||
}
|
}
|
||||||
$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
|
$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
|
||||||
|
|
||||||
@@ -97,10 +96,10 @@ class CommandeStats extends Stats
|
|||||||
global $conf;
|
global $conf;
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$sql = "SELECT date_format(c.date_valid,'%m') as dm, count(*) nb";
|
$sql = "SELECT date_format(c.date_commande,'%m') as dm, count(*) nb";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE date_format(c.date_valid,'%Y') = '".$year."'";
|
$sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'";
|
||||||
$sql.= " AND ".$this->where;
|
$sql.= " AND ".$this->where;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
$sql.= $this->db->order('dm','DESC');
|
$sql.= $this->db->order('dm','DESC');
|
||||||
@@ -119,7 +118,7 @@ class CommandeStats extends Stats
|
|||||||
global $conf;
|
global $conf;
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$sql = "SELECT date_format(c.date_valid,'%Y') as dm, count(*), sum(c.".$this->field.")";
|
$sql = "SELECT date_format(c.date_commande,'%Y') as dm, count(*), sum(c.".$this->field.")";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE ".$this->where;
|
$sql.= " WHERE ".$this->where;
|
||||||
@@ -140,10 +139,10 @@ class CommandeStats extends Stats
|
|||||||
global $conf;
|
global $conf;
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$sql = "SELECT date_format(c.date_valid,'%m') as dm, sum(c.".$this->field.")";
|
$sql = "SELECT date_format(c.date_commande,'%m') as dm, sum(c.".$this->field.")";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE date_format(c.date_valid,'%Y') = '".$year."'";
|
$sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'";
|
||||||
$sql.= " AND ".$this->where;
|
$sql.= " AND ".$this->where;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
$sql.= $this->db->order('dm','DESC');
|
$sql.= $this->db->order('dm','DESC');
|
||||||
@@ -162,10 +161,10 @@ class CommandeStats extends Stats
|
|||||||
global $conf;
|
global $conf;
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$sql = "SELECT date_format(c.date_valid,'%m') as dm, avg(c.".$this->field.")";
|
$sql = "SELECT date_format(c.date_commande,'%m') as dm, avg(c.".$this->field.")";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE date_format(c.date_valid,'%Y') = '".$year."'";
|
$sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'";
|
||||||
$sql.= " AND ".$this->where;
|
$sql.= " AND ".$this->where;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
$sql.= $this->db->order('dm','DESC');
|
$sql.= $this->db->order('dm','DESC');
|
||||||
@@ -182,7 +181,7 @@ class CommandeStats extends Stats
|
|||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$sql = "SELECT date_format(c.date_valid,'%Y') as year, count(*) as nb, sum(c.".$this->field.") as total, avg(".$this->field.") as avg";
|
$sql = "SELECT date_format(c.date_commande,'%Y') as year, count(*) as nb, sum(c.".$this->field.") as total, avg(".$this->field.") as avg";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE ".$this->where;
|
$sql.= " WHERE ".$this->where;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/commande/class/commande.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/commande/class/commande.class.php");
|
||||||
|
|
||||||
@@ -77,10 +78,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -107,12 +117,13 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
if ($object->fetch($id))
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$langs->load("other");
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$upload_dir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,13 +177,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
*/
|
*/
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Affiche formulaire upload
|
// Affiche formulaire upload
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/commande/document.php?id='.$object->id,'',0,0,$user->rights->commande->creer);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/commande/document.php?id='.$object->id,'',0,0,$user->rights->commande->creer,50,$object);
|
||||||
|
|
||||||
|
|
||||||
// List of document
|
// List of document
|
||||||
|
|||||||
@@ -58,12 +58,18 @@ $confirm = GETPOST('confirm');
|
|||||||
$lineid = GETPOST('lineid');
|
$lineid = GETPOST('lineid');
|
||||||
$mesg = GETPOST('mesg');
|
$mesg = GETPOST('mesg');
|
||||||
|
|
||||||
$object = new Commande($db);
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'commande',$id,'');
|
$result=restrictedArea($user,'commande',$id,'');
|
||||||
|
|
||||||
|
$object = new Commande($db);
|
||||||
|
|
||||||
|
// Load object
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
|
{
|
||||||
|
$ret=$object->fetch($id, $ref);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||||
$hookmanager=new HookManager($db);
|
$hookmanager=new HookManager($db);
|
||||||
@@ -128,6 +134,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes')
|
|||||||
if ($user->rights->commande->supprimer)
|
if ($user->rights->commande->supprimer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
$object->fetch_thirdparty();
|
||||||
$result=$object->delete($user);
|
$result=$object->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@@ -464,7 +471,28 @@ else if ($action == 'setconditions' && $user->rights->commande->creer)
|
|||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
dol_print_error($db,$object->error);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||||
|
{
|
||||||
|
// Define output language
|
||||||
|
$outputlangs = $langs;
|
||||||
|
$newlang=GETPOST('lang_id','alpha');
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||||
|
if (! empty($newlang))
|
||||||
|
{
|
||||||
|
$outputlangs = new Translate("",$conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ret=$object->fetch($id); // Reload to get new records
|
||||||
|
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setremisepercent' && $user->rights->commande->creer)
|
else if ($action == 'setremisepercent' && $user->rights->commande->creer)
|
||||||
@@ -996,10 +1024,11 @@ else if ($action == 'remove_file')
|
|||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
|
||||||
|
$langs->load("other");
|
||||||
$upload_dir = $conf->commande->dir_output;
|
$upload_dir = $conf->commande->dir_output;
|
||||||
$file = $upload_dir . '/' . $_GET['file'];
|
$file = $upload_dir . '/' . GETPOST('file');
|
||||||
dol_delete_file($file);
|
dol_delete_file($file);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ if ($user->societe_id > 0)
|
|||||||
$commandestatic=new Commande($db);
|
$commandestatic=new Commande($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo Pedidos de clientes";
|
$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
|
||||||
|
|
||||||
llxHeader("",$langs->trans("Orders"),$help_url);
|
llxHeader("",$langs->trans("Orders"),$help_url);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
@@ -108,12 +108,13 @@ if ($viewstatut <> '')
|
|||||||
}
|
}
|
||||||
if ($viewstatut == -2) // To process
|
if ($viewstatut == -2) // To process
|
||||||
{
|
{
|
||||||
$sql .= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
|
//$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
|
||||||
|
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($ordermonth > 0)
|
if ($ordermonth > 0)
|
||||||
{
|
{
|
||||||
$sql.= " AND date_format(c.date_valid, '%Y-%m') = '".$orderyear."-".$ordermonth."'";
|
$sql.= " AND date_format(c.date_valid, '%Y-%m') = '".$orderyear."-".$ordermonth."'"; // TODO do not use date_format but a between
|
||||||
}
|
}
|
||||||
if ($orderyear > 0)
|
if ($orderyear > 0)
|
||||||
{
|
{
|
||||||
@@ -178,7 +179,7 @@ if ($resql)
|
|||||||
print_liste_field_titre($langs->trans('RefCustomerOrder'),'liste.php','c.ref_client','','&socid='.$socid.'&viewstatut='.$viewstatut,'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('RefCustomerOrder'),'liste.php','c.ref_client','','&socid='.$socid.'&viewstatut='.$viewstatut,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans('OrderDate'),'liste.php','c.date_commande','','&socid='.$socid.'&viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('OrderDate'),'liste.php','c.date_commande','','&socid='.$socid.'&viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans('DeliveryDate'),'liste.php','c.date_livraison','','&socid='.$socid.'&viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('DeliveryDate'),'liste.php','c.date_livraison','','&socid='.$socid.'&viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans('Status'),'liste.php','c.fk_statut','','&socid='.$socid.'&viewstatut='.$viewstatut,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('Status'),'liste.php','c.fk_statut','','&socid='.$socid.'&viewstatut='.$viewstatut,'align="right"',$sortfield,$sortorder);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<form method="get" action="liste.php">';
|
print '<form method="get" action="liste.php">';
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->rights->ban
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'class')
|
if ($user->rights->banque->modifier && $action == 'class')
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".$rowid." AND fk_categ = ".$_POST["cat1"];
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".$rowid." AND fk_categ = ".$_POST["cat1"];
|
||||||
if (! $db->query($sql))
|
if (! $db->query($sql))
|
||||||
@@ -90,7 +90,7 @@ if ($action == 'class')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == "update")
|
if ($user->rights->banque->modifier && $action == "update")
|
||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
@@ -584,8 +584,11 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|||||||
print '<input type="hidden" name="action" value="class">';
|
print '<input type="hidden" name="action" value="class">';
|
||||||
print '<input type="hidden" name="orig_account" value="'.$orig_account.'">';
|
print '<input type="hidden" name="orig_account" value="'.$orig_account.'">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Rubriques").'</td><td colspan="2">';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Rubriques").'</td><td colspan="2">';
|
||||||
print '<select class="flat" name="cat1">'.$options.'</select> ';
|
if ($user->rights->banque->modifier)
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
{
|
||||||
|
print '<select class="flat" name="cat1">'.$options.'</select> ';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||||
|
}
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
print "</form>";
|
print "</form>";
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,12 @@ $usehm=$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE;
|
|||||||
|
|
||||||
$object=new Facture($db);
|
$object=new Facture($db);
|
||||||
|
|
||||||
|
// Load object
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
|
{
|
||||||
|
$ret=$object->fetch($id, $ref);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||||
$hookmanager=new HookManager($db);
|
$hookmanager=new HookManager($db);
|
||||||
@@ -143,16 +149,17 @@ else if ($action == 'reopen' && $user->rights->facture->creer)
|
|||||||
// Delete invoice
|
// Delete invoice
|
||||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->supprimer)
|
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->supprimer)
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
$result = $object->delete();
|
$object->fetch_thirdparty();
|
||||||
if ($result > 0)
|
$result = $object->delete();
|
||||||
{
|
if ($result > 0)
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"]);
|
{
|
||||||
exit;
|
Header('Location: '.$_SERVER["PHP_SELF"]);
|
||||||
}
|
exit;
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
$mesg='<div class="error">'.$object->error.'</div>';
|
{
|
||||||
|
$mesg='<div class="error">'.$object->error.'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1112,7 +1119,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
|
|||||||
unset($_POST['qty']);
|
unset($_POST['qty']);
|
||||||
unset($_POST['type']);
|
unset($_POST['type']);
|
||||||
unset($_POST['idprod']);
|
unset($_POST['idprod']);
|
||||||
unset($_POST['remmise_percent']);
|
unset($_POST['remise_percent']);
|
||||||
unset($_POST['dp_desc']);
|
unset($_POST['dp_desc']);
|
||||||
unset($_POST['np_desc']);
|
unset($_POST['np_desc']);
|
||||||
unset($_POST['np_price']);
|
unset($_POST['np_price']);
|
||||||
@@ -3256,7 +3263,7 @@ else
|
|||||||
if ($userid)
|
if ($userid)
|
||||||
{
|
{
|
||||||
if ($userid == -1) $sql.=' AND f.fk_user_author IS NULL';
|
if ($userid == -1) $sql.=' AND f.fk_user_author IS NULL';
|
||||||
else $sql.=' AND f.fk_user_author = '.$user->id;
|
else $sql.=' AND f.fk_user_author = '.$userid;
|
||||||
}
|
}
|
||||||
if ($_GET['filtre'])
|
if ($_GET['filtre'])
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1166,6 +1166,7 @@ class Facture extends CommonObject
|
|||||||
function delete($rowid=0, $notrigger=0)
|
function delete($rowid=0, $notrigger=0)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
|
||||||
if (! $rowid) $rowid=$this->id;
|
if (! $rowid) $rowid=$this->id;
|
||||||
|
|
||||||
@@ -1236,6 +1237,34 @@ class Facture extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
// On efface le repertoire de pdf provisoire
|
||||||
|
$ref = dol_sanitizeFileName($this->ref);
|
||||||
|
if ($conf->facture->dir_output)
|
||||||
|
{
|
||||||
|
$dir = $conf->facture->dir_output . "/" . $ref;
|
||||||
|
$file = $conf->facture->dir_output . "/" . $ref . "/" . $ref . ".pdf";
|
||||||
|
if (file_exists($file)) // We must delete all files before deleting directory
|
||||||
|
{
|
||||||
|
$ret=dol_delete_preview($this);
|
||||||
|
|
||||||
|
if (! dol_delete_file($file,0,0,0,$this)) // For triggers
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
|
||||||
|
$this->db->rollback();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (file_exists($dir))
|
||||||
|
{
|
||||||
|
if (! dol_delete_dir_recursive($dir)) // For remove dir and meta
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans("ErrorCanNotDeleteDir",$dir);
|
||||||
|
$this->db->rollback();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -1519,7 +1548,7 @@ class Facture extends CommonObject
|
|||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
dol_syslog(get_class($this).'::validate force_number='.$force_number,' idwarehouse='.$idwarehouse, LOG_WARNING);
|
dol_syslog(get_class($this).'::validate force_number='.$force_number.', idwarehouse='.$idwarehouse, LOG_WARNING);
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (! $this->brouillon)
|
if (! $this->brouillon)
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/discount.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/discount.class.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/invoice.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/invoice.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
|
|
||||||
$langs->load('propal');
|
$langs->load('propal');
|
||||||
@@ -79,10 +80,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -109,12 +119,13 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
if ($object->fetch($id))
|
||||||
{
|
{
|
||||||
|
$langs->load("other");
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,14 +195,14 @@ if ($id > 0 || ! empty($ref))
|
|||||||
*/
|
*/
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Affiche formulaire upload
|
// Affiche formulaire upload
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id,'',0,0,$user->rights->facture->creer);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id,'',0,0,$user->rights->facture->creer,50,$object);
|
||||||
|
|
||||||
|
|
||||||
// List of document
|
// List of document
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -58,7 +58,7 @@ $sortfield="f.datef";
|
|||||||
|
|
||||||
|
|
||||||
// Create predefined invoice
|
// Create predefined invoice
|
||||||
if ($_POST["action"] == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
$facturerec = new FactureRec($db);
|
$facturerec = new FactureRec($db);
|
||||||
$facturerec->titre = $_POST["titre"];
|
$facturerec->titre = $_POST["titre"];
|
||||||
@@ -71,17 +71,16 @@ if ($_POST["action"] == 'add')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$_GET["action"] = "create";
|
$action = "create";
|
||||||
$_GET["facid"] = $_POST["facid"];
|
|
||||||
$mesg = '<div class="error">'.$facturerec->error.'</div>';
|
$mesg = '<div class="error">'.$facturerec->error.'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Suppression
|
// Suppression
|
||||||
if ($_REQUEST["action"] == 'delete' && $user->rights->facture->supprimer)
|
if ($action == 'delete' && $user->rights->facture->supprimer)
|
||||||
{
|
{
|
||||||
$facrec = new FactureRec($db);
|
$facrec = new FactureRec($db);
|
||||||
$facrec->fetch(GETPOST('facid','int'));
|
$facrec->fetch($facid);
|
||||||
$facrec->delete();
|
$facrec->delete();
|
||||||
$facid = 0 ;
|
$facid = 0 ;
|
||||||
}
|
}
|
||||||
@@ -99,7 +98,7 @@ $form = new Form($db);
|
|||||||
/*
|
/*
|
||||||
* Create mode
|
* Create mode
|
||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
print_fiche_titre($langs->trans("CreateRepeatableInvoice"));
|
print_fiche_titre($langs->trans("CreateRepeatableInvoice"));
|
||||||
|
|
||||||
@@ -108,7 +107,7 @@ if ($_GET["action"] == 'create')
|
|||||||
$facture = new Facture($db); // Source invoice
|
$facture = new Facture($db); // Source invoice
|
||||||
$product_static=new Product($db);
|
$product_static=new Product($db);
|
||||||
|
|
||||||
if ($facture->fetch($_GET["facid"]) > 0)
|
if ($facture->fetch($facid) > 0)
|
||||||
{
|
{
|
||||||
print '<form action="fiche-rec.php" method="post">';
|
print '<form action="fiche-rec.php" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye
|
|||||||
if (substr($key,0,7) == 'amount_')
|
if (substr($key,0,7) == 'amount_')
|
||||||
{
|
{
|
||||||
$cursorfacid = substr($key,7);
|
$cursorfacid = substr($key,7);
|
||||||
$amounts[$cursorfacid] = price2num($_POST[$key]);
|
$amounts[$cursorfacid] = price2num(trim($_POST[$key]));
|
||||||
$totalpaiement = $totalpaiement + $amounts[$cursorfacid];
|
$totalpaiement = $totalpaiement + $amounts[$cursorfacid];
|
||||||
$tmpfacture=new Facture($db);
|
$tmpfacture=new Facture($db);
|
||||||
$tmpfacture->fetch($cursorfacid);
|
$tmpfacture->fetch($cursorfacid);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -27,7 +27,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php');
|
||||||
if ($conf->esaeb->enabled) require_once(DOL_DOCUMENT_ROOT.'/esaeb/class/esaeb19.class.php');
|
if ($conf->esaeb->enabled) dol_include_once('/esaeb/class/esaeb19.class.php');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ if ($action == 'infotrans' && $user->rights->prelevement->bons->send)
|
|||||||
{
|
{
|
||||||
$dir = $conf->prelevement->dir_output.'/receipts';
|
$dir = $conf->prelevement->dir_output.'/receipts';
|
||||||
|
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . $_FILES['userfile']['name'],1) > 0)
|
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1) > 0)
|
||||||
{
|
{
|
||||||
$dt = dol_mktime(12,0,0,GETPOST('remonth','int'),GETPOST('reday','int'),GETPOST('reyear','int'));
|
$dt = dol_mktime(12,0,0,GETPOST('remonth','int'),GETPOST('reday','int'),GETPOST('reyear','int'));
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ if ($id)
|
|||||||
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||||
print '<td>'.$bon->getLibStatut(1).'</td>';
|
print '<td>'.$bon->getLibStatut(1).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if($bon->date_trans <> 0)
|
if($bon->date_trans <> 0)
|
||||||
{
|
{
|
||||||
$muser = new User($db);
|
$muser = new User($db);
|
||||||
|
|||||||
@@ -73,20 +73,17 @@ $modulepart='tax';
|
|||||||
|
|
||||||
if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
|
||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
{
|
{
|
||||||
// Create small thumbs for company (Ratio is near 16/9)
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
// Used on logon for example
|
// Used on logon for example
|
||||||
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
// Create mini thumbs for company (Ratio is near 16/9)
|
|
||||||
// Used on menu or for setup page for example
|
// Used on menu or for setup page for example
|
||||||
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program 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 General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file htdocs/contact/canvas/default/dao_contact_default.class.php
|
|
||||||
* \ingroup thirdparty
|
|
||||||
* \brief Fichier de la classe des contacts par defaut
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \class DaoContactDefault
|
|
||||||
* \brief Classe permettant la gestion des contacts par defaut, cette classe surcharge la classe contact
|
|
||||||
*/
|
|
||||||
class DaoContactDefault extends Contact
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
* @param DoliDB $DB Handler acces base de donnees
|
|
||||||
*/
|
|
||||||
function DaoContactDefault($DB)
|
|
||||||
{
|
|
||||||
$this->db = $DB;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -22,6 +22,10 @@
|
|||||||
<?php
|
<?php
|
||||||
print_fiche_titre($this->control->tpl['title']);
|
print_fiche_titre($this->control->tpl['title']);
|
||||||
|
|
||||||
|
dol_htmloutput_errors((is_numeric($object->error)?'':$object->error),$object->errors);
|
||||||
|
|
||||||
|
dol_htmloutput_errors((is_numeric($GLOBALS['error'])?'':$GLOBALS['error']),$GLOBALS['errors']);
|
||||||
|
|
||||||
dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']);
|
dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']);
|
||||||
|
|
||||||
echo $this->control->tpl['ajax_selectcountry']; ?>
|
echo $this->control->tpl['ajax_selectcountry']; ?>
|
||||||
@@ -40,7 +44,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td width="15%" class="fieldrequired"><?php echo $langs->trans("Lastname").' / '.$langs->trans("Label"); ?></td>
|
<td width="15%" class="fieldrequired"><?php echo $langs->trans("Lastname").' / '.$langs->trans("Label"); ?></td>
|
||||||
<td><input name="name" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['name']; ?>"></td>
|
<td><input name="lastname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['name']; ?>"></td>
|
||||||
<td width="20%"><?php echo $langs->trans("Firstname"); ?></td>
|
<td width="20%"><?php echo $langs->trans("Firstname"); ?></td>
|
||||||
<td width="25%"><input name="firstname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
|
<td width="25%"><input name="firstname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ echo $this->control->tpl['ajax_selectcountry'];
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td width="15%" class="fieldrequired"><?php echo $langs->trans("Lastname").' / '.$langs->trans("Label"); ?></td>
|
<td width="15%" class="fieldrequired"><?php echo $langs->trans("Lastname").' / '.$langs->trans("Label"); ?></td>
|
||||||
<td><input name="name" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['name']; ?>"></td>
|
<td><input name="lastname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['name']; ?>"></td>
|
||||||
<td width="20%"><?php echo $langs->trans("Firstname"); ?></td>
|
<td width="20%"><?php echo $langs->trans("Firstname"); ?></td>
|
||||||
<td width="25%"><input name="firstname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
|
<td width="25%"><input name="firstname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class Contact extends CommonObject
|
|||||||
$sql.= "'".$this->db->idate($now)."',";
|
$sql.= "'".$this->db->idate($now)."',";
|
||||||
if ($this->socid > 0) $sql.= " ".$this->socid.",";
|
if ($this->socid > 0) $sql.= " ".$this->socid.",";
|
||||||
else $sql.= "null,";
|
else $sql.= "null,";
|
||||||
$sql.= "'".$this->db->escape($this->name)."',";
|
$sql.= "'".$this->db->escape($this->lastname)."',";
|
||||||
$sql.= "'".$this->db->escape($this->firstname)."',";
|
$sql.= "'".$this->db->escape($this->firstname)."',";
|
||||||
$sql.= " ".($user->id > 0 ? "'".$user->id."'":"null").",";
|
$sql.= " ".($user->id > 0 ? "'".$user->id."'":"null").",";
|
||||||
$sql.= " ".$this->priv.",";
|
$sql.= " ".$this->priv.",";
|
||||||
@@ -330,7 +330,7 @@ class Contact extends CommonObject
|
|||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
if ($this->fullname && $conf->global->LDAP_CONTACT_FIELD_FULLNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FULLNAME] = $this->fullname;
|
if ($this->fullname && $conf->global->LDAP_CONTACT_FIELD_FULLNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FULLNAME] = $this->fullname;
|
||||||
if ($this->name && $conf->global->LDAP_CONTACT_FIELD_NAME) $info[$conf->global->LDAP_CONTACT_FIELD_NAME] = $this->name;
|
if ($this->lastname && $conf->global->LDAP_CONTACT_FIELD_NAME) $info[$conf->global->LDAP_CONTACT_FIELD_NAME] = $this->lastname;
|
||||||
if ($this->firstname && $conf->global->LDAP_CONTACT_FIELD_FIRSTNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FIRSTNAME] = $this->firstname;
|
if ($this->firstname && $conf->global->LDAP_CONTACT_FIELD_FIRSTNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FIRSTNAME] = $this->firstname;
|
||||||
|
|
||||||
if ($this->poste) $info["title"] = $this->poste;
|
if ($this->poste) $info["title"] = $this->poste;
|
||||||
@@ -744,6 +744,7 @@ class Contact extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
dol_syslog("Error ".$this->error,LOG_ERR);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1012,7 +1013,7 @@ class Contact extends CommonObject
|
|||||||
// Initialise parameters
|
// Initialise parameters
|
||||||
$this->id=0;
|
$this->id=0;
|
||||||
$this->specimen=1;
|
$this->specimen=1;
|
||||||
$this->name = 'DOLIBARR';
|
$this->lastname = 'DOLIBARR';
|
||||||
$this->firstname = 'SPECIMEN';
|
$this->firstname = 'SPECIMEN';
|
||||||
$this->address = '61 jump street';
|
$this->address = '61 jump street';
|
||||||
$this->zip = '75000';
|
$this->zip = '75000';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||||
@@ -159,13 +159,13 @@ if (empty($reshook))
|
|||||||
$error++; $errors[]=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label"));
|
$error++; $errors[]=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label"));
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$id = $object->create($user);
|
$id = $object->create($user);
|
||||||
if ($id <= 0)
|
if ($id <= 0)
|
||||||
{
|
{
|
||||||
$error++; $errors[]=($object->error?array($object->error):$object->errors);
|
$error++; $errors=array_merge($errors,($object->error?array($object->error):$object->errors));
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -199,7 +199,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$error=$object->error; $errors[]=$object->errors;
|
$error=$object->error; $errors=$object->errors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,7 +355,7 @@ else
|
|||||||
print_fiche_titre($title);
|
print_fiche_titre($title);
|
||||||
|
|
||||||
// Affiche les erreurs
|
// Affiche les erreurs
|
||||||
dol_htmloutput_errors($error,$errors);
|
dol_htmloutput_errors(is_numeric($error)?'':$error,$errors);
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
@@ -689,7 +689,7 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($id) && $action != 'edit')
|
if (! empty($id) && $action != 'edit' && $action != 'create')
|
||||||
{
|
{
|
||||||
$objsoc = new Societe($db);
|
$objsoc = new Societe($db);
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ $langs->load("companies");
|
|||||||
$langs->load("ldap");
|
$langs->load("ldap");
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
|
$action=GETPOST('action');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$contactid = isset($_GET["id"])?$_GET["id"]:'';
|
$contactid = isset($_GET["id"])?$_GET["id"]:'';
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
@@ -45,7 +47,7 @@ $contact->fetch($_GET["id"], $user);
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($_GET["action"] == 'dolibarr2ldap')
|
if ($action == 'dolibarr2ldap')
|
||||||
{
|
{
|
||||||
$message="";
|
$message="";
|
||||||
|
|
||||||
@@ -133,7 +135,7 @@ print '</table>';
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
if ($message) { print $message; }
|
dol_htmloutput_mesg($message);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -324,7 +324,11 @@ class Contrat extends CommonObject
|
|||||||
$sql.= " fk_commercial_signature, fk_commercial_suivi,";
|
$sql.= " fk_commercial_signature, fk_commercial_suivi,";
|
||||||
$sql.= " note as note_private, note_public, extraparams";
|
$sql.= " note as note_private, note_public, extraparams";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."contrat";
|
$sql.= " FROM ".MAIN_DB_PREFIX."contrat";
|
||||||
if ($ref) $sql.= " WHERE ref='".$ref."'";
|
if ($ref)
|
||||||
|
{
|
||||||
|
$sql.= " WHERE ref='".$ref."'";
|
||||||
|
$sql.= " AND entity IN (".getEntity('contract').")";
|
||||||
|
}
|
||||||
else $sql.= " WHERE rowid=".$id;
|
else $sql.= " WHERE rowid=".$id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||||
@@ -622,13 +626,14 @@ class Contrat extends CommonObject
|
|||||||
// Insert contract
|
// Insert contract
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."contrat (datec, fk_soc, fk_user_author, date_contrat,";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."contrat (datec, fk_soc, fk_user_author, date_contrat,";
|
||||||
$sql.= " fk_commercial_signature, fk_commercial_suivi, fk_projet,";
|
$sql.= " fk_commercial_signature, fk_commercial_suivi, fk_projet,";
|
||||||
$sql.= " ref)";
|
$sql.= " ref, entity)";
|
||||||
$sql.= " VALUES (".$this->db->idate(mktime()).",".$this->socid.",".$user->id;
|
$sql.= " VALUES (".$this->db->idate(mktime()).",".$this->socid.",".$user->id;
|
||||||
$sql.= ",".$this->db->idate($this->date_contrat);
|
$sql.= ",".$this->db->idate($this->date_contrat);
|
||||||
$sql.= ",".($this->commercial_signature_id>0?$this->commercial_signature_id:"NULL");
|
$sql.= ",".($this->commercial_signature_id>0?$this->commercial_signature_id:"NULL");
|
||||||
$sql.= ",".($this->commercial_suivi_id>0?$this->commercial_suivi_id:"NULL");
|
$sql.= ",".($this->commercial_suivi_id>0?$this->commercial_suivi_id:"NULL");
|
||||||
$sql.= ",".($this->fk_projet>0?$this->fk_projet:"NULL");
|
$sql.= ",".($this->fk_projet>0?$this->fk_projet:"NULL");
|
||||||
$sql .= ", " . (dol_strlen($this->ref)<=0 ? "null" : "'".$this->ref."'");
|
$sql.= ", ".(dol_strlen($this->ref)<=0 ? "null" : "'".$this->ref."'");
|
||||||
|
$sql.= ", ".$conf->entity;
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ require ("../main.inc.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/contract.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/contract.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
|
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
@@ -69,13 +70,20 @@ $modulepart='contract';
|
|||||||
*/
|
*/
|
||||||
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
|
||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -156,7 +164,7 @@ if ($contrat->id)
|
|||||||
|
|
||||||
// Affiche formulaire upload
|
// Affiche formulaire upload
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/contrat/document.php?id='.$contrat->id,'',0,0,$user->rights->contrat->creer);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/contrat/document.php?id='.$contrat->id,'',0,0,$user->rights->contrat->creer,50,$object);
|
||||||
|
|
||||||
|
|
||||||
// List of document
|
// List of document
|
||||||
|
|||||||
@@ -1254,14 +1254,13 @@ else
|
|||||||
print '<input type="hidden" name="mode" value="predefined">';
|
print '<input type="hidden" name="mode" value="predefined">';
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
// multiprix
|
// multiprix
|
||||||
if($conf->global->PRODUIT_MULTIPRICES)
|
if($conf->global->PRODUIT_MULTIPRICES)
|
||||||
$form->select_produits('','idprod',1,$conf->product->limit_size,$object->thirdparty->price_level);
|
$form->select_produits('','idprod',1,$conf->product->limit_size,$object->thirdparty->price_level);
|
||||||
else
|
else
|
||||||
$form->select_produits('','idprod',1,$conf->product->limit_size);
|
$form->select_produits('','idprod',1,$conf->product->limit_size);
|
||||||
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
|
||||||
print '<textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea>';
|
print '<textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -1270,7 +1269,7 @@ else
|
|||||||
print '<td align="center" colspan="2" rowspan="2"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
print '<td align="center" colspan="2" rowspan="2"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td colspan="8">';
|
print '<td colspan="8">';
|
||||||
print $langs->trans("DateStartPlanned").' ';
|
print $langs->trans("DateStartPlanned").' ';
|
||||||
$form->select_date('',"date_start",$usehm,$usehm,1,"addline");
|
$form->select_date('',"date_start",$usehm,$usehm,1,"addline");
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -38,9 +38,9 @@ $statut=isset($_GET["statut"])?$_GET["statut"]:1;
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
$contratid = isset($_GET["id"])?$_GET["id"]:'';
|
$id = GETPOST('id','int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'contrat',$contratid,'');
|
$result = restrictedArea($user, 'contrat',$id,'');
|
||||||
|
|
||||||
$staticcompany=new Societe($db);
|
$staticcompany=new Societe($db);
|
||||||
$staticcontrat=new Contrat($db);
|
$staticcontrat=new Contrat($db);
|
||||||
@@ -104,7 +104,7 @@ $sql.= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c";
|
|||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid";
|
$sql.= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid";
|
||||||
$sql.= " AND (cd.statut != 4 OR (cd.statut = 4 AND (cd.date_fin_validite is null or cd.date_fin_validite >= '".$db->idate($now)."')))";
|
$sql.= " AND (cd.statut != 4 OR (cd.statut = 4 AND (cd.date_fin_validite is null or cd.date_fin_validite >= '".$db->idate($now)."')))";
|
||||||
$sql.= " AND c.entity = ".$conf->entity;
|
$sql.= " AND c.entity IN (".getEntity('contract').")";
|
||||||
if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id;
|
if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id;
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
$sql.= " GROUP BY cd.statut";
|
$sql.= " GROUP BY cd.statut";
|
||||||
@@ -141,7 +141,7 @@ $sql.= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c";
|
|||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid";
|
$sql.= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid";
|
||||||
$sql.= " AND (cd.statut = 4 AND cd.date_fin_validite < '".$db->idate($now)."')";
|
$sql.= " AND (cd.statut = 4 AND cd.date_fin_validite < '".$db->idate($now)."')";
|
||||||
$sql.= " AND c.entity = ".$conf->entity;
|
$sql.= " AND c.entity IN (".getEntity('contract').")";
|
||||||
if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id;
|
if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id;
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
$sql.= " GROUP BY cd.statut";
|
$sql.= " GROUP BY cd.statut";
|
||||||
@@ -230,7 +230,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire)
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe as s";
|
$sql .= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE s.rowid = c.fk_soc";
|
$sql.= " WHERE s.rowid = c.fk_soc";
|
||||||
$sql.= " AND c.entity = ".$conf->entity;
|
$sql.= " AND c.entity IN (".getEntity('contract').")";
|
||||||
$sql.= " AND c.statut = 0";
|
$sql.= " AND c.statut = 0";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($socid) $sql.= " AND s.fk_soc = ".$socid;
|
if ($socid) $sql.= " AND s.fk_soc = ".$socid;
|
||||||
@@ -301,7 +301,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql.= " ".MAIN_DB_PREFIX.
|
|||||||
$sql.= " ".MAIN_DB_PREFIX."contrat as c";
|
$sql.= " ".MAIN_DB_PREFIX."contrat as c";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat";
|
||||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||||
$sql.= " AND c.entity = ".$conf->entity;
|
$sql.= " AND c.entity IN (".getEntity('contract').")";
|
||||||
$sql.= " AND c.statut > 0";
|
$sql.= " AND c.statut > 0";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||||
@@ -373,7 +373,7 @@ $sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
|||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."contratdet as cd";
|
$sql.= ", ".MAIN_DB_PREFIX."contratdet as cd";
|
||||||
$sql.= ") LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
|
$sql.= ") LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
|
||||||
$sql.= " WHERE c.entity = ".$conf->entity;
|
$sql.= " WHERE c.entity IN (".getEntity('contract').")";
|
||||||
$sql.= " AND cd.fk_contrat = c.rowid";
|
$sql.= " AND cd.fk_contrat = c.rowid";
|
||||||
$sql.= " AND c.fk_soc = s.rowid";
|
$sql.= " AND c.fk_soc = s.rowid";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
@@ -451,7 +451,7 @@ $sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
|||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."contratdet as cd";
|
$sql.= ", ".MAIN_DB_PREFIX."contratdet as cd";
|
||||||
$sql.= " ) LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
|
$sql.= " ) LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
|
||||||
$sql.= " WHERE c.entity = ".$conf->entity;
|
$sql.= " WHERE c.entity IN (".getEntity('contract').")";
|
||||||
$sql.= " AND c.statut = 1";
|
$sql.= " AND c.statut = 1";
|
||||||
$sql.= " AND cd.statut = 0";
|
$sql.= " AND cd.statut = 0";
|
||||||
$sql.= " AND cd.fk_contrat = c.rowid";
|
$sql.= " AND cd.fk_contrat = c.rowid";
|
||||||
@@ -530,7 +530,7 @@ $sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
|||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."contratdet as cd";
|
$sql.= ", ".MAIN_DB_PREFIX."contratdet as cd";
|
||||||
$sql.= " ) LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
|
$sql.= " ) LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
|
||||||
$sql.= " WHERE c.entity = ".$conf->entity;
|
$sql.= " WHERE c.entity IN (".getEntity('contract').")";
|
||||||
$sql.= " AND c.statut = 1";
|
$sql.= " AND c.statut = 1";
|
||||||
$sql.= " AND cd.statut = 4";
|
$sql.= " AND cd.statut = 4";
|
||||||
$sql.= " AND cd.date_fin_validite < '".$db->idate($now)."'";
|
$sql.= " AND cd.date_fin_validite < '".$db->idate($now)."'";
|
||||||
|
|||||||
@@ -16,9 +16,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
* or see http://www.gnu.org/
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,15 +12,13 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/core/ajax/ajaxdirtree.php
|
* \file htdocs/core/ajax/ajaxdirtree.php
|
||||||
* \ingroup ecm
|
* \ingroup ecm
|
||||||
* \brief This script returns content of a directory for filetree
|
* \brief This script returns content of a directory for filetree
|
||||||
* \version $Id: ajaxFileTree.php,v 1.8 2011/07/06 17:03:41 eldy Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -106,6 +104,8 @@ if( file_exists($fullpathselecteddir) )
|
|||||||
// All dirs
|
// All dirs
|
||||||
foreach( $files as $file ) // $file can be '.', '..', or 'My dir' or 'My file'
|
foreach( $files as $file ) // $file can be '.', '..', or 'My dir' or 'My file'
|
||||||
{
|
{
|
||||||
|
if ($file == 'temp') continue;
|
||||||
|
|
||||||
$nbofsubdir=0;
|
$nbofsubdir=0;
|
||||||
$nboffilesinsubdir=0;
|
$nboffilesinsubdir=0;
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
|
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
|
||||||
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
||||||
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1');
|
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1');
|
||||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1');
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1');
|
||||||
@@ -43,8 +43,8 @@ error_reporting(E_ALL | E_STRICT);
|
|||||||
//print_r($_GET);
|
//print_r($_GET);
|
||||||
//print 'upload_dir='.GETPOST('upload_dir');
|
//print 'upload_dir='.GETPOST('upload_dir');
|
||||||
|
|
||||||
$fk_element = GETPOST('fk_element');
|
$fk_element = GETPOST('fk_element','int');
|
||||||
$element = GETPOST('element');
|
$element = GETPOST('element','alpha');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,6 +56,7 @@ class UploadHandler
|
|||||||
private $_options;
|
private $_options;
|
||||||
private $_fk_element;
|
private $_fk_element;
|
||||||
private $_element;
|
private $_element;
|
||||||
|
private $_element_ref;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,19 +65,47 @@ class UploadHandler
|
|||||||
* @param array $options Options array
|
* @param array $options Options array
|
||||||
* @param int $fk_element fk_element
|
* @param int $fk_element fk_element
|
||||||
* @param string $element element
|
* @param string $element element
|
||||||
|
* @param string $element_ref element ref
|
||||||
*/
|
*/
|
||||||
function __construct($options=null,$fk_element=null,$element=null)
|
function __construct($options=null,$fk_element=null,$element=null)
|
||||||
{
|
{
|
||||||
|
|
||||||
global $conf;
|
global $db, $conf;
|
||||||
|
global $object;
|
||||||
|
|
||||||
$this->_fk_element=$fk_element;
|
$this->_fk_element=$fk_element;
|
||||||
$this->_element=$element;
|
$this->_element=$element;
|
||||||
|
|
||||||
|
$pathname=$filename=$element;
|
||||||
|
if (preg_match('/^([^_]+)_([^_]+)/i',$element,$regs))
|
||||||
|
{
|
||||||
|
$pathname = $regs[1];
|
||||||
|
$filename = $regs[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
// For compatibility
|
||||||
|
if ($element == 'propal') {
|
||||||
|
$pathname = 'comm/propal'; $filename = 'propal';
|
||||||
|
}
|
||||||
|
if ($element == 'commande') {
|
||||||
|
$pathname = $filename = 'commande';
|
||||||
|
}
|
||||||
|
if ($element == 'facture') {
|
||||||
|
$pathname = 'compta/facture'; $filename = 'facture';
|
||||||
|
}
|
||||||
|
|
||||||
|
dol_include_once('/'.$pathname.'/class/'.$filename.'.class.php');
|
||||||
|
|
||||||
|
$classname = ucfirst($filename);
|
||||||
|
$object = new $classname($db);
|
||||||
|
|
||||||
|
$object->fetch($fk_element);
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$this->_options = array(
|
$this->_options = array(
|
||||||
'script_url' => $_SERVER['PHP_SELF'],
|
'script_url' => $_SERVER['PHP_SELF'],
|
||||||
'upload_dir' => $conf->$element->dir_output . '/' . $fk_element . '/',
|
'upload_dir' => $conf->$element->dir_output . '/' . $object->ref . '/',
|
||||||
'upload_url' => DOL_URL_ROOT.'/document.php?modulepart='.$element.'&attachment=1&file=/'.$fk_element.'/',
|
'upload_url' => DOL_URL_ROOT.'/document.php?modulepart='.$element.'&attachment=1&file=/'.$object->ref.'/',
|
||||||
'param_name' => 'files',
|
'param_name' => 'files',
|
||||||
// The php.ini settings upload_max_filesize and post_max_size
|
// The php.ini settings upload_max_filesize and post_max_size
|
||||||
// take precedence over the following max_file_size setting:
|
// take precedence over the following max_file_size setting:
|
||||||
@@ -96,8 +125,8 @@ class UploadHandler
|
|||||||
),
|
),
|
||||||
*/
|
*/
|
||||||
'thumbs' => array(
|
'thumbs' => array(
|
||||||
'upload_dir' => $conf->$element->dir_output . '/' . $fk_element . '/thumbs/',
|
'upload_dir' => $conf->$element->dir_output . '/' . $object->ref . '/thumbs/',
|
||||||
'upload_url' => DOL_URL_ROOT.'/document.php?modulepart='.$element.'&attachment=1&file=/'.$fk_element.'/thumbs/'
|
'upload_url' => DOL_URL_ROOT.'/document.php?modulepart='.$element.'&attachment=1&file=/'.$object->ref.'/thumbs/'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -251,8 +280,7 @@ class UploadHandler
|
|||||||
FILE_APPEND
|
FILE_APPEND
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// FIXME problem with trigger
|
dol_move_uploaded_file($uploaded_file, $file_path, 1);
|
||||||
dol_move_uploaded_file($uploaded_file, $file_path, 1, 0, 0, 1);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Non-multipart uploads (PUT method support)
|
// Non-multipart uploads (PUT method support)
|
||||||
|
|||||||
@@ -87,8 +87,15 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
|
|||||||
}
|
}
|
||||||
else if (! empty($ext_element))
|
else if (! empty($ext_element))
|
||||||
{
|
{
|
||||||
dol_include_once('/'.$ext_element.'/class/actions_'.$ext_element.'.class.php');
|
$module = $subelement = $ext_element;
|
||||||
$classname = 'Actions'.ucfirst($ext_element);
|
if (preg_match('/^([^_]+)_([^_]+)/i',$ext_element,$regs))
|
||||||
|
{
|
||||||
|
$module = $regs[1];
|
||||||
|
$subelement = $regs[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
dol_include_once('/'.$module.'/class/actions_'.$subelement.'.class.php');
|
||||||
|
$classname = 'Actions'.ucfirst($subelement);
|
||||||
$object = new $classname($db);
|
$object = new $classname($db);
|
||||||
$ret = $object->$methodname();
|
$ret = $object->$methodname();
|
||||||
if ($ret > 0) echo json_encode($object->$cachename);
|
if ($ret > 0) echo json_encode($object->$cachename);
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
|
|||||||
$field = substr($field, 8); // remove prefix val_
|
$field = substr($field, 8); // remove prefix val_
|
||||||
$type = GETPOST('type','alpha',2);
|
$type = GETPOST('type','alpha',2);
|
||||||
$value = ($type == 'ckeditor' ? GETPOST('value','',2) : GETPOST('value','alpha',2));
|
$value = ($type == 'ckeditor' ? GETPOST('value','',2) : GETPOST('value','alpha',2));
|
||||||
|
$loadmethod = GETPOST('loadmethod','alpha',2);
|
||||||
$savemethod = GETPOST('savemethod','alpha',2);
|
$savemethod = GETPOST('savemethod','alpha',2);
|
||||||
$savemethodname = (! empty($savemethod) ? $savemethod : 'setValueFrom');
|
$savemethodname = (! empty($savemethod) ? $savemethod : 'setValueFrom');
|
||||||
|
|
||||||
@@ -104,9 +105,9 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
|
|||||||
}
|
}
|
||||||
else if ($type == 'select')
|
else if ($type == 'select')
|
||||||
{
|
{
|
||||||
$loadmethodname = 'load_cache_'.GETPOST('loadmethod','alpha');
|
$loadmethodname = 'load_cache_'.$loadmethod;
|
||||||
$loadcachename = 'cache_'.GETPOST('loadmethod','alpha');
|
$loadcachename = 'cache_'.$loadmethod;
|
||||||
$loadviewname = 'view_'.GETPOST('loadmethod','alpha');
|
$loadviewname = 'view_'.$loadmethod;
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
if (method_exists($form, $loadmethodname))
|
if (method_exists($form, $loadmethodname))
|
||||||
@@ -131,8 +132,15 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_include_once('/'.$ext_element.'/class/actions_'.$ext_element.'.class.php');
|
$module = $subelement = $ext_element;
|
||||||
$classname = 'Actions'.ucfirst($ext_element);
|
if (preg_match('/^([^_]+)_([^_]+)/i',$ext_element,$regs))
|
||||||
|
{
|
||||||
|
$module = $regs[1];
|
||||||
|
$subelement = $regs[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
dol_include_once('/'.$module.'/class/actions_'.$subelement.'.class.php');
|
||||||
|
$classname = 'Actions'.ucfirst($subelement);
|
||||||
$object = new $classname($db);
|
$object = new $classname($db);
|
||||||
$ret = $object->$loadmethodname();
|
$ret = $object->$loadmethodname();
|
||||||
if ($ret > 0)
|
if ($ret > 0)
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class box_produits extends ModeleBoxes
|
|||||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||||
'text' => $price);
|
'text' => $price);
|
||||||
|
|
||||||
$this->info_box_contents[$i][3] = array('td' => 'align="center" width="20" nowrap="nowrap"',
|
$this->info_box_contents[$i][3] = array('td' => 'align="left" nowrap="nowrap"',
|
||||||
'text' => $price_base_type);
|
'text' => $price_base_type);
|
||||||
|
|
||||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][4] = array('td' => 'align="right"',
|
||||||
|
|||||||
@@ -53,12 +53,25 @@ class Canvas
|
|||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
$this->actiontype = $actiontype;
|
$this->actiontype = $this->_cleanaction($actiontype);
|
||||||
if ($this->actiontype == 'add') $this->actiontype='create';
|
|
||||||
if ($this->actiontype == 'update') $this->actiontype='edit';
|
|
||||||
if (empty($this->actiontype) || $this->actiontype == 'delete' || $this->actiontype == 'create_user') $this->actiontype='view';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return action code cleaned
|
||||||
|
*
|
||||||
|
* @param string $action Action type ('create', 'view', 'edit', 'list', 'add', 'update')
|
||||||
|
* @return string Cleaned action type ('create', 'view', 'edit', 'list')
|
||||||
|
*/
|
||||||
|
private function _cleanaction($action)
|
||||||
|
{
|
||||||
|
$newaction = $action;
|
||||||
|
if ($newaction == 'add') $newaction='create';
|
||||||
|
if ($newaction == 'update') $newaction='edit';
|
||||||
|
if (empty($newaction) || $newaction == 'delete' || $newaction == 'create_user') $newaction='view';
|
||||||
|
return $newaction;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize properties: ->targetmodule, ->canvas, ->card, ->dirmodule, ->template_dir
|
* Initialize properties: ->targetmodule, ->canvas, ->card, ->dirmodule, ->template_dir
|
||||||
*
|
*
|
||||||
@@ -126,13 +139,13 @@ class Canvas
|
|||||||
* Return the template to display canvas (if it exists)
|
* Return the template to display canvas (if it exists)
|
||||||
*
|
*
|
||||||
* @param string $action Action code
|
* @param string $action Action code
|
||||||
* @return int 0=Canvas template file does not exist, 1=Canvas template file exists
|
* @return int 0=Canvas template file does not exist, 1=Canvas template file exists
|
||||||
*/
|
*/
|
||||||
function displayCanvasExists($action)
|
function displayCanvasExists($action)
|
||||||
{
|
{
|
||||||
if (empty($this->template_dir)) return 0;
|
if (empty($this->template_dir)) return 0;
|
||||||
|
|
||||||
if (file_exists($this->template_dir.($this->card?$this->card.'_':'').$this->actiontype.'.tpl.php')) return 1;
|
if (file_exists($this->template_dir.($this->card?$this->card.'_':'').$this->_cleanaction($action).'.tpl.php')) return 1;
|
||||||
else return 0;
|
else return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,7 +161,7 @@ class Canvas
|
|||||||
global $db, $conf, $langs, $user, $canvas;
|
global $db, $conf, $langs, $user, $canvas;
|
||||||
global $form, $formfile;
|
global $form, $formfile;
|
||||||
|
|
||||||
include($this->template_dir.($this->card?$this->card.'_':'').$this->actiontype.'.tpl.php'); // Include native PHP template
|
include($this->template_dir.($this->card?$this->card.'_':'').$this->_cleanaction($action).'.tpl.php'); // Include native PHP template
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$tab=array();
|
$tab=array();
|
||||||
|
|
||||||
$sql = "SELECT ec.rowid, ec.statut, ec.fk_socpeople as id";
|
$sql = "SELECT ec.rowid, ec.statut, ec.fk_socpeople as id"; // This field contains id of llx_socpeople or id of llx_user
|
||||||
if ($source == 'internal') $sql.=", '-1' as socid";
|
if ($source == 'internal') $sql.=", '-1' as socid";
|
||||||
if ($source == 'external' || $source == 'thirdparty') $sql.=", t.fk_soc as socid";
|
if ($source == 'external' || $source == 'thirdparty') $sql.=", t.fk_soc as socid";
|
||||||
$sql.= ", t.civilite as civility, t.name as lastname, t.firstname, t.email";
|
$sql.= ", t.civilite as civility, t.name as lastname, t.firstname, t.email";
|
||||||
@@ -544,7 +544,7 @@ abstract class CommonObject
|
|||||||
$this->thirdparty = $thirdparty;
|
$this->thirdparty = $thirdparty;
|
||||||
|
|
||||||
// Use first price level if level not defined for third party
|
// Use first price level if level not defined for third party
|
||||||
if ($conf->global->PRODUIT_MULTIPRICES && empty($this->thirdparty->price_level))
|
if (! empty($conf->global->PRODUIT_MULTIPRICES) && empty($this->thirdparty->price_level))
|
||||||
{
|
{
|
||||||
$this->client->price_level=1; // deprecated
|
$this->client->price_level=1; // deprecated
|
||||||
$this->thirdparty->price_level=1;
|
$this->thirdparty->price_level=1;
|
||||||
@@ -1645,7 +1645,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$sourceid = (! empty($sourceid) ? $sourceid : $this->id);
|
$sourceid = (! empty($sourceid) ? $sourceid : $this->id);
|
||||||
$targetid = (! empty($targetid) ? $targetid : $this->id);
|
$targetid = (! empty($targetid) ? $targetid : $this->id);
|
||||||
$sourcetype = (! empty($sourcetype) ? $sourcetype : (! empty($this->origin) ? $this->origin : $this->element));
|
$sourcetype = (! empty($sourcetype) ? $sourcetype : $this->element);
|
||||||
$targettype = (! empty($targettype) ? $targettype : $this->element);
|
$targettype = (! empty($targettype) ? $targettype : $this->element);
|
||||||
|
|
||||||
// Links beetween objects are stored in this table
|
// Links beetween objects are stored in this table
|
||||||
@@ -1846,8 +1846,11 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
$fieldstatus="fk_statut";
|
||||||
|
if ($elementTable == 'user') $fieldstatus="statut";
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$elementTable;
|
$sql = "UPDATE ".MAIN_DB_PREFIX.$elementTable;
|
||||||
$sql.= " SET fk_statut = ".$status;
|
$sql.= " SET ".$fieldstatus." = ".$status;
|
||||||
$sql.= " WHERE rowid=".$elementId;
|
$sql.= " WHERE rowid=".$elementId;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::setStatut sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::setStatut sql=".$sql, LOG_DEBUG);
|
||||||
@@ -2279,6 +2282,9 @@ abstract class CommonObject
|
|||||||
if ($objecttype == 'member') {
|
if ($objecttype == 'member') {
|
||||||
$classpath = 'adherents/class'; $module='adherent'; $subelement='adherent';
|
$classpath = 'adherents/class'; $module='adherent'; $subelement='adherent';
|
||||||
}
|
}
|
||||||
|
if ($objecttype == 'cabinetmed_cons') {
|
||||||
|
$classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons';
|
||||||
|
}
|
||||||
|
|
||||||
//print "objecttype=".$objecttype." module=".$module." subelement=".$subelement;
|
//print "objecttype=".$objecttype." module=".$module." subelement=".$subelement;
|
||||||
|
|
||||||
@@ -2290,13 +2296,15 @@ abstract class CommonObject
|
|||||||
$classfile = 'fournisseur.commande'; $classname='CommandeFournisseur';
|
$classfile = 'fournisseur.commande'; $classname='CommandeFournisseur';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->$module->enabled)
|
if (! empty($conf->$module->enabled))
|
||||||
{
|
{
|
||||||
dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
|
$res=dol_include_once('/'.$classpath.'/'.$classfile.'.class.php');
|
||||||
|
if ($res)
|
||||||
$object = new $classname($this->db);
|
{
|
||||||
$ret=$object->fetch($objectid);
|
$object = new $classname($this->db);
|
||||||
if ($ret > 0) return $object->getNomUrl($withpicto,$option);
|
$ret=$object->fetch($objectid);
|
||||||
|
if ($ret > 0) return $object->getNomUrl($withpicto,$option);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class Conf
|
|||||||
$this->syslog = (object) array();
|
$this->syslog = (object) array();
|
||||||
$this->browser = (object) array();
|
$this->browser = (object) array();
|
||||||
$this->multicompany = (object) array();
|
$this->multicompany = (object) array();
|
||||||
|
|
||||||
// First level object
|
// First level object
|
||||||
$this->expedition_bon = (object) array();
|
$this->expedition_bon = (object) array();
|
||||||
$this->livraison_bon = (object) array();
|
$this->livraison_bon = (object) array();
|
||||||
@@ -111,7 +111,7 @@ class Conf
|
|||||||
$this->bank = (object) array();
|
$this->bank = (object) array();
|
||||||
$this->notification = (object) array();
|
$this->notification = (object) array();
|
||||||
$this->mailing = (object) array();
|
$this->mailing = (object) array();
|
||||||
|
|
||||||
//! Charset for HTML output and for storing data in memory
|
//! Charset for HTML output and for storing data in memory
|
||||||
$this->file->character_set_client='UTF-8'; // UTF-8, ISO-8859-1
|
$this->file->character_set_client='UTF-8'; // UTF-8, ISO-8859-1
|
||||||
}
|
}
|
||||||
@@ -207,12 +207,12 @@ class Conf
|
|||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
//var_dump($this->modules);
|
//var_dump($this->modules);
|
||||||
//var_dump($this->modules_parts);
|
//var_dump($this->modules_parts);
|
||||||
|
|
||||||
// Object $mc
|
// Object $mc
|
||||||
if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled))
|
if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled))
|
||||||
{
|
{
|
||||||
@@ -220,7 +220,7 @@ class Conf
|
|||||||
$ret = @dol_include_once('/multicompany/class/actions_multicompany.class.php');
|
$ret = @dol_include_once('/multicompany/class/actions_multicompany.class.php');
|
||||||
if ($ret) $mc = new ActionsMulticompany($db);
|
if ($ret) $mc = new ActionsMulticompany($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Second or others levels object
|
// Second or others levels object
|
||||||
$this->propal->cloture = (object) array();
|
$this->propal->cloture = (object) array();
|
||||||
$this->propal->facturation = (object) array();
|
$this->propal->facturation = (object) array();
|
||||||
@@ -289,7 +289,7 @@ class Conf
|
|||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
$this->user->dir_output=$rootforuser."/users";
|
$this->user->dir_output=$rootforuser."/users";
|
||||||
$this->user->dir_temp=$rootforuser."/users/temp";
|
$this->user->dir_temp=$rootforuser."/users/temp";
|
||||||
|
|
||||||
// For propal storage
|
// For propal storage
|
||||||
$this->propal->dir_output=$rootforuser."/propale";
|
$this->propal->dir_output=$rootforuser."/propale";
|
||||||
$this->propal->dir_temp=$rootforuser."/propale/temp";
|
$this->propal->dir_temp=$rootforuser."/propale/temp";
|
||||||
@@ -307,7 +307,7 @@ class Conf
|
|||||||
$this->fournisseur->commande->dir_temp =$rootfordata."/fournisseur/commande/temp";
|
$this->fournisseur->commande->dir_temp =$rootfordata."/fournisseur/commande/temp";
|
||||||
$this->fournisseur->facture->dir_output =$rootfordata."/fournisseur/facture";
|
$this->fournisseur->facture->dir_output =$rootfordata."/fournisseur/facture";
|
||||||
$this->fournisseur->facture->dir_temp =$rootfordata."/fournisseur/facture/temp";
|
$this->fournisseur->facture->dir_temp =$rootfordata."/fournisseur/facture/temp";
|
||||||
|
|
||||||
// Module product/service
|
// Module product/service
|
||||||
$this->product->multidir_output=array($this->entity => $rootfordata."/produit");
|
$this->product->multidir_output=array($this->entity => $rootfordata."/produit");
|
||||||
$this->product->multidir_temp =array($this->entity => $rootfordata."/produit/temp");
|
$this->product->multidir_temp =array($this->entity => $rootfordata."/produit/temp");
|
||||||
@@ -318,7 +318,7 @@ class Conf
|
|||||||
$this->product->dir_temp =$rootfordata."/produit/temp";
|
$this->product->dir_temp =$rootfordata."/produit/temp";
|
||||||
$this->service->dir_output=$rootfordata."/produit";
|
$this->service->dir_output=$rootfordata."/produit";
|
||||||
$this->service->dir_temp =$rootfordata."/produit/temp";
|
$this->service->dir_temp =$rootfordata."/produit/temp";
|
||||||
|
|
||||||
// Module contrat
|
// Module contrat
|
||||||
$this->contrat->dir_output=$rootfordata."/contracts";
|
$this->contrat->dir_output=$rootfordata."/contracts";
|
||||||
$this->contrat->dir_temp =$rootfordata."/contracts/temp";
|
$this->contrat->dir_temp =$rootfordata."/contracts/temp";
|
||||||
@@ -414,11 +414,11 @@ class Conf
|
|||||||
$this->bank->cheque->warning_delay=(isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT)?$this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT:0)*24*60*60;
|
$this->bank->cheque->warning_delay=(isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT)?$this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT:0)*24*60*60;
|
||||||
|
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
$this->produit=$this->product;
|
if (isset($this->product)) $this->produit=$this->product;
|
||||||
$this->invoice=$this->facture;
|
if (isset($this->facture)) $this->invoice=$this->facture;
|
||||||
$this->order=$this->commande;
|
if (isset($this->commande)) $this->order=$this->commande;
|
||||||
$this->contract=$this->contrat;
|
if (isset($this->contrat)) $this->contract=$this->contrat;
|
||||||
$this->category=$this->categorie;
|
if (isset($this->categorie)) $this->category=$this->categorie;
|
||||||
|
|
||||||
|
|
||||||
// Define menu manager in setup
|
// Define menu manager in setup
|
||||||
@@ -435,7 +435,7 @@ class Conf
|
|||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
if ($this->top_menu == 'eldy.php') $this->top_menu='eldy_backoffice.php';
|
if ($this->top_menu == 'eldy.php') $this->top_menu='eldy_backoffice.php';
|
||||||
elseif ($this->top_menu == 'rodolphe.php') $this->top_menu='eldy_backoffice.php';
|
elseif ($this->top_menu == 'rodolphe.php') $this->top_menu='eldy_backoffice.php';
|
||||||
|
|
||||||
// Object $mc
|
// Object $mc
|
||||||
if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled))
|
if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ class DolEditor
|
|||||||
/* should be editor=CKEDITOR.replace but what if serveral editors ? */
|
/* should be editor=CKEDITOR.replace but what if serveral editors ? */
|
||||||
CKEDITOR.replace(\''.$this->htmlname.'\',
|
CKEDITOR.replace(\''.$this->htmlname.'\',
|
||||||
{
|
{
|
||||||
customConfig : \''.dol_buildpath('/theme/'.$conf->theme.'/ckeditor/config.js',1).'\',
|
customConfig : ckeditorConfig,
|
||||||
toolbar: \''.$this->toolbarname.'\',
|
toolbar: \''.$this->toolbarname.'\',
|
||||||
toolbarStartupExpanded: '.($this->toolbarstartexpanded ? 'true' : 'false').',
|
toolbarStartupExpanded: '.($this->toolbarstartexpanded ? 'true' : 'false').',
|
||||||
width: '.($this->width ? '\''.$this->width.'\'' : '\'\'').',
|
width: '.($this->width ? '\''.$this->width.'\'' : '\'\'').',
|
||||||
@@ -201,8 +201,8 @@ class DolEditor
|
|||||||
{
|
{
|
||||||
$out.= ','."\n";
|
$out.= ','."\n";
|
||||||
// To use filemanager with old fckeditor (GPL)
|
// To use filemanager with old fckeditor (GPL)
|
||||||
$out.= ' filebrowserBrowseUrl : \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\',';
|
$out.= ' filebrowserBrowseUrl : ckeditorFilebrowserBrowseUrl,';
|
||||||
$out.= ' filebrowserImageBrowseUrl : \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Type=Image&Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\',';
|
$out.= ' filebrowserImageBrowseUrl : ckeditorFilebrowserImageBrowseUrl,';
|
||||||
//$out.= ' filebrowserUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=File\',';
|
//$out.= ' filebrowserUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=File\',';
|
||||||
//$out.= ' filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=Image\',';
|
//$out.= ' filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=Image\',';
|
||||||
$out.= "\n";
|
$out.= "\n";
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
class HookManager
|
class HookManager
|
||||||
{
|
{
|
||||||
var $db;
|
var $db;
|
||||||
|
var $error;
|
||||||
|
var $errors=array();
|
||||||
|
|
||||||
// Context hookmanager was created for ('thirdpartycard', 'thirdpartydao', ...)
|
// Context hookmanager was created for ('thirdpartycard', 'thirdpartydao', ...)
|
||||||
var $contextarray=array();
|
var $contextarray=array();
|
||||||
@@ -148,7 +150,7 @@ class HookManager
|
|||||||
$resaction+=$actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
|
$resaction+=$actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
|
||||||
if ($resaction < 0 || ! empty($actionclassinstance->error) || (! empty($actionclassinstance->errors) && count($actionclassinstance->errors) > 0))
|
if ($resaction < 0 || ! empty($actionclassinstance->error) || (! empty($actionclassinstance->errors) && count($actionclassinstance->errors) > 0))
|
||||||
{
|
{
|
||||||
$this->error=$actionclassinstance->error; $this->errors=$actionclassinstance->errors;
|
$this->error=$actionclassinstance->error; $this->errors=array_merge($this->errors, (array) $actionclassinstance->errors);
|
||||||
if ($method == 'doActions')
|
if ($method == 'doActions')
|
||||||
{
|
{
|
||||||
if ($action=='add') $action='create'; // TODO this change must be inside the doActions
|
if ($action=='add') $action='create'; // TODO this change must be inside the doActions
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user